/* ============================================================
   FinanceFlow — Main Stylesheet
   Design: Refined luxury finance aesthetic
   Fonts: Syne (headings) + DM Sans (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');

/* ── CSS Variables ────────────────────────────────────────── */
:root {
  /* Brand */
  --accent:       #00d4aa;
  --accent-dim:   #00b894;
  --accent-glow:  rgba(0,212,170,.18);
  --danger:       #ff6b6b;
  --warning:      #ffa947;
  --success:      #00d4aa;
  --info:         #4b9fff;

  /* Light theme */
  --bg:           #f4f6fb;
  --surface:      #ffffff;
  --surface-2:    #f0f2f8;
  --border:       #e2e6f0;
  --text-primary: #111827;
  --text-muted:   #6b7280;
  --shadow:       0 2px 12px rgba(0,0,0,.07);
  --shadow-lg:    0 8px 32px rgba(0,0,0,.10);
  --sidebar-bg:   #0f172a;
  --sidebar-text: rgba(255,255,255,.75);
  --sidebar-active:#00d4aa;
}

[data-theme="dark"] {
  --bg:           #0c1220;
  --surface:      #151e2e;
  --surface-2:    #1c2840;
  --border:       #243049;
  --text-primary: #e8edf5;
  --text-muted:   #7b8eaa;
  --shadow:       0 2px 12px rgba(0,0,0,.30);
  --shadow-lg:    0 8px 32px rgba(0,0,0,.40);
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  transition: background .3s, color .3s;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ── Auth Pages ──────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sidebar-bg);
  position: relative;
  overflow: hidden;
}
.auth-page::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,212,170,.12) 0%, transparent 70%);
  top: -150px; left: -150px;
  pointer-events: none;
}
.auth-page::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(75,159,255,.10) 0%, transparent 70%);
  bottom: -100px; right: -100px;
  pointer-events: none;
}
.auth-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(24px);
  border-radius: 20px;
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  animation: fadeUp .5s ease both;
}
.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}
.auth-logo .logo-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 8px;
}
.auth-logo h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.75rem;
  color: #fff;
  letter-spacing: -.5px;
}
.auth-logo span { color: var(--accent); }
.auth-logo p { color: rgba(255,255,255,.5); font-size: .875rem; margin-top: 4px; }
.auth-tabs {
  display: flex;
  background: rgba(255,255,255,.05);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 28px;
}
.auth-tab {
  flex: 1;
  padding: 8px;
  text-align: center;
  font-size: .875rem;
  font-weight: 500;
  color: rgba(255,255,255,.5);
  cursor: pointer;
  border-radius: 8px;
  transition: all .2s;
}
.auth-tab.active { background: var(--accent); color: #0f172a; font-weight: 600; }

/* ── Form Elements ───────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.form-control {
  width: 100%;
  padding: 11px 14px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: .9rem;
  transition: border .2s, box-shadow .2s;
  outline: none;
}
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.auth-card .form-control {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.12);
  color: #fff;
}
.auth-card .form-control::placeholder { color: rgba(255,255,255,.3); }
.auth-card .form-control:focus { border-color: var(--accent); }
.auth-card label { color: rgba(255,255,255,.55); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  outline: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #0f172a;
}
.btn-primary:hover { background: var(--accent-dim); transform: translateY(-1px); box-shadow: 0 4px 16px var(--accent-glow); }
.btn-secondary {
  background: var(--surface-2);
  color: var(--text-primary);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: rgba(255,107,107,.12); color: var(--danger); border: 1.5px solid rgba(255,107,107,.2); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-full { width: 100%; justify-content: center; }
.btn-sm { padding: 7px 14px; font-size: .8rem; border-radius: 8px; }
.btn-icon { padding: 8px; border-radius: 8px; }

/* ── App Shell ───────────────────────────────────────────── */
.app { display: flex; min-height: 100vh; }

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  width: 240px;
  min-height: 100vh;
  background: var(--sidebar-bg);
  position: fixed;
  top: 0; left: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.sidebar-logo {
  padding: 24px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-logo .logo-mark {
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #0f172a;
  font-weight: 800;
  flex-shrink: 0;
}
.sidebar-logo h2 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
}
.sidebar-logo h2 span { color: var(--accent); }

.sidebar-nav { flex: 1; padding: 12px 12px; overflow-y: auto; }
.nav-section-title {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.25);
  padding: 12px 8px 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--sidebar-text);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: rgba(0,212,170,.15); color: var(--accent); }
