:root {
  --bg: #0a1628;
  --bg2: #0f1f3d;
  --bg3: #162440;
  --surface: #1a2d52;
  --surface2: #1f3461;
  --border: rgba(255,255,255,0.08);
  --border2: rgba(255,255,255,0.14);
  --text: #f0f4ff;
  --text2: #8fa3cc;
  --text3: #5a7299;
  --green: #00d68f;
  --green-dim: rgba(0,214,143,0.12);
  --red: #ff6b6b;
  --red-dim: rgba(255,107,107,0.12);
  --blue: #4d9fff;
  --blue-dim: rgba(77,159,255,0.12);
  --amber: #ffb84d;
  --amber-dim: rgba(255,184,77,0.12);
  --purple: #a78bfa;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --nav-h: 64px;
  --topbar-h: 56px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  overflow: hidden;
}

#app { height: 100dvh; position: relative; overflow: hidden; }

/* ── SCREENS ── */
.screen { position: absolute; inset: 0; display: none; overflow-y: auto; }
.screen.active { display: flex; flex-direction: column; }

/* ── AUTH ── */
.auth-bg {
  position: fixed; inset: 0; z-index: 0; overflow: hidden;
  background: linear-gradient(135deg, #0a1628 0%, #0d1f3c 50%, #111827 100%);
}
.auth-orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: 0.3; animation: float 8s ease-in-out infinite;
}
.orb1 { width: 400px; height: 400px; background: #1e40af; top: -100px; left: -100px; }
.orb2 { width: 300px; height: 300px; background: #065f46; bottom: 0; right: -50px; animation-delay: -3s; }
.orb3 { width: 200px; height: 200px; background: #4c1d95; top: 40%; left: 40%; animation-delay: -5s; }
@keyframes float {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(20px, -20px) scale(1.05); }
}

.auth-container {
  position: relative; z-index: 1; width: 100%; max-width: 400px;
  margin: auto; padding: 2rem 1.5rem; display: flex; flex-direction: column; gap: 1.25rem;
}

.auth-logo { display: flex; align-items: center; gap: 12px; }
.logo-icon {
  width: 48px; height: 48px; background: linear-gradient(135deg, #1e40af, #065f46);
  border-radius: 14px; display: grid; place-items: center;
  box-shadow: 0 4px 20px rgba(30,64,175,0.4);
}
.logo-icon.small { width: 36px; height: 36px; border-radius: 10px; font-size: 18px; }
.logo-text { font-family: var(--font-head); font-size: 26px; font-weight: 800; color: var(--text); }
.logo-text span { color: var(--green); }
.auth-tagline { color: var(--text2); font-size: 14px; }

.auth-tabs { display: flex; background: var(--surface); border-radius: var(--radius-sm); padding: 4px; gap: 4px; }
.auth-tab {
  flex: 1; padding: 8px; border: none; background: transparent;
  color: var(--text2); border-radius: 7px; cursor: pointer; font-family: var(--font-body);
  font-size: 14px; font-weight: 500; transition: all 0.2s;
}
.auth-tab.active { background: var(--surface2); color: var(--text); }

.auth-error {
  background: var(--red-dim); border: 1px solid var(--red);
  color: var(--red); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px;
}
.auth-divider { text-align: center; color: var(--text3); font-size: 13px; position: relative; }
.auth-divider::before, .auth-divider::after {
  content: ''; position: absolute; top: 50%; width: 35%; height: 1px; background: var(--border2);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

/* ── SETUP ── */
.setup-container {
  padding: 2rem 1.5rem; display: flex; flex-direction: column; gap: 1.5rem; max-width: 440px; margin: auto;
}
.setup-header { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 1rem 0; }
.setup-header h2 { font-family: var(--font-head); font-size: 22px; }
.setup-header p { color: var(--text2); font-size: 14px; }
.setup-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.setup-card {
  background: var(--surface); border: 1px solid var(--border2); border-radius: var(--radius);
  padding: 1.5rem 1rem; text-align: center; cursor: pointer; transition: all 0.2s; display: flex; flex-direction: column; gap: 8px;
}
.setup-card:hover { background: var(--surface2); border-color: var(--blue); }
.setup-card-icon { font-size: 32px; }
.setup-card h3 { font-family: var(--font-head); font-size: 16px; }
.setup-card p { color: var(--text2); font-size: 12px; line-height: 1.4; }

/* ── MAIN LAYOUT ── */
#screen-main { flex-direction: column; overflow: hidden; }
.topbar {
  height: var(--topbar-h); background: var(--bg2); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 1rem;
  flex-shrink: 0; z-index: 100; position: relative;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.menu-btn {
  width: 36px; height: 36px; background: transparent; border: none; cursor: pointer;
  display: flex; flex-direction: column; gap: 5px; align-items: center; justify-content: center;
}
.menu-btn span { display: block; width: 20px; height: 2px; background: var(--text2); border-radius: 2px; transition: 0.2s; }
.topbar-family { font-family: var(--font-head); font-size: 16px; font-weight: 700; color: var(--text); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--purple));
  display: grid; place-items: center; font-weight: 700; font-size: 14px; cursor: pointer;
}

/* ── SIDEBAR ── */
.sidebar-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 200; display: none; backdrop-filter: blur(4px);
}
.sidebar-overlay.open { display: block; }
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: 260px; background: var(--bg2);
  border-right: 1px solid var(--border); z-index: 201; transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column;
}
.sidebar.open { transform: translateX(0); }
.sidebar-header { padding: 1.25rem 1rem; border-bottom: 1px solid var(--border); }
.sidebar-logo { font-family: var(--font-head); font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.sidebar-family { font-size: 12px; color: var(--text3); }
.sidebar-menu { flex: 1; padding: 0.75rem 0; overflow-y: auto; }
.sidebar-item {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 1rem;
  background: transparent; border: none; color: var(--text2); font-family: var(--font-body);
  font-size: 14px; cursor: pointer; text-align: left; transition: all 0.15s; border-radius: 0;
}
.sidebar-item:hover { background: var(--surface); color: var(--text); }
.sidebar-item.active { background: var(--green-dim); color: var(--green); border-right: 3px solid var(--green); }
.sidebar-item.danger { color: var(--red); }
.sidebar-item.danger:hover { background: var(--red-dim); }
.si-icon { font-size: 17px; width: 24px; text-align: center; }
.sidebar-footer { border-top: 1px solid var(--border); padding: 0.5rem 0; }

/* ── MAIN CONTENT ── */
.main-content {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding-bottom: calc(var(--nav-h) + 16px);
  -webkit-overflow-scrolling: touch;
}
.page { display: none; padding: 1rem; animation: fadeUp 0.25s ease; }
.page.active { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── BOTTOM NAV ── */
.bottom-nav {
  height: var(--nav-h); background: var(--bg2); border-top: 1px solid var(--border);
  display: flex; align-items: stretch; flex-shrink: 0; padding-bottom: env(safe-area-inset-bottom);
}
.bn-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; background: transparent; border: none; cursor: pointer; color: var(--text3);
  transition: color 0.15s; padding: 8px 4px;
}
.bn-item.active { color: var(--green); }
.bn-icon { font-size: 20px; line-height: 1; }
.bn-label { font-size: 10px; font-weight: 500; }

/* ── PAGE HEADER ── */
.page-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem;
}
.page-header h2 { font-family: var(--font-head); font-size: 22px; font-weight: 800; }
.page-subtitle { color: var(--text2); font-size: 13px; margin-top: 2px; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin: 1.25rem 0 0.75rem;
}
.section-header h3, .section-title { font-family: var(--font-head); font-size: 15px; font-weight: 700; color: var(--text2); }
.link-btn { background: transparent; border: none; color: var(--green); font-size: 13px; cursor: pointer; }

/* ── CARDS ── */
.wealth-card {
  background: linear-gradient(135deg, #0f3460, #1a4a7a);
  border: 1px solid rgba(77,159,255,0.3); border-radius: var(--radius);
  padding: 1.5rem; margin-bottom: 1rem; text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.wealth-label { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--text2); margin-bottom: 8px; }
.wealth-amount { font-family: var(--font-head); font-size: 40px; font-weight: 800; color: var(--text); line-height: 1; }
.wealth-sub { color: var(--text3); font-size: 12px; margin-top: 6px; }

.stats-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 0.5rem; }
.stat-card { background: var(--surface); border-radius: var(--radius-sm); padding: 1rem; border: 1px solid var(--border); }
.stat-card.income { border-left: 3px solid var(--green); }
.stat-card.expense { border-left: 3px solid var(--red); }
.stat-label { font-size: 11px; color: var(--text3); margin-bottom: 6px; }
.stat-amount { font-family: var(--font-head); font-size: 20px; font-weight: 700; }
.stat-card.income .stat-amount { color: var(--green); }
.stat-card.expense .stat-amount { color: var(--red); }

.family-balance-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem; margin-bottom: 1rem; display: flex; align-items: center; justify-content: space-between;
}
.fbc-label { font-size: 13px; color: var(--text2); }
.fbc-amount { font-family: var(--font-head); font-size: 24px; font-weight: 800; color: var(--green); }

