    :root {
      --primary:       #1a5276;
      --primary-light: #2980b9;
      --green:         #1e8449;
      --red:           #c0392b;
      --bg:            #f0f4f8;
      --card:          #ffffff;
      --text:          #2c3e50;
      --muted:         #7f8c8d;
      --border:        #dde3ec;
      --plus:          #1e8449;
      --minus:         #c0392b;
    }

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    body {
      font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
      background: var(--bg);
      color: var(--text);
      min-height: 100vh;
      padding: 16px;
    }

    .container { max-width: 680px; margin: 0 auto; }

    /* ── Flag bar ── */
    .flag-bar {
      display: flex;
      height: 7px;
      border-radius: 4px;
      overflow: hidden;
      margin-bottom: 18px;
    }
    .flag-bar span { flex: 1; }

    /* ── Header ── */
    header { text-align: center; padding-bottom: 20px; }
    header h1 { font-size: 1.75rem; color: var(--primary); font-weight: 700; }
    header p  { color: var(--muted); margin-top: 5px; font-size: 0.92rem; }

    /* ── Card ── */
    .card {
      background: var(--card);
      border-radius: 12px;
      padding: 26px;
      box-shadow: 0 2px 14px rgba(0,0,0,0.08);
      margin-bottom: 18px;
    }
    .card h2 {
      font-size: 1rem;
      color: var(--primary);
      text-transform: uppercase;
      letter-spacing: .05em;
      margin-bottom: 18px;
      padding-bottom: 10px;
      border-bottom: 2px solid var(--border);
    }

    /* ── Accordion ── */
    .card-header {
      width: 100%; display: flex; justify-content: space-between; align-items: center;
      background: none; border: none; cursor: pointer;
      padding: 0 0 10px; margin-bottom: 18px;
      border-bottom: 2px solid var(--border);
      font-size: 1rem; font-weight: 700; color: var(--primary);
      text-transform: uppercase; letter-spacing: .05em;
      font-family: inherit; text-align: left; transition: color .15s;
    }
    .card-header:hover { color: var(--primary-light); }
    .card-header .card-chevron {
      font-size: .82rem; flex-shrink: 0; margin-left: 10px;
      transition: transform .25s; display: inline-block;
    }
    .card-header.collapsed .card-chevron { transform: rotate(-90deg); }
    .card-body.collapsed { display: none; }
    .card-clear-btn {
      margin-left: auto; margin-right: 10px; flex-shrink: 0;
      background: none; border: 1px solid var(--border); border-radius: 5px;
      color: var(--muted); font-size: .72rem; font-weight: 600;
      padding: 3px 9px; cursor: pointer; letter-spacing: .03em;
      text-transform: uppercase; font-family: inherit; line-height: 1.4;
      transition: color .15s, border-color .15s;
    }
    .card-clear-btn:hover { color: var(--text); border-color: var(--text); }
    .card-clear-btn.active,
    .card-clear-btn.active:hover { color: var(--danger, #e53e3e); border-color: var(--danger, #e53e3e); }

    /* ── Markets & Prices ── */
    .mkt-subsection-label {
      font-size: .72rem; font-weight: 700; letter-spacing: .06em;
      text-transform: uppercase; color: var(--muted); margin-bottom: 8px;
    }
    .mkt-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
      gap: 8px;
    }
    .mkt-tile {
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: 8px; padding: 10px 12px;
    }
    .mkt-tile-label { font-size: .7rem; color: var(--muted); margin-bottom: 2px; }
    .mkt-tile-value { font-size: 1rem; font-weight: 700; }
    .mkt-tile-sub   { font-size: .68rem; color: var(--muted); margin-top: 2px; }
    .mkt-loading    { font-size: .8rem; color: var(--muted); padding: 6px 0; }
    .mkt-na         { color: var(--muted); font-size: .85rem; }

    /* ── Form ── */
    .form-group { margin-bottom: 16px; }
    label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 5px; color: var(--text); }

    .input-wrap { position: relative; }
    .input-prefix {
      position: absolute; left: 11px; top: 50%;
      transform: translateY(-50%);
      font-weight: 700; color: var(--muted); pointer-events: none;
    }

    input[type="number"], select {
      width: 100%;
      padding: 11px 12px 11px 28px;
      border: 2px solid var(--border);
      border-radius: 8px;
      font-size: 0.98rem;
      color: var(--text);
      background: #fff;
      transition: border-color .2s;
    }
    select { padding-left: 12px; cursor: pointer; 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 fill='%23888' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
      background-repeat: no-repeat; background-position: right 12px center;
    }
    input[type="number"]:focus, select:focus {
      outline: none; border-color: var(--primary-light);
    }
    input[type="number"]::-webkit-inner-spin-button,
    input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; }
    input[type="number"] { -moz-appearance: textfield; }

    .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

    /* ── Button ── */
    .btn {
      width: 100%; padding: 13px;
      background: var(--primary); color: #fff;
      border: none; border-radius: 8px;
      font-size: 1rem; font-weight: 600;
      cursor: pointer; transition: background .2s, transform .1s;
      margin-top: 6px;
    }
    .btn:hover  { background: var(--primary-light); }
    .btn:active { transform: scale(0.99); }

    /* Add extra space below the Gross Salary Calculate button */
    #calcBtn { margin-bottom: 18px; }
    /* Ensure benchmark, expenses and other primary buttons inside cards have matching spacing */
    .card > .btn { margin-bottom: 18px; }
    /* Specific primary action buttons (explicit IDs) */
    #benchmarkBtn, #expCalcBtn, #compareBtn { margin-bottom: 18px; }

    /* ── Gross highlight ── */
    .gross-banner {
      background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
      color: #fff; border-radius: 12px;
      padding: 22px; text-align: center; margin-bottom: 18px;
    }
    .gross-banner .g-label { font-size: .85rem; opacity: .8; margin-bottom: 4px; }
    .gross-banner .g-amount { font-size: 2.1rem; font-weight: 700; }
    .gross-banner .g-annual { font-size: .82rem; opacity: .7; margin-top: 4px; }

    /* ── Tabs ── */
    .tabs { display: flex; gap: 8px; margin-bottom: 14px; }
    .tab {
      padding: 7px 16px; border: 2px solid var(--border); border-radius: 6px;
      background: #fff; cursor: pointer; font-size: .85rem; font-weight: 600;
      color: var(--muted); transition: all .2s;
    }
    .tab.active { border-color: var(--primary); color: var(--primary); background: #eef4fb; }
    .tab-pane { display: none; }
    .tab-pane.active { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* ── Breakdown table ── */
    table { width: 100%; border-collapse: collapse; }
    thead th {
      text-align: left; font-size: .78rem; text-transform: uppercase;
      letter-spacing: .05em; color: var(--muted);
      padding: 7px 10px; border-bottom: 2px solid var(--border);
    }
    thead th:last-child { text-align: right; }
    tbody td {
      padding: 10px 10px; border-bottom: 1px solid var(--border); font-size: .93rem;
    }
    tbody td:last-child { text-align: right; font-weight: 600; }
    tbody tr:last-child td { border-bottom: none; }
    .row-income td:last-child  { color: var(--plus); }
    .row-deduct td:last-child  { color: var(--minus); }
    .row-total  td             { font-weight: 700; color: var(--primary);
                                  border-top: 2px solid var(--border) !important;
                                  border-bottom: none !important; padding-top: 12px; }
    small.note { display: block; font-size: .78rem; color: var(--muted); font-weight: 400; }

    /* ── Summary rows ── */
    .summary-row {
      display: flex; justify-content: space-between; align-items: center;
      padding: 9px 0; border-bottom: 1px solid var(--border); font-size: .92rem;
    }
    .summary-row:last-child { border-bottom: none; }
    .summary-row .s-label { color: var(--muted); }
    .summary-row .s-value { font-weight: 600; }
    .badge {
      display: inline-block; padding: 2px 9px; border-radius: 20px;
      font-size: .78rem; font-weight: 700;
      background: #eef4fb; color: var(--primary);
    }

    /* ── Results section ── */
    #results { display: none; }
    #results.visible { display: block; }

    /* ── Bible Study Tools ── */
    .bible-tabs {
      display: flex; gap: 0; margin-bottom: 18px; border-radius: 8px;
      overflow: hidden; border: 1px solid var(--border);
    }
    .bible-tab-btn {
      flex: 1; padding: 9px 12px; background: #f8f9fa; border: none; cursor: pointer;
      font-size: .87rem; font-weight: 600; color: var(--muted);
      transition: background .15s, color .15s; font-family: inherit;
    }
    .bible-tab-btn.active { background: var(--primary); color: #fff; }
    .bible-tab-btn:hover:not(.active) { background: #e9ecef; color: var(--text); }
    .bible-tab-panel { display: none; }
    .bible-tab-panel.active { display: block; }
    .api-key-bar {
      display: flex; gap: 8px; align-items: center;
      background: #f8f9fa; border: 1px solid var(--border);
      border-radius: 8px; padding: 10px 12px; margin-bottom: 16px;
    }
    .api-key-bar label { font-size: .8rem; color: var(--muted); white-space: nowrap; }
    .api-key-bar input  { flex: 1; font-size: .86rem; border: 1px solid var(--border); border-radius: 6px; padding: 5px 10px; font-family: inherit; }
    .api-key-status { font-size: .78rem; }
    .btn-sm { padding: 5px 14px; font-size: .82rem; border-radius: 6px; }
    .quiz-spinner {
      text-align: center; padding: 30px; font-size: .9rem; color: var(--muted);
    }
    .quiz-spinner .spin-ring {
      width: 32px; height: 32px; border: 4px solid var(--border);
      border-top-color: var(--primary); border-radius: 50%;
      animation: spin .7s linear infinite; margin: 0 auto 10px;
    }
    @keyframes spin { to { transform: rotate(360deg); } }
    .quiz-header {
      display: flex; justify-content: space-between; align-items: center;
      margin-bottom: 14px; flex-wrap: wrap; gap: 8px;
    }
    .quiz-title { font-size: .95rem; font-weight: 700; color: var(--primary); }
    .quiz-actions { display: flex; gap: 8px; flex-wrap: wrap; }
    .quiz-q-block {
      border: 1px solid var(--border); border-radius: 8px;
      padding: 14px; margin-bottom: 12px; background: #fdfdfd;
    }
    .quiz-q-num { font-size: .72rem; color: var(--muted); margin-bottom: 4px; }
    .quiz-q-text { font-size: .9rem; font-weight: 600; margin-bottom: 10px; line-height: 1.45; }
    .quiz-options { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
    @media (max-width: 480px) { .quiz-options { grid-template-columns: 1fr; } }
    .quiz-opt {
      padding: 7px 10px; border-radius: 6px; border: 1px solid var(--border);
      font-size: .83rem; background: #f8f9fa; display: flex; align-items: flex-start; gap: 6px;
    }
    .quiz-opt.correct { background: #eafaf1; border-color: #a9dfbf; color: var(--green); font-weight: 600; }
    .quiz-opt.wrong   { background: #fdf2f0; border-color: #f5b7b1; color: var(--red); }
    .quiz-opt-letter  { font-weight: 700; flex-shrink: 0; }
    .quiz-ref { font-size: .72rem; color: var(--muted); margin-top: 6px; }
    .realtalk-block {
      border: 1px solid var(--border); border-radius: 10px;
      overflow: hidden; margin-bottom: 12px;
    }
    .realtalk-topic-header {
      background: linear-gradient(135deg, #1a5276 0%, #2980b9 100%);
      color: #fff; padding: 16px 18px;
    }
    .realtalk-topic-header h3 { font-size: 1rem; margin-bottom: 4px; }
    .realtalk-topic-header .rt-verse { font-style: italic; font-size: .85rem; opacity: .9; }
    .realtalk-body { padding: 16px 18px; background: #fdfdfd; }
    .realtalk-section { margin-bottom: 14px; }
    .realtalk-section h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--primary); margin-bottom: 6px; }
    .realtalk-section p  { font-size: .88rem; line-height: 1.55; color: var(--text); }
    .realtalk-section ul { padding-left: 18px; }
    .realtalk-section ul li { font-size: .88rem; margin-bottom: 5px; line-height: 1.5; }
    .rt-prayer { background: #eaf4fb; border-left: 3px solid var(--primary); padding: 10px 14px; border-radius: 0 6px 6px 0; font-size: .87rem; font-style: italic; line-height: 1.55; }
    .kahoot-note { background: #fff8e1; border: 1px solid #ffe082; border-radius: 8px; padding: 10px 14px; font-size: .82rem; line-height: 1.5; color: #5d4037; margin-bottom: 14px; }
    .kahoot-note a { color: #1a5276; font-weight: 600; }

    /* ── Chapter Summary ── */
    .chsumm-header {
      background: linear-gradient(135deg, #1a3a5c 0%, #2471a3 100%);
      color: #fff; padding: 16px 18px; border-radius: 10px 10px 0 0;
    }
    .chsumm-title { font-size: 1rem; font-weight: 700; margin-bottom: 5px; }
    .chsumm-source { font-size: .78rem; opacity: .85; }
    .chsumm-source a { color: #aed6f1; }
    .chsumm-body {
      padding: 16px 18px; border: 1px solid var(--border);
      border-top: none; border-radius: 0 0 10px 10px; background: #fdfdfd;
    }
    .chsumm-para { font-size: .88rem; line-height: 1.68; color: var(--text); margin-bottom: 13px; }
    .chsumm-para:last-child { margin-bottom: 0; }
    .chsumm-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

    /* ── Disclaimer ── */
    .disclaimer {
      font-size: .78rem; color: var(--muted);
      text-align: center; padding: 12px 8px; line-height: 1.6;
    }

    /* ── Responsive ── */
    @media (max-width: 480px) {
      .form-row { grid-template-columns: 1fr; }
      header h1 { font-size: 1.4rem; }
      .gross-banner .g-amount { font-size: 1.75rem; }
    }

    /* ── Card description text ── */
    .card-desc {
      font-size: .88rem; color: var(--muted);
      margin-bottom: 16px; margin-top: -8px; line-height: 1.5;
    }

    /* ── Green button variant ── */
    .btn-green { background: var(--green); }
    .btn-green:hover { background: #27ae60; }

    /* ── Benchmark results section ── */
    #benchmarkResults { display: none; }
    #benchmarkResults.visible { display: block; }

    .benchmark-banner {
      background: linear-gradient(135deg, #1a5e36 0%, #27ae60 100%);
      color: #fff; border-radius: 12px;
      padding: 22px; text-align: center; margin-bottom: 18px;
    }
    .benchmark-banner .b-label { font-size: .85rem; opacity: .85; margin-bottom: 4px; }
    .benchmark-banner .b-amount { font-size: 2.1rem; font-weight: 700; }
    .benchmark-banner .b-range-text { font-size: .82rem; opacity: .72; margin-top: 4px; }
    .benchmark-banner .b-annual { font-size: .82rem; opacity: .72; margin-top: 2px; }

    /* ── Market range bar ── */
    .range-bar-wrap { margin: 18px 0 10px; }
    .range-bar-labels {
      display: flex; justify-content: space-between;
      font-size: .78rem; color: var(--muted); margin-bottom: 8px;
    }
    .range-bar {
      position: relative; height: 12px; border-radius: 6px;
      background: linear-gradient(to right, #c8e6d4, #1e8449);
    }
    .range-marker {
      position: absolute; top: 50%; transform: translate(-50%, -50%);
      width: 20px; height: 20px; border-radius: 50%;
      border: 3px solid #fff; box-shadow: 0 1px 6px rgba(0,0,0,0.28);
      z-index: 2; cursor: default;
    }
    .range-marker.rec { background: var(--green); }
    .range-marker.cur { background: var(--primary); }
    .range-legend {
      display: flex; flex-wrap: wrap; gap: 12px;
      margin-top: 12px; font-size: .8rem; color: var(--text);
    }
    .rl-item { display: flex; align-items: center; gap: 6px; }
    .legend-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }

    /* ── Modifier pills ── */
    .modifiers-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
    .mod-pill {
      background: #eef4fb; border: 1px solid var(--border);
      border-radius: 20px; padding: 5px 14px;
      font-size: .82rem; color: var(--primary); font-weight: 600;
    }
    .mod-pill.positive { background: #f0faf4; border-color: #a3d9b5; color: var(--green); }
    .mod-pill.negative { background: #fdf4f3; border-color: #f0bbb8; color: var(--red); }

    /* ── Actual earnings row ── */
    .actual-earnings-row {
      display: flex; align-items: flex-end; gap: 12px; margin: 18px 0 6px;
    }
    .actual-earnings-row .form-group { flex: 1; margin-bottom: 0; }
    .actual-earnings-row .btn { margin-top: 0; width: auto; padding: 11px 22px; flex-shrink: 0; }

    /* ── Comparison box ── */
    .comparison-box {
      border-radius: 10px; padding: 16px 18px;
      margin-top: 14px; border: 2px solid var(--border);
    }
    .comparison-box.above { border-color: #27ae60; background: #f0faf4; }
    .comparison-box.below { border-color: var(--red); background: #fdf3f2; }
    .comparison-box.on-par { border-color: var(--primary-light); background: #eef4fb; }
    .comp-icon { font-size: 1.4rem; margin-bottom: 4px; font-weight: 700; }
    .comp-title { font-weight: 700; font-size: .95rem; margin-bottom: 5px; }
    .comp-detail { font-size: .86rem; color: var(--muted); line-height: 1.5; }

    /* ── Data status bar ── */
    .data-bar {
      background: #fff; border: 1px solid var(--border);
      border-radius: 10px; padding: 11px 16px;
      margin-bottom: 18px; display: flex;
      align-items: center; gap: 12px; flex-wrap: wrap;
    }
    .data-bar-icon { font-size: 1.05rem; flex-shrink: 0; }
    .data-bar-info { flex: 1; min-width: 160px; }
    .data-bar-title { font-size: .8rem; font-weight: 700; color: var(--text); }
    .data-bar-sub   { font-size: .74rem; color: var(--muted); margin-top: 2px; line-height: 1.5; }
    .data-bar-sub a { color: var(--primary-light); text-decoration: none; }
    .data-bar-sub a:hover { text-decoration: underline; }
    .rate-move-chip {
      display: inline-flex; align-items: center; gap: 6px;
      margin-left: 8px; padding: 2px 8px; border-radius: 999px;
      font-size: .72rem; font-weight: 700; letter-spacing: .02em;
      vertical-align: middle; white-space: nowrap;
    }
    .rate-move-trigger {
      border: none; background: none; padding: 0; cursor: pointer;
      font: inherit; appearance: none;
    }
    .rate-move-trigger:focus-visible {
      outline: 2px solid var(--primary-light); outline-offset: 2px;
    }
    .rate-move-chip.up   { background: #fdf3f2; color: var(--red); }
    .rate-move-chip.down { background: #f0faf4; color: var(--green); }
    .rate-move-chip.flat { background: #eef4fb; color: var(--primary); }
    .btn-refresh {
      padding: 6px 14px; font-size: .8rem; font-weight: 600;
      background: #fff; color: var(--primary);
      border: 2px solid var(--border); border-radius: 6px;
      cursor: pointer; white-space: nowrap;
      transition: border-color .2s, background .2s, color .2s;
      flex-shrink: 0;
    }
    .btn-refresh:hover    { border-color: var(--primary); background: #eef4fb; }
    .btn-refresh.loading  { opacity: .65; cursor: wait; }
    .btn-refresh.success  { border-color: var(--green); color: var(--green); background: #f0faf4; }
    .btn-refresh.error    { border-color: var(--red);   color: var(--red);   background: #fdf3f2; }
    .spin { display: inline-block; animation: spin .7s linear infinite; }
    @keyframes spin { to { transform: rotate(360deg); } }

    /* ── Launch-server banner (file:// only) ── */
    .launch-banner {
      background: linear-gradient(135deg, #1a5276 0%, #2980b9 100%);
      color: #fff; border-radius: 12px; padding: 20px 24px;
      display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
      margin-bottom: 18px;
    }
    .launch-banner-icon { font-size: 2rem; flex-shrink: 0; }
    .launch-banner-info { flex: 1; min-width: 200px; }
    .launch-banner-info h3 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
    .launch-banner-info p  { font-size: .83rem; opacity: .88; line-height: 1.5; }
    .btn-launch {
      padding: 10px 20px; font-size: .9rem; font-weight: 700;
      background: #fff; color: var(--primary);
      border: none; border-radius: 8px; cursor: pointer;
      white-space: nowrap; transition: background .15s, transform .1s;
      flex-shrink: 0;
    }
    .btn-launch:hover  { background: #ddeeff; }
    .btn-launch:active { transform: scale(0.98); }
    .btn-launch.probing { opacity: .7; cursor: wait; }

    /* ── Launch modal overlay ── */
    .modal-overlay {
      position: fixed; inset: 0; background: rgba(0,0,0,.55);
      display: flex; align-items: center; justify-content: center;
      z-index: 9999; padding: 20px;
    }
    .modal-overlay.hidden { display: none; }
    .modal-box {
      background: #fff; border-radius: 14px; padding: 28px;
      max-width: 520px; width: 100%; box-shadow: 0 8px 40px rgba(0,0,0,.22);
    }
    .modal-box.wide { max-width: 920px; }
    .modal-box h3 { font-size: 1.1rem; color: var(--primary); margin-bottom: 12px; }
    .modal-box p  { font-size: .88rem; color: var(--text); line-height: 1.6; margin-bottom: 14px; }
    .modal-step {
      display: flex; gap: 12px; align-items: flex-start;
      background: var(--bg); border-radius: 8px; padding: 12px 14px;
      margin-bottom: 10px;
    }
    .modal-step-num {
      background: var(--primary); color: #fff; border-radius: 50%;
      width: 22px; height: 22px; flex-shrink: 0;
      display: flex; align-items: center; justify-content: center;
      font-size: .78rem; font-weight: 700;
    }
    .modal-step-body { font-size: .85rem; line-height: 1.5; }
    .modal-step-body code {
      background: #e8ecf0; padding: 2px 6px; border-radius: 4px;
      font-size: .82rem; font-family: 'Courier New', monospace;
    }
    .modal-close {
      width: 100%; padding: 11px; margin-top: 16px;
      background: var(--primary); color: #fff; border: none;
      border-radius: 8px; font-size: .95rem; font-weight: 600;
      cursor: pointer; transition: background .2s;
    }
    .modal-close:hover { background: var(--primary-light); }

    .rate-popup-note {
      font-size: .82rem; color: var(--muted); line-height: 1.55;
      margin-bottom: 10px;
    }

    /* ── Purple button variant ── */
    .btn-purple { background: #7d3c98; }
    .btn-purple:hover { background: #9b59b6; }

    /* ── Expense section ── */
    .exp-group-label {
      font-size: .78rem; font-weight: 700; text-transform: uppercase;
      letter-spacing: .06em; color: #7d3c98;
      border-left: 3px solid #9b59b6; padding-left: 8px;
      margin: 20px 0 12px;
    }

    #expenseResults { display: none; }
    #expenseResults.visible { display: block; }

    .disposable-banner {
      background: linear-gradient(135deg, #6c3483 0%, #9b59b6 100%);
      color: #fff; border-radius: 12px;
      padding: 22px; text-align: center; margin-bottom: 18px;
    }
    .disposable-banner.negative {
      background: linear-gradient(135deg, #922b21 0%, #e74c3c 100%);
    }
    .disposable-banner .d-label  { font-size: .85rem; opacity: .85; margin-bottom: 4px; }
    .disposable-banner .d-amount { font-size: 2.1rem; font-weight: 700; }
    .disposable-banner .d-sub    { font-size: .82rem; opacity: .72; margin-top: 4px; }

    /* ── Health bars ── */
    .health-row { margin-bottom: 16px; }
    .health-row-header {
      display: flex; justify-content: space-between; flex-wrap: wrap;
      font-size: .82rem; margin-bottom: 5px;
    }
    .health-row-header .h-label { font-weight: 600; }
    .health-row-header .h-pct   { color: var(--muted); }
    .health-bar-track {
      height: 9px; border-radius: 5px; background: #e8ecf0; overflow: hidden;
    }
    .health-bar-fill { height: 100%; border-radius: 5px; transition: width .4s ease; }
    .health-status-ok   .health-bar-fill { background: #27ae60; }
    .health-status-warn .health-bar-fill { background: #f39c12; }
    .health-status-over .health-bar-fill { background: #e74c3c; }

    /* ── Affordability grid ── */
    .afford-grid {
      display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px;
    }
    @media (max-width: 520px) { .afford-grid { grid-template-columns: 1fr; } }
    .afford-box {
      border: 2px solid var(--border); border-radius: 10px; padding: 16px;
    }
    .afford-box-title {
      font-size: .78rem; font-weight: 700; text-transform: uppercase;
      letter-spacing: .05em; color: var(--muted); margin-bottom: 10px;
    }
    .afford-max-payment { font-size: 1.35rem; font-weight: 700; color: #7d3c98; }
    .afford-loan-amount { font-size: .88rem; color: var(--text); font-weight: 600; margin-top: 5px; }
    .afford-detail      { font-size: .78rem; color: var(--muted); margin-top: 4px; line-height: 1.45; }
    .afford-compare {
      margin-top: 10px; padding-top: 10px;
      border-top: 1px solid var(--border); font-size: .82rem;
    }
    .rate-impact-card {
      margin-top: 14px; border: 2px solid var(--border); border-radius: 10px; padding: 14px;
      background: #fbfdff;
    }
    .rate-impact-title {
      font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
      color: var(--muted); margin-bottom: 6px;
    }
    .rate-impact-sub { font-size: .78rem; color: var(--muted); margin-bottom: 10px; line-height: 1.45; }
    .rate-impact-split {
      display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center;
      margin-top: 14px;
    }
    @media (max-width: 640px) { .rate-impact-split { grid-template-columns: 1fr; } .rate-impact-arrow { transform: rotate(90deg); } }
    .rate-impact-box {
      border: 2px solid var(--border); border-radius: 12px; padding: 16px;
      text-align: center; background: #fff;
    }
    .rate-impact-box.before { background: #f0faf4; border-color: #bbf7d0; }
    .rate-impact-box.after  { background: #fdf3f2; border-color: #fecaca; }
    .rate-impact-box-label { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
    .rate-impact-box-rate  { margin-top: 8px; font-size: 1.2rem; font-weight: 800; color: var(--primary); }
    .rate-impact-box-value { margin-top: 4px; font-size: 1.6rem; font-weight: 800; }
    .rate-impact-box.before .rate-impact-box-value { color: var(--green); }
    .rate-impact-box.after  .rate-impact-box-value { color: var(--red); }
    .rate-impact-arrow { font-size: 1.5rem; font-weight: 700; color: var(--muted); text-align: center; }

    /* ── Suggestions ── */
    .sugg-list { list-style: none; padding: 0; margin: 0; }
    .sugg-item {
      display: flex; align-items: flex-start; gap: 12px;
      padding: 12px 14px; border-radius: 9px;
      margin-bottom: 10px; background: #f8f9fa;
      border-left: 4px solid var(--border);
      font-size: .88rem; line-height: 1.5;
    }
    .sugg-item.sugg-high   { border-left-color: #e74c3c; background: #fdf2f2; }
    .sugg-item.sugg-medium { border-left-color: #f39c12; background: #fffbf0; }
    .sugg-item.sugg-low    { border-left-color: #27ae60; background: #f0faf4; }
    .sugg-icon  { font-size: 1.2rem; flex-shrink: 0; margin-top: 1px; }
    .sugg-title { font-weight: 700; margin-bottom: 2px; }
    .sugg-saving { font-size: .8rem; font-weight: 700; margin-top: 4px; }
    .sugg-saving.pos { color: var(--green); }
    .sugg-none  { color: var(--green); font-size: .9rem; text-align: center; padding: 18px 0; }

    /* ── Bond Amortisation ── */
    .amort-summary-grid {
      display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 14px 0;
    }
    @media (max-width: 520px) { .amort-summary-grid { grid-template-columns: 1fr; } }
    .amort-stat {
      border: 2px solid var(--border); border-radius: 10px; padding: 14px;
    }
    .amort-stat-label {
      font-size: .75rem; font-weight: 700; text-transform: uppercase;
      letter-spacing: .05em; color: var(--muted); margin-bottom: 6px;
    }
    .amort-stat-value { font-size: 1.4rem; font-weight: 700; color: var(--primary); }
    .amort-stat-sub   { font-size: .76rem; color: var(--muted); margin-top: 3px; }
    .amort-table-wrap { overflow-x: auto; margin-top: 10px; }
    .amort-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
    .amort-table th {
      background: var(--primary); color: #fff; padding: 8px 10px;
      text-align: right; font-weight: 600;
    }
    .amort-table th:first-child { text-align: left; }
    .amort-table td { padding: 6px 10px; text-align: right; border-bottom: 1px solid var(--border); }
    .amort-table td:first-child { text-align: left; white-space: nowrap; }
    .amort-table tr:nth-child(even) td { background: #f8f9fa; }
    .amort-table tr.amort-annual td   { background: #eaf4fb; font-weight: 600; }

    /* Generic responsive table wrapper */
    .table-wrap { overflow-x: auto; margin-top: 10px; }
    table td, table th { word-break: break-word; }

    /* Responsive adjustments */
    @media (max-width: 920px) {
      .container { max-width: 92%; padding: 12px; }
      .card { padding: 20px; }
      .form-row { grid-template-columns: 1fr; gap: 12px; }
      .tabs { gap: 6px; overflow-x: auto; }
      .tabs .tab { flex: 0 0 auto; white-space: nowrap; }
      .gross-banner { padding: 16px; }
      .gross-banner .g-amount { font-size: 1.6rem; }
      .card > .btn { margin-bottom: 14px; }
      .input-wrap input, .input-wrap select, textarea { font-size: 1rem; }
      .card { margin-bottom: 14px; }
    }

    @media (max-width: 480px) {
      body { padding: 10px; }
      .container { max-width: 100%; padding: 10px; }
      .card { padding: 14px; border-radius: 10px; }
      .card h2 { font-size: .95rem; }
      .form-group label { font-size: .78rem; }
      input[type="number"], select { padding: 10px 12px 10px 28px; }
      .btn { padding: 12px; font-size: .98rem; }
      .gross-banner { padding: 14px; }
      .gross-banner .g-amount { font-size: 1.3rem; }
      .table-wrap { margin-top: 8px; }
      .tab-pane table th, .tab-pane table td { font-size: .82rem; }
    }

    /* Restore simple responsive table handling: horizontal scroll and monospace numerics without truncation */
    .table-wrap { overflow-x: auto; margin-top: 10px; -webkit-overflow-scrolling: touch; }
    .tab-pane table, .amort-table, .table-wrap table { width: auto; min-width: 100%; }

    /* First column: no wrapping so text stays on one line */
    .table-wrap table td:first-child,
    .table-wrap table th:first-child,
    .tab-pane table td:first-child,
    .tab-pane table th:first-child,
    .amort-table td:first-child,
    .amort-table th:first-child { white-space: nowrap; }

    /* Numeric columns use monospace/tabular numbers and do not get truncated; horizontal scroll reveals full values */
    .table-wrap table td:not(:first-child),
    .tab-pane table td:not(:first-child),
    .amort-table td:not(:first-child) {
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, 'Roboto Mono', monospace;
      font-variant-numeric: tabular-nums;
      padding-left: 8px !important;
      padding-right: 8px !important;
      text-align: right !important;
      white-space: nowrap;
    }
    .amort-toggle {
      background: none; border: 1px solid var(--primary); color: var(--primary);
      border-radius: 6px; padding: 6px 14px; font-size: .82rem;
      cursor: pointer; margin-top: 10px; transition: background .2s, color .2s;
    }
    .amort-toggle:hover { background: var(--primary); color: #fff; }
    .amort-section-title { font-size: .92rem; font-weight: 700; margin: 18px 0 8px; }
    .amort-lump-row {
      display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap;
    }
    .amort-lump-row input {
      border: 1px solid var(--border); border-radius: 6px; padding: 7px 10px;
      font-size: .9rem; background: #fff; color: var(--text);
    }
    .amort-lump-row .lump-month  { width: 80px; }
    .amort-lump-row .lump-amount { width: 140px; }
    .amort-lump-label { font-size: .82rem; color: var(--muted); white-space: nowrap; }
    .amort-lump-remove {
      background: none; border: 1px solid #e74c3c; color: #e74c3c;
      border-radius: 5px; padding: 4px 9px; cursor: pointer; font-size: .8rem;
      line-height: 1; transition: background .15s, color .15s; flex-shrink: 0;
    }
    .amort-lump-remove:hover { background: #e74c3c; color: #fff; }
    tr.amort-lump-month td { background: #fef9e7 !important; }

    /* ── Insurance Tools ── */
    .ins-tabs {
      display: flex; gap: 0; margin-bottom: 20px; border-radius: 8px;
      overflow: hidden; border: 2px solid var(--primary);
    }
    .ins-tab-btn {
      flex: 1; padding: 9px 10px; background: #fff; border: none; cursor: pointer;
      font-size: .82rem; font-weight: 700; color: var(--primary);
      letter-spacing: .02em; transition: background .15s, color .15s;
      font-family: inherit; border-right: 1px solid var(--primary); line-height: 1.3;
    }
    .ins-tab-btn:last-child { border-right: none; }
    .ins-tab-btn.active { background: var(--primary); color: #fff; }
    .ins-tab-btn:hover:not(.active) { background: #eef4fb; }
    .ins-tab-panel { display: none; }
    .ins-tab-panel.active { display: block; }

    .ins-result-banner {
      background: linear-gradient(135deg, #1a3a5c 0%, #2471a3 100%);
      color: #fff; border-radius: 10px; padding: 20px 22px;
      text-align: center; margin-bottom: 18px;
    }
    .ins-result-banner .irb-label  { font-size: .82rem; opacity: .82; margin-bottom: 4px; }
    .ins-result-banner .irb-value  { font-size: 2rem; font-weight: 700; }
    .ins-result-banner .irb-sub    { font-size: .8rem; opacity: .72; margin-top: 4px; }

    .ins-grid {
      display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px;
    }
    @media (max-width: 520px) { .ins-grid { grid-template-columns: 1fr; } }
    .ins-stat {
      border: 2px solid var(--border); border-radius: 10px; padding: 14px;
    }
    .ins-stat-label {
      font-size: .72rem; font-weight: 700; text-transform: uppercase;
      letter-spacing: .05em; color: var(--muted); margin-bottom: 6px;
    }
    .ins-stat-value { font-size: 1.25rem; font-weight: 700; color: var(--primary); }
    .ins-stat-sub   { font-size: .76rem; color: var(--muted); margin-top: 3px; line-height: 1.4; }

    .ins-cover-bar-wrap { margin: 14px 0 8px; }
    .ins-cover-bar-track {
      height: 10px; border-radius: 6px; background: #e8ecf0; overflow: hidden; margin-top: 6px;
    }
    .ins-cover-bar-fill {
      height: 100%; border-radius: 6px;
      background: linear-gradient(to right, #27ae60, #1a5276);
      transition: width .4s ease;
    }

    .ins-tips-list {
      list-style: none; padding: 0; margin: 0;
    }
    .ins-tip {
      display: flex; align-items: flex-start; gap: 10px;
      padding: 10px 12px; border-radius: 8px; margin-bottom: 8px;
      background: #f0f4f8; border-left: 4px solid var(--primary);
      font-size: .86rem; line-height: 1.5;
    }
    .ins-tip.warn  { border-left-color: #e67e22; background: #fffbf0; }
    .ins-tip.good  { border-left-color: #27ae60; background: #f0faf4; }
    .ins-tip.info  { border-left-color: var(--primary); background: #eef4fb; }
    .ins-tip-icon  { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }

    .ins-cover-table { width: 100%; border-collapse: collapse; font-size: .88rem; margin: 12px 0; }
    .ins-cover-table th {
      background: #1a3a5c; color: #fff; padding: 8px 10px;
      text-align: left; font-size: .78rem; font-weight: 600;
    }
    .ins-cover-table th:last-child { text-align: right; }
    .ins-cover-table td {
      padding: 8px 10px; border-bottom: 1px solid var(--border);
    }
    .ins-cover-table td:last-child { text-align: right; font-weight: 600; }
    .ins-cover-table tr:last-child td { border-bottom: none; }
    .ins-cover-table tr.ins-total td {
      font-weight: 700; color: var(--primary);
      border-top: 2px solid var(--border); border-bottom: none;
    }
    .ins-section-label {
      font-size: .78rem; font-weight: 700; text-transform: uppercase;
      letter-spacing: .06em; color: #1a3a5c;
      border-left: 3px solid #1a3a5c; padding-left: 8px;
      margin: 20px 0 12px;
    }
    .ins-premium-range {
      display: flex; gap: 12px; margin: 14px 0; flex-wrap: wrap;
    }
    .ins-prem-box {
      flex: 1; min-width: 120px; border-radius: 10px; padding: 14px 16px;
      text-align: center;
    }
    .ins-prem-box.low  { background: #f0faf4; border: 2px solid #a9dfbf; }
    .ins-prem-box.mid  { background: #eef4fb; border: 2px solid #93c5fd; }
    .ins-prem-box.high { background: #fdf6f0; border: 2px solid #f5cba7; }
    .ins-prem-box-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 6px; }
    .ins-prem-box-value { font-size: 1.15rem; font-weight: 700; }
    .ins-prem-box.low  .ins-prem-box-value { color: #27ae60; }
    .ins-prem-box.mid  .ins-prem-box-value { color: var(--primary); }
    .ins-prem-box.high .ins-prem-box-value { color: #e67e22; }
    .ins-disclaimer {
      font-size: .74rem; color: var(--muted); line-height: 1.6;
      padding: 10px 12px; background: #f8f9fa; border-radius: 6px;
      margin-top: 14px;
    }

    /* ── App Navigation ── */
    .app-footer {
      text-align: center; padding: 24px 16px 16px;
      font-size: .75rem; color: var(--muted);
      border-top: 1px solid var(--border); margin-top: 32px;
    }
    .app-footer a { color: var(--primary); text-decoration: none; }
    .app-footer a:hover { text-decoration: underline; }

    .app-nav {
      display: flex; gap: 6px; flex-wrap: wrap;
      background: #fff; border-radius: 12px;
      padding: 10px 12px; margin-bottom: 16px;
      box-shadow: 0 2px 10px rgba(0,0,0,.07);
      position: sticky; top: 8px; z-index: 100;
    }
    .app-nav-btn {
      flex: 1; min-width: 70px;
      display: flex; flex-direction: column; align-items: center; gap: 3px;
      padding: 8px 6px; border: 2px solid transparent; border-radius: 10px;
      background: none; cursor: pointer; font-family: inherit;
      font-size: .68rem; font-weight: 700; letter-spacing: .04em;
      text-transform: uppercase; color: var(--muted);
      transition: all .2s;
    }
    .app-nav-btn .nav-icon { font-size: 1.3rem; line-height: 1; }
    .app-nav-btn .nav-long, .app-nav-btn .nav-short {
      display: block;
      line-height: 1.1;
    }
    .app-nav-btn .nav-short { display: none; }
    @media (max-width: 780px) {
      .app-nav-btn { font-size: .62rem; min-width: 60px; padding: 8px 4px; }
      .app-nav-btn .nav-long { display: none; }
      .app-nav-btn .nav-short { display: block; }
    }
    .app-nav-btn .nav-icon { margin-bottom: 2px; }
    .doc-item.active { border-color: rgba(37,99,235,.6); box-shadow: 0 18px 36px rgba(59,130,246,.16); }
    .doc-detail-panel {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      z-index: 2000;
      max-width: 760px;
      width: calc(100% - 32px);
      max-height: 85vh;
      overflow-y: auto;
      border: 1px solid var(--border);
      border-radius: 16px;
      background: #fff;
      padding: 24px;
      box-shadow: 0 12px 48px rgba(15,23,42,.18);
    }
    .doc-modal-backdrop {
      position: fixed; inset: 0;
      background: rgba(15,23,42,.45);
      z-index: 1999;
      backdrop-filter: blur(2px);
    }
    .doc-detail-header { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
    .doc-detail-header h3 { margin: 0 0 8px; font-size: 1.35rem; }
    .doc-detail-header p { margin: 0; color: var(--muted); max-width: 640px; }
    .doc-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
    .doc-detail-copy { min-width: 0; }
    .doc-detail-copy h4 { margin-top: 0; font-size: 1rem; color: #0f172a; }
    .doc-detail-list { padding-left: 18px; margin: 12px 0 0; color: var(--text); }
    .doc-detail-list li { margin-bottom: 10px; line-height: 1.7; }
    .doc-detail-visual { border: 1px solid rgba(15,23,42,.08); border-radius: 14px; background: #f8fbff; padding: 16px; }
    .doc-anno-wrap { display: flex; flex-direction: column; gap: 8px; }
    .doc-anno-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
    .doc-anno-field { background: #fff; border: 1.5px solid rgba(15,23,42,.13); border-radius: 10px; padding: 9px 13px; display: flex; justify-content: space-between; align-items: center; min-width: 185px; max-width: 100%; flex: 0 0 185px; gap: 10px; }
    .doc-anno-lbl { font-weight: 700; font-size: .82rem; color: #0f172a; white-space: nowrap; }
    .doc-anno-val { color: var(--primary); font-size: .8rem; white-space: nowrap; font-weight: 600; }
    .doc-anno-arr { color: #94a3b8; font-size: 1rem; flex-shrink: 0; }
    .doc-anno-desc { font-size: .79rem; color: #475569; flex: 1; min-width: 0; line-height: 1.45; }
    .doc-anno-wrap.company-profile-doc .doc-anno-field { min-width: 210px; flex: 0 1 210px; }
    .doc-anno-wrap.company-profile-doc .doc-anno-val { min-width: 0; white-space: normal; overflow-wrap: anywhere; text-align: right; }
    @media (max-width: 520px) { .doc-anno-field { min-width: 120px; flex: 0 0 120px; } .doc-anno-val { display: none; } }

    .doc-detail-panel .btn-close-doc {
      background: #eef2ff; color: #3730a3; border: 1px solid #c7d2fe;
      border-radius: 10px; padding: 10px 14px; cursor: pointer; font-weight: 700;
    }
    @media (max-width: 840px) { .doc-detail-grid { grid-template-columns: 1fr; } }

    .app-nav-btn:hover { background: #f0f4f8; color: var(--primary); }
    .app-nav-btn.active { background: #eef4fb; border-color: var(--primary); color: var(--primary); }
    .app-nav-btn.admin-btn { color: #7c3aed; }
    .app-nav-btn.admin-btn.active { background: #f5f0ff; border-color: #7c3aed; color: #7c3aed; }

    /* ── Auth Wall ── */
    .auth-wall {
      position: fixed; inset: 0; background: #f0f4f8;
      z-index: 10000; display: flex; align-items: flex-start; justify-content: center;
      padding: 20px; overflow-y: auto;
    }
    .auth-wall.hidden { display: none; }
    .auth-box {
      background: #fff; border-radius: 18px; padding: 36px 32px;
      max-width: 420px; width: 100%;
      box-shadow: 0 8px 40px rgba(0,0,0,.13);
      position: relative;
    }
    .auth-close-btn {
      position: absolute; top: 12px; right: 12px;
      background: var(--bg); border: none; font-size: 1.35rem; line-height: 1;
      color: var(--text); cursor: pointer; padding: 4px 9px; border-radius: 50px;
      box-shadow: 0 1px 4px rgba(0,0,0,.12); z-index: 1;
    }
    .auth-close-btn:hover { background: #dde3ea; }
    .auth-close-btn.hidden { display: none; }
    .auth-box-logo { text-align: center; margin-bottom: 24px; }
    .auth-box-logo h1 { font-size: 1.6rem; color: var(--primary); margin-bottom: 4px; }
    .auth-box-logo p { font-size: .85rem; color: var(--muted); }
    .auth-tabs { display: flex; gap: 0; border-radius: 10px; overflow: hidden;
      border: 2px solid var(--border); margin-bottom: 22px; }
    .auth-tab { flex: 1; padding: 10px; background: none; border: none; cursor: pointer;
      font-family: inherit; font-size: .88rem; font-weight: 700; color: var(--muted);
      transition: all .2s; }
    .auth-tab.active { background: var(--primary); color: #fff; }
    .trial-badge {
      background: linear-gradient(135deg, #16a34a, #15803d);
      color: #fff; border-radius: 10px; padding: 12px 16px; margin-bottom: 18px;
      font-size: .86rem; text-align: center; font-weight: 600;
    }
    .trial-badge strong { font-size: 1.1rem; display: block; margin-bottom: 2px; }
    .tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
    .tier-card {
      border: 2px solid var(--border); border-radius: 10px; padding: 12px 8px;
      text-align: center; cursor: pointer; transition: all .18s; background: none; font-family: inherit;
    }
    .tier-card.selected { border-color: var(--primary); background: #eef4fb; }
    .tier-card .tier-name { font-size: .78rem; font-weight: 700; text-transform: uppercase;
      letter-spacing: .04em; color: var(--muted); }
    .tier-card .tier-price { font-size: 1rem; font-weight: 800; color: var(--primary); margin: 3px 0; }
    .tier-card .tier-sub { font-size: .68rem; color: var(--muted); }
    .tier-card .tier-who { font-size: .66rem; color: var(--muted); margin-top: 5px; line-height: 1.4; }

    /* ── Auth wall — mobile ── */
    @media (max-width: 520px) {
      .auth-wall { padding: 12px; }
      .auth-box { padding: 20px 14px; border-radius: 12px; }
      .tier-grid { grid-template-columns: 1fr; gap: 6px; }
      .tier-card { text-align: left; padding: 10px 12px;
        display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
      .tier-card .tier-name { order: 1; }
      .tier-card .tier-price { order: 2; }
      .tier-card .tier-sub { order: 3; }
      .tier-card .tier-who { order: 4; width: 100%; }
    }

    /* ── Trial Banner ── */
    .trial-banner {
      background: linear-gradient(90deg, #d97706, #b45309);
      color: #fff; padding: 10px 16px; border-radius: 10px; margin-bottom: 14px;
      display: flex; align-items: center; gap: 10px; font-size: .86rem; font-weight: 600;
      flex-wrap: wrap;
    }
    .trial-banner.hidden { display: none; }
    .trial-banner-days { flex: 1; min-width: 0; }
    .trial-banner-btn {
      background: #fff; color: #b45309; border: none; border-radius: 6px;
      padding: 5px 12px; font-size: .82rem; font-weight: 700; cursor: pointer;
      white-space: nowrap;
    }
    .expired-banner {
      background: linear-gradient(90deg, #dc2626, #b91c1c);
      color: #fff; padding: 10px 16px; border-radius: 10px; margin-bottom: 14px;
      display: flex; align-items: center; gap: 10px; font-size: .86rem; font-weight: 600;
    }
    .expired-banner.hidden { display: none; }
    .plan-locked { opacity: 0.35; pointer-events: none; cursor: not-allowed; }

    /* ── Paywall overlay ── */
    .paywall-overlay {
      position: fixed; inset: 0; background: rgba(15,23,42,.7);
      z-index: 9000; display: flex; align-items: center; justify-content: center;
      padding: 20px; overflow-y: auto;
    }
    .paywall-overlay.hidden { display: none; }
    .paywall-box {
      background: #fff; border-radius: 18px; padding: 32px 28px;
      max-width: 520px; width: 100%; max-height: 92vh; overflow-y: auto;
    }
    .price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 20px 0; }
    @media (max-width: 480px) { .price-grid { grid-template-columns: 1fr; } }
    .price-card {
      border: 2px solid var(--border); border-radius: 12px; padding: 18px 14px; text-align: center;
    }
    .price-card.highlight { border-color: var(--primary); position: relative; }
    .price-card .pc-badge {
      position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
      background: var(--primary); color: #fff; font-size: .7rem; font-weight: 700;
      padding: 2px 10px; border-radius: 20px; white-space: nowrap;
    }
    .price-card .pc-tier { font-size: .75rem; font-weight: 700; text-transform: uppercase;
      letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
    .price-card .pc-price { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
    .price-card .pc-period { font-size: .75rem; color: var(--muted); }
    .price-card .pc-desc { font-size: .78rem; color: #555; margin-top: 8px; }

    /* ── Account menu ── */
    .acct-btn {
      width: 34px; height: 34px; border-radius: 50%;
      background: var(--primary); color: #fff;
      border: none; cursor: pointer; font-size: .88rem; font-weight: 700;
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0; transition: background .2s;
    }
    .acct-btn:hover { background: #154d8b; }
    .acct-dropdown {
      position: fixed; top: 70px; right: 12px; z-index: 5000;
      background: #fff; border-radius: 14px; padding: 18px;
      box-shadow: 0 8px 32px rgba(0,0,0,.16); min-width: 260px; max-width: 300px;
    }
    .acct-dropdown.hidden { display: none; }

    /* ── FAB (Floating Action Button) ── */
    .fab-main {
      width: 54px; height: 54px; border-radius: 50%;
      background: var(--primary); color: #fff;
      border: none; font-size: 1.5rem; cursor: pointer;
      box-shadow: 0 4px 18px rgba(0,0,0,.22);
      display: flex; align-items: center; justify-content: center;
      transition: transform .2s, background .2s;
    }
    .fab-main:hover { transform: scale(1.07); background: #154d8b; }
    .fab-main.open { background: #555; }
    .fab-item {
      display: flex; align-items: center;
      background: #fff; border-radius: 28px;
      box-shadow: 0 2px 12px rgba(0,0,0,.15);
      padding: 9px 16px; text-decoration: none;
      font-size: .88rem; font-weight: 600; color: var(--text);
      transition: transform .18s, box-shadow .18s;
      white-space: nowrap;
    }
    .fab-item:hover { transform: scale(1.04); box-shadow: 0 4px 18px rgba(0,0,0,.2); }

    /* ── Dashboard ── */
    .dash-grid {
      display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px;
    }
    .dash-stat {
      background: linear-gradient(135deg, #1a5276 0%, #2980b9 100%);
      border-radius: 12px; padding: 18px 16px; color: #fff; position: relative; overflow: hidden;
    }
    .dash-stat.green  { background: linear-gradient(135deg, #1e8449 0%, #27ae60 100%); }
    .dash-stat.amber  { background: linear-gradient(135deg, #d35400 0%, #e67e22 100%); }
    .dash-stat.purple { background: linear-gradient(135deg, #6c3483 0%, #9b59b6 100%); }
    .dash-stat-icon { font-size: 1.6rem; margin-bottom: 6px; opacity: .85; }
    .dash-stat-value { font-size: 1.9rem; font-weight: 800; line-height: 1; }
    .dash-stat-label { font-size: .72rem; opacity: .8; margin-top: 4px; text-transform: uppercase; letter-spacing: .05em; }
    .dash-stat-bg { position: absolute; right: -10px; bottom: -10px; font-size: 4rem; opacity: .12; }
    .dash-activity { margin-top: 4px; }
    .dash-activity-row {
      display: flex; align-items: center; gap: 10px;
      padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .88rem;
    }
    .dash-activity-row:last-child { border-bottom: none; }
    .dash-act-dot {
      width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
      background: var(--primary);
    }
    .dash-act-dot.green  { background: #27ae60; }
    .dash-act-dot.amber  { background: #e67e22; }
    .dash-act-dot.red    { background: #e74c3c; }
    .dash-act-text { flex: 1; color: var(--text); }
    .dash-act-time { color: var(--muted); font-size: .78rem; white-space: nowrap; }

    /* ── Tool tiles ── */
    .tool-tile-grid {
      display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px;
    }
    @media (max-width: 540px) { .tool-tile-grid { grid-template-columns: 1fr 1fr; } }
    .tool-tile {
      background: linear-gradient(135deg, #1a5276 0%, #2980b9 100%);
      border-radius: 12px; padding: 18px 14px; color: #fff; position: relative;
      overflow: hidden; cursor: pointer; border: none; text-align: left; width: 100%;
      transition: transform .15s ease, box-shadow .15s ease; user-select: none;
      display: block; font-family: inherit;
    }
    .tool-tile:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
    .tool-tile:active { transform: translateY(-1px); }
    .tool-tile.green  { background: linear-gradient(135deg, #1e8449 0%, #27ae60 100%); }
    .tool-tile.amber  { background: linear-gradient(135deg, #d35400 0%, #e67e22 100%); }
    .tool-tile.purple { background: linear-gradient(135deg, #6c3483 0%, #9b59b6 100%); }
    .tool-tile-icon { font-size: 1.6rem; margin-bottom: 6px; opacity: .9; }
    .tool-tile-name { font-size: .88rem; font-weight: 700; line-height: 1.2; margin-bottom: 3px; }
    .tool-tile-desc { font-size: .70rem; opacity: .78; line-height: 1.4; }
    .tool-tile-bg { position: absolute; right: -8px; bottom: -8px; font-size: 3.8rem; opacity: .13; pointer-events: none; line-height: 1; }
    .tool-card-panel { display: none; }
    .tool-back-btn {
      display: inline-flex; align-items: center; gap: 6px;
      background: var(--card); border: 1.5px solid var(--border);
      border-radius: 8px; padding: 9px 16px; font-size: .85rem; font-weight: 600;
      color: var(--primary); cursor: pointer; margin-bottom: 14px; font-family: inherit;
      transition: background .15s, border-color .15s;
    }
    .tool-back-btn:hover { background: var(--bg); border-color: var(--primary-light); }

    .doc-group { margin-bottom: 22px; }
    .doc-group-title { font-size: .95rem; font-weight: 700; margin: 0 0 12px; letter-spacing: .06em; color: #334155; }
    .doc-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    @media (max-width: 780px) { .doc-grid { grid-template-columns: 1fr; } }
    .doc-item {
      border: 1px solid var(--border);
      border-radius: 14px;
      background: #fff;
      padding: 18px 18px 16px;
      transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
      cursor: pointer;
      box-shadow: 0 6px 18px rgba(15,23,42,.06);
    }
    .doc-item:hover { transform: translateY(-2px); border-color: rgba(59,130,246,.24); box-shadow: 0 14px 30px rgba(15,23,42,.12); }
    .doc-item h3 { margin: 0 0 8px; font-size: 1rem; }
    .doc-item p { margin: 0; color: var(--muted); line-height: 1.7; }

    /* ── Appt-panel / Fin-panel / Client-panel (share tool-tile styles) ── */
    .appt-card-panel { display: none; }
    .fin-card-panel  { display: none; }
    .client-card-panel { display: none; }
    .legal-card-panel  { display: none; }

    /* ── Clients ── */
    .client-list { margin-top: 4px; }
    .client-card {
      border: 1px solid var(--border); border-radius: 10px;
      padding: 14px 16px; margin-bottom: 10px; background: #fff;
      display: flex; align-items: center; gap: 14px;
      transition: box-shadow .15s;
    }
    .client-card:hover { box-shadow: 0 3px 12px rgba(0,0,0,.1); }
    .client-avatar {
      width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
      background: linear-gradient(135deg, #1a5276, #2980b9);
      display: flex; align-items: center; justify-content: center;
      color: #fff; font-size: 1.1rem; font-weight: 700;
    }
    .client-info { flex: 1; min-width: 0; }
    .client-name { font-weight: 700; font-size: .95rem; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .client-sub  { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .client-actions { display: flex; gap: 6px; flex-shrink: 0; }
    .icon-btn {
      padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px;
      background: #fff; cursor: pointer; font-size: .85rem;
      color: var(--muted); transition: all .15s; font-family: inherit;
    }
    .icon-btn:hover { border-color: var(--primary); color: var(--primary); background: #eef4fb; }
    .icon-btn.danger:hover { border-color: #e74c3c; color: #e74c3c; background: #fdf2f0; }
    .empty-state {
      text-align: center; padding: 32px 16px; color: var(--muted);
    }
    .empty-state-icon { font-size: 2.5rem; margin-bottom: 10px; }
    .empty-state-text { font-size: .9rem; }

    /* ── Appointments ── */
    .appt-list { margin-top: 4px; }
    .appt-card {
      border: 1px solid var(--border); border-radius: 10px;
      padding: 14px 16px; margin-bottom: 10px; background: #fff;
      display: flex; gap: 14px; align-items: flex-start;
      transition: box-shadow .15s;
    }
    .appt-card:hover { box-shadow: 0 3px 12px rgba(0,0,0,.1); }
    .appt-date-block {
      flex-shrink: 0; width: 52px; text-align: center;
      background: linear-gradient(135deg, #1a5276, #2980b9);
      border-radius: 10px; padding: 8px 4px; color: #fff;
    }
    .appt-date-day   { font-size: 1.4rem; font-weight: 800; line-height: 1; }
    .appt-date-month { font-size: .65rem; text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
    .appt-info { flex: 1; min-width: 0; }
    .appt-title { font-weight: 700; font-size: .95rem; margin-bottom: 3px; }
    .appt-meta  { font-size: .78rem; color: var(--muted); margin-bottom: 6px; }
    .appt-actions { display: flex; gap: 6px; flex-wrap: wrap; }
    .status-badge {
      display: inline-block; padding: 2px 10px; border-radius: 20px;
      font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    }
    .status-badge.pending   { background: #fff8e1; color: #e67e22; border: 1px solid #f5cba7; }
    .status-badge.confirmed { background: #eafaf1; color: #1e8449; border: 1px solid #a9dfbf; }
    .status-badge.cancelled { background: #fdf2f0; color: #e74c3c; border: 1px solid #f5b7b1; }
    .status-badge.completed { background: #eef4fb; color: #1a5276; border: 1px solid #93c5fd; }

    /* ── QR Panel ── */
    .qr-panel {
      background: linear-gradient(135deg, #1a3a5c 0%, #1a5276 100%);
      border-radius: 14px; padding: 24px; text-align: center; margin-bottom: 18px; color: #fff;
    }
    .qr-panel h3 { font-size: 1rem; margin-bottom: 6px; }
    .qr-panel p  { font-size: .82rem; opacity: .8; margin-bottom: 18px; line-height: 1.5; }
    #qrCodeCanvas { background: #fff; border-radius: 10px; padding: 10px; display: inline-block; }
    .qr-url-box {
      background: rgba(255,255,255,.12); border-radius: 8px;
      padding: 8px 12px; font-size: .75rem; word-break: break-all;
      margin-top: 12px; letter-spacing: .02em;
    }

    /* ── Financial Summary ── */
    .fin-period-bar {
      display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap;
    }
    .fin-period-btn {
      padding: 5px 14px; border: 2px solid var(--border); border-radius: 6px;
      background: #fff; cursor: pointer; font-size: .8rem; font-weight: 600;
      color: var(--muted); transition: all .2s; font-family: inherit;
    }
    .fin-period-btn.active { border-color: var(--primary); color: var(--primary); background: #eef4fb; }
    .fin-summary-row {
      display: flex; justify-content: space-between; align-items: center;
      padding: 11px 0; border-bottom: 1px solid var(--border); font-size: .92rem;
    }
    .fin-summary-row:last-child { border-bottom: none; }
    .fin-summary-row .fs-label { color: var(--muted); }
    .fin-summary-row .fs-value { font-weight: 700; }
    .fin-summary-row .fs-value.income  { color: #1e8449; }
    .fin-summary-row .fs-value.expense { color: #e74c3c; }
    .fin-summary-row .fs-value.profit  { color: #1a5276; }
    .fin-bar-wrap { margin: 18px 0; }
    .fin-bar-label { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); margin-bottom: 5px; }
    .fin-bar { height: 10px; border-radius: 5px; background: #e9ecef; overflow: hidden; }
    .fin-bar-fill { height: 100%; border-radius: 5px; transition: width .6s ease; }
    .fin-bar-fill.income  { background: linear-gradient(90deg, #1e8449, #27ae60); }
    .fin-bar-fill.expense { background: linear-gradient(90deg, #c0392b, #e74c3c); }

    /* ── Modal (shared) ── */
    .biz-modal-overlay {
      position: fixed; inset: 0; background: rgba(0,0,0,.45);
      display: flex; align-items: flex-end; justify-content: center;
      z-index: 9999; padding: 16px;
    }
    .biz-modal-overlay.hidden { display: none; }
    .biz-modal {
      background: #fff; border-radius: 18px 18px 14px 14px;
      width: 100%; max-width: 520px; max-height: 90vh;
      overflow-y: auto; padding: 24px; box-shadow: 0 -4px 30px rgba(0,0,0,.18);
    }
    .biz-modal h3 { font-size: 1.05rem; color: var(--primary); margin-bottom: 18px; }
    .biz-modal-actions { display: flex; gap: 10px; margin-top: 18px; }
    .biz-modal-actions .btn { margin-top: 0; }

    /* ── Section visibility ── */
    .app-section { display: none; }
    .app-section.active { display: block; }

    /* ══════════════════════════════════════════════
       NEW FEATURES — shared form-input style
    ══════════════════════════════════════════════ */
    .form-input {
      width: 100%; padding: 11px 12px; border: 2px solid var(--border);
      border-radius: 8px; font-size: .96rem; color: var(--text);
      background: #fff; transition: border-color .2s; font-family: inherit;
      box-sizing: border-box; display: block;
    }
    .form-input:focus { outline: none; border-color: var(--primary-light); }
    textarea.form-input { resize: vertical; min-height: 72px; }
    select.form-input { cursor: pointer; 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 fill='%23888' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
      background-repeat: no-repeat; background-position: right 12px center;
    }

    /* ── Quote / Invoice doc cards ── */
    .doc-card {
      border: 1px solid var(--border); border-radius: 10px;
      padding: 14px 16px; margin-bottom: 10px; background: #fff;
      display: flex; align-items: center; gap: 14px; transition: box-shadow .15s;
    }
    .doc-card:hover { box-shadow: 0 3px 12px rgba(0,0,0,.1); }
    .doc-num-block {
      flex-shrink: 0; width: 46px; height: 46px; border-radius: 10px;
      background: linear-gradient(135deg, #1a5276, #2980b9);
      display: flex; align-items: center; justify-content: center;
      color: #fff; font-size: .65rem; font-weight: 800; text-align: center;
      text-transform: uppercase; letter-spacing: .03em; line-height: 1.2; padding: 2px;
    }
    .doc-info { flex: 1; min-width: 0; }
    .doc-title { font-weight: 700; font-size: .93rem; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .doc-meta { font-size: .76rem; color: var(--muted); }
    .doc-amount { font-size: 1rem; font-weight: 800; color: var(--primary); flex-shrink: 0; white-space: nowrap; }
    .doc-actions { display: flex; gap: 6px; flex-shrink: 0; }

    /* ── Expense log ── */
    .exp-entry-card {
      border: 1px solid var(--border); border-radius: 10px;
      padding: 12px 14px; margin-bottom: 8px; background: #fff;
      display: flex; align-items: center; gap: 12px; transition: box-shadow .15s;
    }
    .exp-cat-icon {
      width: 38px; height: 38px; border-radius: 8px; flex-shrink: 0;
      display: flex; align-items: center; justify-content: center;
      font-size: 1.1rem; background: #eef4fb;
    }
    .exp-entry-info { flex: 1; min-width: 0; }
    .exp-entry-name { font-weight: 700; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .exp-entry-meta { font-size: .76rem; color: var(--muted); }
    .exp-entry-amount { font-weight: 800; font-size: 1rem; color: var(--red); flex-shrink: 0; white-space: nowrap; }
    .exp-total-bar {
      background: #f8f9fa; border: 1px solid var(--border); border-radius: 10px;
      padding: 12px 16px; display: flex; justify-content: space-between;
      align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 8px;
    }
    .exp-total-label { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
    .exp-total-value { font-size: 1.2rem; font-weight: 800; color: var(--red); }

    /* ── VAT Return ── */
    .vat-box {
      border-radius: 10px; padding: 18px 20px; text-align: center; margin-bottom: 14px;
    }
    .vat-box.payable { background: #fdf2f0; border: 2px solid #f5b7b1; }
    .vat-box.refund  { background: #f0faf4; border: 2px solid #a9dfbf; }
    .vat-box-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 4px; }
    .vat-box-value { font-size: 2rem; font-weight: 800; }
    .vat-box.payable .vat-box-value { color: #e74c3c; }
    .vat-box.refund  .vat-box-value { color: #1e8449; }

    /* ── Cash Flow ── */
    .cf-month-card { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
    .cf-month-header {
      background: linear-gradient(135deg, #1a5276 0%, #2980b9 100%);
      color: #fff; padding: 12px 16px;
      display: flex; justify-content: space-between; align-items: center;
    }
    .cf-month-name { font-weight: 700; font-size: .95rem; }
    .cf-month-net  { font-size: 1.05rem; font-weight: 800; }
    .cf-month-net.positive { color: #a9dfbf; }
    .cf-month-net.negative { color: #f5b7b1; }
    .cf-month-body { padding: 12px 16px; }
    .cf-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: .88rem; }
    .cf-row:last-child { border-bottom: none; }
    .cf-income  { color: #1e8449; font-weight: 700; }
    .cf-expense { color: #e74c3c; font-weight: 700; }

    /* ── Client Statements ── */
    .stmt-block { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
    .stmt-row {
      display: flex; justify-content: space-between; align-items: center;
      padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: .88rem;
    }
    .stmt-row:last-child { border-bottom: none; }
    .stmt-label { flex: 1; }
    .stmt-date  { color: var(--muted); font-size: .76rem; margin-right: 12px; white-space: nowrap; }
    .stmt-amount { font-weight: 700; white-space: nowrap; }
    .stmt-amount.credit { color: #1e8449; }
    .stmt-amount.debit  { color: #e74c3c; }
    .stmt-total { display: flex; justify-content: space-between; padding: 12px 14px; background: #f8f9fa; border-top: 2px solid var(--border); font-weight: 700; font-size: .95rem; }

    /* ── Time Tracker ── */
    .timer-display {
      text-align: center; padding: 28px 16px;
      background: linear-gradient(135deg, #1a5276 0%, #2980b9 100%);
      border-radius: 14px; color: #fff; margin-bottom: 16px;
    }
    .timer-clock { font-size: 3rem; font-weight: 800; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
    .timer-client-label { font-size: .85rem; opacity: .8; margin-top: 6px; min-height: 1.2em; }
    .timer-controls { display: flex; gap: 10px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
    .timer-btn { padding: 10px 22px; border: none; border-radius: 8px; font-size: .9rem; font-weight: 700; cursor: pointer; font-family: inherit; }
    .timer-btn.start { background: #27ae60; color: #fff; }
    .timer-btn.stop  { background: #e74c3c; color: #fff; }
    .timer-btn.reset { background: rgba(255,255,255,.2); color: #fff; border: 1px solid rgba(255,255,255,.4); }
    .time-entry-card {
      border: 1px solid var(--border); border-radius: 10px;
      padding: 12px 14px; margin-bottom: 8px; background: #fff;
      display: flex; align-items: center; gap: 12px;
    }
    .time-entry-dur { font-size: 1.05rem; font-weight: 800; color: var(--primary); flex-shrink: 0; min-width: 56px; text-align: right; }
    .time-entry-info { flex: 1; min-width: 0; }
    .time-entry-name { font-weight: 700; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .time-entry-meta { font-size: .76rem; color: var(--muted); }
    .bill-badge { font-size: .68rem; padding: 2px 7px; border-radius: 4px; font-weight: 700; }
    .bill-badge.yes { background: #eafaf1; color: #1e8449; border: 1px solid #a9dfbf; }
    .bill-badge.no  { background: #f4f4f4; color: var(--muted); border: 1px solid var(--border); }

    /* ── Projects & Tasks ── */
    .project-card {
      border: 1px solid var(--border); border-radius: 10px;
      padding: 14px 16px; margin-bottom: 10px; background: #fff; transition: box-shadow .15s;
    }
    .project-card:hover { box-shadow: 0 3px 12px rgba(0,0,0,.1); }
    .project-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
    .project-name { font-weight: 700; font-size: .95rem; flex: 1; }
    .project-progress { font-size: .75rem; color: var(--muted); margin-bottom: 8px; }
    .task-list { display: flex; flex-direction: column; gap: 5px; }
    .task-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: #f8f9fa; border-radius: 6px; font-size: .85rem; cursor: pointer; }
    .task-item:hover { background: #eef4fb; }
    .task-check { width: 16px; height: 16px; border-radius: 3px; border: 2px solid var(--border); flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: #fff; font-size: .7rem; }
    .task-check.done { background: #27ae60; border-color: #27ae60; color: #fff; }
    .task-label { flex: 1; }
    .task-label.done { text-decoration: line-through; color: var(--muted); }
    .task-due { font-size: .72rem; color: var(--muted); white-space: nowrap; }
    .task-due.overdue { color: #e74c3c; font-weight: 700; }

    /* ── Recurring invoices ── */
    .recur-card {
      border: 1px solid var(--border); border-radius: 10px;
      padding: 14px 16px; margin-bottom: 10px; background: #fff;
      display: flex; align-items: center; gap: 14px; transition: box-shadow .15s;
    }
    .recur-freq-badge {
      background: #eef4fb; color: var(--primary); border-radius: 6px;
      padding: 4px 10px; font-size: .76rem; font-weight: 700; white-space: nowrap; flex-shrink: 0;
    }
    .recur-info { flex: 1; min-width: 0; }
    .recur-name { font-weight: 700; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .recur-meta { font-size: .76rem; color: var(--muted); }

    /* ── Contract Generator ── */
    .contract-template-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
    @media (max-width: 520px) { .contract-template-grid { grid-template-columns: 1fr; } }
    .ct-card {
      border: 2px solid var(--border); border-radius: 10px; padding: 16px;
      cursor: pointer; transition: all .15s; text-align: center;
    }
    .ct-card:hover { border-color: var(--primary); background: #eef4fb; }
    .ct-card.selected { border-color: var(--primary); background: #eef4fb; }
    .ct-icon { font-size: 1.8rem; margin-bottom: 6px; }
    .ct-name { font-weight: 700; font-size: .88rem; color: var(--text); }
    .ct-desc { font-size: .73rem; color: var(--muted); margin-top: 3px; line-height: 1.4; }
    .contract-preview {
      white-space: pre-wrap; font-family: 'Courier New', monospace; font-size: .78rem;
      line-height: 1.7; background: #f8f9fa; border: 1px solid var(--border);
      border-radius: 8px; padding: 16px; max-height: 340px; overflow-y: auto;
      color: var(--text);
    }
    .slogan-s1{color:var(--primary);font-size:15px;font-weight:800;letter-spacing:.01em;line-height:1.08;margin-top:6px;font-family:'Segoe UI',Roboto,Arial,sans-serif}
    .slogan-flag{background:linear-gradient(90deg,#007A4D 0%,#007A4D 14%,#000 14%,#000 28%,#FFB612 28%,#FFB612 42%,#000 42%,#000 56%,#DE3831 56%,#DE3831 70%,#002395 70%,#002395 84%,#007A4D 84%,#007A4D 100%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent;font-weight:800;display:inline-block}
  