.nav-item .nav-icon { font-size: 1.1rem; width: 20px; text-align: center; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #0f172a;
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,.05);
  border-radius: 12px;
  cursor: pointer;
  transition: background .2s;
}
.user-pill:hover { background: rgba(255,255,255,.08); }
.user-avatar {
  width: 32px; height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .875rem;
  color: #0f172a;
  flex-shrink: 0;
}
.user-pill .user-name { color: #fff; font-size: .875rem; font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-pill .logout-icon { color: rgba(255,255,255,.4); font-size: .875rem; }

/* ── Main Content ────────────────────────────────────────── */
.main {
  margin-left: 240px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Top Bar ─────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 50;
  transition: background .3s;
}
.topbar-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
}
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.hamburger { display: none; background: none; border: none; cursor: pointer; color: var(--text-primary); font-size: 1.3rem; }
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all .2s;
  color: var(--text-primary);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* ── Page Content ────────────────────────────────────────── */
.page-content { padding: 28px; flex: 1; }
.page { display: none; }
.page.active { display: block; animation: fadeIn .25s ease; }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.card-title {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title span { color: var(--text-muted); font-size: .8rem; font-family: 'DM Sans', sans-serif; font-weight: 400; }

/* Stat Cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  border-radius: 0 16px 0 80px;
  opacity: .08;
}
.stat-card.green::before  { background: #00d4aa; }
.stat-card.red::before    { background: #ff6b6b; }
.stat-card.blue::before   { background: #4b9fff; }
.stat-card.orange::before { background: #ffa947; }
.stat-card.purple::before { background: #a78bfa; }

.stat-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 14px;
}
.stat-card.green  .stat-icon { background: rgba(0,212,170,.12);  color: #00d4aa; }
.stat-card.red    .stat-icon { background: rgba(255,107,107,.12); color: #ff6b6b; }
.stat-card.blue   .stat-icon { background: rgba(75,159,255,.12);  color: #4b9fff; }
.stat-card.orange .stat-icon { background: rgba(255,169,71,.12);  color: #ffa947; }
.stat-card.purple .stat-icon { background: rgba(167,139,250,.12); color: #a78bfa; }

.stat-label { font-size: .78rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.stat-value { font-family: 'Syne', sans-serif; font-size: 1.6rem; font-weight: 700; }
.stat-sub   { font-size: .78rem; color: var(--text-muted); margin-top: 4px; }
.stat-sub.pos { color: var(--success); }
.stat-sub.neg { color: var(--danger); }

/* ── Data Table ──────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
thead th {
  text-align: left;
  padding: 10px 14px;
  color: var(--text-muted);
  font-weight: 700;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border); transition: background .12s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }
tbody td { padding: 12px 14px; vertical-align: middle; }

/* ── Badges ──────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
}
.badge-green  { background: rgba(0,212,170,.12);  color: #00d4aa; }
.badge-red    { background: rgba(255,107,107,.12); color: #ff6b6b; }
.badge-orange { background: rgba(255,169,71,.12);  color: #ffa947; }
.badge-blue   { background: rgba(75,159,255,.12);  color: #4b9fff; }
.badge-gray   { background: var(--surface-2); color: var(--text-muted); }
.badge-purple { background: rgba(167,139,250,.12); color: #a78bfa; }

/* ── Modal ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface);
  border-radius: 20px;
  padding: 28px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(.97);
  transition: transform .25s cubic-bezier(.34,1.56,.64,1);
  box-shadow: var(--shadow-lg);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.modal-header h3 { font-family: 'Syne', sans-serif; font-size: 1.1rem; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--surface-2);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all .15s;
}
.modal-close:hover { background: var(--danger); color: #fff; }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }

/* ── Filters Bar ─────────────────────────────────────────── */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
}
.filter-group { display: flex; align-items: center; gap: 8px; }
.filter-group label { font-size: .8rem; color: var(--text-muted); font-weight: 600; white-space: nowrap; }
.filters .form-control { padding: 8px 12px; font-size: .85rem; }
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 7px 12px;
  transition: border .2s;
}
.search-box:focus-within { border-color: var(--accent); }
.search-box input {
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  font-size: .875rem;
  outline: none;
  min-width: 160px;
}
.search-box input::placeholder { color: var(--text-muted); }