/* ── ACCOUNTS LIST ── */
.accounts-list { display: flex; flex-direction: column; gap: 10px; }
.account-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem; display: flex; align-items: center; gap: 12px;
}
.acc-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.acc-info { flex: 1; }
.acc-name { font-weight: 600; font-size: 15px; }
.acc-bank { font-size: 12px; color: var(--text3); margin-top: 2px; }
.acc-balance { font-family: var(--font-head); font-size: 18px; font-weight: 700; color: var(--green); }
.acc-private { font-size: 10px; background: var(--amber-dim); color: var(--amber); border-radius: 4px; padding: 2px 6px; margin-left: 6px; }

/* ── TRANSACTIONS ── */
.transaction-list { display: flex; flex-direction: column; gap: 8px; }
.tx-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px; display: flex; align-items: center; gap: 12px;
}
.tx-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.tx-info { flex: 1; min-width: 0; }
.tx-desc { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-meta { font-size: 11px; color: var(--text3); margin-top: 2px; }
.tx-amount { font-family: var(--font-head); font-size: 16px; font-weight: 700; }
.tx-amount.expense { color: var(--red); }
.tx-amount.income { color: var(--green); }

.filter-bar { display: flex; gap: 8px; margin-bottom: 1rem; }
.filter-btn {
  padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border2);
  background: transparent; color: var(--text2); font-size: 13px; cursor: pointer; font-family: var(--font-body);
}
.filter-btn.active { background: var(--green-dim); border-color: var(--green); color: var(--green); }

