    /* ─── TOKENS ─────────────────────────────────────────────── */
    :root {
      --bg:        #1b2536;
      --surface:   #253248;
      --surface2:  #2d3d56;
      --border:    rgba(236,243,255,0.13);
      --gold:      #c8973a;
      --gold-lt:   #e6c07b;
      --gold-dim:  rgba(200,151,58,0.15);
      --teal:      #4eb4c4;
      --red:       #c77b79;
      --green:     #60bb8c;
      --text:      #eef2f8;
      --text-dim:  #aeb9ca;
      --text-mid:  #d8e0eb;
      --radius:    12px;
      --radius-lg: 20px;
    }

    /* ─── RESET ──────────────────────────────────────────────── */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html { scroll-behavior: smooth; }
    body {
      font-family: 'Jost', sans-serif;
      background:
        radial-gradient(circle at 20% 8%, rgba(78,180,196,0.1), transparent 46%),
        radial-gradient(circle at 88% 0%, rgba(230,192,123,0.09), transparent 42%),
        var(--bg);
      color: var(--text);
      min-height: 100vh;
      overflow-x: hidden;
    }

    /* ─── NOISE OVERLAY ──────────────────────────────────────── */
    body::before {
      content: '';
      position: fixed;
      inset: 0;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
      pointer-events: none;
      z-index: 0;
      opacity: 0.4;
    }

    /* ─── AUTH SCREEN ─────────────────────────────────────────── */
    #auth-screen {
      position: fixed;
      inset: 0;
      background: var(--bg);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 1000;
      flex-direction: column;
      gap: 0;
    }

    .auth-glow {
      position: absolute;
      width: min(500px, 90vw);
      height: min(500px, 90vw);
      border-radius: 50%;
      background: radial-gradient(circle, rgba(200,151,58,0.08) 0%, transparent 70%);
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      pointer-events: none;
    }

    .auth-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 48px 40px;
      width: 100%;
      max-width: 420px;
      position: relative;
      z-index: 1;
      box-shadow: 0 30px 60px rgba(8,12,20,0.35), 0 0 0 1px rgba(200,151,58,0.07);
    }

    .auth-logo {
      text-align: center;
      margin-bottom: 32px;
    }

    .auth-logo .sigil {
      font-size: 40px;
      display: block;
      margin-bottom: 12px;
      filter: drop-shadow(0 0 12px rgba(200,151,58,0.5));
    }

    .auth-logo h1 {
      font-family: 'Cinzel', serif;
      font-size: 22px;
      font-weight: 700;
      color: var(--gold-lt);
      letter-spacing: 0.08em;
    }

    .auth-logo p {
      font-size: 12px;
      color: var(--text-dim);
      letter-spacing: 0.15em;
      text-transform: uppercase;
      margin-top: 4px;
    }

    .auth-tabs {
      display: flex;
      gap: 0;
      background: var(--surface2);
      border-radius: 8px;
      padding: 3px;
      margin-bottom: 28px;
    }

    .auth-tab {
      flex: 1;
      padding: 9px;
      text-align: center;
      font-size: 13px;
      font-weight: 500;
      color: var(--text-dim);
      cursor: pointer;
      border-radius: 6px;
      transition: all 0.2s;
      letter-spacing: 0.05em;
    }

    .auth-tab.active {
      background: var(--gold-dim);
      color: var(--gold-lt);
      border: 1px solid rgba(200,151,58,0.2);
    }

    .auth-form { display: flex; flex-direction: column; gap: 14px; }

    .field-group { display: flex; flex-direction: column; gap: 6px; }

    .field-group label {
      font-size: 11px;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--text-dim);
      font-weight: 500;
    }

    .field-group input {
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 12px 14px;
      color: var(--text);
      font-family: 'Jost', sans-serif;
      font-size: 14px;
      outline: none;
      transition: border-color 0.2s;
    }

    .field-group input:focus { border-color: rgba(200,151,58,0.4); }

    .btn-primary {
      background: linear-gradient(135deg, var(--gold) 0%, #a07428 100%);
      color: #080a0f;
      border: none;
      border-radius: 8px;
      padding: 14px;
      font-family: 'Cinzel', serif;
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 0.1em;
      cursor: pointer;
      margin-top: 4px;
      transition: opacity 0.2s, transform 0.15s;
      width: 100%;
    }

    .btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
    .btn-primary:active { transform: translateY(0); }

    .auth-divider {
      text-align: center;
      color: var(--text-dim);
      font-size: 12px;
      margin: 8px 0;
      position: relative;
    }

    .btn-google {
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 12px;
      color: var(--text);
      font-family: 'Jost', sans-serif;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: border-color 0.2s, background 0.2s;
    }

    .btn-google:hover { border-color: rgba(200,151,58,0.3); background: var(--surface); }

    .auth-guest {
      text-align: center;
      margin-top: 16px;
      font-size: 12px;
      color: var(--text-dim);
    }

    .auth-guest span {
      color: var(--gold);
      cursor: pointer;
      text-decoration: underline;
      text-underline-offset: 3px;
    }

    /* ─── APP SHELL ───────────────────────────────────────────── */
    #app { display: none; flex-direction: column; min-height: 100vh; position: relative; z-index: 1; }
    #app.visible { display: flex; }

    /* ─── TOP NAV ─────────────────────────────────────────────── */
    .topnav {
      display: flex;
      align-items: stretch;
      justify-content: space-between;
      padding: 0 24px;
      height: 64px;
      border-bottom: 1px solid var(--border);
      background: rgba(18,26,39,0.86);
      backdrop-filter: blur(12px);
      position: sticky;
      top: 0;
      z-index: 100;
      gap: 0;
    }

    .nav-brand {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-shrink: 0;
    }

    .nav-sigil {
      font-size: 22px;
      filter: drop-shadow(0 0 6px rgba(200,151,58,0.6));
    }

    .nav-brand h1 {
      font-family: 'Cinzel', serif;
      font-size: 16px;
      font-weight: 700;
      color: var(--gold-lt);
      letter-spacing: 0.08em;
    }

    .nav-brand span {
      font-size: 10px;
      color: var(--text-dim);
      letter-spacing: 0.2em;
      text-transform: uppercase;
      display: block;
      line-height: 1;
    }

    .nav-right {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-shrink: 0;
    }

    .household-badge {
      background: var(--gold-dim);
      border: 1px solid rgba(200,151,58,0.2);
      border-radius: 20px;
      padding: 5px 12px;
      font-size: 12px;
      color: var(--gold);
      letter-spacing: 0.05em;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .avatar {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--gold), #704d1a);
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: 'Cinzel', serif;
      font-size: 13px;
      font-weight: 700;
      color: var(--bg);
      cursor: pointer;
      border: 1px solid rgba(200,151,58,0.3);
    }

    /* ─── NAV TABS ────────────────────────────────────────────── */
    .nav-tabs {
      display: flex;
      gap: 2px;
      padding: 0 8px;
      overflow-x: auto;
      scrollbar-width: none;
      flex: 1;
      align-self: stretch;
      align-items: stretch;
      justify-content: center;
      background: transparent;
      border-bottom: none;
    }

    .nav-tabs::-webkit-scrollbar { display: none; }

    .nav-tab {
      padding: 14px 20px;
      font-size: 13px;
      font-weight: 500;
      color: var(--text-dim);
      cursor: pointer;
      border-bottom: 2px solid transparent;
      transition: all 0.2s;
      white-space: nowrap;
      letter-spacing: 0.03em;
      display: flex;
      align-items: center;
      gap: 7px;
    }

    .nav-tab:hover { color: var(--text-mid); }

    .nav-tab.active {
      color: var(--gold-lt);
      border-bottom-color: var(--gold);
    }

    /* ─── MAIN CONTENT ────────────────────────────────────────── */
    .main { flex: 1; padding: 28px 24px; max-width: 1200px; margin: 0 auto; width: 100%; }

    /* ─── OVERVIEW CARDS ──────────────────────────────────────── */
    .overview-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 16px;
      margin-bottom: 28px;
    }

    .overview-card {
      background: rgba(26,36,52,0.95);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 22px 24px;
      position: relative;
      overflow: hidden;
      transition: border-color 0.2s;
    }

    .overview-card::before {
      content: '';
      position: absolute;
      top: 0; left: 0; right: 0;
      height: 2px;
    }

    .overview-card.income::before  { background: linear-gradient(90deg, var(--green), transparent); }
    .overview-card.expense::before { background: linear-gradient(90deg, var(--red), transparent); }
    .overview-card.balance::before { background: linear-gradient(90deg, var(--gold), transparent); }
    .overview-card.savings::before { background: linear-gradient(90deg, var(--teal), transparent); }

    .overview-card:hover { border-color: rgba(200,151,58,0.2); }

    .card-label {
      font-size: 10px;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: var(--text-dim);
      font-weight: 600;
      margin-bottom: 10px;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .card-amount {
      font-family: 'Cinzel', serif;
      font-size: 26px;
      font-weight: 700;
      line-height: 1;
      margin-bottom: 6px;
    }

    .card-amount.income  { color: var(--green); }
    .card-amount.expense { color: var(--red); }
    .card-amount.balance { color: var(--gold-lt); }
    .card-amount.savings { color: var(--teal); }

    .card-sub {
      font-size: 11px;
      color: var(--text-dim);
    }

    /* ─── TWO-COL LAYOUT ──────────────────────────────────────── */
    .content-grid {
      display: grid;
      grid-template-columns: 1fr 340px;
      gap: 20px;
      align-items: start;
    }

    @media (max-width: 900px) {
      .content-grid { grid-template-columns: 1fr; }
    }

    /* ─── PANEL ───────────────────────────────────────────────── */
    .panel {
      background: rgba(37,50,72,0.95);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      overflow: hidden;
    }

    .panel-header {
      padding: 16px 20px;
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .panel-title {
      font-family: 'Cinzel', serif;
      font-size: 13px;
      font-weight: 600;
      color: var(--gold-lt);
      letter-spacing: 0.08em;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .panel-body { padding: 24px; }

    /* ─── ADD TRANSACTION ─────────────────────────────────────── */
    .type-toggle {
      display: flex;
      gap: 0;
      background: var(--surface2);
      border-radius: 8px;
      padding: 3px;
      margin-bottom: 16px;
    }

    .type-btn {
      flex: 1;
      padding: 8px 10px;
      text-align: center;
      font-size: 12px;
      font-weight: 500;
      color: var(--text-dim);
      cursor: pointer;
      border-radius: 6px;
      transition: all 0.2s;
      letter-spacing: 0.04em;
      border: none;
      background: none;
    }

    .type-btn.active-income  { background: rgba(80,200,120,0.15); color: var(--green);  border: 1px solid rgba(80,200,120,0.2); }
    .type-btn.active-expense { background: rgba(199,123,121,0.12); color: var(--red);    border: 1px solid rgba(199,123,121,0.24); }
    .type-btn.active-bill    { background: rgba(58,191,200,0.15); color: var(--teal);   border: 1px solid rgba(58,191,200,0.2); }

    .form-row { display: flex; gap: 10px; margin-bottom: 12px; }
    .form-row.col1 { flex-direction: column; }

    .form-field { display: flex; flex-direction: column; gap: 5px; flex: 1; }

    .form-field label {
      font-size: 10px;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--text-dim);
      font-weight: 600;
    }

    .form-field input,
    .form-field select {
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 10px 12px;
      color: var(--text);
      font-family: 'Jost', sans-serif;
      font-size: 13px;
      outline: none;
      transition: border-color 0.2s;
      width: 100%;
    }

    .form-field input:focus,
    .form-field select:focus { border-color: rgba(200,151,58,0.35); }

    .form-field select option { background: var(--surface2); }

    .btn-add {
      background: linear-gradient(135deg, var(--gold) 0%, #a07428 100%);
      color: #080a0f;
      border: none;
      border-radius: 8px;
      padding: 11px;
      font-family: 'Cinzel', serif;
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.08em;
      cursor: pointer;
      width: 100%;
      transition: opacity 0.2s, transform 0.15s;
    }

    .btn-add:hover { opacity: 0.9; transform: translateY(-1px); }

    /* ─── TRANSACTIONS LIST ───────────────────────────────────── */
    .tx-filters {
      display: flex;
      gap: 8px;
      padding: 14px 20px;
      border-bottom: 1px solid var(--border);
      overflow-x: auto;
      scrollbar-width: none;
    }

    .tx-filters::-webkit-scrollbar { display: none; }

    .filter-chip {
      padding: 5px 12px;
      border-radius: 20px;
      font-size: 11px;
      font-weight: 500;
      color: var(--text-dim);
      border: 1px solid var(--border);
      cursor: pointer;
      white-space: nowrap;
      transition: all 0.2s;
      background: none;
    }

    .filter-chip.active {
      background: var(--gold-dim);
      border-color: rgba(200,151,58,0.3);
      color: var(--gold-lt);
    }

    .tx-list { max-height: 420px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }

    .tx-item {
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 14px 20px;
      border-bottom: 1px solid var(--border);
      transition: background 0.15s;
      cursor: default;
    }

    .tx-item:last-child { border-bottom: none; }
    .tx-item:hover { background: rgba(255,255,255,0.02); }

    .tx-icon {
      width: 36px;
      height: 36px;
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 15px;
      flex-shrink: 0;
    }

    .tx-icon.income  { background: rgba(80,200,120,0.12); }
    .tx-icon.expense { background: rgba(199,123,121,0.12); }
    .tx-icon.bill    { background: rgba(58,191,200,0.12); }

    .tx-info { flex: 1; min-width: 0; }

    .tx-desc {
      font-size: 14px;
      font-weight: 500;
      color: var(--text);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .tx-meta {
      font-size: 11px;
      color: var(--text-dim);
      margin-top: 2px;
    }

    .tx-amount {
      font-family: 'Cinzel', serif;
      font-size: 15px;
      font-weight: 600;
      flex-shrink: 0;
    }

    .tx-amount.income  { color: var(--green); }
    .tx-amount.expense { color: var(--red); }
    .tx-amount.bill    { color: var(--teal); }

    .tx-delete, .tx-edit {
      background: none;
      border: none;
      color: var(--text-dim);
      cursor: pointer;
      font-size: 14px;
      padding: 4px;
      border-radius: 4px;
      opacity: 0;
      transition: opacity 0.15s, color 0.15s;
    }

    .tx-item:hover .tx-delete,
    .tx-item:hover .tx-edit { opacity: 1; }
    .tx-delete:hover { color: var(--red); }
    .tx-edit:hover   { color: var(--gold); }

    .oracle-step-pill {
      font-size: 11px;
      color: var(--text-dim);
      padding: 4px 10px;
      border-radius: 4px;
      font-family: 'Cinzel', serif;
      letter-spacing: 1px;
    }
    .oracle-step-pill.active {
      color: var(--gold);
      background: var(--gold-dim);
    }

    .tx-cat-select {
      background: transparent;
      border: none;
      color: var(--text-dim);
      font-size: 11px;
      font-family: inherit;
      cursor: pointer;
      padding: 0;
      outline: none;
      appearance: none;
      -webkit-appearance: none;
    }
    .tx-cat-select:hover, .tx-cat-select:focus {
      color: var(--gold);
    }
    .tx-cat-select option {
      background: var(--surface);
      color: var(--text);
    }

    .tx-empty {
      padding: 48px 20px;
      text-align: center;
      color: var(--text-dim);
      font-size: 13px;
    }

    .tx-empty .empty-sigil {
      font-size: 32px;
      display: block;
      margin-bottom: 10px;
      opacity: 0.4;
    }

    /* ─── BUDGET BARS ─────────────────────────────────────────── */
    .budget-list { display: flex; flex-direction: column; gap: 16px; }

    .budget-item-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 7px;
    }

    .budget-cat {
      font-size: 13px;
      font-weight: 500;
      color: var(--text);
      display: flex;
      align-items: center;
      gap: 7px;
    }

    .budget-amounts {
      font-size: 12px;
      color: var(--text-dim);
    }

    .budget-amounts span { color: var(--text-mid); font-weight: 500; }

    .budget-bar-track {
      height: 6px;
      background: var(--surface2);
      border-radius: 3px;
      overflow: hidden;
    }

    .budget-bar-fill {
      height: 100%;
      border-radius: 3px;
      transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .budget-bar-fill.safe    { background: linear-gradient(90deg, var(--green), #3aab58); }
    .budget-bar-fill.caution { background: linear-gradient(90deg, var(--gold), #e8a020); }
    .budget-bar-fill.danger  { background: linear-gradient(90deg, var(--red), #e03030); }

    /* ─── CHART ───────────────────────────────────────────────── */
    .chart-wrap { position: relative; height: 220px; }

    /* ─── BUDGET PAGE ─────────────────────────────────────────── */
    .budget-page { display: none; }
    .budget-page.active { display: block; }

    .budget-setup-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
      gap: 16px;
      margin-top: 20px;
    }

    .budget-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 18px;
      display: flex;
      flex-direction: column;
      min-height: 158px;
      transition: border-color 0.15s;
    }
    .budget-card:hover { border-color: rgba(200,151,58,0.25); }
    .budget-card.safe    { border-color: rgba(80,200,120,0.2); }
    .budget-card.caution { border-color: rgba(200,151,58,0.25); }
    .budget-card.danger  { border-color: rgba(200,80,80,0.22); }

    .budget-card-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 14px;
    }

    .budget-card-cat {
      font-size: 14px;
      font-weight: 500;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .budget-limit-input {
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 10px 12px;
      color: var(--text);
      font-family: 'Cinzel', serif;
      font-size: 18px;
      font-weight: 600;
      outline: none;
      width: 100%;
      transition: border-color 0.2s;
      text-align: right;
    }

    .budget-limit-input:focus { border-color: rgba(200,151,58,0.35); }

    .budget-limit-label {
      font-size: 10px;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--text-dim);
      margin-bottom: 6px;
    }

    .budget-top-actions {
      display: flex;
      gap: 8px;
      align-items: center;
      flex-wrap: wrap;
    }

    .budget-setup-summary {
      margin-bottom: 16px;
      border: 1px solid rgba(200,151,58,0.2);
      border-radius: 14px;
      background: linear-gradient(135deg, rgba(200,151,58,0.06) 0%, rgba(255,255,255,0.02) 100%);
      padding: 18px 20px;
    }

    .budget-summary-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 10px;
      flex-wrap: wrap;
    }

    .budget-summary-title {
      color: var(--gold-lt);
      font-family: 'Cinzel', serif;
      font-size: 14px;
      font-weight: 700;
      letter-spacing: 0.04em;
    }

    .budget-summary-meta {
      color: var(--text-dim);
      font-size: 12px;
      margin-top: 3px;
    }

    .budget-summary-values {
      text-align: right;
      font-size: 12px;
      color: var(--text-mid);
    }

    .budget-summary-spent { color: var(--text); font-weight: 600; }
    .budget-summary-remaining { margin-top: 2px; }

    .budget-setup-empty {
      color: var(--text-dim);
      font-size: 13px;
      line-height: 1.5;
      text-align: center;
      padding: 4px 0;
    }

    .budget-card-status {
      border-radius: 999px;
      padding: 3px 9px;
      font-size: 10px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      border: 1px solid rgba(255,255,255,0.12);
      color: var(--text-mid);
    }

    .budget-card-status.safe { color: var(--green); border-color: rgba(80,200,120,0.24); background: rgba(80,200,120,0.08); }
    .budget-card-status.caution { color: var(--gold-lt); border-color: rgba(200,151,58,0.24); background: rgba(200,151,58,0.08); }
    .budget-card-status.danger { color: var(--red); border-color: rgba(200,80,80,0.24); background: rgba(200,80,80,0.08); }
    .budget-card-status.neutral { color: var(--text-dim); }

    .budget-card-meta {
      margin-top: auto;
      padding-top: 8px;
      display: flex;
      justify-content: space-between;
      gap: 8px;
      flex-wrap: wrap;
      font-size: 11px;
      color: var(--text-dim);
    }

    .budget-card-empty {
      margin-top: auto;
      padding-top: 10px;
      color: var(--text-dim);
      font-size: 11px;
      line-height: 1.5;
    }

    /* ─── ANALYTICS PAGE ──────────────────────────────────────── */
    .analytics-page { display: none; }
    .analytics-page.active { display: block; }

    .analytics-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px;
      margin-top: 20px;
    }

    @media (max-width: 700px) {
      .analytics-grid { grid-template-columns: 1fr; }
      .overview-grid { grid-template-columns: 1fr 1fr; }
    }

    /* ─── HOUSEHOLD PAGE ──────────────────────────────────────── */
    .household-page { display: none; }
    .household-page.active { display: block; }

    .member-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 20px;
      display: flex;
      align-items: center;
      gap: 16px;
      margin-bottom: 12px;
    }

    .member-avatar {
      width: 48px;
      height: 48px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: 'Cinzel', serif;
      font-size: 18px;
      font-weight: 700;
      flex-shrink: 0;
    }

    .member-avatar.primary { background: linear-gradient(135deg, var(--gold), #704d1a); color: var(--bg); border: 2px solid rgba(200,151,58,0.4); }
    .member-avatar.secondary { background: linear-gradient(135deg, var(--teal), #1a5e70); color: var(--bg); border: 2px solid rgba(58,191,200,0.4); }

    .member-info { flex: 1; }
    .member-name { font-size: 15px; font-weight: 600; }
    .member-role { font-size: 11px; color: var(--text-dim); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 2px; }

    .member-badge {
      padding: 4px 10px;
      border-radius: 20px;
      font-size: 11px;
      font-weight: 500;
      letter-spacing: 0.05em;
    }

    .member-badge.admin { background: var(--gold-dim); color: var(--gold); border: 1px solid rgba(200,151,58,0.2); }
    .member-badge.member { background: rgba(58,191,200,0.1); color: var(--teal); border: 1px solid rgba(58,191,200,0.2); }

    .invite-box {
      background: var(--surface);
      border: 1px dashed rgba(200,151,58,0.25);
      border-radius: var(--radius);
      padding: 24px;
      text-align: center;
      margin-top: 20px;
    }

    .invite-box p { color: var(--text-dim); font-size: 13px; margin-bottom: 16px; }

    .invite-input-row {
      display: flex;
      gap: 10px;
    }

    .invite-input-row input {
      flex: 1;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 10px 14px;
      color: var(--text);
      font-family: 'Jost', sans-serif;
      font-size: 13px;
      outline: none;
    }

    .btn-invite {
      background: var(--gold-dim);
      border: 1px solid rgba(200,151,58,0.3);
      border-radius: 8px;
      padding: 10px 18px;
      color: var(--gold-lt);
      font-family: 'Cinzel', serif;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      white-space: nowrap;
      transition: background 0.2s;
    }

    .btn-invite:hover { background: rgba(200,151,58,0.2); }

    /* ─── HOUSEHOLD SHARING ────────────────────────────────────── */
    .hh-setup-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
      margin-top: 20px;
    }
    @media (max-width: 520px) { .hh-setup-grid { grid-template-columns: 1fr; } }

    .hh-setup-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 24px 20px;
      text-align: center;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    .hh-setup-icon  { font-size: 28px; }
    .hh-setup-title { font-family: 'Cinzel', serif; font-size: 13px; letter-spacing: 1px; color: var(--gold-lt); }
    .hh-setup-desc  { color: var(--text-dim); font-size: 13px; line-height: 1.5; flex: 1; }

    .btn-hh-primary {
      background: var(--gold-dim); border: 1px solid rgba(200,151,58,0.3);
      border-radius: 8px; padding: 10px 16px; color: var(--gold-lt);
      font-family: 'Cinzel', serif; font-size: 11px; font-weight: 600;
      cursor: pointer; letter-spacing: 1px; width: 100%; transition: background 0.2s;
    }
    .btn-hh-primary:hover { background: rgba(200,151,58,0.2); }

    .btn-hh-secondary {
      background: rgba(58,191,200,0.08); border: 1px solid rgba(58,191,200,0.25);
      border-radius: 8px; padding: 10px 16px; color: var(--teal);
      font-family: 'Cinzel', serif; font-size: 11px;
      cursor: pointer; letter-spacing: 1px; width: 100%; transition: background 0.2s;
    }
    .btn-hh-secondary:hover { background: rgba(58,191,200,0.15); }

    .btn-hh-ghost {
      background: transparent; border: 1px solid var(--border);
      border-radius: 8px; padding: 8px 16px; color: var(--text-dim);
      font-family: 'Jost', sans-serif; font-size: 12px; cursor: pointer;
    }

    .btn-hh-leave {
      background: rgba(200,80,80,0.1); border: 1px solid rgba(200,80,80,0.25);
      border-radius: 8px; padding: 8px 14px; color: #e05c5c;
      font-size: 12px; cursor: pointer; font-family: 'Jost', sans-serif;
      white-space: nowrap;
    }

    .hh-code-input {
      background: var(--surface2); border: 1px solid var(--border); border-radius: 8px;
      padding: 12px 14px; color: var(--text); font-family: 'Cinzel', serif;
      font-size: 20px; letter-spacing: 6px; text-align: center; outline: none;
      width: 100%; box-sizing: border-box;
    }

    .hh-invite-pending {
      background: var(--surface); border: 1px dashed rgba(200,151,58,0.3);
      border-radius: var(--radius); padding: 24px; text-align: center; margin: 16px 0;
    }
    .hh-invite-header { font-family: 'Cinzel', serif; font-size: 11px; letter-spacing: 2px; color: var(--text-dim); margin-bottom: 14px; }
    .hh-invite-code {
      font-family: 'Cinzel', serif; font-size: 30px; letter-spacing: 10px;
      color: var(--gold); background: rgba(200,151,58,0.08);
      border: 1px solid rgba(200,151,58,0.2); border-radius: 8px;
      padding: 14px 20px; display: inline-block; min-width: 200px;
    }
    .hh-invite-note { color: var(--text-dim); font-size: 12px; margin-top: 10px; }

    .hh-view-toggle {
      display: flex; background: var(--surface);
      border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
    }
    .hh-toggle-btn {
      flex: 1; padding: 10px; background: transparent; border: none;
      color: var(--text-dim); font-family: 'Jost', sans-serif; font-size: 13px;
      cursor: pointer; transition: all 0.2s;
    }
    .hh-toggle-btn.active { background: rgba(200,151,58,0.12); color: var(--gold-lt); font-weight: 600; }

    .hh-sts-card {
      background: linear-gradient(135deg, rgba(200,151,58,0.07), rgba(58,191,200,0.04));
      border: 1px solid rgba(200,151,58,0.2); border-radius: var(--radius);
      padding: 24px; text-align: center; margin-top: 16px;
    }
    .hh-sts-label { font-size: 10px; letter-spacing: 2px; color: var(--text-dim); margin-bottom: 8px; }
    .hh-sts-value { font-family: 'Cinzel', serif; font-size: 30px; color: var(--gold-lt); }
    .hh-sts-value.neg { color: #e05c5c; }
    .hh-sts-sub   { font-size: 11px; color: var(--text-dim); margin-top: 6px; }

    .hh-spend-card {
      flex: 1; background: var(--surface2); border-radius: 8px;
      padding: 12px 8px; text-align: center;
    }
    .hh-spend-who {
      width: 34px; height: 34px; border-radius: 50%;
      background: linear-gradient(135deg, var(--gold), #704d1a); color: var(--bg);
      display: flex; align-items: center; justify-content: center;
      font-family: 'Cinzel', serif; font-size: 11px; margin: 0 auto 6px;
    }
    .hh-spend-who.secondary { background: linear-gradient(135deg, var(--teal), #1a5e70); }
    .hh-spend-name { font-size: 11px; color: var(--text-dim); }
    .hh-spend-amt  { font-size: 14px; font-weight: 600; color: var(--text); margin-top: 2px; }

    .hh-tx-row {
      display: flex; align-items: center; gap: 10px;
      padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 13px;
    }
    .hh-tx-row:last-child { border-bottom: none; }
    .hh-tx-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
    .hh-tx-dot.me      { background: var(--gold); }
    .hh-tx-dot.partner { background: var(--teal); }
    .hh-tx-desc  { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .hh-tx-date  { font-size: 11px; color: var(--text-dim); white-space: nowrap; }
    .hh-tx-amt   { font-weight: 500; white-space: nowrap; }

    .hh-budget-bar   { margin-bottom: 12px; }
    .hh-budget-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-dim); margin-bottom: 4px; }
    .hh-budget-track { height: 6px; background: var(--surface2); border-radius: 3px; overflow: hidden; }
    .hh-budget-fill  { height: 100%; border-radius: 3px; transition: width 0.4s; }

    /* ─── FAMILY MODE ──────────────────────────────────────────── */
    .btn-family-add {
      background: rgba(128,200,128,0.12); border: 1px solid rgba(128,200,128,0.3);
      border-radius: 8px; padding: 9px 16px; color: var(--green);
      font-family: 'Cinzel', serif; font-size: 11px; letter-spacing: 1px;
      cursor: pointer; white-space: nowrap; transition: background 0.2s;
    }
    .btn-family-add:hover { background: rgba(128,200,128,0.2); }

    .family-empty {
      text-align: center; padding: 48px 24px;
      background: var(--surface); border: 1px dashed var(--border);
      border-radius: var(--radius); margin-top: 20px;
    }

    .family-child-card {
      background: var(--surface); border: 1px solid var(--border);
      border-radius: var(--radius); padding: 20px; margin-bottom: 16px;
      transition: border-color 0.2s;
    }
    .family-child-card.limit-hit { border-color: rgba(200,80,80,0.4); }

    .fcc-header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
    .fcc-avatar { font-size: 32px; flex-shrink: 0; }
    .fcc-info   { flex: 1; }
    .fcc-name   { font-size: 16px; font-weight: 600; color: var(--text); }
    .fcc-meta   { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
    .fcc-actions { display: flex; gap: 6px; }

    .btn-fcc-icon {
      width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--border);
      background: transparent; color: var(--text-dim); cursor: pointer; font-size: 13px;
      display: flex; align-items: center; justify-content: center; transition: all 0.15s;
    }
    .btn-fcc-icon:hover { background: var(--surface2); color: var(--text); }
    .btn-fcc-icon.danger:hover { border-color: rgba(200,80,80,0.4); color: #e05c5c; }

    .fcc-stats-row {
      display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
      margin-bottom: 12px;
    }
    @media (max-width: 480px) { .fcc-stats-row { grid-template-columns: repeat(2, 1fr); } }

    .fcc-stat { background: var(--surface2); border-radius: 8px; padding: 10px 8px; text-align: center; }
    .fcc-stat-label { font-size: 9px; letter-spacing: 1px; color: var(--text-dim); margin-bottom: 4px; }
    .fcc-stat-value { font-size: 14px; font-weight: 600; color: var(--text); }
    .fcc-stat-value.over { color: #e05c5c; }

    .fcc-limit-alert {
      background: rgba(200,80,80,0.1); border: 1px solid rgba(200,80,80,0.25);
      border-radius: 6px; padding: 8px 12px; font-size: 12px; color: #e05c5c;
      margin-bottom: 10px;
    }
    .fcc-allowance-due {
      background: rgba(200,151,58,0.12); border: 1px solid rgba(200,151,58,0.25);
      border-radius: 6px; padding: 8px 12px; font-size: 12px; color: var(--gold);
      margin-bottom: 10px;
    }
    .fcc-allowance-next { font-size: 11px; color: var(--text-dim); margin-bottom: 8px; }

    .fcc-goal { margin-bottom: 10px; }
    .fcc-goal-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-dim); margin-bottom: 4px; }
    .fcc-goal-track { height: 6px; background: var(--surface2); border-radius: 3px; overflow: hidden; }
    .fcc-goal-fill  { height: 100%; background: var(--green); border-radius: 3px; transition: width 0.4s; }

    .fcc-xp-row {
      display: flex; align-items: center; gap: 10px; font-size: 12px;
      color: var(--text-dim); margin-bottom: 12px;
    }
    .fcc-xp-bar  { flex: 1; height: 5px; background: var(--surface2); border-radius: 3px; overflow: hidden; }
    .fcc-xp-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--teal)); border-radius: 3px; transition: width 0.4s; }

    .fcc-txs { border-top: 1px solid var(--border); padding-top: 10px; margin-bottom: 12px; }
    .fcc-tx-header { font-size: 10px; letter-spacing: 1px; color: var(--text-dim); margin-bottom: 6px; }
    .fcc-tx-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 12px; border-bottom: 1px solid var(--border); }
    .fcc-tx-row:last-child { border-bottom: none; }
    .fcc-tx-desc { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .fcc-tx-date { color: var(--text-dim); white-space: nowrap; font-size: 11px; }
    .fcc-tx-amt  { white-space: nowrap; font-weight: 500; }
    .fcc-tx-amt.income { color: var(--green); }

    .fcc-btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
    .btn-fcc-action {
      background: var(--surface2); border: 1px solid var(--border); border-radius: 6px;
      padding: 7px 12px; color: var(--text-mid); font-size: 12px; cursor: pointer;
      transition: all 0.15s;
    }
    .btn-fcc-action:hover { background: rgba(200,151,58,0.1); border-color: rgba(200,151,58,0.3); color: var(--gold-lt); }
    .btn-fcc-action.primary { background: rgba(128,200,128,0.1); border-color: rgba(128,200,128,0.3); color: var(--green); }

    .fcc-label { font-size: 11px; letter-spacing: 0.08em; color: var(--text-dim); display: block; margin-bottom: 6px; }
    .fcc-input {
      width: 100%; background: var(--surface2); border: 1px solid var(--border);
      border-radius: 8px; padding: 10px 12px; color: var(--text);
      font-family: 'Jost', sans-serif; font-size: 13px; outline: none; box-sizing: border-box;
    }
    .fcc-input:focus { border-color: rgba(200,151,58,0.4); }

    .child-avatar-grid { display: flex; flex-wrap: wrap; gap: 8px; }
    .child-avatar-btn {
      width: 38px; height: 38px; border-radius: 8px; border: 2px solid transparent;
      background: var(--surface2); font-size: 20px; cursor: pointer;
      display: flex; align-items: center; justify-content: center; transition: all 0.15s;
    }
    .child-avatar-btn.selected { border-color: var(--gold); background: rgba(200,151,58,0.12); }
    .child-avatar-btn:hover { border-color: var(--border); }

    /* ─── CHILD VIEW OVERLAY ──────────────────────────────────── */
    .cv-wrap {
      min-height: 100vh; background: #0a0c12;
      font-family: 'Jost', sans-serif; padding: 0 0 40px;
    }
    .cv-header {
      display: flex; align-items: center; gap: 16px; padding: 16px 20px;
      background: rgba(10,12,18,0.95); border-bottom: 1px solid rgba(255,255,255,0.06);
      position: sticky; top: 0; z-index: 10; backdrop-filter: blur(8px);
    }
    .cv-back {
      background: transparent; border: 1px solid var(--border); border-radius: 6px;
      padding: 7px 12px; color: var(--text-dim); font-size: 12px; cursor: pointer;
    }
    .cv-title { font-size: 13px; color: var(--text-mid); }

    .cv-hero {
      text-align: center; padding: 40px 24px 28px;
      background: linear-gradient(180deg, rgba(200,151,58,0.06) 0%, transparent 100%);
    }
    .cv-avatar { font-size: 64px; margin-bottom: 10px; }
    .cv-name   { font-family: 'Cinzel', serif; font-size: 24px; color: var(--gold-lt); letter-spacing: 2px; }
    .cv-level  { font-size: 14px; color: var(--text-dim); margin-top: 4px; }
    .cv-balance { margin-top: 20px; }
    .cv-balance-label { font-size: 10px; letter-spacing: 3px; color: var(--text-dim); margin-bottom: 6px; }
    .cv-balance-value { font-family: 'Cinzel', serif; font-size: 40px; color: var(--gold); }

    .cv-section {
      background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
      padding: 18px; margin: 0 16px 14px;
    }
    .cv-section-label { font-size: 10px; letter-spacing: 2px; color: var(--text-dim); margin-bottom: 10px; }

    .cv-xp-track  { height: 12px; background: var(--surface2); border-radius: 6px; overflow: hidden; }
    .cv-xp-fill   { height: 100%; background: linear-gradient(90deg, #c8973a, #3abfc8); border-radius: 6px; transition: width 0.5s; }

    .cv-goal-track { height: 16px; background: var(--surface2); border-radius: 8px; overflow: hidden; }
    .cv-goal-fill  { height: 100%; background: linear-gradient(90deg, var(--green), #3abfc8); border-radius: 8px; transition: width 0.5s; }

    .cv-limit-card { }
    .cv-limit-track { height: 10px; background: var(--surface2); border-radius: 5px; overflow: hidden; }
    .cv-limit-fill  { height: 100%; border-radius: 5px; transition: width 0.4s; }

    .cv-allowance-card { background: rgba(200,151,58,0.07); border-color: rgba(200,151,58,0.2); }

    .cv-tx-row  { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
    .cv-tx-row:last-child { border-bottom: none; }
    .cv-tx-desc { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .cv-tx-date { font-size: 11px; color: var(--text-dim); white-space: nowrap; }
    .cv-tx-amt  { font-weight: 600; white-space: nowrap; }
    .cv-income  { color: var(--green); }

    /* ─── FINANCIAL ACADEMY (5.3) ────────────────────────────── */
    .aca-wrap {
      min-height: 100vh;
      background: linear-gradient(160deg,#0d1117 0%,#130d1f 60%,#0a1a12 100%);
      font-family: Jost, sans-serif;
      padding-bottom: 40px;
    }
    .aca-header {
      display: flex; align-items: center; gap: 12px;
      padding: 16px 18px;
      background: rgba(155,89,182,0.08);
      border-bottom: 1px solid rgba(155,89,182,0.2);
      position: sticky; top: 0; z-index: 10;
    }
    .aca-back {
      background: none; border: none; color: var(--gold-lt);
      font-size: 13px; cursor: pointer; padding: 4px 8px;
    }
    .aca-title {
      font-family: Cinzel, serif; font-size: 13px;
      letter-spacing: 1px; color: #c89ee0; flex: 1;
    }
    .aca-hero {
      text-align: center; padding: 28px 20px 20px;
    }
    .aca-hero-avatar { font-size: 48px; margin-bottom: 8px; }
    .aca-hero-name { font-size: 18px; color: var(--text-light); font-weight: 600; }
    .aca-hero-sub { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

    .aca-level-block {
      margin: 0 16px 20px;
      background: rgba(255,255,255,0.03);
      border: 1px solid rgba(155,89,182,0.2);
      border-radius: 12px;
      padding: 16px;
    }
    .aca-level-title {
      font-family: Cinzel, serif; font-size: 11px;
      letter-spacing: 1.5px; color: #c89ee0; margin-bottom: 12px;
    }
    .aca-locked-msg {
      font-size: 12px; color: var(--text-dim);
      padding: 8px 0; text-align: center;
    }

    .aca-lesson-row {
      display: flex; align-items: center; gap: 12px;
      padding: 10px 12px; border-radius: 8px;
      cursor: pointer; margin-bottom: 4px;
      transition: background 0.15s;
    }
    .aca-lesson-row:hover { background: rgba(155,89,182,0.1); }
    .aca-lesson-row.done  { opacity: 0.75; }
    .aca-lesson-emoji { font-size: 22px; min-width: 32px; text-align: center; }
    .aca-lesson-info  { flex: 1; }
    .aca-lesson-name  { font-size: 14px; color: var(--text-light); }
    .aca-lesson-meta  { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
    .aca-lesson-badge {
      font-size: 11px; padding: 2px 8px; border-radius: 20px;
      background: rgba(155,89,182,0.2); color: #c89ee0; white-space: nowrap;
    }
    .aca-lesson-badge.done { background: rgba(46,204,113,0.15); color: var(--green); }

    /* Lesson content view */
    .aca-content-scroll { padding: 16px; }
    .aca-content-block {
      display: flex; gap: 14px; align-items: flex-start;
      background: rgba(255,255,255,0.03);
      border: 1px solid rgba(200,151,58,0.1);
      border-radius: 10px; padding: 14px;
      margin-bottom: 12px;
    }
    .aca-content-icon { font-size: 24px; min-width: 32px; }
    .aca-content-text { font-size: 14px; color: var(--text-mid); line-height: 1.6; }
    .aca-start-quiz-btn {
      display: block; width: 100%; padding: 14px;
      background: linear-gradient(135deg,#9b59b6,#7d3c98);
      border: none; border-radius: 10px;
      color: #fff; font-size: 15px; font-family: Jost, sans-serif;
      cursor: pointer; margin-top: 20px; text-align: center;
    }

    /* Quiz view */
    .aca-quiz-body { padding: 16px; }
    .aca-quiz-progress {
      display: flex; gap: 6px; margin-bottom: 20px;
    }
    .aca-quiz-pip {
      flex: 1; height: 4px; border-radius: 2px;
      background: rgba(255,255,255,0.1);
    }
    .aca-quiz-pip.active   { background: #9b59b6; }
    .aca-quiz-pip.complete { background: var(--green); }
    .aca-quiz-q { font-size: 16px; color: var(--text-light); font-weight: 600; line-height: 1.5; margin-bottom: 20px; }
    .aca-option {
      display: block; width: 100%; text-align: left;
      padding: 12px 16px; margin-bottom: 10px;
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 10px; cursor: pointer;
      font-size: 14px; color: var(--text-mid);
      font-family: Jost, sans-serif; transition: all 0.15s;
    }
    .aca-option:hover:not(:disabled) {
      background: rgba(155,89,182,0.12);
      border-color: rgba(155,89,182,0.4);
      color: var(--text-light);
    }
    .aca-option.correct {
      background: rgba(46,204,113,0.15);
      border-color: var(--green); color: var(--green);
    }
    .aca-option.wrong {
      background: rgba(224,92,92,0.15);
      border-color: #e05c5c; color: #e05c5c;
    }
    .aca-option.show-correct {
      background: rgba(46,204,113,0.1);
      border-color: rgba(46,204,113,0.4);
      color: var(--green);
    }

    /* Results view */
    .aca-results {
      padding: 32px 20px; text-align: center;
    }
    .aca-results-stars { font-size: 36px; margin-bottom: 12px; }
    .aca-results-score { font-size: 28px; color: var(--text-light); font-weight: 700; margin-bottom: 6px; }
    .aca-results-msg   { font-size: 14px; color: var(--text-dim); margin-bottom: 24px; }
    .aca-reward-chip {
      display: inline-block; padding: 8px 20px;
      background: rgba(200,151,58,0.12);
      border: 1px solid rgba(200,151,58,0.3);
      border-radius: 20px; font-size: 14px; color: var(--gold-lt);
      margin-bottom: 8px;
    }
    .aca-reward-chip.xp {
      background: rgba(155,89,182,0.12);
      border-color: rgba(155,89,182,0.3);
      color: #c89ee0;
    }
    .aca-results-actions {
      display: flex; gap: 10px; justify-content: center; margin-top: 24px;
    }
    .aca-results-btn {
      padding: 10px 22px;
      border-radius: 8px; border: none;
      font-size: 14px; font-family: Jost, sans-serif;
      cursor: pointer;
    }
    .aca-results-btn.primary {
      background: linear-gradient(135deg,#9b59b6,#7d3c98); color: #fff;
    }
    .aca-results-btn.secondary {
      background: rgba(255,255,255,0.06); color: var(--text-mid);
    }

    /* Parent child card: academy summary bar */
    .fcc-academy-summary {
      margin: 10px 0 4px;
      padding: 10px 12px;
      background: rgba(155,89,182,0.06);
      border: 1px solid rgba(155,89,182,0.18);
      border-radius: 8px;
    }

    /* Child view overlay: academy card */
    .cv-academy-card {
      background: rgba(155,89,182,0.06);
      border-color: rgba(155,89,182,0.2);
    }

    /* ─── REFERRAL PROGRAM (5.5) ────────────────────────────── */
    .ref-wrap {
      max-width: 560px; margin: 0 auto;
      padding: 0 0 40px;
      font-family: Jost, sans-serif;
    }
    .ref-header {
      display: flex; align-items: center; gap: 12px;
      padding: 14px 18px;
      background: rgba(255,255,255,0.02);
      border-bottom: 1px solid rgba(255,255,255,0.07);
      position: sticky; top: 0; z-index: 5;
    }
    .ref-back {
      background: none; border: 1px solid rgba(200,151,58,0.3);
      border-radius: 6px; color: var(--gold-lt);
      font-size: 12px; padding: 5px 10px; cursor: pointer;
      font-family: Jost, sans-serif;
    }
    .ref-title {
      font-family: Cinzel, serif; font-size: 13px;
      letter-spacing: 1.5px; color: var(--gold-lt);
    }

    .ref-hero {
      text-align: center; padding: 32px 20px 24px;
    }
    .ref-hero-icon     { font-size: 48px; margin-bottom: 12px; }
    .ref-hero-headline { font-size: 20px; color: var(--text-light); font-weight: 700; margin-bottom: 8px; }
    .ref-hero-sub      { font-size: 13px; color: var(--text-dim); line-height: 1.6; }

    .ref-code-card {
      margin: 0 16px 16px;
      background: linear-gradient(135deg, rgba(200,151,58,0.1), rgba(200,151,58,0.04));
      border: 1px solid rgba(200,151,58,0.3);
      border-radius: 14px; padding: 20px;
      text-align: center;
    }
    .ref-code-label {
      font-size: 10px; letter-spacing: 2px; color: var(--text-dim);
      font-family: Cinzel, serif; margin-bottom: 10px;
    }
    .ref-code-display {
      font-family: Cinzel, serif; font-size: 36px;
      color: var(--gold-lt); letter-spacing: 6px;
      font-weight: 700; margin-bottom: 16px;
      filter: drop-shadow(0 0 12px rgba(200,151,58,0.4));
    }
    .ref-code-actions { display: flex; gap: 10px; justify-content: center; margin-bottom: 12px; }
    .ref-btn {
      padding: 9px 20px; border-radius: 8px;
      border: 1px solid rgba(200,151,58,0.3);
      background: rgba(200,151,58,0.08); color: var(--gold-lt);
      font-size: 13px; font-family: Jost, sans-serif; cursor: pointer;
      transition: all 0.15s;
    }
    .ref-btn:hover { background: rgba(200,151,58,0.16); }
    .ref-btn.primary {
      background: linear-gradient(135deg,#c8973a,#a67828);
      color: #0e1117; border-color: transparent; font-weight: 600;
    }
    .ref-btn.primary:hover { filter: brightness(1.1); }
    .ref-btn:disabled { opacity: 0.5; cursor: not-allowed; }
    .ref-link-preview {
      font-size: 11px; color: var(--text-dim);
      word-break: break-all; line-height: 1.4;
    }

    .ref-stats-row {
      display: grid; grid-template-columns: 1fr 1fr 1fr;
      gap: 10px; margin: 0 16px 16px;
    }
    .ref-stat {
      background: rgba(255,255,255,0.03);
      border: 1px solid rgba(255,255,255,0.07);
      border-radius: 10px; padding: 14px 8px;
      text-align: center;
    }
    .ref-stat.highlight {
      background: rgba(200,151,58,0.06);
      border-color: rgba(200,151,58,0.2);
    }
    .ref-stat-val   { font-size: 28px; font-weight: 700; color: var(--text-light); }
    .ref-stat.highlight .ref-stat-val { color: var(--gold-lt); }
    .ref-stat-label { font-size: 11px; color: var(--text-dim); margin-top: 4px; }

    .ref-section {
      margin: 0 16px 16px;
      background: rgba(255,255,255,0.02);
      border: 1px solid rgba(255,255,255,0.06);
      border-radius: 12px; padding: 16px;
    }
    .ref-section-title {
      font-size: 10px; letter-spacing: 2px;
      color: var(--text-dim); font-family: Cinzel, serif;
      margin-bottom: 12px;
    }

    .ref-step {
      display: flex; align-items: flex-start; gap: 12px;
      padding: 8px 0; font-size: 13px; color: var(--text-mid);
      border-bottom: 1px solid rgba(255,255,255,0.04);
      line-height: 1.5;
    }
    .ref-step:last-child { border-bottom: none; }
    .ref-step-num {
      min-width: 24px; height: 24px; border-radius: 50%;
      background: rgba(200,151,58,0.15); color: var(--gold-lt);
      font-size: 12px; font-weight: 700; display: flex;
      align-items: center; justify-content: center; flex-shrink: 0;
      margin-top: 1px;
    }

    .ref-hist-row {
      display: flex; align-items: center; justify-content: space-between;
      padding: 10px 0;
      border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    .ref-hist-row:last-child { border-bottom: none; }
    .ref-hist-left  { display: flex; align-items: center; gap: 10px; }
    .ref-hist-icon  { font-size: 18px; }
    .ref-hist-label { font-size: 13px; color: var(--text-mid); }
    .ref-hist-date  { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
    .ref-hist-reward { font-size: 12px; color: var(--green); font-weight: 600; }

    .ref-input {
      background: rgba(255,255,255,0.05);
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 8px; padding: 9px 12px;
      color: var(--text-light); font-size: 14px;
      font-family: Jost, sans-serif; letter-spacing: 2px;
    }
    .ref-input:focus { outline: none; border-color: rgba(200,151,58,0.4); }

    /* ─── BILL SPLITTER (5.4) ───────────────────────────────── */
    .sp-wrap {
      max-width: 600px; margin: 0 auto;
      padding: 0 0 40px;
      font-family: Jost, sans-serif;
    }
    .sp-topbar {
      display: flex; align-items: center; gap: 10px;
      padding: 14px 18px;
      background: rgba(200,151,58,0.05);
      border-bottom: 1px solid rgba(200,151,58,0.15);
      position: sticky; top: 0; z-index: 5;
    }
    .sp-title {
      flex: 1; font-family: Cinzel, serif;
      font-size: 13px; letter-spacing: 1.5px; color: var(--gold-lt);
    }
    .sp-back-btn, .sp-history-btn, .sp-save-btn {
      background: none; border: 1px solid rgba(200,151,58,0.3);
      border-radius: 6px; color: var(--gold-lt);
      font-size: 12px; padding: 5px 10px; cursor: pointer;
      font-family: Jost, sans-serif;
    }
    .sp-back-btn:hover, .sp-history-btn:hover, .sp-save-btn:hover {
      background: rgba(200,151,58,0.08);
    }

    .sp-section {
      margin: 12px 16px;
      background: rgba(255,255,255,0.02);
      border: 1px solid rgba(255,255,255,0.07);
      border-radius: 12px;
      padding: 14px;
    }
    .sp-section-header {
      display: flex; justify-content: space-between; align-items: center;
      margin-bottom: 12px;
    }
    .sp-section-title {
      font-size: 11px; letter-spacing: 1.5px;
      color: var(--text-dim); font-family: Cinzel, serif;
    }
    .sp-add-btn {
      background: rgba(200,151,58,0.1); border: 1px solid rgba(200,151,58,0.3);
      border-radius: 6px; color: var(--gold-lt); font-size: 12px;
      padding: 4px 10px; cursor: pointer; font-family: Jost, sans-serif;
    }
    .sp-add-btn:disabled { opacity: 0.4; cursor: not-allowed; }

    .sp-my-handles { border-color: rgba(200,151,58,0.2); }
    .sp-handles-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
    .sp-handles-row .sp-input { flex: 1; min-width: 140px; }
    .sp-save-handles-btn {
      background: rgba(200,151,58,0.15); border: 1px solid rgba(200,151,58,0.35);
      border-radius: 6px; color: var(--gold-lt); font-size: 13px;
      padding: 6px 14px; cursor: pointer; font-family: Jost, sans-serif;
      white-space: nowrap;
    }

    .sp-mode-toggle {
      display: flex; gap: 8px; margin: 12px 16px 4px;
    }
    .sp-mode-btn {
      flex: 1; padding: 10px; border-radius: 8px;
      background: rgba(255,255,255,0.03);
      border: 1px solid rgba(255,255,255,0.1);
      color: var(--text-dim); font-size: 14px;
      cursor: pointer; font-family: Jost, sans-serif;
      transition: all 0.15s;
    }
    .sp-mode-btn.active {
      background: rgba(200,151,58,0.12);
      border-color: rgba(200,151,58,0.4);
      color: var(--gold-lt);
    }

    .sp-input {
      width: 100%; box-sizing: border-box;
      background: rgba(255,255,255,0.05);
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 7px; padding: 8px 10px;
      color: var(--text-light); font-size: 13px;
      font-family: Jost, sans-serif;
    }
    .sp-input:focus { outline: none; border-color: rgba(200,151,58,0.4); }

    .sp-person-row {
      display: flex; align-items: flex-start; gap: 8px;
      padding: 8px 0;
      border-bottom: 1px solid rgba(255,255,255,0.04);
    }
    .sp-person-row:last-child { border-bottom: none; }
    .sp-person-emoji { font-size: 20px; padding-top: 6px; }
    .sp-person-fields { flex: 1; display: flex; flex-direction: column; gap: 5px; }
    .sp-name  { font-size: 14px; font-weight: 500; }
    .sp-handle { font-size: 12px; opacity: 0.8; }
    .sp-remove-btn {
      background: none; border: none; color: #e05c5c;
      font-size: 16px; cursor: pointer; padding: 4px 6px;
      line-height: 1; flex-shrink: 0;
    }
    .sp-remove-btn:disabled { color: rgba(255,255,255,0.15); cursor: not-allowed; }

    .sp-item-row {
      padding: 10px 0;
      border-bottom: 1px solid rgba(255,255,255,0.04);
    }
    .sp-item-row:last-child { border-bottom: none; }
    .sp-item-top {
      display: flex; gap: 8px; align-items: center; margin-bottom: 8px;
    }
    .sp-item-desc { flex: 1; }
    .sp-item-amt  { width: 80px; text-align: right; }
    .sp-assign-row { display: flex; flex-wrap: wrap; gap: 6px; }
    .sp-assign-btn {
      padding: 4px 10px; border-radius: 16px;
      background: rgba(255,255,255,0.05);
      border: 1px solid rgba(255,255,255,0.12);
      color: var(--text-dim); font-size: 12px;
      cursor: pointer; font-family: Jost, sans-serif;
      transition: all 0.15s;
    }
    .sp-assign-btn.assigned {
      background: rgba(200,151,58,0.18);
      border-color: rgba(200,151,58,0.5);
      color: var(--gold-lt);
    }

    .sp-calc-btn {
      display: block; width: calc(100% - 32px); margin: 16px 16px 0;
      padding: 14px; background: linear-gradient(135deg,#c8973a,#a67828);
      border: none; border-radius: 10px; color: #0e1117;
      font-size: 15px; font-weight: 700; font-family: Cinzel, serif;
      letter-spacing: 0.5px; cursor: pointer;
    }
    .sp-calc-btn:hover { filter: brightness(1.08); }

    /* Results */
    .sp-grand-total {
      text-align: center; padding: 28px 20px 20px;
    }
    .sp-result-card {
      margin: 0 16px 12px;
      background: rgba(255,255,255,0.03);
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 12px; padding: 14px 16px;
    }
    .sp-result-header {
      display: flex; justify-content: space-between;
      align-items: center; margin-bottom: 12px;
    }
    .sp-result-name { font-size: 16px; color: var(--text-light); font-weight: 600; }
    .sp-result-amt  { font-size: 22px; color: var(--gold-lt); font-weight: 700; }
    .sp-result-actions { display: flex; gap: 8px; flex-wrap: wrap; }
    .sp-pay-btn {
      flex: 1; min-width: 70px; padding: 9px 6px; border-radius: 8px;
      border: none; font-size: 13px; font-family: Jost, sans-serif;
      cursor: pointer; text-align: center; text-decoration: none;
      display: inline-block; transition: filter 0.15s;
    }
    .sp-pay-btn:hover:not(:disabled) { filter: brightness(1.1); }
    .sp-pay-btn.venmo   { background: #3D95CE; color: #fff; }
    .sp-pay-btn.cashapp { background: #00D64F; color: #000; }
    .sp-pay-btn.zelle   { background: #6E2FBF; color: #fff; }
    .sp-pay-btn.copy    { background: rgba(200,151,58,0.18); color: var(--gold-lt); border: 1px solid rgba(200,151,58,0.3); }
    .sp-pay-btn.dim     { opacity: 0.35; cursor: not-allowed; }

    /* History */
    .sp-history-row {
      display: flex; align-items: center; justify-content: space-between;
      padding: 14px 16px; cursor: pointer;
      border-bottom: 1px solid rgba(255,255,255,0.05);
      transition: background 0.15s;
    }
    .sp-history-row:hover { background: rgba(255,255,255,0.03); }
    .sp-hist-names { font-size: 14px; color: var(--text-light); }
    .sp-hist-date  { font-size: 11px; color: var(--text-dim); margin-top: 3px; }
    .sp-hist-total { font-size: 18px; color: var(--gold-lt); font-weight: 600; }

    /* ─── TOAST ───────────────────────────────────────────────── */
    .toast {
      position: fixed;
      bottom: 28px;
      right: 24px;
      background: var(--surface);
      border: 1px solid rgba(200,151,58,0.3);
      border-radius: 10px;
      padding: 12px 18px;
      font-size: 13px;
      color: var(--text);
      box-shadow: 0 8px 32px rgba(0,0,0,0.4);
      transform: translateY(80px);
      opacity: 0;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      z-index: 999;
      max-width: 280px;
    }

    .toast.show { transform: translateY(0); opacity: 1; }

    /* ─── SCROLLBAR ───────────────────────────────────────────── */
    ::-webkit-scrollbar { width: 5px; height: 5px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

    /* ─── ANIMATIONS ──────────────────────────────────────────── */
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(8px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    .fade-in { animation: fadeIn 0.35s ease forwards; }

    @keyframes shimmer {
      0%   { opacity: 0.6; }
      50%  { opacity: 1; }
      100% { opacity: 0.6; }
    }

    /* ─── SECTION HEADERS ─────────────────────────────────────── */
    .section-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 20px;
    }

    .section-title {
      font-family: 'Cinzel', serif;
      font-size: 18px;
      font-weight: 700;
      color: var(--gold-lt);
      letter-spacing: 0.05em;
    }

    .section-sub {
      font-size: 12px;
      color: var(--text-dim);
      margin-top: 3px;
    }

    .btn-outline {
      background: none;
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 8px 14px;
      color: var(--text-mid);
      font-family: 'Jost', sans-serif;
      font-size: 12px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .btn-outline:hover { border-color: rgba(200,151,58,0.3); color: var(--gold-lt); }

    /* ─── DASHBOARD CORE ─────────────────────────────────────── */
    .dashboard-hero {
      display: flex;
      flex-direction: column;
      gap: 14px;
      margin-bottom: 20px;
    }

    .spend-meter {
      background:
        radial-gradient(circle at top center, rgba(200,151,58,0.10), transparent 55%),
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)),
        var(--surface2);
      border: 1px solid rgba(230,192,123,0.18);
      border-radius: 16px;
      padding: 20px 24px 22px;
      text-align: center;
    }

    #hero-display {
      width: 100%;
      max-width: 300px;
      margin: 0 auto -4px;
    }
    #hero-display svg, .fuel-gauge-svg {
      width: 100%;
      display: block;
      overflow: visible;
    }

    .spend-meter-footer {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      margin-top: 12px;
      flex-wrap: wrap;
    }

    .spend-meter-label {
      font-size: 10px;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: var(--text-dim);
      margin-top: 2px;
    }

    .spend-meter-amount {
      font-family: 'Cinzel', serif;
      font-size: clamp(34px, 7vw, 48px);
      font-weight: 900;
      color: var(--gold-lt);
      line-height: 1;
      margin-top: 4px;
      word-break: break-word;
    }

    .spend-meter-sub {
      font-size: 14px;
      color: var(--text);
      margin-top: 5px;
    }

    .spend-meter-note {
      font-size: 12px;
      color: var(--text-dim);
    }

    .risk-pill {
      border-radius: 999px;
      padding: 7px 12px;
      font-size: 11px;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      font-weight: 700;
      white-space: nowrap;
      border: 1px solid transparent;
    }

    .risk-pill.safe { background: rgba(80,200,120,0.14); color: var(--green); border-color: rgba(80,200,120,0.24); }
    .risk-pill.caution { background: rgba(230,192,123,0.16); color: #f3e1bc; border-color: rgba(230,192,123,0.24); }
    .risk-pill.danger { background: rgba(199,123,121,0.18); color: #f0d2d1; border-color: rgba(199,123,121,0.26); }

    .status-gauge {
      width: 100%;
      height: 12px;
      border-radius: 999px;
      background: rgba(255,255,255,0.14);
      overflow: hidden;
      margin-top: 14px;
    }

    .status-gauge-fill {
      height: 100%;
      border-radius: inherit;
      transition: width 0.25s ease;
    }

    .status-gauge-fill.safe { background: linear-gradient(90deg, #4f9f76, #60bb8c); }
    .status-gauge-fill.caution { background: linear-gradient(90deg, #b08a46, #e6c07b); }
    .status-gauge-fill.danger { background: linear-gradient(90deg, #9d4a4a, #bf5f5f); }

    .warning-banner {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      padding: 14px 16px;
      background: rgba(78,180,196,0.1);
      border: 1px solid rgba(78,180,196,0.24);
      border-radius: 12px;
      color: #e4edf8;
      font-size: 13px;
      line-height: 1.55;
    }

    .dashboard-metrics {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
      gap: 14px;
      margin-bottom: 20px;
    }

    .metric-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 18px 16px;
      min-width: 0;
    }

    .metric-label {
      font-size: 10px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--text-dim);
      margin-bottom: 10px;
    }

    .metric-value {
      font-family: 'Cinzel', serif;
      font-size: 23px;
      line-height: 1.15;
      color: var(--text);
      word-break: break-word;
    }

    .metric-value.tight {
      font-size: 18px;
      font-family: 'Jost', sans-serif;
      font-weight: 600;
    }

    .metric-meta {
      margin-top: 8px;
      font-size: 12px;
      color: var(--text-dim);
      line-height: 1.45;
    }

    .forecast-panel-body {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .forecast-chart-wrap {
      position: relative;
      height: 170px;
      margin: 0 -4px;
    }
    #forecast-chart {
      width: 100% !important;
      height: 100% !important;
    }

    .forecast-summary {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }

    .forecast-summary-card {
      background: rgba(255,255,255,0.02);
      border: 1px solid rgba(255,255,255,0.06);
      border-radius: 12px;
      padding: 14px;
      min-width: 0;
    }

    .forecast-summary-card .label {
      font-size: 10px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--text-dim);
      margin-bottom: 8px;
    }

    .forecast-summary-card .value {
      color: var(--text);
      font-size: 14px;
      line-height: 1.45;
      word-break: break-word;
    }

    .forecast-list {
      display: flex;
      flex-direction: column;
      gap: 10px;
      max-height: 420px;
      overflow-y: auto;
      padding-right: 4px;
    }

    .forecast-row {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      padding: 12px 0;
      border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .forecast-row:last-child { border-bottom: none; }

    .forecast-row-main,
    .forecast-row-values {
      min-width: 0;
    }

    .forecast-row-label {
      color: var(--text);
      font-size: 14px;
      line-height: 1.4;
    }

    .forecast-row-meta {
      color: var(--text-dim);
      font-size: 12px;
      margin-top: 3px;
      overflow-wrap: anywhere;
    }

    .forecast-certainty {
      text-transform: uppercase;
      letter-spacing: 0.06em;
      font-size: 10px;
      border-radius: 999px;
      padding: 1px 6px;
      border: 1px solid rgba(255,255,255,0.12);
    }

    .forecast-certainty.confirmed {
      color: var(--green);
      border-color: rgba(80,200,120,0.24);
      background: rgba(80,200,120,0.08);
    }

    .forecast-certainty.likely {
      color: #ffcf7a;
      border-color: rgba(255,207,122,0.25);
      background: rgba(255,207,122,0.08);
    }

    .forecast-certainty.estimated {
      color: #c7c2b4;
      border-color: rgba(199,194,180,0.22);
      background: rgba(199,194,180,0.08);
    }

    .forecast-note {
      margin-top: 10px;
      font-size: 12px;
      color: var(--text-dim);
      line-height: 1.5;
      border: 1px solid rgba(255,255,255,0.08);
      background: rgba(255,255,255,0.02);
      border-radius: 10px;
      padding: 10px 12px;
    }
    .eg-row {
      margin-bottom: 6px;
      color: #a09880;
    }
    .eg-row:last-child { margin-bottom: 0; }
    .eg-action {
      color: #c8973a;
      cursor: pointer;
      text-decoration: underline;
      font-weight: 500;
    }
    .eg-action:hover { color: #e4b96a; }

    .forecast-row-values {
      text-align: right;
      flex-shrink: 0;
    }

    .forecast-row-amount {
      font-family: 'Cinzel', serif;
      font-size: 14px;
    }

    .forecast-row-amount.positive { color: var(--green); }
    .forecast-row-amount.negative { color: var(--red); }

    .forecast-row-balance {
      color: var(--text-mid);
      font-size: 12px;
      margin-top: 4px;
    }

    .dashboard-content { align-items: start; }

    .tx-state-badge {
      display: inline-flex;
      align-items: center;
      border-radius: 999px;
      padding: 2px 8px;
      font-size: 10px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      border: 1px solid rgba(255,255,255,0.08);
    }

    .tx-state-badge.posted { color: var(--green); border-color: rgba(80,200,120,0.22); background: rgba(80,200,120,0.08); }
    .tx-state-badge.pending { color: var(--gold-lt); border-color: rgba(200,151,58,0.22); background: rgba(200,151,58,0.08); }
    .tx-state-badge.watchlist { color: #ffb86b; border-color: rgba(255,184,107,0.24); background: rgba(255,184,107,0.08); }
    .tx-state-badge.reversed { color: var(--text-dim); border-color: rgba(255,255,255,0.14); background: rgba(255,255,255,0.03); }
    .tx-state-badge.simulated { color: var(--teal); border-color: rgba(58,191,200,0.24); background: rgba(58,191,200,0.08); }

    .compact {
      padding: 7px 12px;
      font-size: 11px;
      justify-content: center;
    }

    .btn-outline.danger {
      color: #e6b0ae;
      border-color: rgba(199,123,121,0.28);
    }

    .editor-lifecycle-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      flex-wrap: wrap;
    }

    .editor-status {
      font-size: 11px;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--text-dim);
    }

    .editor-status.due,
    .editor-status.expected {
      color: #ffcf7a;
    }

    .editor-status.paid,
    .editor-status.received {
      color: var(--green);
    }

    .editor-status.skipped {
      color: #c7c2b4;
    }

    .affordability-panel,
    .management-panel {
      margin-bottom: 20px;
    }

    .stacked-form {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .inline-form {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      align-items: end;
    }

    .inline-form .form-field {
      min-width: 0;
    }

    .inline-form .form-field label {
      letter-spacing: 0.08em;
      line-height: 1.3;
      white-space: normal;
    }

    .inline-actions {
      grid-column: 1 / -1;
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      min-width: 0;
    }

    .inline-actions .btn-outline {
      width: 100%;
      min-width: 0;
    }

    .simple-input,
    .editor-add-grid input,
    .editor-add-grid select,
    .editor-row input,
    .editor-row select {
      width: 100%;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 10px 12px;
      color: var(--text);
      font-family: 'Jost', sans-serif;
      font-size: 13px;
      outline: none;
      min-width: 0;
    }

    .simple-input:focus,
    .editor-add-grid input:focus,
    .editor-add-grid select:focus,
    .editor-row input:focus,
    .editor-row select:focus {
      border-color: rgba(200,151,58,0.35);
    }

    .affordability-result {
      margin-top: 14px;
      border-top: 1px solid rgba(255,255,255,0.06);
      padding-top: 14px;
    }

    .result-empty {
      color: var(--text-dim);
      font-size: 13px;
      line-height: 1.5;
      overflow-wrap: anywhere;
    }

    .affordability-message {
      color: var(--text);
      font-size: 14px;
      line-height: 1.5;
      margin-bottom: 12px;
      overflow-wrap: anywhere;
    }

    .affordability-summary-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    .affordability-stat {
      background: rgba(255,255,255,0.02);
      border: 1px solid rgba(255,255,255,0.06);
      border-radius: 10px;
      padding: 12px;
      min-width: 0;
    }

    .affordability-stat .label {
      color: var(--text-dim);
      font-size: 10px;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      margin-bottom: 8px;
    }

    .affordability-stat .value {
      color: var(--text);
      font-family: 'Cinzel', serif;
      font-size: 16px;
      line-height: 1.35;
      word-break: break-word;
    }

    .affordability-stat .value.negative { color: var(--red); }
    .affordability-stat .value.positive { color: var(--green); }

    .affordability-meta {
      margin-top: 12px;
      color: var(--text-dim);
      font-size: 12px;
      line-height: 1.5;
      overflow-wrap: anywhere;
    }

    .management-section {
      padding-top: 16px;
      margin-top: 16px;
      border-top: 1px solid rgba(255,255,255,0.06);
    }

    .management-section:first-child {
      margin-top: 0;
      padding-top: 0;
      border-top: none;
    }

    .management-title {
      font-size: 11px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--text-dim);
      margin-bottom: 10px;
    }

    .management-copy {
      color: var(--text-dim);
      font-size: 12px;
      line-height: 1.45;
      margin-bottom: 12px;
    }

    .editor-add-grid,
    .editor-grid {
      display: grid;
      gap: 10px;
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .editor-add-grid-account,
    .editor-row:not(.editor-row-stacked) {
      grid-template-columns: 1.2fr 1fr auto;
    }

    .editor-add-grid-bill,
    .editor-add-grid-income,
    .editor-row-stacked .editor-grid {
      grid-template-columns: 1.3fr .9fr .95fr 1fr;
    }

    .editor-list {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin-top: 12px;
    }

    .editor-row {
      display: grid;
      grid-template-columns: 1.2fr 1fr auto;
      gap: 10px;
      align-items: start;
      padding: 12px;
      border-radius: 10px;
      background: rgba(255,255,255,0.02);
      border: 1px solid rgba(255,255,255,0.05);
    }

    .editor-row-stacked {
      grid-template-columns: 1fr;
    }

    .editor-actions {
      display: flex;
      gap: 8px;
      justify-content: flex-end;
      flex-wrap: wrap;
    }

    /* ─── MOBILE ──────────────────────────────────────────────── */
    @media (max-width: 600px) {
      .main { padding: 16px 14px; }
      .topnav { padding: 0 14px; }
      .nav-tabs { padding: 0 4px; }
      .card-amount { font-size: 20px; }
      .overview-grid { gap: 10px; }
      .overview-card { padding: 14px 16px; }
      .household-badge { display: none; }
      .spend-meter-header { flex-direction: column; align-items: flex-start; }
      .dashboard-metrics { grid-template-columns: 1fr 1fr; }
      .forecast-summary { grid-template-columns: 1fr; }
      .forecast-row { flex-direction: column; }
      .forecast-row-values { text-align: left; }
      .metric-value { font-size: 20px; }
      .inline-form,
      .inline-actions,
      .editor-add-grid,
      .editor-add-grid-account,
      .editor-add-grid-bill,
      .editor-add-grid-income,
      .editor-row,
      .editor-row-stacked .editor-grid,
      .affordability-summary-grid {
        grid-template-columns: 1fr;
      }
      .editor-actions { justify-content: stretch; }
      .editor-actions .btn-outline { width: 100%; }
      .import-export-grid { grid-template-columns: 1fr; }
      .budget-top-actions { width: 100%; }
      .budget-top-actions .btn-outline { width: 100%; justify-content: center; }
      .budget-summary-values { text-align: left; }
    }

    /* ── Import / Export Rows ───────────────────────────────── */
    .io-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 12px 14px;
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 8px;
      background: rgba(255,255,255,0.02);
      transition: border-color 0.2s, background 0.2s;
    }
    .io-row:hover { border-color: rgba(200,151,58,0.3); background: rgba(200,151,58,0.05); }
    .io-info { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
    .io-icon { font-size: 20px; flex-shrink: 0; }
    .io-label { font-size: 13px; font-weight: 600; color: #e8e4d8; font-family: Jost, sans-serif; }
    .io-sub { font-size: 11px; color: #7a7468; margin-top: 2px; font-family: Jost, sans-serif; }
    .io-btn {
      flex-shrink: 0;
      background: transparent;
      border: 1px solid rgba(200,151,58,0.45);
      color: #c8973a;
      font-family: Cinzel, serif;
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.08em;
      padding: 6px 16px;
      border-radius: 5px;
      cursor: pointer;
      transition: background 0.2s, border-color 0.2s, color 0.2s;
      white-space: nowrap;
    }
    .io-btn:hover { background: #c8973a; color: #080a0f; border-color: #c8973a; }
    .io-btn:active { background: #a87830; border-color: #a87830; color: #080a0f; }

    .import-mode-toggle {
      display: flex;
      gap: 8px;
    }

    .import-mode-btn {
      flex: 1;
      background: transparent;
      border: 1px solid rgba(255,255,255,0.16);
      color: var(--text-dim);
      border-radius: 8px;
      padding: 8px 10px;
      font-family: Jost, sans-serif;
      font-size: 11px;
      letter-spacing: 0.07em;
      text-transform: uppercase;
      cursor: pointer;
    }

    .import-mode-btn.active {
      border-color: rgba(200,151,58,0.55);
      color: var(--gold);
      background: rgba(200,151,58,0.08);
    }

    .import-mode-note {
      font-size: 11px;
      color: var(--text-dim);
      line-height: 1.45;
      margin-top: 2px;
      overflow-wrap: anywhere;
    }

    .import-export-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px;
      margin-top: 24px;
    }

    /* ─── ONBOARDING WIZARD ───────────────────────────────────── */
    #onboarding-modal {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.84);
      z-index: 2000;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      backdrop-filter: blur(6px);
    }

    .onboarding-card {
      background: var(--surface);
      border: 1px solid rgba(200,151,58,0.22);
      border-radius: 20px;
      padding: 36px 32px 28px;
      width: 100%;
      max-width: 460px;
      box-shadow: 0 40px 80px rgba(0,0,0,0.55), 0 0 0 1px rgba(200,151,58,0.07);
      position: relative;
    }

    .ob-dismiss {
      position: absolute;
      top: 14px;
      right: 16px;
      background: none;
      border: none;
      color: var(--text-dim);
      font-size: 16px;
      cursor: pointer;
      padding: 4px 6px;
      line-height: 1;
      opacity: 0.55;
      transition: opacity 0.15s;
    }
    .ob-dismiss:hover { opacity: 1; }

    .onboarding-dots {
      display: flex;
      gap: 8px;
      justify-content: center;
      margin-bottom: 28px;
    }

    .onboarding-dot {
      width: 8px;
      height: 8px;
      border-radius: 4px;
      background: rgba(255,255,255,0.1);
      transition: all 0.3s ease;
    }

    .onboarding-dot.active {
      background: var(--gold);
      width: 26px;
    }

    .onboarding-step { display: none; }
    .onboarding-step.active { display: block; animation: fadeIn 0.3s ease; }

    .ob-icon {
      font-size: 38px;
      text-align: center;
      display: block;
      margin-bottom: 14px;
      filter: drop-shadow(0 0 14px rgba(200,151,58,0.45));
    }

    .ob-title {
      font-family: 'Cinzel', serif;
      font-size: clamp(20px, 4vw, 24px);
      font-weight: 700;
      color: var(--gold-lt);
      text-align: center;
      line-height: 1.25;
      margin-bottom: 14px;
      letter-spacing: 0.03em;
    }

    .ob-desc {
      font-size: 14px;
      color: var(--text-dim);
      text-align: center;
      line-height: 1.7;
      margin-bottom: 22px;
    }

    .ob-features {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin-bottom: 28px;
    }

    .ob-feature {
      display: flex;
      align-items: center;
      gap: 13px;
      background: rgba(255,255,255,0.03);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 12px 15px;
      font-size: 13px;
      color: var(--text-mid);
    }

    .ob-feature-icon { font-size: 19px; flex-shrink: 0; }
    .ob-feature-label { font-weight: 500; }
    .ob-feature-sub { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

    .ob-form { margin-bottom: 24px; }

    .ob-hint {
      font-size: 11px;
      color: var(--text-dim);
      margin-top: 6px;
      line-height: 1.55;
    }

    .ob-actions {
      display: flex;
      gap: 9px;
      justify-content: flex-end;
      align-items: center;
      flex-wrap: wrap;
    }

    .ob-actions .btn-primary { width: auto; margin: 0; padding: 11px 20px; }
    .ob-actions .btn-outline  { padding: 10px 16px; font-size: 12px; }

    /* Bank connect coming-soon block */
    .ob-bank-coming-soon {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      background: rgba(255,255,255,0.02);
      border: 1px dashed rgba(255,255,255,0.1);
      border-radius: 14px;
      padding: 24px 20px;
      margin: 16px 0 20px;
    }
    .ob-bank-icon { font-size: 32px; margin-bottom: 4px; opacity: 0.4; }
    .ob-bank-label {
      font-family: Cinzel, serif;
      font-size: 13px;
      font-weight: 600;
      color: #5a5650;
      letter-spacing: 0.08em;
    }
    .ob-bank-sub { font-family: Jost, sans-serif; font-size: 11px; color: #3a3830; }
    .ob-coming-soon-badge {
      margin-top: 8px;
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 20px;
      padding: 3px 12px;
      font-family: Cinzel, serif;
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.14em;
      color: #5a5650;
      text-transform: uppercase;
    }

    @media (max-width: 480px) {
      .onboarding-card { padding: 28px 20px 22px; }
      .ob-title { font-size: 19px; }
    }

    /* ── ONBOARDING WOW SCREEN ─────────────────────────────────── */
    .ob-wow {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      padding: 6px 0 4px;
    }

    .ob-wow-label {
      font-family: 'Cinzel', serif;
      font-size: 10px;
      letter-spacing: 0.22em;
      color: var(--text-dim);
      text-transform: uppercase;
      margin-bottom: 10px;
    }

    .ob-wow-amount {
      font-family: 'Cinzel', serif;
      font-size: clamp(46px, 13vw, 62px);
      font-weight: 700;
      line-height: 1;
      color: #60bb8c;
      margin-bottom: 12px;
      letter-spacing: -0.01em;
      transition: color 0.4s ease;
    }

    .ob-wow-badge {
      font-family: 'Cinzel', serif;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.16em;
      padding: 5px 18px;
      border-radius: 20px;
      text-transform: uppercase;
      margin-bottom: 16px;
    }

    .ob-wow-badge.safe    { background: rgba(96,187,140,0.14);  color: #60bb8c; border: 1px solid rgba(96,187,140,0.28); }
    .ob-wow-badge.caution { background: rgba(200,151,58,0.14);  color: #c8973a; border: 1px solid rgba(200,151,58,0.28); }
    .ob-wow-badge.danger  { background: rgba(199,123,121,0.14); color: #c77b79; border: 1px solid rgba(199,123,121,0.28); }

    .ob-wow-gauge {
      width: 100%;
      max-width: 220px;
      margin: 0 auto 14px;
    }

    .ob-wow-copy {
      font-size: 13px;
      color: var(--text-mid);
      line-height: 1.65;
      max-width: 320px;
      margin: 0 auto 8px;
    }

    .ob-wow-low {
      font-size: 11px;
      color: var(--text-dim);
      margin-bottom: 2px;
    }

    /* ── FINANCIAL EDUCATION ───────────────────────────────────── */
    .term-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: rgba(200,151,58,0.1);
      border: 1px solid rgba(200,151,58,0.25);
      border-radius: 50%;
      color: rgba(200,151,58,0.7);
      font-size: 9px;
      width: 14px;
      height: 14px;
      cursor: pointer;
      padding: 0;
      vertical-align: middle;
      line-height: 1;
      transition: all 0.15s;
      font-family: 'Jost', sans-serif;
      flex-shrink: 0;
    }
    .term-btn:hover { background: rgba(200,151,58,0.2); color: #c8973a; border-color: rgba(200,151,58,0.5); }

    /* ── BILL CALENDAR STRIP ───────────────────────────────────── */
    .bill-strip {
      display: flex;
      overflow-x: auto;
      gap: 2px;
      padding: 12px;
      scrollbar-width: none;
    }
    .bill-strip::-webkit-scrollbar { display: none; }
    .bill-day {
      flex-shrink: 0;
      min-width: 58px;
      display: flex;
      flex-direction: column;
      gap: 4px;
      padding: 8px 6px;
      border-radius: 8px;
      transition: background 0.15s;
    }
    .bill-day:hover { background: rgba(255,255,255,0.03); }
    .bill-day.today {
      background: rgba(200,151,58,0.08);
      border: 1px solid rgba(200,151,58,0.2);
    }
    .bill-day.has-events { min-width: 72px; }
    .bill-day-header {
      display: flex;
      align-items: baseline;
      gap: 3px;
      padding-bottom: 4px;
      border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    .bill-day-dow {
      font-size: 9px;
      color: #4a4740;
      font-family: 'Jost', sans-serif;
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }
    .bill-day.today .bill-day-dow { color: #c8973a; }
    .bill-day-num {
      font-size: 13px;
      color: #7a7468;
      font-family: 'Cinzel', serif;
      line-height: 1;
    }
    .bill-day.today .bill-day-num { color: #c8973a; font-weight: 700; }
    .bill-day.has-events .bill-day-num { color: #e8e2d9; }
    .bill-day-mon {
      font-size: 9px;
      color: #c8973a;
      font-family: 'Jost', sans-serif;
      letter-spacing: 0.04em;
      margin-left: 2px;
    }
    .bill-chip {
      border-radius: 5px;
      padding: 3px 5px;
      font-size: 10px;
      font-family: 'Jost', sans-serif;
      line-height: 1.3;
      overflow: hidden;
    }
    .bill-chip.bill-type {
      background: rgba(224,92,92,0.12);
      border: 1px solid rgba(224,92,92,0.22);
      color: #e8c4c4;
    }
    .bill-chip.income-type {
      background: rgba(80,200,120,0.1);
      border: 1px solid rgba(80,200,120,0.22);
      color: #a0e8b8;
    }
    .bill-chip.more-type {
      background: rgba(255,255,255,0.05);
      border: 1px solid rgba(255,255,255,0.08);
      color: #7a7468;
      text-align: center;
    }
    .bill-chip-name {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 64px;
    }
    .bill-chip-amt {
      font-size: 9px;
      opacity: 0.75;
    }

    /* ── DETECTED SUBSCRIPTIONS ────────────────────────────────── */
    .detected-sub-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 12px 0;
      border-bottom: 1px solid rgba(255,255,255,0.05);
      flex-wrap: wrap;
    }
    .detected-sub-row:last-child { border-bottom: none; }
    .detected-sub-info { flex: 1; min-width: 0; }
    .detected-sub-name {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 13px;
      color: #e8e2d9;
      font-family: 'Jost', sans-serif;
      margin-bottom: 4px;
      flex-wrap: wrap;
    }
    .detected-sub-pill {
      background: rgba(200,151,58,0.12);
      border: 1px solid rgba(200,151,58,0.25);
      color: #c8973a;
      font-size: 9px;
      font-family: 'Cinzel', serif;
      letter-spacing: 0.06em;
      padding: 2px 7px;
      border-radius: 10px;
      white-space: nowrap;
    }
    .detected-sub-meta {
      font-size: 11px;
      color: #7a7468;
      font-family: 'Jost', sans-serif;
      line-height: 1.5;
    }
    .detected-sub-actions {
      display: flex;
      gap: 8px;
      flex-shrink: 0;
    }
    .btn-sub-confirm {
      background: rgba(200,151,58,0.12);
      border: 1px solid rgba(200,151,58,0.3);
      color: #c8973a;
      padding: 6px 14px;
      border-radius: 6px;
      font-family: 'Cinzel', serif;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.06em;
      cursor: pointer;
      transition: all 0.15s;
      white-space: nowrap;
    }
    .btn-sub-confirm:hover { background: rgba(200,151,58,0.22); border-color: rgba(200,151,58,0.5); }
    .btn-sub-dismiss {
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.08);
      color: #7a7468;
      padding: 6px 14px;
      border-radius: 6px;
      font-family: 'Jost', sans-serif;
      font-size: 12px;
      cursor: pointer;
      transition: all 0.15s;
      white-space: nowrap;
    }
    .btn-sub-dismiss:hover { background: rgba(255,255,255,0.08); color: #a09880; }

    /* ── OVERDRAFT BANNER ──────────────────────────────────────── */
    .od-banner { margin-bottom: 14px; }
    .od-banner-inner {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      background: rgba(224,92,92,0.08);
      border: 1px solid rgba(224,92,92,0.28);
      border-radius: 12px;
      padding: 14px 16px;
    }
    .od-banner-icon { font-size: 22px; flex-shrink: 0; margin-top: 1px; }
    .od-banner-body { flex: 1; min-width: 0; }
    .od-banner-title {
      font-family: 'Cinzel', serif;
      font-size: 11px;
      font-weight: 700;
      color: #e8a0a0;
      letter-spacing: 0.07em;
      text-transform: uppercase;
      margin-bottom: 5px;
    }
    .od-banner-msg { font-size: 13px; color: #e8c4c4; margin-bottom: 8px; line-height: 1.5; }
    .od-banner-bills-label { font-size: 10px; color: #a09880; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
    .od-banner-bills { display: flex; flex-wrap: wrap; gap: 6px; }
    .od-bill-chip {
      background: rgba(224,92,92,0.12);
      border: 1px solid rgba(224,92,92,0.25);
      border-radius: 20px;
      padding: 3px 10px;
      font-size: 11px;
      color: #e8c4c4;
    }
    .od-banner-dismiss {
      background: none;
      border: none;
      color: rgba(255,255,255,0.3);
      font-size: 15px;
      cursor: pointer;
      flex-shrink: 0;
      padding: 0;
      line-height: 1;
    }
    .od-banner-dismiss:hover { color: rgba(255,255,255,0.6); }

    /* ── PAYCHECK CALCULATOR ───────────────────────────────────── */
    .pc-field-row  { display:flex;flex-direction:column;gap:5px; }
    .pc-label      { font-size:12px;color:#a09880;font-family:'Jost',sans-serif; }
    .pc-input      { background:rgba(255,255,255,0.04);border:1px solid rgba(255,255,255,0.1);border-radius:8px;color:#e8e2d9;font-family:'Jost',sans-serif;font-size:14px;padding:10px 12px;outline:none;width:100%; }
    .pc-input:focus { border-color:rgba(200,151,58,0.4); }
    .pc-input option { background:#0e1117; }

    /* ── STEWARD CHAT ──────────────────────────────────────────── */
    .steward-wrap {
      display: flex;
      flex-direction: column;
      height: calc(100vh - 200px);
      max-width: 680px;
      margin: 0 auto;
      padding-bottom: 4px;
    }
    .steward-head {
      text-align: center;
      padding: 16px 0 12px;
    }
    .steward-chips-wrap {
      padding: 0 0 14px;
    }
    .steward-quick-select {
      width: 100%;
      background: rgba(200,151,58,0.07);
      border: 1px solid rgba(200,151,58,0.22);
      color: #a09880;
      padding: 9px 14px;
      border-radius: 10px;
      font-size: 13px;
      font-family: 'Jost', sans-serif;
      cursor: pointer;
      appearance: none;
      -webkit-appearance: none;
      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='%23c8973a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 14px center;
    }
    .steward-quick-select:focus { outline: none; border-color: rgba(200,151,58,0.5); color: #c8973a; }
    .steward-quick-select option { background: #141820; color: #c8c4b8; }
    .steward-messages {
      flex: 1;
      overflow-y: auto;
      padding: 4px 0;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    .steward-bubble {
      display: flex;
      gap: 10px;
      align-items: flex-start;
      max-width: 88%;
    }
    .steward-bubble.user { margin-left: auto; flex-direction: row-reverse; }
    .steward-bubble-body {
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 12px;
      padding: 10px 14px;
      font-size: 13.5px;
      font-family: 'Jost', sans-serif;
      color: #e8e2d9;
      line-height: 1.6;
    }
    .steward-bubble.user .steward-bubble-body {
      background: rgba(200,151,58,0.09);
      border-color: rgba(200,151,58,0.2);
    }
    .steward-bubble-avatar {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 13px;
      flex-shrink: 0;
      margin-top: 2px;
    }
    .steward-bubble.assistant .steward-bubble-avatar {
      background: rgba(200,151,58,0.1);
      border: 1px solid rgba(200,151,58,0.22);
    }
    .steward-bubble.user .steward-bubble-avatar { background: rgba(255,255,255,0.05); }
    .steward-input-row {
      display: flex;
      gap: 10px;
      padding-top: 12px;
      border-top: 1px solid rgba(255,255,255,0.06);
      margin-top: 4px;
    }
    .steward-input {
      flex: 1;
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 10px;
      color: #e8e2d9;
      font-family: 'Jost', sans-serif;
      font-size: 13.5px;
      padding: 10px 14px;
      resize: none;
      outline: none;
      line-height: 1.5;
      min-height: 44px;
      max-height: 120px;
    }
    .steward-input:focus { border-color: rgba(200,151,58,0.4); }
    .steward-send {
      background: #c8973a;
      border: none;
      border-radius: 10px;
      color: #0d0f14;
      padding: 10px 18px;
      cursor: pointer;
      font-family: 'Cinzel', serif;
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.04em;
      transition: background 0.15s;
      flex-shrink: 0;
      align-self: flex-end;
    }
    .steward-send:hover { background: #daa84a; }
    .steward-send:disabled { background: rgba(200,151,58,0.3); cursor: default; }
    .steward-typing { display: flex; gap: 5px; align-items: center; padding: 2px 0; }
    .steward-typing span {
      width: 7px; height: 7px;
      background: #c8973a;
      border-radius: 50%;
      animation: stewardBounce 1.2s ease-in-out infinite;
    }
    .steward-typing span:nth-child(2) { animation-delay: 0.2s; }
    .steward-typing span:nth-child(3) { animation-delay: 0.4s; }
    @keyframes stewardBounce { 0%,80%,100%{ transform:scale(0.65);opacity:0.35 } 40%{ transform:scale(1);opacity:1 } }

    /* ── CREDIT SCORE TRACKER ─────────────────────────────────── */
    .cs-hero {
      display: flex;
      align-items: center;
      gap: 20px;
      background: rgba(255,255,255,0.02);
      border: 1px solid rgba(255,255,255,0.07);
      border-radius: 14px;
      padding: 20px;
      margin-bottom: 14px;
    }
    .cs-gauge-wrap { flex-shrink: 0; width: 160px; }
    .cs-hero-right { flex: 1; }
    .cs-hero-label { font-size: 10px; color: #7a7468; font-family: 'Cinzel', serif; letter-spacing: 0.12em; margin-bottom: 4px; }
    .cs-hero-score { font-family: 'Cinzel', serif; font-size: 36px; font-weight: 700; line-height: 1; }
    .cs-hero-zone  { font-family: 'Cinzel', serif; font-size: 13px; letter-spacing: 0.08em; margin-top: 3px; }
    .cs-zone-pill  { display: inline-block; font-family: 'Cinzel', serif; font-size: 10px; font-weight: 700; letter-spacing: 0.14em; padding: 4px 14px; border-radius: 20px; border: 1px solid; margin-top: 6px; text-transform: uppercase; }
    .cs-hero-empty-sub { font-size: 11px; color: #4a4740; display: block; margin-top: 6px; line-height: 1.65; }
    .cs-mom        { font-size: 13px; font-weight: 600; margin-top: 6px; }
    .cs-mom.pos    { color: #60bb8c; }
    .cs-mom.neg    { color: #e05c5c; }
    .cs-source-tag { font-size: 11px; color: #4a4740; margin-top: 6px; font-family: 'Cinzel', serif; }
    .cs-updated    { font-size: 11px; color: #4a4740; margin-top: 2px; }
    .cs-hero-empty { font-size: 13px; color: #7a7468; line-height: 1.6; margin-bottom: 10px; }
    .cs-add-btn {
      margin-top: 12px;
      background: rgba(200,151,58,0.12);
      border: 1px solid rgba(200,151,58,0.3);
      color: #c8973a;
      padding: 8px 16px;
      border-radius: 8px;
      font-family: 'Cinzel', serif;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.08em;
      cursor: pointer;
      display: inline-block;
    }
    .cs-add-btn:hover { background: rgba(200,151,58,0.2); }

    .cs-zone-legend {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
      margin-bottom: 14px;
    }
    .cs-zone-item {
      display: flex;
      align-items: center;
      gap: 5px;
      background: rgba(255,255,255,0.02);
      border: 1px solid rgba(255,255,255,0.06);
      border-radius: 20px;
      padding: 4px 10px;
    }
    .cs-zone-dot   { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
    .cs-zone-range { font-size: 10px; color: #7a7468; }
    .cs-zone-label { font-size: 10px; color: #a09880; font-family: 'Cinzel', serif; }

    .cs-panel {
      background: rgba(255,255,255,0.02);
      border: 1px solid rgba(255,255,255,0.07);
      border-radius: 12px;
      padding: 16px;
      margin-bottom: 12px;
    }
    .cs-panel-title {
      font-family: 'Cinzel', serif;
      font-size: 11px;
      color: #7a7468;
      letter-spacing: 0.1em;
      margin-bottom: 14px;
    }
    .cs-chart-wrap { overflow-x: auto; }

    .cs-history-list { display: flex; flex-direction: column; gap: 2px; }
    .cs-history-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 4px;
      border-bottom: 1px solid rgba(255,255,255,0.04);
    }
    .cs-history-row:last-child { border-bottom: none; }
    .cs-history-left { display: flex; flex-direction: column; gap: 2px; }
    .cs-history-score { font-family: 'Cinzel', serif; font-size: 18px; font-weight: 700; }
    .cs-history-meta  { font-size: 11px; color: #7a7468; }
    .cs-history-right { display: flex; align-items: center; gap: 10px; }
    .cs-zone-badge {
      font-size: 9px;
      font-family: 'Cinzel', serif;
      border: 1px solid;
      padding: 2px 7px;
      border-radius: 10px;
      letter-spacing: 0.06em;
    }
    .cs-del-btn { background: none; border: none; color: #4a4740; font-size: 12px; cursor: pointer; padding: 2px; }
    .cs-del-btn:hover { color: #e05c5c; }

    .cs-factors-list { display: flex; flex-direction: column; gap: 12px; }
    .cs-factor-card {
      background: rgba(255,255,255,0.015);
      border: 1px solid rgba(255,255,255,0.05);
      border-radius: 10px;
      padding: 13px 14px;
    }
    .cs-factor-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
    .cs-factor-icon  { font-size: 18px; flex-shrink: 0; }
    .cs-factor-label { flex: 1; font-size: 14px; color: #e8e2d9; font-weight: 500; }
    .cs-factor-pct   { font-family: 'Cinzel', serif; font-size: 18px; font-weight: 700; color: #c8973a; }
    .cs-factor-bar-wrap {
      height: 5px;
      background: rgba(255,255,255,0.06);
      border-radius: 3px;
      margin-bottom: 9px;
      overflow: hidden;
    }
    .cs-factor-bar {
      height: 100%;
      background: linear-gradient(90deg, rgba(200,151,58,0.8), rgba(200,151,58,0.4));
      border-radius: 3px;
    }
    .cs-factor-desc { font-size: 12px; color: #7a7468; line-height: 1.65; }

    .cs-disclaimer {
      margin-top: 12px;
      padding: 12px 14px;
      background: rgba(78,180,196,0.04);
      border: 1px solid rgba(78,180,196,0.15);
      border-radius: 8px;
      font-size: 11px;
      color: #4a7080;
      line-height: 1.6;
    }

    /* ── CREDIT ALERTS ────────────────────────────────────────── */
    .ca-alerts-wrap { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
    .ca-alert {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 10px;
      border: 1px solid;
      border-radius: 10px;
      padding: 11px 13px;
    }
    .ca-alert-left  { display: flex; align-items: flex-start; gap: 10px; flex: 1; min-width: 0; }
    .ca-alert-icon  { font-size: 15px; flex-shrink: 0; margin-top: 1px; }
    .ca-alert-body  { font-size: 12px; line-height: 1.65; flex: 1; }
    .ca-ask-steward {
      font-family: 'Cinzel', serif;
      font-size: 10px;
      letter-spacing: 0.06em;
      cursor: pointer;
      text-decoration: underline;
      text-underline-offset: 2px;
      white-space: nowrap;
    }
    .ca-dismiss {
      background: none;
      border: none;
      color: #4a4740;
      font-size: 12px;
      cursor: pointer;
      padding: 0 0 0 6px;
      flex-shrink: 0;
      opacity: 0.5;
      line-height: 1;
      margin-top: 2px;
      transition: opacity 0.15s, color 0.15s;
    }
    .ca-dismiss:hover { opacity: 1; color: #e05c5c; }

    /* ── UTILIZATION PLANNER ──────────────────────────────────── */
    .util-overall-wrap { margin-bottom: 14px; }
    .util-overall-top  { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
    .util-overall-label { font-size: 10px; color: #7a7468; font-family: 'Cinzel', serif; letter-spacing: 0.12em; }
    .util-overall-pct   { font-family: 'Cinzel', serif; font-size: 28px; font-weight: 700; line-height: 1; }
    .util-overall-targets { font-size: 11px; color: #7a7468; margin-top: 8px; }

    .util-bar-wrap { position: relative; height: 8px; background: rgba(255,255,255,0.07); border-radius: 4px; overflow: visible; margin-top: 4px; }
    .util-bar-wrap.util-bar-overall { height: 11px; border-radius: 6px; }
    .util-bar-fill { height: 100%; border-radius: inherit; transition: width 0.4s ease; }
    .util-bar-marker { position: absolute; top: -3px; bottom: -3px; width: 2px; background: rgba(255,255,255,0.2); border-radius: 1px; pointer-events: none; }
    .util-bar-marker-10 { background: rgba(96,187,140,0.45); }

    .util-threshold-labels { position: relative; height: 18px; margin-top: 3px; }
    .util-threshold-label  { position: absolute; transform: translateX(-50%); font-size: 9px; color: #4a4740; letter-spacing: 0.04em; }

    .util-warn-banner { background: rgba(199,123,121,0.08); border: 1px solid rgba(199,123,121,0.2); border-radius: 8px; padding: 10px 13px; font-size: 12px; color: #c77b79; line-height: 1.6; margin: 12px 0 4px; }
    .util-cashflow-banner { background: rgba(78,180,196,0.07); border: 1px solid rgba(78,180,196,0.18); border-radius: 8px; padding: 10px 13px; font-size: 12px; color: #4eb4c4; line-height: 1.6; margin: 8px 0 4px; }

    .util-cards-list { display: flex; flex-direction: column; margin-top: 6px; }
    .util-card-row   { padding: 13px 0; border-top: 1px solid rgba(255,255,255,0.05); }
    .util-card-top   { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
    .util-card-name  { flex: 1; font-size: 14px; color: #e8e2d9; font-weight: 500; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .util-card-pct   { font-family: 'Cinzel', serif; font-size: 15px; font-weight: 700; flex-shrink: 0; }
    .util-card-edit  { background: none; border: none; color: #7a7468; font-size: 13px; cursor: pointer; padding: 2px 5px; flex-shrink: 0; }
    .util-card-edit:hover { color: #c8973a; }
    .util-card-del   { background: none; border: none; color: #4a4740; font-size: 12px; cursor: pointer; padding: 2px 4px; flex-shrink: 0; }
    .util-card-del:hover { color: #e05c5c; }
    .util-card-meta  { font-size: 11px; color: #7a7468; margin-bottom: 7px; }

    .util-target-row       { font-size: 11px; color: #7a7468; margin-top: 7px; }
    .util-target-ideal     { color: #c8973a; }
    .util-target-good      { color: #60bb8c; }
    .util-overlimit-tag    { font-size: 11px; color: #c77b79; margin-top: 4px; }

    .util-add-btn { background: rgba(78,180,196,0.1); border: 1px solid rgba(78,180,196,0.25); color: #4eb4c4; padding: 6px 14px; border-radius: 8px; font-family: 'Cinzel', serif; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; cursor: pointer; flex-shrink: 0; }
    .util-add-btn:hover { background: rgba(78,180,196,0.18); }

    .cs-util-empty      { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 18px 0 10px; gap: 10px; }
    .cs-util-empty-icon { font-size: 28px; opacity: 0.35; }
    .cs-util-empty-text { font-size: 13px; color: #7a7468; line-height: 1.65; max-width: 280px; }

    /* ── CRYPTO PORTFOLIO TRACKER ─────────────────────────────── */
    .crypto-summary-card {
      background: linear-gradient(135deg, rgba(247,147,26,0.07), rgba(98,126,234,0.05));
      border: 1px solid rgba(247,147,26,0.2);
      border-radius: 14px;
      padding: 20px;
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 16px;
    }
    .crypto-summary-left { flex: 1; min-width: 0; }
    .crypto-summary-label { font-size: 10px; color: #c8973a; font-family: 'Cinzel', serif; letter-spacing: 0.1em; margin-bottom: 4px; }
    .crypto-summary-total { font-family: 'Cinzel', serif; font-size: 28px; font-weight: 700; color: #e8e2d9; }
    .crypto-summary-basis { font-size: 12px; color: #7a7468; margin-top: 3px; }
    .crypto-summary-gain  { font-size: 13px; font-weight: 600; margin-top: 3px; }
    .crypto-gain.pos { color: #60bb8c; }
    .crypto-gain.neg { color: #e05c5c; }
    .crypto-price-age { font-size: 11px; color: #4a4740; margin-top: 10px; }
    .crypto-refresh-btn { background: none; border: none; color: #c8973a; font-size: 11px; cursor: pointer; padding: 0; font-family: 'Cinzel', serif; }
    .crypto-refresh-btn:hover { color: #e8c070; }

    .crypto-donut-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; flex-shrink: 0; }
    .crypto-legend { display: flex; flex-direction: column; gap: 4px; min-width: 80px; }
    .crypto-legend-row { display: flex; align-items: center; gap: 6px; }
    .crypto-legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
    .crypto-legend-label { font-size: 10px; color: #a09880; font-family: 'Cinzel', serif; flex: 1; }
    .crypto-legend-pct { font-size: 10px; color: #7a7468; }

    .crypto-add-btn {
      background: rgba(247,147,26,0.1);
      border: 1px solid rgba(247,147,26,0.28);
      color: #F7931A;
      padding: 6px 14px;
      border-radius: 6px;
      font-family: 'Cinzel', serif;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.08em;
      cursor: pointer;
    }
    .crypto-add-btn:hover { background: rgba(247,147,26,0.18); }

    .crypto-coin-card {
      background: rgba(255,255,255,0.02);
      border: 1px solid rgba(255,255,255,0.07);
      border-radius: 12px;
      padding: 14px 16px;
      margin-bottom: 10px;
    }
    .crypto-coin-top {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      margin-bottom: 12px;
    }
    .crypto-coin-identity { display: flex; align-items: center; gap: 10px; }
    .crypto-coin-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
    .crypto-coin-sym  { font-family: 'Cinzel', serif; font-size: 15px; font-weight: 700; color: #e8e2d9; }
    .crypto-coin-name { font-size: 11px; color: #7a7468; margin-top: 2px; }
    .crypto-coin-price { font-family: 'Cinzel', serif; font-size: 14px; color: #e8e2d9; font-weight: 600; }
    .crypto-change { font-size: 11px; font-weight: 600; display: block; margin-top: 3px; text-align: right; }
    .crypto-change.pos { color: #60bb8c; }
    .crypto-change.neg { color: #e05c5c; }

    .crypto-coin-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 12px;
      padding: 4px 0;
      border-top: 1px solid rgba(255,255,255,0.04);
      color: #a09880;
    }
    .crypto-coin-label { color: #7a7468; }
    .crypto-coin-value { font-family: 'Cinzel', serif; font-size: 13px; color: #e8e2d9; }
    .crypto-coin-gain.pos { color: #60bb8c; font-weight: 600; }
    .crypto-coin-gain.neg { color: #e05c5c; font-weight: 600; }

    .crypto-coin-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-top: 10px;
      padding-top: 8px;
      border-top: 1px solid rgba(255,255,255,0.05);
    }
    .crypto-alert-btn {
      background: rgba(200,151,58,0.08);
      border: 1px solid rgba(200,151,58,0.2);
      color: #c8973a;
      padding: 5px 10px;
      border-radius: 6px;
      font-size: 11px;
      cursor: pointer;
      font-family: 'Jost', sans-serif;
    }
    .crypto-alert-btn:hover { background: rgba(200,151,58,0.14); }
    .crypto-edit-btn {
      background: none;
      border: 1px solid rgba(255,255,255,0.08);
      color: #7a7468;
      padding: 5px 10px;
      border-radius: 6px;
      font-size: 11px;
      cursor: pointer;
    }
    .crypto-edit-btn:hover { color: #c8973a; }
    .crypto-del-btn { background: none; border: none; color: #7a7468; font-size: 13px; cursor: pointer; padding: 4px; margin-left: auto; }
    .crypto-del-btn:hover { color: #e05c5c; }

    .crypto-alert-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 14px;
      background: rgba(255,255,255,0.02);
      border: 1px solid rgba(255,255,255,0.07);
      border-radius: 8px;
      margin-bottom: 8px;
    }
    .crypto-alert-info { font-size: 13px; color: #a09880; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
    .crypto-alert-status { font-size: 10px; font-family: 'Cinzel', serif; color: #7a7468; margin-left: 4px; }

    .crypto-disclaimer {
      margin-top: 20px;
      padding: 12px 14px;
      background: rgba(255,255,255,0.02);
      border: 1px solid rgba(255,255,255,0.07);
      border-radius: 8px;
      font-size: 11px;
      color: #4a4740;
      line-height: 1.6;
    }
    .crypto-empty { text-align: center; padding: 40px 20px; color: #7a7468; }

    /* ── SUBSCRIPTION MANAGER ─────────────────────────────────── */
    .sub-burn-card {
      background: linear-gradient(135deg, rgba(200,151,58,0.08), rgba(224,92,92,0.05));
      border: 1px solid rgba(200,151,58,0.25);
      border-radius: 14px;
      padding: 20px;
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      margin-bottom: 16px;
    }
    .sub-burn-label { font-size: 11px; color: #c8973a; font-family: 'Cinzel', serif; letter-spacing: 0.1em; margin-bottom: 6px; }
    .sub-burn-amount { font-family: 'Cinzel', serif; font-size: 32px; font-weight: 700; color: #e8e2d9; }
    .sub-burn-period { font-size: 16px; color: #7a7468; font-weight: 400; margin-left: 4px; }
    .sub-burn-annual { font-size: 12px; color: #7a7468; margin-top: 4px; }
    .sub-add-btn {
      background: rgba(200,151,58,0.1);
      border: 1px solid rgba(200,151,58,0.28);
      color: #c8973a;
      padding: 8px 14px;
      border-radius: 8px;
      font-family: 'Cinzel', serif;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.08em;
      cursor: pointer;
      flex-shrink: 0;
    }
    .sub-add-btn:hover { background: rgba(200,151,58,0.18); }

    .sub-alerts-section {
      background: rgba(224,92,92,0.06);
      border: 1px solid rgba(224,92,92,0.2);
      border-radius: 12px;
      padding: 14px 16px;
      margin-bottom: 16px;
    }
    .sub-alert-row {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      padding: 8px 0;
      font-size: 13px;
      color: #e8c4c4;
      border-bottom: 1px solid rgba(255,255,255,0.04);
    }
    .sub-alert-row:last-child { border-bottom: none; }
    .sub-alert-icon { font-size: 16px; flex-shrink: 0; }

    .sub-section-label {
      font-size: 10px;
      color: #7a7468;
      font-family: 'Cinzel', serif;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      margin-bottom: 10px;
    }
    .sub-card {
      background: rgba(255,255,255,0.02);
      border: 1px solid rgba(255,255,255,0.07);
      border-radius: 12px;
      padding: 14px 16px;
      margin-bottom: 10px;
    }
    .sub-card-top {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      margin-bottom: 6px;
    }
    .sub-card-name {
      display: flex;
      align-items: center;
      gap: 7px;
      font-size: 14px;
      font-weight: 500;
      color: var(--text);
      flex-wrap: wrap;
    }
    .sub-freq-badge {
      font-size: 9px;
      font-family: 'Cinzel', serif;
      background: rgba(200,151,58,0.1);
      border: 1px solid rgba(200,151,58,0.22);
      color: #c8973a;
      padding: 2px 6px;
      border-radius: 10px;
    }
    .sub-auto-badge {
      font-size: 9px;
      font-family: 'Cinzel', serif;
      background: rgba(78,180,196,0.1);
      border: 1px solid rgba(78,180,196,0.22);
      color: #4eb4c4;
      padding: 2px 6px;
      border-radius: 10px;
    }
    .sub-card-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
    .sub-card-amt { font-family: 'Cinzel', serif; font-size: 16px; font-weight: 700; color: #e8e2d9; }
    .sub-del-btn { background: none; border: none; color: #7a7468; font-size: 13px; cursor: pointer; padding: 0; }
    .sub-del-btn:hover { color: #e05c5c; }
    .sub-card-meta { font-size: 11px; color: #7a7468; display: flex; justify-content: space-between; margin-bottom: 10px; }
    .sub-cancel-btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: rgba(224,92,92,0.08);
      border: 1px solid rgba(224,92,92,0.2);
      color: #e8a0a0;
      padding: 7px 13px;
      border-radius: 7px;
      font-size: 12px;
      font-family: 'Jost', sans-serif;
      cursor: pointer;
    }
    .sub-cancel-btn:hover { background: rgba(224,92,92,0.14); }
    .sub-cancel-generic { border-color: rgba(255,255,255,0.1); color: #7a7468; background: rgba(255,255,255,0.03); }
    .sub-cancel-generic:hover { background: rgba(255,255,255,0.06); color: #a09880; }
    .sub-empty { text-align: center; padding: 48px 20px; color: #7a7468; }

    /* Cancel instructions modal */
    .cancel-url-btn {
      display: block;
      background: rgba(78,180,196,0.08);
      border: 1px solid rgba(78,180,196,0.22);
      color: #4eb4c4;
      padding: 10px 14px;
      border-radius: 8px;
      font-size: 13px;
      text-decoration: none;
      text-align: center;
      margin-bottom: 6px;
    }
    .cancel-url-btn:hover { background: rgba(78,180,196,0.14); }
    .cancel-step { display: flex; gap: 12px; align-items: flex-start; padding: 2px 0; }
    .cancel-step-num {
      flex-shrink: 0;
      width: 22px;
      height: 22px;
      border-radius: 50%;
      background: rgba(224,92,92,0.12);
      border: 1px solid rgba(224,92,92,0.25);
      color: #e05c5c;
      font-family: 'Cinzel', serif;
      font-size: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .cancel-step-text { font-size: 13px; color: #a09880; line-height: 1.6; padding-top: 2px; }
    .cancel-note {
      background: rgba(200,151,58,0.06);
      border: 1px solid rgba(200,151,58,0.2);
      border-radius: 8px;
      padding: 10px 13px;
      font-size: 12px;
      color: #a09060;
      margin-top: 4px;
    }

    /* ── DEBT PAYOFF PLANNER ───────────────────────────────────── */
    .debt-strategy-wrap {
      background: rgba(255,255,255,0.02);
      border: 1px solid rgba(255,255,255,0.07);
      border-radius: 12px;
      padding: 16px;
      margin-bottom: 16px;
    }
    .debt-strat-btns {
      display: flex;
      gap: 8px;
      margin-bottom: 12px;
    }
    .debt-strat-btn {
      flex: 1;
      padding: 10px;
      border-radius: 8px;
      border: 1px solid rgba(255,255,255,0.08);
      background: rgba(255,255,255,0.03);
      color: #7a7468;
      font-family: 'Cinzel', serif;
      font-size: 11px;
      letter-spacing: 0.08em;
      cursor: pointer;
      transition: all 0.15s;
    }
    .debt-strat-btn.active {
      background: rgba(200,151,58,0.12);
      border-color: rgba(200,151,58,0.35);
      color: #c8973a;
    }
    .debt-explainer {
      font-size: 13px;
      color: #a09880;
      line-height: 1.6;
    }
    .debt-extra-wrap {
      background: rgba(255,255,255,0.02);
      border: 1px solid rgba(255,255,255,0.07);
      border-radius: 12px;
      padding: 16px 18px;
      margin-bottom: 16px;
    }
    .debt-extra-label {
      font-size: 11px;
      color: #7a7468;
      font-family: 'Cinzel', serif;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      display: block;
      margin-bottom: 10px;
    }
    .debt-extra-row {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .debt-extra-sign { font-size: 20px; color: #c8973a; font-family: 'Cinzel', serif; }
    .debt-extra-input {
      flex: 1;
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 8px;
      color: #e8e2d9;
      font-family: 'Cinzel', serif;
      font-size: 20px;
      padding: 10px 14px;
      outline: none;
      max-width: 160px;
    }
    .debt-extra-input:focus { border-color: rgba(200,151,58,0.4); }
    .debt-extra-hint { font-size: 13px; color: #7a7468; }

    /* Timeline card */
    .debt-timeline-card {
      background: rgba(200,151,58,0.05);
      border: 1px solid rgba(200,151,58,0.2);
      border-radius: 12px;
      padding: 18px;
      margin-bottom: 16px;
    }
    .debt-tl-row { display: flex; gap: 12px; margin-bottom: 12px; }
    .debt-tl-item { flex: 1; text-align: center; }
    .debt-tl-label { font-size: 10px; color: #7a7468; font-family: 'Cinzel', serif; letter-spacing: 0.1em; margin-bottom: 5px; }
    .debt-tl-value { font-family: 'Cinzel', serif; font-size: 15px; font-weight: 700; color: var(--text); }
    .debt-tl-value.gold { color: #c8973a; }
    .debt-tl-value.red  { color: #e05c5c; }
    .debt-savings-banner {
      display: flex;
      align-items: center;
      gap: 10px;
      background: rgba(96,187,140,0.07);
      border: 1px solid rgba(96,187,140,0.2);
      border-radius: 8px;
      padding: 10px 14px;
      font-size: 13px;
      color: #a0e8b8;
      margin-top: 4px;
    }
    .debt-savings-icon { font-size: 18px; flex-shrink: 0; }

    /* Debt cards */
    .debt-section-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 12px;
    }
    .debt-add-btn {
      background: rgba(200,151,58,0.1);
      border: 1px solid rgba(200,151,58,0.28);
      color: #c8973a;
      padding: 6px 14px;
      border-radius: 6px;
      font-family: 'Cinzel', serif;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.08em;
      cursor: pointer;
    }
    .debt-add-btn:hover { background: rgba(200,151,58,0.18); }
    .debt-card {
      background: rgba(255,255,255,0.02);
      border: 1px solid rgba(255,255,255,0.07);
      border-radius: 12px;
      padding: 16px;
      margin-bottom: 12px;
    }
    .debt-card.debt-paid {
      opacity: 0.55;
      border-color: rgba(96,187,140,0.2);
    }
    .debt-card-top {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      margin-bottom: 6px;
    }
    .debt-card-name {
      display: flex;
      align-items: center;
      gap: 8px;
      font-family: 'Jost', sans-serif;
      font-size: 14px;
      font-weight: 500;
      color: var(--text);
      flex-wrap: wrap;
    }
    .debt-rate-badge {
      font-size: 10px;
      font-family: 'Cinzel', serif;
      background: rgba(224,92,92,0.1);
      border: 1px solid rgba(224,92,92,0.25);
      color: #e8a0a0;
      padding: 2px 7px;
      border-radius: 10px;
    }
    .debt-paid-badge {
      font-size: 10px;
      font-family: 'Cinzel', serif;
      background: rgba(96,187,140,0.12);
      border: 1px solid rgba(96,187,140,0.3);
      color: #60bb8c;
      padding: 2px 7px;
      border-radius: 10px;
    }
    .debt-card-actions { display: flex; gap: 6px; flex-shrink: 0; }
    .debt-edit-btn, .debt-del-btn {
      background: none; border: none; cursor: pointer; font-size: 13px; padding: 0 2px;
    }
    .debt-edit-btn { color: #7a7468; } .debt-edit-btn:hover { color: #c8973a; }
    .debt-del-btn  { color: #7a7468; } .debt-del-btn:hover  { color: #e05c5c; }
    .debt-card-bal {
      font-family: 'Cinzel', serif;
      font-size: 22px;
      font-weight: 700;
      color: var(--text);
      margin-bottom: 10px;
    }
    .debt-card-min { font-size: 12px; color: #7a7468; font-family: 'Jost', sans-serif; font-weight: 400; margin-left: 6px; }
    .debt-progress-wrap {
      height: 6px;
      background: rgba(255,255,255,0.06);
      border-radius: 4px;
      overflow: hidden;
      margin-bottom: 6px;
    }
    .debt-progress-bar {
      height: 100%;
      border-radius: 4px;
      transition: width 0.6s ease;
    }
    .debt-card-meta {
      display: flex;
      justify-content: space-between;
      font-size: 11px;
      color: #7a7468;
      font-family: 'Jost', sans-serif;
    }
    .debt-empty {
      text-align: center;
      padding: 48px 20px;
      color: #7a7468;
    }
    .debt-overdue-badge {
      font-size: 9px; font-family: 'Cinzel', serif;
      background: rgba(224,92,92,0.15); border: 1px solid rgba(224,92,92,0.35);
      color: #e05c5c; padding: 2px 7px; border-radius: 10px;
    }
    .debt-plaid-badge {
      font-size: 9px; font-family: 'Cinzel', serif;
      background: rgba(78,180,196,0.1); border: 1px solid rgba(78,180,196,0.25);
      color: #4eb4c4; padding: 2px 7px; border-radius: 10px;
    }

    /* Plaid debt import panel */
    .dpi-loading { font-size: 13px; color: #7a7468; padding: 14px 0; }
    .dpi-banner {
      background: rgba(78,180,196,0.05);
      border: 1px solid rgba(78,180,196,0.2);
      border-radius: 12px;
      padding: 16px;
      margin-bottom: 16px;
    }
    .dpi-banner.dpi-relink { border-color: rgba(200,151,58,0.25); background: rgba(200,151,58,0.04); }
    .dpi-banner.dpi-error  { border-color: rgba(224,92,92,0.25); background: rgba(224,92,92,0.04); }
    .dpi-banner.dpi-empty  { border-color: rgba(255,255,255,0.07); background: rgba(255,255,255,0.01); }
    .dpi-banner.dpi-done   { border-color: rgba(96,187,140,0.25); background: rgba(96,187,140,0.04); }
    .dpi-banner-header {
      display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px;
    }
    .dpi-banner-title { font-family: 'Cinzel', serif; font-size: 12px; color: #4eb4c4; letter-spacing: 0.08em; margin-bottom: 3px; }
    .dpi-banner.dpi-relink .dpi-banner-title { color: #c8973a; }
    .dpi-banner.dpi-error  .dpi-banner-title { color: #e05c5c; }
    .dpi-banner.dpi-done   .dpi-banner-title { color: #60bb8c; }
    .dpi-banner-sub { font-size: 12px; color: #7a7468; line-height: 1.5; }
    .dpi-collapse-btn { background: none; border: none; color: #4a4740; font-size: 14px; cursor: pointer; padding: 0; flex-shrink: 0; }
    .dpi-collapse-btn:hover { color: #7a7468; }
    .dpi-disclaimer { font-size: 10px; color: #4a4740; margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.05); }
    .dpi-retry-btn {
      margin-top: 10px; background: rgba(224,92,92,0.1); border: 1px solid rgba(224,92,92,0.25);
      color: #e05c5c; padding: 6px 14px; border-radius: 6px; font-size: 11px; cursor: pointer;
    }
    .dpi-show-btn {
      background: rgba(78,180,196,0.08); border: 1px solid rgba(78,180,196,0.2);
      color: #4eb4c4; padding: 10px 16px; border-radius: 8px;
      font-family: 'Cinzel', serif; font-size: 11px; letter-spacing: 0.08em;
      cursor: pointer; width: 100%; margin-bottom: 16px; text-align: left;
    }
    .dpi-show-btn:hover { background: rgba(78,180,196,0.14); }
    .dpi-rows { display: flex; flex-direction: column; gap: 8px; }
    .dpi-row {
      display: flex; align-items: center; justify-content: space-between; gap: 12px;
      background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.06);
      border-radius: 10px; padding: 12px 14px;
    }
    .dpi-row.dpi-row-overdue { border-color: rgba(224,92,92,0.25); background: rgba(224,92,92,0.04); }
    .dpi-row-left { flex: 1; min-width: 0; }
    .dpi-row-top { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
    .dpi-row-icon { font-size: 18px; flex-shrink: 0; }
    .dpi-row-name { font-size: 14px; font-weight: 500; color: #e8e2d9; }
    .dpi-row-type { font-size: 11px; color: #7a7468; margin-top: 2px; font-family: 'Cinzel', serif; letter-spacing: 0.06em; }
    .dpi-status { background: rgba(255,255,255,0.06); padding: 1px 5px; border-radius: 4px; margin-left: 4px; text-transform: capitalize; }
    .dpi-overdue-badge {
      display: inline-block; font-size: 10px; font-family: 'Cinzel', serif;
      background: rgba(224,92,92,0.15); border: 1px solid rgba(224,92,92,0.3);
      color: #e05c5c; padding: 2px 8px; border-radius: 6px; margin-bottom: 6px;
    }
    .dpi-row-detail { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
    .dpi-row-bal { font-family: 'Cinzel', serif; font-size: 15px; font-weight: 700; color: #e8e2d9; }
    .dpi-row-meta { font-size: 11px; color: #7a7468; }
    .dpi-import-btn {
      background: rgba(78,180,196,0.1); border: 1px solid rgba(78,180,196,0.28);
      color: #4eb4c4; padding: 8px 14px; border-radius: 8px;
      font-family: 'Cinzel', serif; font-size: 10px; font-weight: 700;
      letter-spacing: 0.08em; cursor: pointer; flex-shrink: 0;
    }
    .dpi-import-btn:hover { background: rgba(78,180,196,0.18); }

    /* Celebration overlay */
    .debt-celebrate-card {
      background: #141820;
      border: 1px solid rgba(200,151,58,0.4);
      border-radius: 16px;
      padding: 36px 32px;
      text-align: center;
      max-width: 360px;
      width: 100%;
      position: relative;
      z-index: 1;
    }
    .debt-celebrate-emoji { font-size: 52px; margin-bottom: 12px; animation: celebratePop 0.4s ease; }
    .debt-celebrate-title { font-family: 'Cinzel', serif; font-size: 20px; font-weight: 700; color: #c8973a; letter-spacing: 0.1em; margin-bottom: 6px; }
    .debt-celebrate-name  { font-family: 'Jost', sans-serif; font-size: 16px; color: #e8e2d9; margin-bottom: 12px; }
    .debt-celebrate-sub   { font-size: 13px; color: #7a7468; line-height: 1.6; }
    @keyframes celebratePop { 0%{transform:scale(0)} 70%{transform:scale(1.15)} 100%{transform:scale(1)} }
    .debt-confetti-pieces { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: 0; }
    .confetti-piece {
      position: absolute;
      top: -10px;
      width: 8px;
      height: 8px;
      border-radius: 2px;
      animation: confettiFall 2.5s ease-in forwards;
    }
    @keyframes confettiFall {
      0%   { transform: translateY(0) rotate(0deg);   opacity: 1; }
      100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
    }

    /* ── NET WORTH TRACKER ─────────────────────────────────────── */
    .nw-hero {
      background: rgba(255,255,255,0.02);
      border: 1px solid rgba(255,255,255,0.07);
      border-radius: 16px;
      padding: 28px 24px 20px;
      text-align: center;
      margin-bottom: 20px;
    }
    .nw-hero-label {
      font-family: 'Cinzel', serif;
      font-size: 10px;
      letter-spacing: 0.2em;
      color: #7a7468;
      margin-bottom: 8px;
    }
    .nw-hero-value {
      font-family: 'Cinzel', serif;
      font-size: 40px;
      font-weight: 700;
      letter-spacing: -0.5px;
      line-height: 1.1;
      margin-bottom: 8px;
    }
    .nw-mom {
      font-family: 'Jost', sans-serif;
      font-size: 15px;
      font-weight: 500;
      margin-bottom: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
    }
    .nw-mom.pos { color: #60bb8c; }
    .nw-mom.neg { color: #e05c5c; }
    .nw-mom span { font-size: 13px; opacity: 0.8; }
    .nw-mom-label { font-size: 11px; color: #7a7468; font-weight: 400; }
    .nw-totals-row {
      display: flex;
      gap: 10px;
      justify-content: center;
      flex-wrap: wrap;
    }
    .nw-total-pill {
      font-size: 12px;
      font-family: 'Jost', sans-serif;
      padding: 5px 14px;
      border-radius: 20px;
    }
    .nw-total-pill.green { background: rgba(96,187,140,0.1); border: 1px solid rgba(96,187,140,0.25); color: #60bb8c; }
    .nw-total-pill.red   { background: rgba(224,92,92,0.1);  border: 1px solid rgba(224,92,92,0.25);  color: #e05c5c; }

    /* NW rows */
    .nw-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 20px;
      border-bottom: 1px solid rgba(255,255,255,0.04);
      font-family: 'Jost', sans-serif;
      font-size: 13px;
    }
    .nw-row:last-child { border-bottom: none; }
    .nw-row-group {
      background: rgba(255,255,255,0.02);
      font-size: 11px;
      font-family: 'Cinzel', serif;
      letter-spacing: 0.08em;
      color: #7a7468;
      padding: 8px 20px;
      border-bottom: 1px solid rgba(255,255,255,0.04);
    }
    .nw-row-label { display: flex; align-items: center; gap: 8px; color: var(--text-mid); }
    .nw-row-val   { color: var(--text); font-weight: 500; }
    .nw-row-actions { display: flex; align-items: center; gap: 8px; }
    .nw-row-dot {
      width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
    }
    .nw-row-dot.teal { background: #4eb4c4; }
    .nw-row-dot.gold { background: #c8973a; }
    .nw-row-dot.red  { background: #e05c5c; }
    .nw-badge-plaid {
      font-size: 8px; font-family: 'Cinzel', serif; letter-spacing: 0.1em;
      background: rgba(78,180,196,0.12); border: 1px solid rgba(78,180,196,0.25);
      color: #4eb4c4; padding: 1px 6px; border-radius: 8px;
    }
    .nw-edit-btn, .nw-del-btn {
      background: none; border: none; cursor: pointer;
      font-size: 13px; padding: 0 2px; line-height: 1;
    }
    .nw-edit-btn { color: #7a7468; }
    .nw-edit-btn:hover { color: #c8973a; }
    .nw-del-btn  { color: #7a7468; }
    .nw-del-btn:hover  { color: #e05c5c; }
    .nw-add-btn {
      background: rgba(200,151,58,0.1); border: 1px solid rgba(200,151,58,0.28);
      color: #c8973a; padding: 4px 12px; border-radius: 6px;
      font-family: 'Cinzel', serif; font-size: 10px; font-weight: 700;
      letter-spacing: 0.08em; cursor: pointer;
    }
    .nw-add-btn:hover { background: rgba(200,151,58,0.18); }

  /* ── Feedback FAB ─────────────────────────────────────────── */
  #feedback-fab {
    position: fixed;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    right: 16px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(200,151,58,0.15);
    border: 1px solid rgba(200,151,58,0.35);
    color: #c8973a;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.15s;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
  }
  #feedback-fab:hover  { background: rgba(200,151,58,0.25); transform: scale(1.06); }
  #feedback-fab:active { transform: scale(0.96); }

  /* Hide FAB on auth screen */
  body.auth-visible #feedback-fab { display: none; }

  /* ── Feedback star rating ─────────────────────────────────── */
  .fb-star {
    font-size: 28px;
    cursor: pointer;
    color: #5a6880;
    transition: color 0.15s, transform 0.1s;
    user-select: none;
    line-height: 1;
  }
  .fb-star.lit   { color: #c8973a; }
  .fb-star:hover { transform: scale(1.15); }

  /* ── Feedback tag pills ───────────────────────────────────── */
  .fb-tag {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    padding: 6px 13px;
    font-size: 12px;
    color: #8a9ab8;
    cursor: pointer;
    font-family: 'Jost', sans-serif;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
  }
  .fb-tag.active {
    background: rgba(200,151,58,0.18);
    border-color: rgba(200,151,58,0.5);
    color: #e6c07b;
  }

  /* ── NPS buttons ──────────────────────────────────────────── */
  .nps-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    color: #aeb9ca;
    font-size: 13px;
    font-family: 'Jost', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
  }
  .nps-btn:hover { background: rgba(200,151,58,0.15); border-color: rgba(200,151,58,0.4); color: #e6c07b; }
  .nps-btn.selected { background: #c8973a; border-color: #c8973a; color: #0b0f17; font-weight: 700; }

/* ─── NAV DROPDOWNS ───────────────────────────────────────── */
.nav-dropdown-parent {
  position: relative;
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--surface);
  border: 1px solid rgba(200,151,58,0.25);
  border-radius: 8px;
  min-width: 160px;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  overflow: hidden;
}
.nav-dropdown-parent:hover .nav-dropdown-menu {
  display: block;
}
.nav-dropdown-item {
  display: block;
  padding: 10px 16px;
  font-size: 12px;
  color: var(--text-mid);
  cursor: pointer;
  font-family: 'Jost', sans-serif;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.nav-dropdown-item:last-child { border-bottom: none; }
.nav-dropdown-item:hover { background: rgba(200,151,58,0.1); color: var(--gold-lt); }
.nav-dropdown-item.active { color: var(--gold-lt); background: rgba(200,151,58,0.08); }

/* ─── BUDGET COLUMNS ──────────────────────────────────────── */
.budget-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: start;
}
@media (max-width: 860px) {
  .budget-columns { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .budget-columns { grid-template-columns: 1fr; }
}
.budget-column { display: flex; flex-direction: column; gap: 12px; }
.budget-column .budget-card { flex: 1; }
.budget-column-header {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--gold-lt);
  text-transform: uppercase;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(200,151,58,0.2);
}

/* ── FINANCIAL HEALTH SCORE ─────────────────────────────────── */
.hs-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.hs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--border);
}
.hs-body {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px;
}
@media (max-width: 560px) {
  .hs-body { flex-direction: column; align-items: flex-start; gap: 16px; }
}
.hs-ring-wrap {
  position: relative;
  flex-shrink: 0;
  width: 100px;
  height: 100px;
}
.hs-ring-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}
.hs-score {
  font-family: 'Cinzel', serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}
.hs-grade {
  font-family: 'Jost', sans-serif;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}
.hs-components {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.hs-comp-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hs-comp-icon {
  font-size: 13px;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}
.hs-comp-info {
  flex: 1;
  min-width: 0;
}
.hs-comp-label {
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.hs-comp-bar-wrap {
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  height: 5px;
  overflow: hidden;
}
.hs-comp-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}
.hs-comp-val {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  width: 28px;
  text-align: right;
}

/* ── DISPLAY STYLE TAB ──────────────────────────────────────── */
.style-tab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}
.style-tab-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 20px 16px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  text-align: center;
}
.style-tab-card:hover {
  background: rgba(200,151,58,0.05);
  border-color: rgba(200,151,58,0.3);
  transform: translateY(-2px);
}
.style-tab-card.active {
  border-color: rgba(200,151,58,0.55);
  background: rgba(200,151,58,0.07);
}
.style-tab-preview {
  font-size: 40px;
  margin-bottom: 10px;
  display: block;
}
.style-tab-name {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  color: var(--text-light);
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.style-tab-desc {
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 12px;
}
.style-tab-badge {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid;
}
.style-tab-select {
  display: inline-block;
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  color: var(--text-dim);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

/* ── DASHBOARD JUMP BAR ─────────────────────────────────────── */
.dash-jump-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 0 14px;
  scrollbar-width: none;
  flex-wrap: nowrap;
}
.dash-jump-bar::-webkit-scrollbar { display: none; }
.dash-jump-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #7a7468;
  font-family: Jost, sans-serif;
  font-size: 11px;
  font-weight: 600;
  padding: 8px 14px;
  min-height: 34px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.dash-jump-btn:hover { border-color: rgba(200,151,58,0.4); color: #c8973a; background: rgba(200,151,58,0.07); }
.dash-jump-btn:active { background: rgba(200,151,58,0.14); }

/* ── CAN I AFFORD THIS? CARD ────────────────────────────────── */
.afford-hero-card {
  background: rgba(200,151,58,0.04);
  border: 1px solid rgba(200,151,58,0.18);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 20px;
  transition: border-color 0.2s;
}
.afford-hero-card:focus-within { border-color: rgba(200,151,58,0.4); }
.afford-hero-prompt {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.afford-hero-sigil { font-size: 16px; color: #c8973a; }
.afford-hero-label {
  font-family: Cinzel, serif;
  font-size: 12px;
  font-weight: 600;
  color: #c8973a;
  letter-spacing: 0.1em;
  flex: 1;
}
.afford-hero-clear {
  background: none;
  border: none;
  color: #5a5650;
  font-family: Jost, sans-serif;
  font-size: 11px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s;
}
.afford-hero-clear:hover { color: #a09880; }
.afford-hero-form {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.afford-hero-input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 11px 16px;
  color: #e8e4d8;
  font-family: Jost, sans-serif;
  font-size: 18px;
  font-weight: 500;
  outline: none;
  min-width: 0;
  transition: border-color 0.15s;
}
.afford-hero-input::placeholder { color: #4a4642; }
.afford-hero-input:focus { border-color: rgba(200,151,58,0.45); }
.afford-hero-date {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 11px 12px;
  color: #a09880;
  font-family: Jost, sans-serif;
  font-size: 13px;
  outline: none;
  cursor: pointer;
  max-width: 148px;
  transition: border-color 0.15s;
}
.afford-hero-date:focus { border-color: rgba(200,151,58,0.45); }
.afford-hero-btn {
  background: #c8973a;
  color: #080a0f;
  border: none;
  border-radius: 8px;
  padding: 11px 22px;
  font-family: Cinzel, serif;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.1em;
  transition: background 0.15s;
  white-space: nowrap;
}
.afford-hero-btn:hover { background: #d4a84a; }
.afford-hero-btn:active { background: #b8872a; }
@media (max-width: 480px) {
  .afford-hero-input, .afford-hero-date { font-size: 16px; }
}

/* ── DASHBOARD LAYOUT ───────────────────────────────────────── */
.dash-main-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  margin-bottom: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .dash-main-grid { grid-template-columns: 1fr; }
}
.dash-main-col { display: flex; flex-direction: column; gap: 0; }
.dash-side-col { display: flex; flex-direction: column; gap: 0; }

.dash-input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
@media (max-width: 860px) {
  .dash-input-grid { grid-template-columns: 1fr; }
}

/* ── SAVINGS GOALS ──────────────────────────────────────────── */
.goal-row { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.goal-row:last-of-type { border-bottom: none; }
.goal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.goal-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.goal-emoji { font-size: 18px; flex-shrink: 0; }
.goal-name { font-family: Jost, sans-serif; font-size: 14px; font-weight: 600; color: #e8e4d8; }
.goal-complete-badge {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  background: rgba(80,200,120,0.12); color: #60bb8c;
  border: 1px solid rgba(80,200,120,0.25); border-radius: 20px;
  padding: 2px 8px; font-family: Cinzel, serif;
}
.goal-actions { display: flex; gap: 6px; flex-shrink: 0; }
.goal-edit-btn, .goal-del-btn {
  background: none; border: 1px solid rgba(255,255,255,0.07); color: #5a5650;
  width: 36px; height: 36px; border-radius: 6px; cursor: pointer;
  font-size: 14px; display: flex; align-items: center; justify-content: center; transition: all 0.12s;
}
.goal-edit-btn:hover { color: #c8973a; border-color: rgba(200,151,58,0.3); }
.goal-del-btn:hover  { color: #c77b79; border-color: rgba(199,123,121,0.3); }
.goal-bar-wrap { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.goal-bar { flex: 1; height: 8px; background: rgba(255,255,255,0.06); border-radius: 4px; overflow: hidden; }
.goal-bar-fill {
  height: 100%; background: linear-gradient(90deg, #a87830, #c8973a);
  border-radius: 4px; transition: width 0.7s cubic-bezier(0.4,0,0.2,1);
}
.goal-bar-fill.complete { background: linear-gradient(90deg, #3a8c5a, #60bb8c); }
.goal-pct { font-family: Jost, sans-serif; font-size: 11px; font-weight: 600; color: #c8973a; width: 36px; text-align: right; flex-shrink: 0; }
.goal-meta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.goal-amounts { font-family: Jost, sans-serif; font-size: 12px; color: #a09880; }
.goal-sep { color: #5a5650; }
.goal-remain { font-family: Jost, sans-serif; font-size: 11px; color: #5a5650; }
.goal-date { font-family: Jost, sans-serif; font-size: 11px; color: #7a7468; margin-left: auto; }
.goal-edit-form { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.goal-input {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px; padding: 7px 10px; color: #e8e4d8;
  font-family: Jost, sans-serif; font-size: 12px; outline: none; min-width: 0; flex: 1;
}
.goal-input:focus { border-color: rgba(200,151,58,0.4); }
.goal-save-btn {
  background: rgba(200,151,58,0.15); border: 1px solid rgba(200,151,58,0.3);
  color: #c8973a; font-family: Cinzel, serif; font-size: 10px; font-weight: 700;
  padding: 7px 14px; border-radius: 6px; cursor: pointer; white-space: nowrap;
}
.goal-save-btn:hover { background: rgba(200,151,58,0.25); }
.goal-cancel-btn {
  background: none; border: 1px solid rgba(255,255,255,0.08); color: #5a5650;
  font-family: Jost, sans-serif; font-size: 11px; padding: 7px 10px; border-radius: 6px; cursor: pointer;
}
.goal-cancel-btn:hover { color: #a09880; }
.goal-add-form { padding: 12px 0 4px; border-top: 1px solid rgba(255,255,255,0.05); margin-top: 4px; }
.goal-add-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.goal-emoji-select {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px; padding: 7px 8px; color: #e8e4d8;
  font-size: 16px; outline: none; width: 56px; flex-shrink: 0; cursor: pointer;
}
.goal-add-actions { display: flex; gap: 8px; }
.goal-add-toggle-btn {
  background: none; border: 1px dashed rgba(200,151,58,0.3); color: #c8973a;
  font-family: Jost, sans-serif; font-size: 12px; padding: 9px 16px;
  border-radius: 8px; cursor: pointer; width: 100%; margin-top: 8px; transition: all 0.15s;
}
.goal-add-toggle-btn:hover { background: rgba(200,151,58,0.07); border-style: solid; }

/* ── INCOME MODE TOGGLE ─────────────────────────────────────── */
.income-mode-toggle { display: flex; gap: 8px; margin-top: 10px; }
.income-mode-btn {
  flex: 1; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1);
  color: #7a7468; font-family: Jost, sans-serif; font-size: 12px; font-weight: 600;
  padding: 9px 14px; border-radius: 8px; cursor: pointer; transition: all 0.15s;
}
.income-mode-btn.active {
  background: rgba(200,151,58,0.12); border-color: rgba(200,151,58,0.4); color: #c8973a;
}

/* ── INLINE STYLE PICKER (hero) ─────────────────────────────── */
.spend-style-mini-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.smsb {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, border-color 0.18s, transform 0.12s;
}
.smsb:hover { background: rgba(200,151,58,0.12); border-color: rgba(200,151,58,0.35); }
.smsb.active {
  background: rgba(200,151,58,0.18);
  border-color: rgba(200,151,58,0.6);
  transform: scale(1.08);
}

/* ── LEDGER SPEAKS STRIP ────────────────────────────────────── */
.ledger-speaks-strip {
  background: rgba(200,151,58,0.06);
  border: 1px solid rgba(200,151,58,0.18);
  border-top: none;
  padding: 10px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}
.lss-label {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  color: var(--gold-lt);
  letter-spacing: 0.1em;
  flex-shrink: 0;
  margin-right: 4px;
}
.lss-item {
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  color: #b0a898;
  line-height: 1.5;
}
.lss-item + .lss-item::before {
  content: '·';
  margin-right: 6px;
  color: rgba(255,255,255,0.2);
}

/* ── MONTHLY BILL CALENDAR ──────────────────────────────────── */
.bmc-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 10px 12px 8px;
}
.bmc-dow {
  text-align: center;
  font-family: 'Jost', sans-serif;
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  padding-bottom: 4px;
  text-transform: uppercase;
}
.bmc-cell {
  position: relative;
  text-align: center;
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  color: var(--text-light);
  padding: 4px 2px 14px;
  border-radius: 6px;
  cursor: default;
  min-height: 36px;
  transition: background 0.15s;
}
.bmc-cell.empty { background: transparent; }
.bmc-cell.today {
  background: rgba(200,151,58,0.14);
  color: var(--gold-lt);
  font-weight: 600;
  border: 1px solid rgba(200,151,58,0.35);
}
.bmc-cell.has-bill { color: #e8e4d8; }
.bmc-cell.has-income { color: #60bb8c; }
.bmc-cell.has-bill.has-income { color: #e8e4d8; }
.bmc-dot {
  position: absolute;
  bottom: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
}
.bmc-dot.bill { background: #c77b79; right: 4px; }
.bmc-dot.income { background: #60bb8c; left: 4px; }
.bmc-amt {
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  color: #c77b79;
  white-space: nowrap;
  font-family: 'Jost', sans-serif;
  display: none;
}
.bmc-cell.has-bill:hover .bmc-amt { display: block; }
.bmc-event-list {
  border-top: 1px solid var(--border);
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
}
.bmc-event-row {
  display: grid;
  grid-template-columns: 18px 1fr auto auto;
  align-items: center;
  gap: 6px;
  font-family: 'Jost', sans-serif;
  font-size: 11px;
}
.bmc-ev-icon { text-align: center; font-size: 11px; }
.bmc-ev-name { color: var(--text-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bmc-ev-date { color: var(--text-dim); font-size: 10px; white-space: nowrap; }
.bmc-ev-amt { font-weight: 600; white-space: nowrap; }
.bmc-event-row.bmc-ev-bill .bmc-ev-amt { color: #c77b79; }
.bmc-event-row.bmc-ev-income .bmc-ev-amt { color: #60bb8c; }

/* ── CALENDAR CLICKABLE CELLS ───────────────────────────────── */
.bmc-cell.clickable {
  cursor: pointer;
}
.bmc-cell.clickable:hover {
  background: rgba(200,151,58,0.1);
  border-radius: 6px;
}
.bmc-cell.selected {
  background: rgba(200,151,58,0.22) !important;
  border: 1px solid rgba(200,151,58,0.6) !important;
  border-radius: 6px;
}

/* ── DAY DETAIL PANEL ───────────────────────────────────────── */
.bmc-day-panel {
  margin: 0 10px 10px;
  background: rgba(200,151,58,0.06);
  border: 1px solid rgba(200,151,58,0.25);
  border-radius: 10px;
  overflow: hidden;
  animation: bmc-slide-in 0.18s ease;
}
@keyframes bmc-slide-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.bmc-day-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: rgba(200,151,58,0.1);
  font-family: 'Cinzel', serif;
  font-size: 11px;
  color: var(--gold-lt);
  letter-spacing: 0.06em;
}
.bmc-close-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 0;
}
.bmc-close-btn:hover { color: var(--text-light); }
.bmc-detail-item {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.bmc-detail-item:last-child { border-bottom: none; }
.bmc-detail-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.bmc-detail-name {
  flex: 1;
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  color: var(--text-light);
  font-weight: 500;
}
.bmc-detail-amt {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 600;
}
.bmc-detail-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.bmc-link-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 5px;
  padding: 4px 10px;
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  color: var(--gold-lt);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.bmc-link-btn:hover {
  background: rgba(200,151,58,0.12);
  border-color: rgba(200,151,58,0.4);
}

/* ── DRAWER NAV HOVER (fix — applied via app.css since style.css not linked in web) */
.drawer-nav-item {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 10px 16px;
}
.drawer-nav-icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 22px;
  text-align: center;
  line-height: 1;
}
.drawer-nav-item:hover .drawer-nav-label {
  text-decoration: underline;
  text-decoration-color: rgba(200,151,58,0.55);
  text-underline-offset: 2px;
  color: #c8973a;
}
.drawer-nav-item:hover::after {
  content: '›';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(200,151,58,0.6);
  font-size: 16px;
}

/* ── BOTTOM NAV (mobile sticky — moved from style.css which is not linked in web build) */
.bottom-nav { display: none; }

@media (max-width: 768px) {
  .nav-tabs { display: none; }
  .main { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px) + 16px); }

  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(60px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    background: rgba(14,17,23,0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    z-index: 100;
  }

  .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 48px;
    cursor: pointer;
    color: var(--text-dim);
    transition: color 0.15s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    position: relative;
  }

  .bottom-nav-item.active { color: var(--gold-lt); }

  .bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 25%;
    right: 25%;
    height: 2px;
    background: var(--gold);
    border-radius: 0 0 2px 2px;
  }

  .bnav-icon {
    font-size: 19px;
    line-height: 1;
    transition: transform 0.12s;
  }

  .bottom-nav-item.active .bnav-icon {
    filter: drop-shadow(0 0 5px rgba(200,151,58,0.55));
  }

  .bottom-nav-item:active .bnav-icon { transform: scale(0.85); }

  .bnav-label {
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    font-family: 'Jost', sans-serif;
  }

  .bottom-nav-item .lock-badge {
    position: absolute;
    top: 6px;
    right: calc(50% - 18px);
    font-size: 9px;
    pointer-events: none;
  }
}

/* ═══════════════════════════════════════════════════════════
   NOTIFICATION BELL + PANEL
═══════════════════════════════════════════════════════════ */

@keyframes notif-bell-shake {
  0%,100% { transform: rotate(0deg); }
  15%     { transform: rotate(14deg); }
  30%     { transform: rotate(-10deg); }
  45%     { transform: rotate(8deg); }
  60%     { transform: rotate(-6deg); }
  75%     { transform: rotate(4deg); }
}

.notif-bell {
  position: relative;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 5px 7px;
  border-radius: 8px;
  transition: background 0.15s;
  line-height: 1;
  color: inherit;
}
.notif-bell:hover { background: rgba(255,255,255,0.06); }
.notif-bell.has-notifs { animation: notif-bell-shake 0.7s ease both; }

.notif-badge {
  position: absolute;
  top: 1px;
  right: 1px;
  background: #c8973a;
  color: #0e1117;
  font-family: Jost, sans-serif;
  font-size: 9px;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  pointer-events: none;
  box-sizing: border-box;
  border: 1.5px solid #0e1117;
}

/* ── Panel base — hidden state ─────────────────────────── */
.notif-panel {
  position: fixed;
  top: 58px;
  right: 16px;
  width: 360px;
  max-height: 520px;
  background: #131720;
  border: 1px solid rgba(200,151,58,0.2);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.7), 0 0 0 1px rgba(200,151,58,0.05);
  z-index: 150;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* closed state */
  opacity: 0;
  transform: translateY(-10px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.notif-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* caret pointing up toward bell */
.notif-panel::before {
  content: '';
  position: absolute;
  top: -7px;
  right: 22px;
  width: 13px;
  height: 7px;
  background: #131720;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  border-left: 1px solid rgba(200,151,58,0.2);
  border-right: 1px solid rgba(200,151,58,0.2);
}

.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.notif-panel-title {
  font-family: Cinzel, serif;
  font-size: 11px;
  font-weight: 600;
  color: #c8973a;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.notif-panel-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.notif-push-btn {
  background: rgba(80,200,120,0.1);
  border: 1px solid rgba(80,200,120,0.25);
  color: #50c878;
  font-family: Jost, sans-serif;
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s;
}
.notif-push-btn:hover { background: rgba(80,200,120,0.18); }
.notif-clear-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.08);
  color: #5a5650;
  font-family: Jost, sans-serif;
  font-size: 10px;
  cursor: pointer;
  padding: 3px 9px;
  border-radius: 5px;
  transition: color 0.15s, border-color 0.15s;
}
.notif-clear-btn:hover { color: #a09880; border-color: rgba(255,255,255,0.15); }
.notif-close-btn {
  background: none;
  border: none;
  color: #5a5650;
  font-size: 16px;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.12s;
  display: none; /* shown on mobile */
}
.notif-close-btn:hover { color: #a09880; }

.notif-list {
  overflow-y: auto;
  flex: 1;
  padding: 4px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(200,151,58,0.15) transparent;
}
.notif-empty {
  padding: 32px 16px;
  text-align: center;
  color: #4a4642;
  font-family: Jost, sans-serif;
  font-size: 13px;
}
.notif-empty::before { content: '🔔'; display: block; font-size: 28px; margin-bottom: 10px; opacity: 0.3; }

/* ── Notification items ─────────────────────────────────── */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px 11px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.12s;
  cursor: default;
  position: relative;
  border-left: 3px solid transparent;
}
.notif-item:last-child { border-bottom: none; }

/* type-based left border color */
.notif-item[data-type="balance_danger"]  { border-left-color: #c85050; }
.notif-item[data-type="balance_caution"] { border-left-color: #e6a817; }
.notif-item[data-type="bill_due"]        { border-left-color: #5090d0; }
.notif-item[data-type="spending_pulse"]  { border-left-color: #50c878; }
.notif-item[data-type="sub_detected"]   { border-left-color: #9b59b6; }
.notif-item[data-type="large_tx"]       { border-left-color: #e67e22; }
.notif-item[data-type="info"]           { border-left-color: #c8973a; }

/* unread: gold dot instead of bg tint */
.notif-item.unread::after {
  content: '';
  position: absolute;
  top: 14px;
  right: 36px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c8973a;
}

.notif-icon { font-size: 15px; flex-shrink: 0; margin-top: 2px; }
.notif-body { flex: 1; min-width: 0; }
.notif-title {
  font-family: Jost, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #e8e4d8;
  line-height: 1.4;
}
.notif-text {
  font-family: Jost, sans-serif;
  font-size: 11px;
  color: #7a7468;
  margin-top: 2px;
  line-height: 1.5;
}
.notif-time {
  font-family: Jost, sans-serif;
  font-size: 10px;
  color: #3a3632;
  margin-top: 5px;
}
.notif-dismiss {
  background: none;
  border: none;
  color: #3a3632;
  font-size: 13px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
  transition: color 0.12s;
}
.notif-dismiss:hover { color: #7a7468; }

/* ── Mobile: bottom sheet ───────────────────────────────── */
@media (max-width: 640px) {
  .notif-panel {
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-height: 70vh;
    border-radius: 18px 18px 0 0;
    border-bottom: none;
    transform: translateY(100%);
  }
  .notif-panel.open {
    transform: translateY(0);
  }
  .notif-panel::before { display: none; } /* no caret on mobile */
  .notif-panel::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,0.12);
    pointer-events: none;
  }
  .notif-panel-header { padding-top: 20px; }
  .notif-close-btn { display: block; }
}

/* ── CRYPTO MARKET WATCH ────────────────────────────────────── */
.mw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 540px) {
  .mw-grid { grid-template-columns: 1fr; }
}
.mw-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 14px 14px 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  overflow: hidden;
}
.mw-card:hover {
  border-color: rgba(200,151,58,0.3);
  background: rgba(255,255,255,0.05);
}
.mw-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.mw-coin-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mw-coin-symbol {
  font-family: Cinzel, serif;
  font-size: 13px;
  font-weight: 700;
  color: #e8e4d8;
  letter-spacing: 0.04em;
}
.mw-coin-name {
  font-family: Jost, sans-serif;
  font-size: 10px;
  color: #5a5650;
  margin-top: 1px;
}
.mw-price {
  font-family: Cinzel, serif;
  font-size: 13px;
  color: #e8e4d8;
}
.mw-change {
  font-family: Jost, sans-serif;
  font-size: 11px;
  font-weight: 600;
  margin-top: 2px;
}
.mw-change.pos { color: #60bb8c; }
.mw-change.neg { color: #e05c5c; }
.mw-chart-wrap {
  height: 72px;
  border-radius: 4px;
  overflow: hidden;
}

/* ── CRYPTO DETAIL MODAL ────────────────────────────────────── */
.crypto-detail-modal {
  background: #141820;
  border: 1px solid rgba(200,151,58,0.25);
  border-radius: 14px;
  width: 100%;
  max-width: 520px;
  padding: 20px;
}
.crypto-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.crypto-detail-tf {
  display: flex;
  gap: 6px;
}
.tf-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #7a7468;
  font-family: Cinzel, serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s;
}
.tf-btn.active, .tf-btn:hover {
  background: rgba(200,151,58,0.12);
  border-color: rgba(200,151,58,0.4);
  color: #c8973a;
}

/* ── CRYPTO EDIT MARKET MODAL ───────────────────────────────── */
.crypto-edit-modal {
  background: #141820;
  border: 1px solid rgba(200,151,58,0.25);
  border-radius: 14px;
  width: 100%;
  max-width: 460px;
  padding: 20px;
  max-height: 80vh;
  overflow-y: auto;
}
.coin-pick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
@media (max-width: 400px) {
  .coin-pick-grid { grid-template-columns: repeat(2, 1fr); }
}
.coin-pick-tile {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  padding: 10px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.12s;
  text-align: center;
}
.coin-pick-tile:hover { border-color: rgba(200,151,58,0.3); background: rgba(200,151,58,0.04); }
.coin-pick-tile.selected {
  border-color: rgba(200,151,58,0.6);
  background: rgba(200,151,58,0.1);
}
.coin-pick-dot { width: 8px; height: 8px; border-radius: 50%; }
.coin-pick-sym { font-family: Cinzel, serif; font-size: 11px; font-weight: 700; color: #e8e4d8; }
.coin-pick-name { font-family: Jost, sans-serif; font-size: 9px; color: #5a5650; }

/* ── ADD CATEGORY MODAL ─────────────────────────────────────── */
.cat-section-btn {
  flex: 1;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  color: #7a7468;
  font-family: Jost, sans-serif;
  font-size: 11px;
  font-weight: 600;
  padding: 8px 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.cat-section-btn.active {
  background: rgba(200,151,58,0.12);
  border-color: rgba(200,151,58,0.4);
  color: #c8973a;
}

/* ── DEBT PLANNER ENHANCEMENTS ──────────────────────────────── */
.debt-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(200,151,58,0.08) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(200,151,58,0.2);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 14px;
  gap: 16px;
}
.debt-hero-label {
  font-family: Cinzel, serif;
  font-size: 9px;
  letter-spacing: 0.18em;
  color: #7a7468;
  margin-bottom: 6px;
}
.debt-hero-date {
  font-family: Cinzel, serif;
  font-size: 22px;
  font-weight: 700;
  color: #c8973a;
  letter-spacing: 0.03em;
}
.debt-hero-sub {
  font-family: Jost, sans-serif;
  font-size: 11px;
  color: #5a5650;
  margin-top: 4px;
}
.debt-hero-ring {
  position: relative;
  flex-shrink: 0;
}
.debt-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: Cinzel, serif;
  font-size: 13px;
  font-weight: 700;
  color: #c8973a;
  line-height: 1.2;
  text-align: center;
}
.debt-ring-label span { font-size: 8px; color: #7a7468; font-family: Jost, sans-serif; font-weight: 400; letter-spacing: 0.06em; }

.debt-compare {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.debt-compare-card {
  flex: 1;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}
.debt-compare-card:hover { border-color: rgba(200,151,58,0.3); }
.debt-compare-card.active {
  border-color: rgba(200,151,58,0.5);
  background: rgba(200,151,58,0.07);
}
.debt-compare-icon { font-size: 22px; margin-bottom: 6px; }
.debt-compare-name {
  font-family: Cinzel, serif;
  font-size: 11px;
  font-weight: 700;
  color: #e8e4d8;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.debt-compare-stat {
  font-family: Cinzel, serif;
  font-size: 13px;
  color: #c8973a;
  margin-bottom: 3px;
}
.debt-compare-sub { font-family: Jost, sans-serif; font-size: 11px; color: #7a7468; }
.debt-compare-tag {
  margin-top: 8px;
  display: inline-block;
  font-family: Cinzel, serif;
  font-size: 8px;
  letter-spacing: 0.1em;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(200,151,58,0.1);
  border: 1px solid rgba(200,151,58,0.2);
  color: #c8973a;
}
.debt-compare-vs {
  font-family: Cinzel, serif;
  font-size: 10px;
  color: #5a5650;
  letter-spacing: 0.1em;
  flex-shrink: 0;
}

.debt-order-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #c8973a;
  color: #080a0f;
  font-family: Cinzel, serif;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
  margin-right: 2px;
}
.debt-type-icon { font-size: 16px; flex-shrink: 0; }

.debt-extra-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.debt-extra-sub {
  font-family: Jost, sans-serif;
  font-size: 11px;
  color: #5a5650;
  margin-top: 2px;
}

/* ── EXPERIENCE PROFILE SECTION ─────────────────────────────── */
.exp-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}
.exp-profile-card {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}
.exp-profile-card:hover {
  border-color: rgba(200,151,58,0.35);
  background: rgba(200,151,58,0.04);
}
.exp-profile-card.active {
  border-color: #c8973a;
  background: rgba(200,151,58,0.08);
}
.exp-profile-card-name {
  font-family: Cinzel, serif;
  font-size: 11px;
  color: #c8973a;
  letter-spacing: 0.06em;
  margin-bottom: 5px;
}
.exp-profile-card-desc {
  font-family: Jost, sans-serif;
  font-size: 12px;
  color: #7a7468;
  line-height: 1.5;
}