/* ── Charts ──────────────────────────────────────────────── */
.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
.chart-container { position: relative; height: 240px; }

/* ── Recent transactions ─────────────────────────────────── */
.txn-list { display: flex; flex-direction: column; gap: 10px; }
.txn-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface-2);
  border-radius: 12px;
  transition: background .15s;
}
.txn-item:hover { background: var(--border); }
.txn-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.txn-icon.income  { background: rgba(0,212,170,.12); }
.txn-icon.expense { background: rgba(255,107,107,.12); }
.txn-label  { font-weight: 600; font-size: .875rem; }
.txn-sub    { font-size: .78rem; color: var(--text-muted); }
.txn-amount { margin-left: auto; font-weight: 700; font-size: .95rem; }
.txn-amount.income  { color: var(--success); }
.txn-amount.expense { color: var(--danger); }

/* ── Investment cards ────────────────────────────────────── */
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.inv-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.inv-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.inv-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 700;
  margin-bottom: 14px;
}
.inv-name { font-weight: 700; font-size: 1rem; margin-bottom: 16px; }
.inv-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
  font-size: .85rem;
}
.inv-row:last-of-type { border-bottom: none; }
.inv-row label { color: var(--text-muted); }
.inv-row strong { font-weight: 600; }
.pl-positive { color: var(--success); font-weight: 700; }
.pl-negative { color: var(--danger); font-weight: 700; }
.inv-actions { display: flex; gap: 8px; margin-top: 14px; }

/* ── Borrow cards ────────────────────────────────────────── */
.borrow-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.borrow-tab {
  padding: 8px 20px;
  border-radius: 10px;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  transition: all .2s;
}
.borrow-tab.active.lent     { background: rgba(0,212,170,.12); border-color: var(--accent); color: var(--accent); }
.borrow-tab.active.borrowed { background: rgba(255,107,107,.12); border-color: var(--danger); color: var(--danger); }

/* ── Progress bar ────────────────────────────────────────── */
.progress-bar {
  height: 6px;
  background: var(--surface-2);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 8px;
}
.progress-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--accent);
  transition: width .6s ease;
}

/* ── Toast ───────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--sidebar-bg);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: .875rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  animation: slideIn .3s ease, fadeOut .3s ease 2.7s forwards;
  max-width: 320px;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--danger); }
.toast.info    { border-left: 3px solid var(--info); }

/* ── Loading ─────────────────────────────────────────────── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  color: var(--text-muted);
  font-size: .875rem;
  gap: 10px;
}
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; opacity: .4; }
.empty-state p { font-size: .9rem; }

/* ── Page header ─────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.page-header h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
}

/* ── Sidebar overlay (mobile) ────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 99;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .charts-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.show { display: block; }
  .main { margin-left: 0; }
  .hamburger { display: flex; }
  .page-content { padding: 16px; }
  .topbar { padding: 12px 16px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .inv-grid { grid-template-columns: 1fr; }
  .filters { flex-direction: column; align-items: stretch; }
  .modal { padding: 20px; }
}
@media (max-width: 420px) {
  .stat-grid { grid-template-columns: 1fr; }
}

/* ── Animations ──────────────────────────────────────────── */
@keyframes fadeIn    { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp    { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn   { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeOut   { from { opacity: 1; } to { opacity: 0; } }
@keyframes spin      { to { transform: rotate(360deg); } }

/* ── Utility ─────────────────────────────────────────────── */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-16 { margin-top: 16px; }
.mb-20 { margin-bottom: 20px; }
.text-muted { color: var(--text-muted); font-size: .875rem; }
.text-right { text-align: right; }
.fw-600 { font-weight: 600; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 500px) { .grid-2 { grid-template-columns: 1fr; } }

/* PWA install banner */
#pwa-banner {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--sidebar-bg);
  color: #fff;
  padding: 14px 20px;
  border-radius: 14px;
  display: none;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  z-index: 500;
  font-size: .875rem;
  max-width: 340px;
  width: calc(100% - 40px);
}
#pwa-banner.show { display: flex; }