/* ── SHOPPING ── */
.shopping-lists-container { display: flex; flex-direction: column; gap: 12px; }
.shopping-list-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.slc-header {
  padding: 1rem; display: flex; align-items: center; justify-content: space-between; cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.slc-title { font-family: var(--font-head); font-size: 16px; font-weight: 700; }
.slc-meta { font-size: 12px; color: var(--text3); margin-top: 2px; }
.slc-progress { font-size: 12px; color: var(--green); }
.slc-body { padding: 0.75rem; }
.slc-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 4px;
  border-bottom: 1px solid var(--border); cursor: pointer;
}
.slc-item:last-child { border-bottom: none; }
.slc-item.checked .slc-item-name { text-decoration: line-through; color: var(--text3); }
.slc-item-name { flex: 1; font-size: 14px; }
.slc-item-qty { font-size: 12px; color: var(--text3); }
.slc-add-row { display: flex; gap: 8px; margin-top: 8px; }
.slc-add-row input { flex: 1; }
.shopping-preview { display: flex; flex-direction: column; gap: 8px; }
.sp-item { background: var(--surface); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px; }

/* ── BILLS ── */
.bills-list { display: flex; flex-direction: column; gap: 10px; }
.bill-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem; display: flex; align-items: center; gap: 12px;
}
.bill-item.overdue { border-left: 3px solid var(--red); }
.bill-item.soon { border-left: 3px solid var(--amber); }
.bill-icon { font-size: 28px; flex-shrink: 0; }
.bill-info { flex: 1; }
.bill-name { font-weight: 600; font-size: 15px; }
.bill-due { font-size: 12px; color: var(--text3); margin-top: 2px; }
.bill-due.overdue-text { color: var(--red); }
.bill-due.soon-text { color: var(--amber); }
.bill-amount { font-family: var(--font-head); font-size: 18px; font-weight: 700; }
.bill-paid-btn {
  padding: 6px 12px; border-radius: 8px; border: 1px solid var(--green);
  background: var(--green-dim); color: var(--green); font-size: 12px; cursor: pointer; font-family: var(--font-body);
}

