    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #f8fafc; color: #1e293b; font-size: 13px; }
    button, a { cursor: pointer; }

    /* ─── Header ─── */
    .hdr {
      background: #0f172a; height: 56px;
      display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
      position: fixed; top: 0; left: 0; right: 0; z-index: 200;
      box-shadow: 0 2px 8px rgba(0,0,0,.3);
    }
    .hdr-left { display: flex; align-items: center; gap: 14px; }
    .hdr-mark { height: 26px; width: auto; }
    .hdr-badge { background: #2563eb; color: #fff; font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 4px; letter-spacing: .06em; }
    .hdr-title { color: #f1f5f9; font-size: 15px; font-weight: 700; }
    .hdr-right { display: flex; align-items: center; gap: 12px; }
    .hdr-gen { color: #64748b; font-size: 10px; }
    .hdr-sel { background: #1e293b; border: 1px solid #334155; color: #cbd5e1; font-size: 11px; padding: 5px 9px; border-radius: 5px; }
    .hdr-export-all { background: #1d4ed8; color: #fff; border: none; border-radius: 5px; padding: 6px 14px; font-size: 11px; font-weight: 600; cursor: pointer; }
    .hdr-export-all:hover { background: #1e40af; }

    /* ─── Top Nav ─── */
    .tnav {
      background: #1e3a8a; position: fixed; top: 56px; left: 0; right: 0; z-index: 190;
      display: flex; align-items: center; padding: 0 16px; height: 42px; gap: 2px;
      border-bottom: 1px solid #1d4ed8; overflow-x: auto;
    }
    .tn {
      padding: 0 16px; height: 42px; font-size: 12px; font-weight: 500; color: #93c5fd;
      background: transparent; border: none; border-bottom: 3px solid transparent;
      display: flex; align-items: center; gap: 6px; white-space: nowrap; transition: all .15s;
    }
    .tn:hover { color: #fff; background: rgba(255,255,255,.08); }
    .tn.on {
      color: #fff; background: transparent; border-bottom-color: #fbbf24; font-weight: 700;
    }
    .bottom-nav { display: none; }
    .bottom-nav-item { border: 0; background: transparent; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

    /* ─── Company toggle — fixed below nav ─── */
    .company-toggle {
      display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
      position: fixed; top: 98px; left: 0; right: 0; z-index: 150;
      background: #f8fafc; padding: 8px 28px;
      border-bottom: 1px solid #e2e8f0;
      box-shadow: 0 2px 6px rgba(0,0,0,.05);
    }
    .company-btn { padding: 5px 16px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 12px; font-weight: 500; color: #475569; background: #fff; cursor: pointer; transition: all .15s; }
    .company-btn:hover { background: #f1f5f9; }
    .company-btn.on { background: #1e3a8a; color: #fff; border-color: #1e3a8a; font-weight: 700; }

    /* ─── Content ─── */
    .content { margin-top: 142px; padding: 22px 28px; }

    /* ─── Pages ─── */
    .pg { display: none; }
    .pg.on { display: block; }

    /* ─── Section header ─── */
    .shead {
      display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
      padding-bottom: 10px; border-bottom: 2px solid #1e3a8a;
    }
    .shead-num { background: #1e3a8a; color: #fff; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 10px; letter-spacing: .04em; }
    .shead-text { font-size: 13px; font-weight: 700; color: #1e3a8a; }
    .shead-sub { font-size: 11px; color: #64748b; font-weight: 400; }

    /* ─── Cards ─── */
    .bcard { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 18px 20px; margin-bottom: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.05); }

    /* ─── KPI grid ─── */
    .kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
    .kpi-b { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 16px 18px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
    .kpi-b.blue { background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%); border-color: transparent; }
    .kpi-b .lbl { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #64748b; }
    .kpi-b.blue .lbl { color: rgba(255,255,255,.75); }
    .kpi-b .val { font-size: 22px; font-weight: 800; color: #0f172a; margin: 5px 0 4px; }
    .kpi-b.blue .val { color: #fff; }
    .kpi-b .chg { font-size: 11px; color: #64748b; }
    .kpi-b.blue .chg { color: rgba(255,255,255,.7); }

    /* ─── Controls bar ─── */
    .ctrl { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
    .ctrl label { font-size: 11px; color: #64748b; display: flex; align-items: center; gap: 5px; }
    .ctrl select, .ctrl input { padding: 5px 9px; border: 1px solid #e2e8f0; border-radius: 5px; font-size: 11px; color: #334155; background: #fff; }
    .ctrl input[type=number] { width: 64px; }
    .ctrl input[type=text] { width: 170px; }
    .ctrl-div { width: 1px; height: 20px; background: #e2e8f0; }
    .ctrl-note { font-size: 10px; color: #94a3b8; }
    .ctrl-btn { padding: 5px 12px; border: 1px solid #e2e8f0; border-radius: 5px; font-size: 11px; color: #64748b; background: #f8fafc; cursor: pointer; }
    .ctrl-btn:hover { background: #e2e8f0; color: #334155; }
    .active-filter { border-color: #2563eb !important; background: #eff6ff !important; color: #1d4ed8 !important; }
    .mobile-filter-toggle { display: none; }

    /* Desktop filter compaction (G-1). Mobile rules below remain unchanged. */
    @media (min-width:769px) {
      .ctrl { gap: 6px; }
      .ctrl label { flex: 0 1 auto; min-width: 90px; gap: 2px; font-size: 10px; flex-direction: column; align-items: flex-start; }
      .ctrl select, .ctrl input { min-width: 90px; padding: 4px 7px; }
      .ctrl input[type=number] { width: 90px; }
      .ctrl input[type=text] { width: 150px; min-width: 90px; }
      .ctrl > .ctrl-note { flex: 1 1 220px; min-width: 90px; min-height: 23px; align-self: flex-end; display: flex; align-items: center; }
      .ctrl > .ctrl-btn { flex: 0 0 auto; align-self: flex-end; padding: 4px 9px; }
      .company-toggle { gap: 5px; padding: 7px 22px; }
    }

    /* ─── Table ─── */
    .tbl-wrap { overflow-x: auto; }
    .biz-table-scroll,
    .goals-table-scroll { max-height: min(62vh, 620px); overflow: auto; position: relative; }
    /* Z-13: the Goal table gets a taller viewport while retaining this scroll container for sticky rows. */
    .goals-table-scroll { max-height: min(78vh, 820px); }
    .biz-table-scroll table.biz,
    .goals-table-scroll table.biz { border-collapse: separate; border-spacing: 0; }
    .biz-table-scroll table.biz thead,
    .goals-table-scroll table.biz thead { position: sticky; top: 0; z-index: 6; }
    .biz-table-scroll table.biz tbody tr.total-row td,
    .goals-table-scroll table.biz tbody tr.total-row td {
      position: sticky;
      bottom: 0;
      z-index: 5;
      background: #eff6ff;
      box-shadow: 0 -2px 0 #bfdbfe;
    }
    /* Z-4: sticky Number + Category columns while scrolling horizontally */
    .goals-table-scroll table.biz thead tr:first-child th:nth-child(1),
    .goals-table-scroll table.biz tbody td:nth-child(1) { position: sticky; left: 0; z-index: 3; }
    .goals-table-scroll table.biz thead tr:first-child th:nth-child(2),
    .goals-table-scroll table.biz tbody td:nth-child(2) { position: sticky; left: 38px; z-index: 3; box-shadow: 4px 0 6px -4px rgba(15,23,42,.25); }
    .goals-table-scroll table.biz thead th:nth-child(1),
    .goals-table-scroll table.biz thead th:nth-child(2) { z-index: 7; }
    table.biz { width: 100%; border-collapse: collapse; font-size: 12px; }
    table.biz thead tr:first-child th { background: #1e3a8a; color: #fff; padding: 9px 12px; font-weight: 600; white-space: nowrap; text-align: center; }
    table.biz thead tr:first-child th.tleft { text-align: left; }
    table.biz thead tr:last-child th { background: #f1f5f9; color: #475569; padding: 7px 12px; font-weight: 600; border-bottom: 2px solid #cbd5e1; text-align: center; white-space: nowrap; }
    table.biz thead tr:last-child th.tleft { text-align: left; }
    table.biz tbody tr { border-bottom: 1px solid #f1f5f9; transition: background .1s; }
    table.biz tbody tr:hover { background: #f8fafc; }
    table.biz tbody tr.other-row { background: #fafafa; }
    table.biz tbody tr.total-row { background: #eff6ff; border-top: 2px solid #bfdbfe; }
    table.biz tbody td { padding: 9px 12px; color: #334155; text-align: right; }
    table.biz tbody td.tleft { text-align: left; }
    table.biz tbody td.tcenter { text-align: center; }
    /* Z-4: Category Goals table only — sticky columns (1st/2nd) need their own opaque
       background per row level so scrolled content doesn't show through, and tabular
       numerals keep digits aligned across rows */
    .goals-table-scroll table.biz tbody td { font-variant-numeric: tabular-nums; }
    /* Z-13: Goal-table detail headers use deliberate two-line labels where needed. */
    .goals-table-scroll table.biz thead tr:last-child th { white-space: normal; line-height: 1.2; }
    .goals-header-break { display: block; white-space: nowrap; }
    .goals-table-scroll table.biz tbody td:nth-child(1),
    .goals-table-scroll table.biz tbody td:nth-child(2) { background: #fff; }
    .goals-table-scroll table.biz tbody tr:hover td:nth-child(1),
    .goals-table-scroll table.biz tbody tr:hover td:nth-child(2) { background: #f8fafc; }
    .goals-table-scroll table.biz tbody tr.total-row td:nth-child(1),
    .goals-table-scroll table.biz tbody tr.total-row td:nth-child(2) { background: #eff6ff; }
    .goals-table-scroll table.biz tbody tr.total-row td:nth-child(1),
    .goals-table-scroll table.biz tbody tr.total-row td:nth-child(2) { z-index: 8; }

    /* ─── Z-4: Category Goals row hierarchy — Level 1 Category / Level 2 Brand / Level 3 Channel ─── */
    .goals-table-scroll table.biz tbody tr.sku-cat-hdr { background: #dbeafe; border-top: 2px solid #93c5fd; cursor: pointer; }
    .goals-table-scroll table.biz tbody tr.sku-cat-hdr td { padding-top: 11px; padding-bottom: 11px; font-weight: 700; color: #1e3a8a; }
    .goals-table-scroll table.biz tbody tr.sku-cat-hdr td:nth-child(1),
    .goals-table-scroll table.biz tbody tr.sku-cat-hdr td:nth-child(2) { background: #dbeafe; }
    .goals-table-scroll table.biz tbody tr.sku-cat-hdr:hover td:nth-child(1),
    .goals-table-scroll table.biz tbody tr.sku-cat-hdr:hover td:nth-child(2) { background: #bfdbfe; }
    .goals-table-scroll table.biz tbody tr.sku-cat-hdr .expand-arrow { font-size: 11px; width: 18px; }
    .goals-table-scroll table.biz tbody tr.sku-brand-hdr { background: #eef2f7; cursor: pointer; }
    .goals-table-scroll table.biz tbody tr.sku-brand-hdr td { font-weight: 600; color: #334155; }
    .goals-table-scroll table.biz tbody tr.sku-brand-hdr td:nth-child(1),
    .goals-table-scroll table.biz tbody tr.sku-brand-hdr td:nth-child(2) { background: #eef2f7; }
    .goals-table-scroll table.biz tbody tr.sku-brand-hdr:hover td:nth-child(1),
    .goals-table-scroll table.biz tbody tr.sku-brand-hdr:hover td:nth-child(2) { background: #e2e8f0; }
    .goals-table-scroll table.biz tbody tr.sku-brand-hdr .expand-arrow { font-size: 8px; width: 13px; }
    .goals-table-scroll table.biz tbody tr.sku-detail-row { background: #fff; }
    .goals-table-scroll table.biz tbody tr.sku-detail-row td:nth-child(2) { color: #1e40af; border-left: 2px solid #e2e8f0; }

    /* ─── Vertical separators between Net Sales / Goal / Growth / Contribution groups ─── */
    .goals-table-scroll table.biz.has-yr0 thead tr:last-child th:nth-child(4),
    .goals-table-scroll table.biz.has-yr0 thead tr:last-child th:nth-child(8),
    .goals-table-scroll table.biz.has-yr0 thead tr:last-child th:nth-child(10) { border-right: 2px solid #64748b; }
    .goals-table-scroll table.biz:not(.has-yr0) thead tr:last-child th:nth-child(3),
    .goals-table-scroll table.biz:not(.has-yr0) thead tr:last-child th:nth-child(7),
    .goals-table-scroll table.biz:not(.has-yr0) thead tr:last-child th:nth-child(8) { border-right: 2px solid #64748b; }
    .goals-table-scroll table.biz.has-yr0 tbody td:nth-child(6),
    .goals-table-scroll table.biz.has-yr0 tbody td:nth-child(10),
    .goals-table-scroll table.biz.has-yr0 tbody td:nth-child(12) { border-right: 2px solid #cbd5e1; }
    .goals-table-scroll table.biz:not(.has-yr0) tbody td:nth-child(5),
    .goals-table-scroll table.biz:not(.has-yr0) tbody td:nth-child(9),
    .goals-table-scroll table.biz:not(.has-yr0) tbody td:nth-child(10) { border-right: 2px solid #cbd5e1; }

    /* ─── Goal columns — pale yellow reserved for editable Goal amount + Comment only ─── */
    th.goal-col { background: #1e40af !important; color: #fff !important; }
    td.goal-col { background: #fefce8; }
    tr.total-row td.goal-col { background: #fef9c3; }
    /* computed, read-only Remaining-to-Goal / %Remaining cells: neutral, not yellow */
    td.goal-metric-col { background: #fff; }
    tr.total-row td.goal-metric-col { background: #eff6ff; }
    tr.sku-brand-hdr td.goal-metric-col { background: #eef2f7; }
    .goal-input-num { width: 104px; padding: 4px 7px; border: 1px solid #cbd5e1; border-radius: 4px; font-size: 11px; text-align: right; color: #334155; font-variant-numeric: tabular-nums; }
    .goal-input-num:focus { outline: none; border-color: #2563eb; background: #eff6ff; }
    th.comment-col { background: #1e40af !important; color: #fff !important; min-width: 150px; }
    td.comment-col { background: #fefce8; min-width: 150px; max-width: 240px; text-align: left; }
    tr.total-row td.comment-col { background: #fef9c3; text-align: left; }
    /* Z-4: Category Goals table only — compact comment column now that it holds a small input, not a textarea */
    .goals-table-scroll th.comment-col { min-width: 90px; }
    .goals-table-scroll td.comment-col { min-width: 90px; max-width: none; }
    /* Z-4: compact single-line comment input, expands on focus (Task 4 alternative) */
    .goal-comment-input {
      width: 90px; padding: 4px 7px;
      border: 1px solid #cbd5e1; border-radius: 4px; font-size: 11px;
      color: #334155; transition: width .12s ease;
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    }
    .goal-comment-input:not(:placeholder-shown) { border-color: #d4a23e; background: #fffbeb; }
    .goal-comment-input:focus { outline: none; width: 220px; border-color: #2563eb; background: #eff6ff; position: relative; z-index: 2; }
    .goal-comment-text { display: block; max-width: 230px; white-space: normal; overflow-wrap: anywhere; font-size: 11px; line-height: 1.4; color: #475569; }
    .goal-comment-label { color: #334155; font-weight: 700; }
    .goal-comment-value { color: #475569; font-weight: 400; }
    .goal-comment-sep { color: #94a3b8; margin: 0 2px; }

    /* ─── Rank badge ─── */
    .rbadge { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; font-size: 10px; font-weight: 700; background: #e2e8f0; color: #334155; }
    .rbadge.gold { background: #fef3c7; color: #92400e; }
    .rbadge.silver { background: #f1f5f9; color: #475569; }
    .rbadge.bronze { background: #fde8d8; color: #9a3412; }

    /* ─── Growth colors ─── */
    .pos { color: #059669; font-weight: 600; }
    .neg { color: #dc2626; font-weight: 600; }
    .na-cell { color: #94a3b8; }

    /* ─── Growth pill badges ─── */
    .growth-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
    .growth-pill.pos { color: #15803d; background: #dcfce7; }
    .growth-pill.neg { color: #b91c1c; background: #fee2e2; }
    .growth-pill.neu { color: #6b7280; background: #f3f4f6; }

    /* ─── Store name ─── */
    .store-name { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .store-other { color: #64748b; font-style: italic; }
    .store-vendor-row.expandable { cursor: pointer; }
    .store-vendor-row.expandable:hover { background: #eff6ff; }
    .store-vendor-row .expand-arrow { margin-right: 6px; }
    .store-category-row { background: #eff6ff; cursor: pointer; }
    .store-category-row:hover { background: #dbeafe !important; }
    .store-category-row td { color: #1e3a8a; font-weight: 600; }
    .store-category-row td.tleft { padding-left: 28px; }
    .store-category-row .expand-arrow { margin-right: 6px; }
    .store-brand-row { background: #f8fafc; }
    .store-brand-row td { color: #475569; font-size: 11px; }
    .store-brand-row td.tleft { padding-left: 54px; border-left: 2px solid #dbeafe; }
    .store-remark { display: block; color: #475569; font-size: 10px; line-height: 1.35; }
    .goal-status-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 68px; padding: 3px 7px; border-radius: 999px; font-size: 10px; font-weight: 700; white-space: nowrap; }
    .goal-status-pill.incomplete { color: #b91c1c; background: #fee2e2; }
    .goal-status-pill.achieved { color: #15803d; background: #dcfce7; }
    .goal-status-pill.pending { color: #92400e; background: #fef3c7; min-width: 88px; }
    .goal-status-pill.no-goal { color: #64748b; background: #f1f5f9; }
    .status-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 14px; margin-top: 9px; padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 7px; background: #f8fafc; color: #475569; font-size: 10px; line-height: 1.35; }
    .status-legend-label { color: #1e3a8a; font-weight: 700; }
    .status-legend .goal-status-pill { margin-right: 4px; vertical-align: middle; }

    /* ─── Chart wrappers ─── */
    .cw { position: relative; }
    .h220 { height: 220px; } .h260 { height: 260px; } .h300 { height: 300px; }

    /* ─── Grid ─── */
    .g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
    .g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

    /* ─── Category table ─── */
    .cat-row { cursor: pointer; }
    .cat-row:hover { background: #eff6ff !important; }
    .cat-row td { font-weight: 600; }
    .toggle-icon, .expand-arrow { display: inline-block; width: 16px; font-size: 10px; color: #64748b; }
    .brand-row td { font-size: 11px; color: #475569; font-weight: 400; }
    .brand-row td.tleft { padding-left: 36px; }
    .brand-row.hidden { display: none; }
    .brand-row { background: #f8fafc; }

    /* ─── Text area sections ─── */
    .biz-textarea {
      width: 100%; border: 1px solid #e2e8f0; border-radius: 6px; padding: 12px;
      font-size: 12px; color: #334155; resize: vertical; line-height: 1.7;
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    }
    .biz-textarea:focus { outline: none; border-color: #60a5fa; box-shadow: 0 0 0 2px rgba(96,165,250,.2); }
    .textarea-hint { font-size: 10px; color: #94a3b8; margin-top: 4px; }

    /* ─── Goals page ─── */
    .goals-block { margin-bottom: 28px; }
    .goals-block-title {
      font-size: 13px; font-weight: 700; color: #1e3a8a;
      margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid #e2e8f0;
    }
    .goals-headline-input {
      width: 100%; padding: 8px 12px; border: 1px solid #e2e8f0; border-radius: 6px;
      font-size: 12px; color: #334155; margin-bottom: 6px;
    }
    .goals-headline-input:focus { outline: none; border-color: #60a5fa; }
    .goals-hint { font-size: 10px; color: #94a3b8; margin-bottom: 10px; }
    .goals-clear-btn { padding: 5px 12px; border: 1px solid #fca5a5; border-radius: 5px; font-size: 11px; color: #b91c1c; background: #fef2f2; cursor: pointer; }
    .goals-clear-btn:hover { background: #fee2e2; }
    .company-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
    .company-clear-goals { white-space: nowrap; }
    .number-format-toggle { display: inline-flex; align-items: center; padding: 2px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; }
    .number-format-label { padding: 0 7px 0 5px; font-size: 10px; font-weight: 600; color: #64748b; }
    .number-format-btn { padding: 3px 8px; border: 0; border-radius: 4px; background: transparent; color: #64748b; font-size: 10px; font-weight: 600; }
    .number-format-btn:hover { background: #f1f5f9; color: #1e3a8a; }
    .number-format-btn.on { background: #1e3a8a; color: #fff; }

    /* ─── Z-4: Category Goals toolbar ─── */
    .goals-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
    .goals-search-input { flex: 0 1 240px; min-width: 160px; padding: 6px 10px; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 11px; color: #334155; }
    .goals-search-input:focus { outline: none; border-color: #60a5fa; }
    .goals-toggle-label { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #64748b; margin-left: 4px; }

    /* ─── Mall row management ─── */
    .mall-remove-btn { background: none; border: none; color: #94a3b8; font-size: 13px; line-height: 1; padding: 0 4px; cursor: pointer; margin-left: 4px; vertical-align: middle; }
    /* ─── Channel group badge ─── */
    .ch-tag { display: inline-block; font-size: 9px; font-weight: 600; padding: 1px 5px; border-radius: 10px; margin-left: 5px; vertical-align: middle; letter-spacing: 0.02em; }
    .ch-tag.online { background: #dbeafe; color: #1d4ed8; }
    .ch-tag.trad { background: #fef9c3; color: #92400e; }
    .mall-remove-btn:hover { color: #dc2626; }
    .mall-add-btn { background: #f0fdf4; border: 1px dashed #86efac; color: #15803d; font-size: 11px; padding: 4px 12px; border-radius: 5px; cursor: pointer; margin: 4px 0 4px 48px; }
    .mall-add-btn:hover { background: #dcfce7; border-color: #4ade80; }

    /* ─── Placeholder ─── */
    .coming-soon { padding: 50px; text-align: center; color: #94a3b8; font-size: 13px; }

    /* ─── Footer ─── */
    .biz-foot { text-align: center; color: #94a3b8; font-size: 10px; padding: 24px; margin-top: 10px; border-top: 1px solid #e2e8f0; }

    /* ─── Password Modal ─── */
    dialog.pw-modal{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);border:none;border-radius:12px;padding:0;background:transparent;box-shadow:none;max-width:380px;width:90%;}
    dialog.pw-modal::backdrop{background:rgba(14,10,8,0.92);backdrop-filter:blur(6px);}
    .pw-box{background:#2a221d;border-radius:12px;padding:36px;border:1px solid #1a1411;}
    .pw-box .pw-brand{font-family:'Fraunces','Iowan Old Style',Georgia,serif;font-size:22px;font-weight:600;color:#efe6d8;letter-spacing:-.02em;margin-bottom:4px;}
    .pw-box .pw-sub{font-size:11px;color:#d4a23e;margin-bottom:22px;line-height:1.5;text-transform:uppercase;letter-spacing:.08em;font-family:'Geist Mono',monospace;}
    .pw-box input{width:100%;padding:10px 13px;border-radius:6px;border:1px solid #1a1411;background:#0e0a08;color:#f4ecdd;font-size:13px;outline:none;margin-bottom:12px;font-family:'Geist',sans-serif;}
    .pw-box input:focus{border-color:#d4a23e;}
    .pw-box button{width:100%;padding:10px;border-radius:6px;border:none;background:#d4a23e;color:#2a1d08;font-size:13px;font-weight:700;cursor:pointer;transition:background .15s;font-family:'Geist',sans-serif;}
    .pw-box button:hover:not(:disabled){background:#b88a2f;}
    .pw-box button:disabled{opacity:0.5;cursor:not-allowed;}
    .pw-err{color:#b91c1c;font-size:11px;margin-bottom:10px;min-height:1.3em;font-family:'Geist Mono',monospace;}
    /* ─── Light mode login panel (Parchment) ─── */
    [data-theme="light"] dialog.pw-modal::backdrop{background:rgba(14,10,8,0.88);backdrop-filter:blur(6px);}
    [data-theme="light"] .pw-box{background:#f6ecd6;border-color:#e2d2b1;}
    [data-theme="light"] .pw-box .pw-brand{color:#2a1d08;}
    [data-theme="light"] .pw-box .pw-sub{color:#d4a23e;}
    [data-theme="light"] .pw-box input{background:#fffaf0;border-color:#e2d2b1;color:#2a1d08;}
    [data-theme="light"] .pw-box input::placeholder{color:#b8a98f;}
    [data-theme="light"] .pw-box input:focus{border-color:#d4a23e;}
    [data-theme="light"] .pw-box button{background:#d4a23e;color:#2a1d08;}
    [data-theme="light"] .pw-box button:hover:not(:disabled){background:#b88a2f;}
    [data-theme="light"] .pw-err{color:#8c1c1c;}

    /* ─── Responsive ─── */
    @media (max-width:900px) {
      .g2, .g3 { grid-template-columns: 1fr; }
      .kpi-row { grid-template-columns: repeat(2, 1fr); }
      /* Table wrapper — horizontal scroll */
      .tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    }
    @media (max-width:768px) {
      /* Switch fixed headers to static so they stack naturally */
      .hdr { position: static; }
      .tnav { position: static; }
      .company-toggle { position: static; }
      /* Remove the hardcoded offset — static headers occupy natural flow */
      .content { margin-top: 0; padding: 14px 14px 36px; }
      /* Header layout adjustments */
      .hdr { flex-wrap: wrap; gap: 8px; height: auto; padding: 10px 14px; }
      .hdr-right { flex-wrap: wrap; gap: 8px; }
      .tnav { height: auto; flex-wrap: wrap; padding: 6px 14px; overflow-x: auto; }
      .company-toggle { flex-wrap: wrap; padding: 8px 14px; }
      .company-actions { width: 100%; margin-left: 0; justify-content: space-between; }
      .ctrl { align-items: stretch; }
      .ctrl label { width: 100%; align-items: flex-start; flex-direction: column; gap: 4px; }
      .ctrl select, .ctrl input, .ctrl input[type=text], .ctrl input[type=number], .ctrl-btn { width: 100%; }
      .ctrl-div { display: none; }
      .bcard { padding: 14px; }
      table.biz { width: max-content; min-width: 100%; font-size: 11.5px; }
      table.biz thead tr:first-child th, table.biz thead tr:last-child th, table.biz tbody td { padding: 7px 8px; }
      .store-name { max-width: 150px; }
      .goal-input-num { width: 78px; }
      .goal-comment-input { min-width: 110px; }
      body { padding-bottom: 64px; }
      .mobile-filter-toggle {
        display: flex; align-items: center; justify-content: space-between; gap: 8px;
        width: 100%; min-height: 34px; padding: 7px 10px; border: 1px solid #cbd5e1;
        border-radius: 6px; background: #fff; color: #1e3a8a; font-size: 11px; font-weight: 700;
      }
      .ctrl.mobile-filter-shell, .company-toggle.mobile-filter-shell { align-items: stretch; }
      .ctrl.mobile-filter-shell:not(.open) > :not(.mobile-filter-toggle),
      .company-toggle.mobile-filter-shell:not(.open) > :not(.mobile-filter-toggle) { display: none !important; }
      .ctrl.mobile-filter-shell.open label { width: 100%; align-items: flex-start; flex-direction: column; gap: 4px; }
      .ctrl.mobile-filter-shell.open select,
      .ctrl.mobile-filter-shell.open input { width: 100%; }
      .bottom-nav {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 260;
        display: flex; gap: 6px; padding: 6px 8px 7px;
        background: #0f172a; border-top: 1px solid #334155;
        box-shadow: 0 -10px 24px -18px rgba(0,0,0,.65);
      }
      .bottom-nav-item {
        flex: 1 1 0; min-height: 48px; padding: 5px 6px; border-radius: 8px;
        color: #94a3b8; font-size: 10px; font-weight: 700;
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
      }
      .bottom-nav-item .bi { font-size: 13px; line-height: 1; }
      .bottom-nav-item.on { color: #fff; background: rgba(96,165,250,.18); }
    }
    @media (max-width:480px) {
      .kpi-row { grid-template-columns: 1fr 1fr; }
      .hdr-title { font-size: 13px; }
      .h220 { height: 180px; } .h260 { height: 200px; } .h300 { height: 220px; }
      .pw-box input { min-height: 44px; }
      .pw-box button { min-height: 44px; }
    }