/* ── REPORTS ── */
.report-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 1.25rem; }
.rs-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.75rem; text-align: center; }
.rs-card.green { border-top: 3px solid var(--green); }
.rs-card.red { border-top: 3px solid var(--red); }
.rs-card.blue { border-top: 3px solid var(--blue); }
.rs-label { font-size: 11px; color: var(--text3); margin-bottom: 4px; }
.rs-amount { font-family: var(--font-head); font-size: 16px; font-weight: 700; }
.rs-card.green .rs-amount { color: var(--green); }
.rs-card.red .rs-amount { color: var(--red); }
.rs-card.blue .rs-amount { color: var(--blue); }

.category-report { display: flex; flex-direction: column; gap: 8px; }
.cat-row { background: var(--surface); border-radius: var(--radius-sm); padding: 10px 12px; }
.cat-row-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.cat-name { font-size: 13px; }
.cat-amount { font-size: 13px; font-weight: 600; color: var(--red); }
.cat-bar-bg { height: 4px; background: var(--border); border-radius: 2px; }
.cat-bar { height: 4px; background: var(--red); border-radius: 2px; transition: width 0.5s ease; }

/* ── FAMILY ── */
.invite-card {
  background: linear-gradient(135deg, var(--surface), var(--surface2));
  border: 1px solid var(--border2); border-radius: var(--radius);
  padding: 1.25rem; text-align: center; margin-bottom: 1.25rem; display: flex; flex-direction: column; gap: 10px;
}
.invite-label { font-size: 12px; color: var(--text2); text-transform: uppercase; letter-spacing: 1px; }
.invite-code { font-family: var(--font-head); font-size: 28px; font-weight: 800; color: var(--green); letter-spacing: 4px; }
.family-members-list { display: flex; flex-direction: column; gap: 10px; }
.member-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem; display: flex; align-items: center; gap: 12px;
}
.member-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  display: grid; place-items: center; font-weight: 700; font-size: 16px; flex-shrink: 0;
}
.member-info { flex: 1; }
.member-name { font-weight: 600; font-size: 15px; }
.member-email { font-size: 12px; color: var(--text3); }
.member-role-badge {
  font-size: 11px; padding: 3px 8px; border-radius: 6px;
  background: var(--blue-dim); color: var(--blue);
}
.member-role-badge.admin { background: var(--green-dim); color: var(--green); }

/* ── PROFILE ── */
.profile-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.profile-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  display: grid; place-items: center; font-size: 28px; font-weight: 700;
}
.profile-name { font-family: var(--font-head); font-size: 22px; font-weight: 800; }
.profile-email { font-size: 14px; color: var(--text2); }
.badge {
  font-size: 12px; padding: 4px 12px; border-radius: 8px;
  background: var(--green-dim); color: var(--green);
}

/* ── INPUTS ── */
.input-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.input-group label { font-size: 12px; color: var(--text2); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], select, textarea {
  background: var(--surface); border: 1px solid var(--border2); border-radius: var(--radius-sm);
  color: var(--text); font-family: var(--font-body); font-size: 15px; padding: 12px 14px; width: 100%;
  outline: none; transition: border-color 0.2s; -webkit-appearance: none; appearance: none;
}
input:focus, select:focus { border-color: var(--blue); }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238fa3cc' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.select-inline { background: var(--surface); border: 1px solid var(--border2); border-radius: 8px; color: var(--text); font-size: 13px; padding: 6px 28px 6px 10px; }

.toggle-group { flex-direction: row; align-items: center; justify-content: space-between; }
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0; background: var(--surface2);
  border-radius: 24px; transition: 0.2s;
}
.toggle-slider::before {
  content: ''; position: absolute; width: 18px; height: 18px; left: 3px; bottom: 3px;
  background: white; border-radius: 50%; transition: 0.2s;
}
input:checked + .toggle-slider { background: var(--green); }
input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ── COLOR PICKER ── */
.color-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.color-swatch {
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer; border: 2px solid transparent;
  transition: transform 0.15s;
}
.color-swatch.selected { border-color: white; transform: scale(1.2); }

.icon-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.icon-opt {
  width: 36px; height: 36px; border-radius: 8px; background: var(--surface2);
  display: grid; place-items: center; font-size: 18px; cursor: pointer; border: 2px solid transparent;
}
.icon-opt.selected { border-color: var(--blue); }

.type-toggle { display: flex; gap: 8px; margin-bottom: 14px; }
.type-btn {
  flex: 1; padding: 10px; border-radius: 10px; border: 1px solid var(--border2);
  background: transparent; color: var(--text2); font-size: 13px; cursor: pointer; font-family: var(--font-body);
}
.type-btn.active.expense-btn { background: var(--red-dim); border-color: var(--red); color: var(--red); }
.type-btn.active.income-btn { background: var(--green-dim); border-color: var(--green); color: var(--green); }

/* ── BUTTONS ── */
.btn-primary {
  background: linear-gradient(135deg, #1e40af, #065f46); color: white;
  border: none; border-radius: var(--radius-sm); padding: 13px 20px;
  font-family: var(--font-body); font-size: 15px; font-weight: 600; cursor: pointer;
  transition: opacity 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary:hover { opacity: 0.9; }
.btn-secondary {
  background: var(--surface2); color: var(--text); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); padding: 12px 20px;
  font-family: var(--font-body); font-size: 14px; cursor: pointer;
}
.btn-ghost {
  background: transparent; color: var(--text2); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); padding: 12px 20px;
  font-family: var(--font-body); font-size: 14px; cursor: pointer;
}
.btn-full { width: 100%; }
.btn-icon {
  width: 36px; height: 36px; border-radius: 50%; background: var(--green);
  border: none; color: #000; font-size: 22px; cursor: pointer; display: grid; place-items: center;
  font-weight: 700; flex-shrink: 0;
}
.btn-loader {
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white; border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── MODALS ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 300;
  display: none; backdrop-filter: blur(4px);
}
.modal-overlay.open { display: block; }
.modal {
  position: fixed; bottom: 0; left: 0; right: 0; max-height: 90dvh;
  background: var(--bg2); border-radius: 24px 24px 0 0; z-index: 301;
  transform: translateY(100%); transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column;
}
.modal.open { transform: translateY(0); }
.modal::before {
  content: ''; display: block; width: 40px; height: 4px; border-radius: 2px;
  background: var(--border2); margin: 12px auto 0;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem 0.5rem;
}
.modal-header h3 { font-family: var(--font-head); font-size: 18px; font-weight: 700; }
.modal-close { background: transparent; border: none; color: var(--text2); font-size: 18px; cursor: pointer; }
.modal-body { padding: 0.75rem 1.25rem; overflow-y: auto; flex: 1; }
.modal-footer { padding: 1rem 1.25rem; display: flex; gap: 10px; border-top: 1px solid var(--border); padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
.modal-footer .btn-secondary { flex: 1; }
.modal-footer .btn-primary { flex: 2; }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: calc(var(--nav-h) + 16px); left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--surface2); color: var(--text); border-radius: 100px; padding: 10px 20px;
  font-size: 14px; z-index: 400; opacity: 0; transition: all 0.3s; white-space: nowrap;
  border: 1px solid var(--border2); pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center; color: var(--text3); font-size: 13px; padding: 2rem 1rem; line-height: 1.6;
}
