:root {
      --bg: #f3f7f8;
      --panel: #ffffff;
      --panel-soft: #f7f8fa;
      --field: #ffffff;
      --ink: #202124;
      --muted: #6b7280;
      --line: #e2e5ea;
      --brand: #0e7490;
      --brand-dark: #083344;
      --blue: #0f4c81;
      --blue-soft: #e7f1fa;
      --good: #0f7a45;
      --good-soft: #eaf7ef;
      --warn: #9a5b00;
      --warn-soft: #fff3d8;
      --bad: #b42318;
      --bad-soft: #fde8e6;
      --purple: #4a328a;
      --radius-xl: 24px;
      --radius-lg: 18px;
      --radius-md: 14px;
      --shadow: 0 12px 28px rgba(16,24,40,0.10);
      --shadow-soft: 0 6px 16px rgba(16,24,40,0.07);
      --bottom-nav-height: 72px;
      --top-gradient: linear-gradient(135deg, #083344 0%, #0e7490 100%);
      --focus-ring: rgba(14,116,144,0.14);
    }

    html[data-accent="teal"] {
      --brand: #0e7490;
      --brand-dark: #083344;
      --blue: #0f4c81;
      --blue-soft: #e7f1fa;
      --top-gradient: linear-gradient(135deg, #083344 0%, #0e7490 100%);
      --focus-ring: rgba(14,116,144,0.14);
    }

    html[data-accent="blue"] {
      --brand: #2563eb;
      --brand-dark: #1e3a8a;
      --blue: #1d4ed8;
      --blue-soft: #dbeafe;
      --top-gradient: linear-gradient(135deg, #172554 0%, #2563eb 100%);
      --focus-ring: rgba(37,99,235,0.16);
    }

    html[data-accent="purple"] {
      --brand: #7c3aed;
      --brand-dark: #3b0764;
      --blue: #6d28d9;
      --blue-soft: #ede9fe;
      --top-gradient: linear-gradient(135deg, #2e1065 0%, #7c3aed 100%);
      --focus-ring: rgba(124,58,237,0.16);
    }

    html[data-accent="green"] {
      --brand: #15803d;
      --brand-dark: #14532d;
      --blue: #166534;
      --blue-soft: #dcfce7;
      --top-gradient: linear-gradient(135deg, #14532d 0%, #16a34a 100%);
      --focus-ring: rgba(22,163,74,0.16);
    }

    html[data-accent="orange"] {
      --brand: #ea580c;
      --brand-dark: #7c2d12;
      --blue: #c2410c;
      --blue-soft: #ffedd5;
      --top-gradient: linear-gradient(135deg, #7c2d12 0%, #ea580c 100%);
      --focus-ring: rgba(234,88,12,0.16);
    }

    html[data-accent="red"] {
      --brand: #dc2626;
      --brand-dark: #7f1d1d;
      --blue: #b91c1c;
      --blue-soft: #fee2e2;
      --top-gradient: linear-gradient(135deg, #7f1d1d 0%, #dc2626 100%);
      --focus-ring: rgba(220,38,38,0.16);
    }

    html[data-accent="slate"] {
      --brand: #475569;
      --brand-dark: #0f172a;
      --blue: #334155;
      --blue-soft: #e2e8f0;
      --top-gradient: linear-gradient(135deg, #0f172a 0%, #475569 100%);
      --focus-ring: rgba(71,85,105,0.16);
    }

    html[data-theme="dark"] {
      --bg: #0b1418;
      --panel: #111c22;
      --panel-soft: #17242b;
      --field: #0f1a20;
      --ink: #f4f7f8;
      --muted: #a8b5bd;
      --line: #2c3b43;
      --brand: #16a1bd;
      --brand-dark: #d7fbff;
      --blue: #8cccf0;
      --blue-soft: #132633;
      --good: #7ee3a3;
      --good-soft: #10321f;
      --warn: #ffd080;
      --warn-soft: #352712;
      --bad: #ff9a91;
      --bad-soft: #351818;
      --purple: #d7c8ff;
      --shadow: 0 12px 28px rgba(0,0,0,0.34);
      --shadow-soft: 0 6px 16px rgba(0,0,0,0.28);
    }

    html[data-theme="dark"][data-accent="teal"] { --brand: #16a1bd; --brand-dark: #d7fbff; --blue: #8cccf0; --blue-soft: #132633; --top-gradient: linear-gradient(135deg, #083344 0%, #0e7490 100%); --focus-ring: rgba(22,161,189,0.22); }
    html[data-theme="dark"][data-accent="blue"] { --brand: #60a5fa; --brand-dark: #dbeafe; --blue: #93c5fd; --blue-soft: #172554; --top-gradient: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%); --focus-ring: rgba(96,165,250,0.22); }
    html[data-theme="dark"][data-accent="purple"] { --brand: #c084fc; --brand-dark: #f3e8ff; --blue: #d8b4fe; --blue-soft: #2e1065; --top-gradient: linear-gradient(135deg, #3b0764 0%, #7c3aed 100%); --focus-ring: rgba(192,132,252,0.22); }
    html[data-theme="dark"][data-accent="green"] { --brand: #4ade80; --brand-dark: #dcfce7; --blue: #86efac; --blue-soft: #14532d; --top-gradient: linear-gradient(135deg, #14532d 0%, #16a34a 100%); --focus-ring: rgba(74,222,128,0.22); }
    html[data-theme="dark"][data-accent="orange"] { --brand: #fb923c; --brand-dark: #ffedd5; --blue: #fdba74; --blue-soft: #431407; --top-gradient: linear-gradient(135deg, #7c2d12 0%, #ea580c 100%); --focus-ring: rgba(251,146,60,0.22); }
    html[data-theme="dark"][data-accent="red"] { --brand: #f87171; --brand-dark: #fee2e2; --blue: #fca5a5; --blue-soft: #450a0a; --top-gradient: linear-gradient(135deg, #7f1d1d 0%, #dc2626 100%); --focus-ring: rgba(248,113,113,0.22); }
    html[data-theme="dark"][data-accent="slate"] { --brand: #94a3b8; --brand-dark: #f8fafc; --blue: #cbd5e1; --blue-soft: #1e293b; --top-gradient: linear-gradient(135deg, #020617 0%, #475569 100%); --focus-ring: rgba(148,163,184,0.22); }

    * { box-sizing: border-box; }

    html { scroll-behavior: smooth; }

    body {
      margin: 0;
      min-height: 100vh;
      color: var(--ink);
      background: var(--bg);
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      -webkit-font-smoothing: antialiased;
      padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
    }

    button, input, select, textarea { font: inherit; }

    button {
      border: 0;
      border-radius: var(--radius-md);
      min-height: 42px;
      padding: 10px 14px;
      font-weight: 850;
      color: var(--ink);
      background: var(--panel);
      border: 1px solid var(--line);
      cursor: pointer;
      touch-action: manipulation;
    }

    button:active { transform: translateY(1px); }
    button.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
    button.blue { background: var(--blue); border-color: var(--blue); color: #fff; }
    button.soft { background: var(--panel-soft); }
    button.danger { background: var(--bad-soft); border-color: #f6c6c1; color: var(--bad); }
    button.compact { min-height: 34px; padding: 7px 10px; border-radius: 12px; font-size: 0.82rem; }
    button.linkLike { border: 0; background: transparent; color: inherit; padding: 0; min-height: auto; }

    input, select, textarea {
      width: 100%;
      min-height: 44px;
      border: 1px solid var(--line);
      border-radius: var(--radius-md);
      padding: 10px 12px;
      color: var(--ink);
      background: var(--field);
      outline: none;
    }

    textarea { min-height: 74px; resize: vertical; }

    input:focus, select:focus, textarea:focus {
      border-color: var(--brand);
      box-shadow: 0 0 0 3px var(--focus-ring);
    }

    input:disabled { background: #f2f4f7; color: #9aa3af; }

    label {
      display: block;
      margin: 0 0 6px;
      color: var(--muted);
      font-size: 0.76rem;
      line-height: 1.15;
      font-weight: 850;
    }

    .topBar {
      position: sticky;
      top: 0;
      z-index: 40;
      background: var(--top-gradient);
      color: #fff;
      box-shadow: 0 8px 20px rgba(16,24,40,0.16);
    }

    .topBarInner {
      width: min(1100px, 100%);
      margin: 0 auto;
      padding: 10px 14px 11px;
      display: grid;
      gap: 8px;
    }

    .brandRow {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .brandTitle {
      display: flex;
      align-items: center;
      min-width: 0;
      gap: 10px;
    }

    .appMark {
      width: 38px;
      height: 38px;
      border-radius: 12px;
      display: grid;
      place-items: center;
      background: rgba(255,255,255,0.16);
      border: 1px solid rgba(255,255,255,0.22);
      font-weight: 950;
    }

    .brandText { min-width: 0; }
    .brandText h1 { margin: 0; font-size: 1.08rem; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .brandText p { margin: 2px 0 0; opacity: 0.82; font-size: 0.76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    .topActions { display: flex; align-items: center; gap: 8px; }
    .iconBtn {
      width: 40px;
      height: 40px;
      padding: 0;
      display: grid;
      place-items: center;
      border-radius: 999px;
      border-color: rgba(255,255,255,0.20);
      background: rgba(255,255,255,0.12);
      color: #fff;
      font-size: 1.16rem;
    }

    .versionPill {
      min-height: 30px;
      padding: 6px 9px;
      border-radius: 999px;
      background: rgba(255,255,255,0.16);
      border: 1px solid rgba(255,255,255,0.22);
      color: #fff;
      font-size: 0.72rem;
      font-weight: 950;
    }

    .favStrip {
      display: flex;
      gap: 8px;
      overflow-x: auto;
      scrollbar-width: none;
      padding-bottom: 1px;
    }
    .favStrip::-webkit-scrollbar { display: none; }
    .favChip {
      flex: 0 0 auto;
      min-height: 34px;
      padding: 7px 11px;
      border-radius: 999px;
      background: rgba(255,255,255,0.15);
      border: 1px solid rgba(255,255,255,0.20);
      color: #fff;
      font-size: 0.8rem;
      font-weight: 850;
    }

    .appShell {
      width: min(1100px, 100%);
      margin: 0 auto;
      padding: 14px 12px calc(var(--bottom-nav-height) + 34px + env(safe-area-inset-bottom));
    }

    .view { display: none; }
    .view.active { display: block; }

    .screenTitle {
      margin: 2px 2px 12px;
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
    }
    .screenTitle h2 { margin: 0; font-size: 1.25rem; letter-spacing: -0.03em; }
    .screenTitle p { margin: 3px 0 0; color: var(--muted); font-size: 0.84rem; line-height: 1.3; }

    .moneyHero {
      border-radius: var(--radius-xl);
      overflow: hidden;
      background: linear-gradient(135deg, #0b2233 0%, #071923 100%);
      color: #fff;
      box-shadow: var(--shadow);
      margin-bottom: 14px;
    }

    .moneyHeroTop {
      padding: 17px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px;
      align-items: start;
    }

    .moneyHero .label { color: rgba(255,255,255,0.70); font-size: 0.78rem; font-weight: 850; }
    .moneyHero .amount { margin-top: 4px; font-size: clamp(2.35rem, 13vw, 4.8rem); line-height: 0.95; font-weight: 950; letter-spacing: -0.07em; }
    .moneyHero .range { margin-top: 10px; color: rgba(255,255,255,0.78); font-size: 0.9rem; }
    .moneyHero .nextPrompt { margin-top: 8px; color: rgba(255,255,255,0.86); font-size: 0.78rem; font-weight: 800; }
    .moneyHero .statusPill { background: rgba(255,255,255,0.14); color: #fff; border: 1px solid rgba(255,255,255,0.20); }
    .heroSideActions { display: grid; justify-items: end; gap: 8px; }
    .heroChartBtn {
      width: 48px;
      height: 48px;
      border-radius: 18px;
      display: grid;
      place-items: center;
      background: rgba(255,255,255,0.14);
      border: 1px solid rgba(255,255,255,0.22);
      color: #fff;
      box-shadow: 0 10px 22px rgba(0,0,0,0.16);
    }
    .heroChartBtn svg { width: 25px; height: 25px; display: block; }
    .heroChartBtn:active { transform: translateY(1px); }

    .heroMetrics {
      display: grid;
      grid-template-columns: repeat(4, minmax(0,1fr));
      gap: 1px;
      background: rgba(255,255,255,0.10);
      border-top: 1px solid rgba(255,255,255,0.10);
    }

    .heroMetric {
      padding: 12px 10px;
      background: rgba(255,255,255,0.05);
      min-width: 0;
    }
    .heroMetric small { display: block; color: rgba(255,255,255,0.66); font-weight: 800; font-size: 0.7rem; }
    .heroMetric b { display: block; margin-top: 4px; color: #fff; font-size: 1rem; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    .card {
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      background: var(--panel);
      box-shadow: var(--shadow-soft);
      overflow: hidden;
      margin-bottom: 12px;
    }

    .card.pad { padding: 14px; }
    .cardHeader {
      padding: 14px;
      border-bottom: 1px solid var(--line);
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 12px;
    }
    .cardHeader h3 { margin: 0; font-size: 1rem; letter-spacing: -0.02em; }
    .cardHeader p { margin: 3px 0 0; color: var(--muted); font-size: 0.82rem; line-height: 1.3; }
    .cardBody { padding: 14px; }

    .quickGrid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0,1fr));
      gap: 10px;
      margin-bottom: 0;
    }

    .homeQuickGrid { grid-template-columns: repeat(2, minmax(0,1fr)); }

    .quickTile {
      min-height: 78px;
      padding: 12px;
      border-radius: var(--radius-lg);
      border: 1px solid var(--line);
      background: var(--panel);
      box-shadow: var(--shadow-soft);
      color: var(--ink);
      text-align: left;
      display: grid;
      align-content: space-between;
      gap: 8px;
    }

    .quickTile.primaryTile {
      min-height: 92px;
      grid-column: 1 / -1;
      grid-template-columns: auto 1fr;
      align-items: center;
      align-content: center;
      column-gap: 14px;
    }

    .quickTile.primaryTile .tileIcon {
      width: 38px;
      height: 38px;
      border-radius: 14px;
      display: grid;
      place-items: center;
      background: rgba(255,255,255,0.16);
    }

    .quickTile.primaryTile .tileText,
    .quickTile.primaryTile .tileSub { grid-column: 2; }

    .quickTile.primaryTile .tileText { align-self: end; }
    .quickTile.primaryTile .tileSub { align-self: start; }

    .quickTile.primaryTile { background: var(--brand); color: #fff; border-color: var(--brand); }
    .quickTile.darkTile { background: #1f1f1f; color: #fff; border-color: #1f1f1f; }
    .quickTile.blueTile { background: #0784a3; color: #fff; border-color: #0784a3; }
    .quickTile.greenTile { background: #0f7a45; color: #fff; border-color: #0f7a45; }
    .quickTile.purpleTile { background: #43215f; color: #fff; border-color: #43215f; }
    .quickTile.yellowTile { background: #ffc20e; color: #fff; border-color: #ffc20e; }
    .quickTile.periodTile { background: var(--blue-soft); color: var(--ink); border-color: #cfe2f3; }
    .quickTile.periodTile .tileIcon, .quickTile.periodTile .tileText { color: var(--brand-dark); }
    html[data-theme="dark"] .quickTile.periodTile { background: #112a34; color: #f4f7f8; border-color: #285464; }
    html[data-theme="dark"] .quickTile.periodTile .tileIcon,
    html[data-theme="dark"] .quickTile.periodTile .tileText { color: #7de7f7; }
    html[data-theme="dark"] .quickTile.primaryTile { background: #1597ad; border-color: #1597ad; }
    html[data-theme="dark"] .quickTile.darkTile { background: #1d252b; border-color: #33454e; }
    html[data-theme="dark"] .quickTile.blueTile { background: #0f8298; border-color: #0f8298; }
    html[data-theme="dark"] .quickTile.greenTile { background: #117242; border-color: #117242; }
    html[data-theme="dark"] .quickTile.purpleTile { background: #40245a; border-color: #40245a; }
    html[data-theme="dark"] .quickTile.yellowTile { background: #d19a00; border-color: #d19a00; color: #111820; }

    .workflowCard {
      display: grid;
      gap: 12px;
    }

    .workflowSummary {
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      background: var(--panel-soft);
      padding: 12px;
      display: grid;
      gap: 8px;
    }
    .workflowSummary small {
      display: block;
      color: var(--muted);
      font-size: 0.68rem;
      font-weight: 950;
      text-transform: uppercase;
      letter-spacing: 0.06em;
    }
    .workflowSummary b {
      display: block;
      margin-top: 3px;
      font-size: 1.05rem;
      letter-spacing: -0.03em;
    }
    .workflowSummary span {
      display: block;
      color: var(--muted);
      font-size: 0.78rem;
      line-height: 1.35;
      font-weight: 750;
    }

    .workflowActions {
      display: grid;
      grid-template-columns: 1.25fr 0.75fr;
      gap: 10px;
    }
    .workflowBtn {
      min-height: 64px;
      border-radius: var(--radius-lg);
      border: 1px solid var(--line);
      background: var(--panel);
      color: var(--ink);
      display: grid;
      align-content: center;
      justify-items: start;
      gap: 2px;
      padding: 12px 14px;
      text-align: left;
      box-shadow: var(--shadow-soft);
    }
    .workflowBtn.primary {
      background: var(--brand);
      border-color: var(--brand);
      color: #fff;
    }
    .workflowBtn b { font-size: 0.98rem; letter-spacing: -0.02em; }
    .workflowBtn span { font-size: 0.74rem; font-weight: 850; opacity: 0.78; }
    html[data-theme="dark"] .workflowBtn.primary { background: #1597ad; border-color: #1597ad; }

    .homeProgressChips {
      display: grid;
      grid-template-columns: repeat(7, minmax(0,1fr));
      gap: 5px;
    }
    .homeProgressChip {
      position: relative;
      min-height: 44px;
      border-radius: 11px;
      border: 1px solid var(--line);
      background: var(--panel);
      color: var(--ink);
      display: grid;
      place-items: center;
      padding: 5px 2px;
      gap: 0;
    }
    .homeProgressChip small { font-size: 0.58rem; font-weight: 950; color: var(--muted); line-height: 1; }
    .homeProgressChip b { font-size: 0.82rem; line-height: 1; }
    .homeProgressChip.hasEntry { background: var(--good-soft); border-color: #b7e4ca; }
    .homeProgressChip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
    .homeProgressChip.active small { color: rgba(255,255,255,0.76); }
    .homeProgressChip .miniDot { position: absolute; right: 5px; top: 5px; width: 6px; height: 6px; border-radius: 999px; background: var(--good); }
    .homeProgressChip.active .miniDot { background: #fff; }

    .homeProgressChip.status-rdo:not(.active) { background: rgba(100,116,139,.16); border-color: rgba(148,163,184,.45); }
    .homeProgressChip.status-annual:not(.active) { background: rgba(124,58,237,.13); border-color: rgba(167,139,250,.40); }
    .homeProgressChip.status-sick:not(.active) { background: rgba(245,158,11,.14); border-color: rgba(251,191,36,.40); }
    .homeProgressChip.status-publicHoliday:not(.active) { background: rgba(14,165,233,.13); border-color: rgba(56,189,248,.42); }
    .homeProgressChip.status-shift:not(.active) { background: var(--good-soft); border-color: #b7e4ca; }
    .homeProgressChip.active.status-rdo { background:#475569; border-color:#94a3b8; color:#fff; }
    .homeProgressChip.active.status-annual { background:#6d28d9; border-color:#a78bfa; color:#fff; }
    .homeProgressChip.active.status-sick { background:#b45309; border-color:#fbbf24; color:#fff; }
    .homeProgressChip.active.status-publicHoliday { background:#0369a1; border-color:#7dd3fc; color:#fff; }
    .homeProgressChip.active.status-shift { background: var(--good); border-color:#86efac; color:#fff; }
    .homeProgressChip .miniBadge { position:absolute; right:4px; top:4px; min-width:15px; height:15px; padding:0 3px; border-radius:999px; display:grid; place-items:center; font-size:.48rem; font-weight:950; color:#fff; background:var(--good); }
    .homeProgressChip.status-rdo .miniBadge { background:#64748b; }
    .homeProgressChip.status-annual .miniBadge { background:var(--purple); }
    .homeProgressChip.status-sick .miniBadge { background:#b45309; }
    .homeProgressChip.status-publicHoliday .miniBadge { background:#0369a1; }


    .homeToolsGrid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0,1fr));
      gap: 9px;
    }
    .homeToolsGrid .quickTile {
      min-height: 68px;
      box-shadow: none;
    }



    /* v1.76 dashboard refresh */
    .moneyHero { position: relative; isolation: isolate; }
    .moneyHero::before {
      content: "";
      position: absolute;
      inset: 0;
      background:
        radial-gradient(circle at 82% 20%, rgba(255,255,255,.16), transparent 30%),
        linear-gradient(135deg, rgba(255,255,255,.10), transparent 42%);
      pointer-events: none;
      z-index: -1;
    }
    .moneyHeroTop { align-items: start; }
    .heroSideActions { align-content: start; }
    .heroChartBtn { width: auto; min-width: 72px; padding: 0 12px; gap: 6px; grid-auto-flow: column; font-weight: 950; font-size: .72rem; }
    .heroChartBtn::after { content: "Graph"; letter-spacing: .04em; }
    .homeStack { display: grid; gap: 12px; }
    .dashboardCalendarCard { overflow: visible; }
    .dashboardCalendarHead {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 12px;
      margin-bottom: 12px;
    }
    .dashboardCalendarHead h2 { margin: 0; font-size: 1.15rem; letter-spacing: -.03em; }
    .dashboardCalendarHead p { margin: 4px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.35; }
    .dashboardCalendarMeta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
    .dashboardCalendarMeta span {
      display: inline-flex;
      align-items: center;
      padding: 5px 8px;
      border-radius: 999px;
      border: 1px solid var(--line);
      background: var(--panel-soft);
      color: var(--muted);
      font-size: .68rem;
      font-weight: 900;
    }
    .dashboardCalendarHint { margin-top: 10px; color: var(--muted); font-size: .74rem; line-height: 1.35; font-weight: 750; }

    /* v1.80 breakdown cleanup */
    /* v1.83 breakdown layout tidy */
    /* v1.84 half-shift auto-hours patch */
    .moneyHeroTop { padding-bottom: 10px; }
    .heroSideActions { min-width: 104px; }
    .heroChartBtn { min-width: 90px; justify-content: center; }
    .moneyHero .statusPill.compact { justify-content: center; min-width: 90px; }
    .heroCalendarPanel {
      margin: 0 16px 14px;
      padding: 12px;
      border-radius: 22px;
      border: 1px solid rgba(255,255,255,.14);
      background: rgba(3, 15, 23, .30);
      box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
    }
    .heroCalendarHeader {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 9px;
    }
    .heroCalendarHeader b { display:block; font-size: .82rem; letter-spacing:-.01em; }
    .heroCalendarHeader small { display:block; margin-top: 2px; color: rgba(255,255,255,.68); font-weight: 800; line-height: 1.25; }
    .heroCalendarOpen {
      border: 0;
      background: rgba(255,255,255,.12);
      color: #fff;
      border: 1px solid rgba(255,255,255,.16);
      border-radius: 999px;
      padding: 7px 10px;
      font-weight: 950;
      font-size: .68rem;
      white-space: nowrap;
      box-shadow: none;
    }
    .heroCalendarPanel .homeProgressChip {
      background: rgba(255,255,255,.06);
      border-color: rgba(255,255,255,.13);
      color: #fff;
    }
    .heroCalendarPanel .homeProgressChip small { color: rgba(255,255,255,.62); }
    .heroCalendarPanel .homeProgressChip.hasEntry { background: rgba(34,197,94,.18); border-color: rgba(187,247,208,.54); }
    .heroCalendarPanel .homeProgressChip.status-rdo:not(.active) { background: rgba(100,116,139,.28); border-color: rgba(148,163,184,.42); }
    .heroCalendarPanel .homeProgressChip.status-annual:not(.active) { background: rgba(124,58,237,.26); border-color: rgba(167,139,250,.42); }
    .heroCalendarPanel .homeProgressChip.status-sick:not(.active) { background: rgba(245,158,11,.24); border-color: rgba(251,191,36,.42); }
    .heroCalendarPanel .homeProgressChip.status-publicHoliday:not(.active) { background: rgba(14,165,233,.24); border-color: rgba(56,189,248,.44); }
    .heroCalendarHint { margin-top: 8px; color: rgba(255,255,255,.62); font-size: .66rem; font-weight: 850; line-height: 1.3; }
    .homeHighlightsCard h2 { margin: 0 0 4px; font-size: 1.18rem; letter-spacing:-.03em; }
    .homeHighlightsCard p { margin: 0 0 12px; color: var(--muted); font-size:.82rem; line-height:1.35; }
    .homeHighlightsGrid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0,1fr));
      gap: 8px;
    }
    .homeHighlightItem {
      border: 1px solid var(--line);
      border-radius: 16px;
      background: var(--panel-soft);
      padding: 11px 12px;
      min-width: 0;
    }
    .homeHighlightItem small { display:block; color: var(--muted); font-size:.68rem; font-weight: 900; }
    .homeHighlightItem b { display:block; margin-top: 4px; font-size:.95rem; font-weight: 950; white-space: nowrap; overflow:hidden; text-overflow: ellipsis; }
    .homeHighlightItem span { display:block; margin-top: 3px; color: var(--muted); font-size:.66rem; font-weight: 800; white-space: nowrap; overflow:hidden; text-overflow: ellipsis; }
    .homeHighlightItem.conf-high { border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.10); }
    .homeHighlightItem.conf-medium { border-color: rgba(245,158,11,.35); background: rgba(245,158,11,.10); }
    .homeHighlightItem.conf-low { border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.10); }

    .dashboardYtdCard {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      padding: 14px;
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      background: var(--panel);
      box-shadow: var(--shadow-soft);
    }
    .dashboardYtdCard h3 { margin: 0; font-size: 1rem; letter-spacing: -.02em; }
    .dashboardYtdCard p { margin: 3px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.35; }
    .dashboardYtdCard .statusPill { min-width: 82px; justify-content: center; }
    .homeProgressChip { min-height: 52px; padding: 6px 2px; overflow: visible; }
    .homeProgressChip .miniBadge {
      right: -3px;
      top: -3px;
      min-width: 18px;
      height: 18px;
      padding: 0 5px;
      font-size: .56rem;
      box-shadow: 0 0 0 2px var(--panel);
    }
    .homeProgressChip .miniDot {
      right: -2px;
      top: -2px;
      width: 17px;
      height: 17px;
      display: grid;
      place-items: center;
      box-shadow: 0 0 0 2px var(--panel);
    }
    .homeProgressChip .miniDot::after { content: "✓"; font-size: .62rem; font-weight: 950; color: #fff; line-height: 1; }
    .homeProgressChip.active .miniDot::after { color: var(--brand); }
    .homeProgressChip small { font-size: .61rem; }
    .homeProgressChip b { font-size: .95rem; }

    .contractBadge {
      display: inline-flex;
      align-items: center;
      width: fit-content;
      margin-top: 7px;
      padding: 5px 9px;
      border-radius: 999px;
      background: rgba(255,255,255,0.12);
      border: 1px solid rgba(255,255,255,0.18);
      color: rgba(255,255,255,0.86);
      font-size: 0.7rem;
      font-weight: 900;
    }

    .themeModeStrip {
      display: grid;
      grid-template-columns: repeat(3, minmax(0,1fr));
      gap: 8px;
      margin-top: 12px;
    }

    .themeChoice {
      min-height: 42px;
      padding: 8px 10px;
      border-radius: 14px;
      background: rgba(255,255,255,0.10);
      color: #fff;
      border: 1px solid rgba(255,255,255,0.18);
      font-weight: 900;
      font-size: 0.78rem;
    }

    .themeChoice.active {
      background: #fff;
      color: #0f5566;
      border-color: #fff;
    }

    .accentChoiceStrip {
      display: flex;
      gap: 8px;
      margin-top: 10px;
      overflow-x: auto;
      scrollbar-width: none;
      padding-bottom: 1px;
    }

    .accentChoiceStrip::-webkit-scrollbar { display: none; }

    .accentChoice {
      width: auto;
      min-width: 70px;
      min-height: 36px;
      padding: 8px 10px;
      border-radius: 999px;
      background: rgba(255,255,255,0.10);
      color: #fff;
      border: 1px solid rgba(255,255,255,0.18);
      font-weight: 900;
      font-size: 0.72rem;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      white-space: nowrap;
    }

    .accentChoice::before {
      content: '';
      width: 12px;
      height: 12px;
      border-radius: 999px;
      background: var(--swatch, var(--brand));
      border: 1px solid rgba(255,255,255,0.55);
      flex: 0 0 auto;
    }

    .accentChoice.active {
      background: #fff;
      color: #0f172a;
      border-color: #fff;
    }

    .accentChoice[data-accent-choice="teal"] { --swatch: #0e7490; }
    .accentChoice[data-accent-choice="blue"] { --swatch: #2563eb; }
    .accentChoice[data-accent-choice="purple"] { --swatch: #7c3aed; }
    .accentChoice[data-accent-choice="green"] { --swatch: #15803d; }
    .accentChoice[data-accent-choice="orange"] { --swatch: #ea580c; }
    .accentChoice[data-accent-choice="red"] { --swatch: #dc2626; }
    .accentChoice[data-accent-choice="slate"] { --swatch: #475569; }

    .periodTools {
      margin-top: 12px;
      padding: 14px;
      border-radius: var(--radius-lg);
      border: 1px solid var(--line);
      background:
        linear-gradient(135deg, rgba(14,116,144,0.08), rgba(255,255,255,0.72)),
        var(--panel);
      display: grid;
      gap: 12px;
      box-shadow: 0 10px 24px rgba(16,24,40,0.06);
    }

    .periodToolsHeader {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: start;
    }

    .periodToolsHeader b {
      display: block;
      font-size: 0.98rem;
      line-height: 1.18;
      letter-spacing: -0.02em;
    }

    .periodToolsHeader small {
      display: block;
      margin-top: 3px;
      color: var(--muted);
      font-size: 0.72rem;
      line-height: 1.3;
      font-weight: 750;
    }

    .periodToolsRow {
      display: grid;
      grid-template-columns: 1fr;
      gap: 9px;
      align-items: end;
    }

    .periodActionsRow {
      display: grid;
      grid-template-columns: 1fr;
      gap: 9px;
    }

    .periodBrowseBtn {
      min-height: 54px;
      justify-content: space-between;
      text-align: left;
    }

    .periodBrowseBtn .miniMuted {
      display: block;
      margin-top: 2px;
      color: var(--muted);
      font-size: 0.7rem;
      font-weight: 800;
    }

    .periodSheetBackdrop {
      position: fixed;
      inset: 0;
      z-index: 70;
      display: none;
      align-items: flex-end;
      justify-content: center;
      background: rgba(2, 6, 23, 0.52);
      padding: 12px;
    }

    .periodSheetBackdrop.show { display: flex; }

    .periodSheet {
      width: min(720px, 100%);
      max-height: min(78vh, 720px);
      border-radius: 28px 28px 20px 20px;
      background: var(--panel);
      color: var(--ink);
      border: 1px solid var(--line);
      box-shadow: 0 -18px 55px rgba(15, 23, 42, 0.28);
      overflow: hidden;
      display: grid;
      grid-template-rows: auto 1fr;
    }

    .periodSheetHeader {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 18px 18px 12px;
      border-bottom: 1px solid var(--line);
      background: linear-gradient(135deg, rgba(14,116,144,0.10), rgba(255,255,255,0.02));
    }

    .periodSheetHeader h3 {
      margin: 0;
      font-size: 1.08rem;
      letter-spacing: -0.03em;
    }

    .periodSheetHeader p {
      margin: 3px 0 0;
      color: var(--muted);
      font-size: 0.74rem;
      line-height: 1.25;
      font-weight: 750;
    }

    .periodList {
      padding: 12px;
      overflow: auto;
      display: grid;
      gap: 8px;
      -webkit-overflow-scrolling: touch;
    }

    .periodRow {
      width: 100%;
      min-height: 76px;
      border: 1px solid var(--line);
      background: var(--panel-soft);
      color: var(--ink);
      border-radius: 18px;
      padding: 12px 13px;
      text-align: left;
      display: grid;
      grid-template-columns: 1fr auto;
      align-items: center;
      gap: 12px;
    }

    .periodRow small {
      display: block;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.055em;
      font-size: 0.66rem;
      font-weight: 950;
    }

    .periodRow b {
      display: block;
      margin-top: 2px;
      font-size: 0.98rem;
      letter-spacing: -0.02em;
      line-height: 1.18;
    }

    .periodRow span {
      display: block;
      margin-top: 4px;
      color: var(--muted);
      font-size: 0.72rem;
      line-height: 1.22;
      font-weight: 760;
    }

    .periodRow .selectMark {
      width: 28px;
      height: 28px;
      border-radius: 999px;
      display: grid;
      place-items: center;
      color: transparent;
      border: 2px solid var(--line-strong);
      font-weight: 950;
      flex: 0 0 auto;
    }

    .periodRow.active {
      border-color: var(--brand);
      background: linear-gradient(135deg, rgba(14,116,144,0.14), rgba(255,255,255,0.72));
      box-shadow: 0 0 0 3px var(--focus-ring);
    }

    .periodRow.active .selectMark {
      color: #fff;
      border-color: var(--brand);
      background: var(--brand);
    }



    .shiftPickerList {
      padding: 12px;
      overflow: auto;
      display: grid;
      gap: 10px;
      -webkit-overflow-scrolling: touch;
      scroll-padding-top: 12px;
      overscroll-behavior: contain;
    }

    .shiftPickerCategoryIntro {
      display: grid;
      gap: 4px;
      padding: 2px 2px 6px;
    }

    .shiftPickerCategoryIntro b {
      font-size: 0.92rem;
      letter-spacing: -0.01em;
    }

    .shiftPickerCategoryIntro span {
      color: var(--muted);
      font-size: 0.76rem;
      line-height: 1.32;
      font-weight: 760;
    }

    .shiftPickerCategoryRow {
      width: 100%;
      min-height: 74px;
      border: 1px solid var(--line);
      background: var(--panel-soft);
      color: var(--ink);
      border-radius: 18px;
      padding: 11px 12px;
      text-align: left;
      display: grid;
      grid-template-columns: 42px minmax(0, 1fr) auto;
      align-items: center;
      gap: 10px;
      overflow: hidden;
    }

    .shiftPickerCategoryIcon {
      width: 38px;
      height: 38px;
      border-radius: 14px;
      display: grid;
      place-items: center;
      background: rgba(14,116,144,0.12);
      color: var(--brand-dark);
      font-weight: 950;
      border: 1px solid rgba(14,116,144,0.22);
    }

    html[data-theme="dark"] .shiftPickerCategoryIcon {
      color: #7de7f7;
      background: rgba(32,184,206,0.12);
      border-color: rgba(32,184,206,0.30);
    }

    .shiftPickerCategoryRow small {
      display: block;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.055em;
      font-size: 0.65rem;
      font-weight: 950;
    }

    .shiftPickerCategoryRow b {
      display: block;
      margin-top: 2px;
      font-size: 0.98rem;
      letter-spacing: -0.02em;
      line-height: 1.12;
    }

    .shiftPickerCategoryText {
      min-width: 0;
    }

    .shiftPickerCategoryRow span.shiftPickerCategoryDesc {
      display: block;
      margin-top: 3px;
      color: var(--muted);
      font-size: 0.70rem;
      line-height: 1.2;
      font-weight: 760;
      overflow: hidden;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
    }

    .shiftPickerCountPill {
      border-radius: 999px;
      padding: 6px 9px;
      background: rgba(14,116,144,0.12);
      border: 1px solid rgba(14,116,144,0.26);
      color: var(--brand-dark);
      font-size: 0.72rem;
      font-weight: 950;
      white-space: nowrap;
    }

    html[data-theme="dark"] .shiftPickerCountPill {
      color: #7de7f7;
      background: rgba(32,184,206,0.12);
      border-color: rgba(32,184,206,0.34);
    }

    .shiftPickerBackRow {
      position: relative;
      z-index: 2;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 8px;
      border-radius: 16px;
      background: color-mix(in srgb, var(--panel-soft) 96%, transparent);
      border: 1px solid var(--line);
    }

    .shiftPickerBackRow b {
      font-size: 0.88rem;
    }

    .shiftPickerBackRow small {
      display: block;
      color: var(--muted);
      font-size: 0.68rem;
      margin-top: 1px;
      font-weight: 800;
    }

    .shiftPickerRow {
      width: 100%;
      min-height: 78px;
      border: 1px solid var(--line);
      background: var(--panel-soft);
      color: var(--ink);
      border-radius: 18px;
      padding: 12px 13px;
      text-align: left;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 10px;
    }

    .shiftPickerRow > div:first-child {
      min-width: 0;
    }

    .shiftPickerRow small {
      display: block;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.055em;
      font-size: 0.66rem;
      font-weight: 950;
    }

    .shiftPickerRow b {
      display: block;
      margin-top: 2px;
      font-size: 1rem;
      letter-spacing: -0.02em;
      line-height: 1.16;
    }

    .shiftPickerRow span {
      display: block;
      margin-top: 4px;
      color: var(--muted);
      font-size: 0.72rem;
      line-height: 1.22;
      font-weight: 760;
    }

    .shiftPickerEstimate {
      border-radius: 999px;
      padding: 6px 9px;
      background: rgba(14,116,144,0.12);
      border: 1px solid rgba(14,116,144,0.26);
      color: var(--brand-dark);
      font-size: 0.72rem;
      font-weight: 950;
      white-space: nowrap;
    }

    html[data-theme="dark"] .shiftPickerEstimate {
      color: #7de7f7;
      background: rgba(32,184,206,0.12);
      border-color: rgba(32,184,206,0.34);
    }
    .shiftPickerRow.active {
      border-color: var(--brand);
      background: linear-gradient(135deg, rgba(14,116,144,0.16), rgba(32,184,206,0.08));
      box-shadow: 0 0 0 3px rgba(14,116,144,0.12);
    }


    .shiftBrowseButton {
      width: 100%;
      justify-content: center;
      background: linear-gradient(135deg, rgba(14,116,144,0.14), rgba(32,184,206,0.10));
      border-color: rgba(14,116,144,0.28);
    }

    .periodHint {
      margin: 0;
      color: var(--muted);
      font-size: 0.72rem;
      line-height: 1.35;
      font-weight: 760;
    }

    html[data-theme="dark"] .periodChoice.currentPeriod {
      background: linear-gradient(135deg, #103844 0%, #111c22 100%);
      color: var(--ink);
      border-color: #285464;
    }

    html[data-theme="dark"] .periodChoice.active {
      background: #102a34;
      border-color: #20b8ce;
      box-shadow: 0 0 0 3px rgba(32,184,206,0.22), 0 8px 18px rgba(0,0,0,0.25);
    }

    html[data-theme="dark"] .selectedPeriodSummary {
      background: #082331;
      border: 1px solid #1d5365;
    }

    html[data-theme="dark"] .periodTools {
      background:
        linear-gradient(135deg, rgba(32,184,206,0.10), rgba(17,28,34,0.88)),
        var(--panel);
      box-shadow: 0 12px 24px rgba(0,0,0,0.22);
    }

    html[data-theme="dark"] .periodSheetBackdrop {
      background: rgba(0,0,0,0.56);
    }

    html[data-theme="dark"] .periodSheet {
      background: #0b171d;
      border-color: #22343d;
      box-shadow: 0 -18px 55px rgba(0,0,0,0.55);
    }

    html[data-theme="dark"] .periodRow {
      background: #101f26;
      border-color: #22343d;
    }

    html[data-theme="dark"] .periodRow.active {
      background: linear-gradient(135deg, #103844 0%, #111c22 100%);
      border-color: #20b8ce;
      box-shadow: 0 0 0 3px rgba(32,184,206,0.20);
    }

    .periodJumpRow {
      display: grid;
      grid-template-columns: repeat(3, minmax(0,1fr));
      gap: 8px;
      margin-top: 10px;
    }

    .trackerPreview {
      display: grid;
      grid-template-columns: repeat(2, minmax(0,1fr));
      gap: 8px;
      margin-top: 10px;
    }

    .trackerPreviewItem {
      border: 1px solid var(--line);
      border-radius: 14px;
      background: var(--panel-soft);
      padding: 9px 10px;
      min-width: 0;
    }

    .trackerPreviewItem small { display: block; color: var(--muted); font-size: 0.68rem; font-weight: 850; }
    .trackerPreviewItem b { display: block; margin-top: 4px; font-size: 0.86rem; font-weight: 950; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    button.trackerPreviewItem { width: 100%; text-align: left; color: var(--ink); box-shadow: none; }
    button.trackerPreviewItem::after { content: 'Value'; display: inline-block; margin-top: 7px; color: var(--brand); font-size: .62rem; font-weight: 950; }
    button.trackerPreviewItem:active { transform: translateY(1px); }

    .tileIcon { font-size: 1.25rem; line-height: 1; }
    .tileText { font-weight: 850; font-size: 0.95rem; line-height: 1.15; }
    .tileSub { font-size: 0.72rem; opacity: 0.74; font-weight: 700; }

    .miniDashboard {
      display: grid;
      grid-template-columns: 1fr;
      gap: 8px;
    }

    .miniCard {
      border: 1px solid var(--line);
      border-radius: 14px;
      background: var(--panel);
      padding: 10px 12px;
      min-width: 0;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
    }
    .miniCard small { display: block; color: var(--muted); font-size: 0.72rem; font-weight: 850; }
    .miniCard b { display: block; font-size: 0.98rem; letter-spacing: -0.03em; white-space: nowrap; }

    .converterHero {
      padding: 14px;
      border-radius: var(--radius-lg);
      background: linear-gradient(135deg, #0b2233 0%, #0e7490 100%);
      color: #fff;
      box-shadow: var(--shadow-soft);
      margin-bottom: 12px;
    }
    .converterHero small { display:block; color: rgba(255,255,255,0.72); font-weight: 850; font-size: 0.72rem; }
    .converterHero b { display:block; margin-top: 6px; font-size: 2rem; line-height: 1; letter-spacing: -0.06em; }
    .converterHero span { display:block; margin-top: 7px; color: rgba(255,255,255,0.78); font-size: 0.78rem; line-height: 1.35; font-weight: 750; }
    .converterExamples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
    .converterExamples button { min-height: 34px; border-radius: 999px; padding: 7px 10px; font-size: 0.78rem; }
    .inputHelp { display:block; margin-top: 7px; color: var(--muted); font-weight: 750; font-size: 0.72rem; line-height: 1.3; }

    .mealCreditBox {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(90px, 0.45fr);
      gap: 10px;
      align-items: end;
      padding: 11px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: var(--panel-soft);
    }
    .mealCreditBox .inlineCheck { padding: 0; border: 0; background: transparent; }
    .mealCreditBox small { display:block; margin-top:4px; color:var(--muted); font-size:.68rem; font-weight:800; line-height:1.25; }
    @media (max-width: 420px) { .mealCreditBox { grid-template-columns: 1fr; } }

    .paidHoursPreview { margin-top: 7px; color: var(--muted); font-weight: 800; font-size: 0.76rem; line-height: 1.3; }
    .paidHoursPreview.good { color: var(--good); }
    .paidHoursPreview.warn { color: var(--warn); }
    .formulaBox {
      margin-top: 10px;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: var(--radius-md);
      background: var(--panel-soft);
      color: var(--muted);
      font-size: 0.82rem;
      line-height: 1.4;
      font-weight: 700;
    }

    .barChart {
      display: flex;
      align-items: end;
      gap: 9px;
      height: 66px;
      margin-top: 10px;
      padding: 8px;
      border-radius: var(--radius-md);
      background: var(--panel-soft);
      border: 1px solid #edf0f4;
    }
    .barCol { flex: 1; display: grid; align-content: end; gap: 5px; height: 100%; text-align: center; }
    .bar { min-height: 6px; height: var(--h, 6%); border-radius: 999px 999px 4px 4px; background: var(--brand); }
    .barCol span { font-size: 0.68rem; color: var(--muted); font-weight: 850; }

    .graphHeaderLine { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom: 10px; }
    .graphToggle {
      display:flex;
      gap:4px;
      padding:4px;
      border-radius:999px;
      background:var(--panel-soft);
      border:1px solid var(--line);
      flex-shrink:0;
    }
    .graphToggle button {
      min-height:30px;
      border-radius:999px;
      padding:6px 12px;
      border:0;
      background:transparent;
      color:var(--muted);
      font-size:.72rem;
      font-weight:950;
      box-shadow:none;
    }
    .graphToggle button.active { background:var(--brand); color:#fff; }
    .weekTabRow {
      display:flex;
      gap:8px;
      margin:12px 0 14px;
      padding:6px;
      border-radius:999px;
      background:var(--panel-soft);
      border:1px solid var(--line);
    }
    .weekTabRow button {
      flex:1;
      min-height:36px;
      border-radius:999px;
      border:0;
      background:transparent;
      color:var(--muted);
      font-size:.76rem;
      font-weight:950;
      box-shadow:none;
      padding:8px 6px;
    }
    .weekTabRow button.active { background:var(--brand); color:#fff; }
    .shiftAllowanceNote {
      grid-column: 1 / -1;
      margin: 2px 0 0;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: var(--radius-md);
      background: var(--panel-soft);
      color: var(--muted);
      font-size: .82rem;
      line-height: 1.45;
      font-weight: 750;
    }

    .fortnightGraph {
      display:grid;
      grid-template-columns: repeat(7, minmax(0, 1fr));
      gap:6px;
      padding:9px;
      border-radius:var(--radius-lg);
      background:var(--panel-soft);
      border:1px solid var(--line);
      overflow:visible;
    }
    .graphDay {
      min-width:0;
      min-height:122px;
      padding:7px 4px 6px;
      border:1px solid rgba(148,163,184,.18);
      border-radius:16px;
      background:rgba(148,163,184,.055);
      box-shadow:none;
      display:grid;
      grid-template-rows:auto auto 1fr auto auto;
      gap:4px;
      align-items:end;
      text-align:center;
      color:var(--ink);
    }
    .graphDay.selected { border-color:rgba(34,211,238,.78); box-shadow:0 0 0 2px rgba(34,211,238,.20); background:rgba(34,211,238,.08); }
    .graphBarWrap {
      width:100%;
      height:54px;
      display:flex;
      align-items:flex-end;
      justify-content:center;
      border-radius:12px;
      background:linear-gradient(to top, rgba(148,163,184,.18) 0 1px, transparent 1px 100%);
      overflow:visible;
      padding:0 0 1px;
      align-self:stretch;
    }
    .graphBar {
      width:62%;
      max-width:22px;
      min-height:0;
      height:var(--h, 0%);
      border-radius:999px 999px 7px 7px;
      background:linear-gradient(180deg, #22d3ee 0%, #0891b2 100%);
      box-shadow:0 0 0 1px rgba(34,211,238,.16), 0 6px 14px rgba(8,145,178,.22);
      opacity:1;
      transition:height .18s ease;
    }
    .graphDay.empty { opacity:.72; background:rgba(148,163,184,.028); border-color:rgba(148,163,184,.12); }
    .graphDay.empty .graphBar { opacity:0; }
    .graphDay.empty .graphBarWrap { height:38px; background:transparent; }
    .graphDay.rdo .graphBar { background:#64748b; box-shadow:none; }
    .graphDay.annual .graphBar { background:#7c3aed; box-shadow:none; }
    .graphDay.sick .graphBar { background:#f59e0b; box-shadow:none; }
    .graphDay small { color:var(--muted); font-size:.55rem; font-weight:950; text-transform:uppercase; line-height:1; align-self:start; }
    .graphDay b { font-size:.82rem; line-height:1; letter-spacing:-.02em; align-self:start; }
    .graphValue { color:var(--ink); font-size:.58rem; font-weight:950; line-height:1.05; min-height:14px; }
    .graphDay.empty .graphValue { color:var(--muted); }
    .graphDay .graphStatus {
      display:inline-grid;
      place-items:center;
      justify-self:center;
      min-width:20px;
      height:16px;
      padding:0 5px;
      border-radius:999px;
      background:rgba(14,116,144,.18);
      color:#67e8f9;
      font-size:.5rem;
      font-weight:950;
      line-height:1;
    }
    .graphDay.annual .graphStatus { background:rgba(124,58,237,.22); color:#c4b5fd; }
    .graphDay.sick .graphStatus { background:rgba(245,158,11,.18); color:#fbbf24; }
    .graphDay.shift .graphStatus { background:rgba(34,197,94,.16); color:#86efac; }
    .graphDay.empty .graphStatus { opacity:0; }
    .graphLegend { grid-column:1 / -1; display:flex; flex-wrap:wrap; gap:6px; margin-top:9px; color:var(--muted); font-size:.63rem; font-weight:850; }
    .graphLegend span { display:inline-flex; align-items:center; gap:5px; }
    .graphLegend i { width:8px; height:8px; border-radius:999px; background:var(--brand); display:inline-block; }
    .graphLegend .empty i { background:rgba(148,163,184,.35); }
    .graphLegend .rdo i { background:#64748b; }
    .graphLegend .al i { background:#7c3aed; }
    .graphLegend .sl i { background:#f59e0b; }
    .graphFooter { margin-top:9px; color:var(--muted); font-size:.74rem; line-height:1.35; font-weight:800; }

    .periodScroller {
      display: grid;
      grid-template-columns: repeat(3, minmax(0,1fr));
      gap: 10px;
      padding: 0;
      margin-bottom: 12px;
    }

    .periodChoice {
      text-align: left;
      min-height: 104px;
      padding: 13px;
      border-radius: var(--radius-lg);
      background: var(--panel);
      border: 1px solid var(--line);
      box-shadow: 0 4px 12px rgba(16,24,40,0.05);
      display: grid;
      align-content: space-between;
      gap: 8px;
    }
    .periodChoice.active { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(14,116,144,0.14), 0 8px 18px rgba(16,24,40,0.08); }
    .periodChoice.currentPeriod { background: linear-gradient(135deg, #ecfeff 0%, #ffffff 100%); }
    .periodChoice .periodLabel { display: block; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.68rem; font-weight: 950; }
    .periodChoice b { display: block; font-size: 0.98rem; line-height: 1.18; letter-spacing: -0.02em; }
    .periodChoice span:not(.periodLabel) { display: block; color: var(--muted); font-size: 0.72rem; line-height: 1.25; font-weight: 750; }

    .selectedPeriodSummary {
      margin-top: 0;
      padding: 13px;
      border-radius: var(--radius-lg);
      background: #0b2233;
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      box-shadow: var(--shadow-soft);
    }
    .selectedPeriodSummary small { display: block; color: rgba(255,255,255,0.68); font-size: 0.68rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.05em; }
    .selectedPeriodSummary b { display: block; margin-top: 3px; font-size: 1.05rem; letter-spacing: -0.03em; }
    .selectedPeriodSummary span { display: block; margin-top: 3px; color: rgba(255,255,255,0.72); font-size: 0.72rem; line-height: 1.25; font-weight: 750; }
    .selectedPeriodSummary strong { font-size: 1.35rem; letter-spacing: -0.05em; white-space: nowrap; }

    .dayChips {
      display: grid;
      grid-template-columns: repeat(7, minmax(0, 1fr));
      gap: 6px;
      margin-top: 12px;
    }
    .dayChip {
      position: relative;
      min-height: 66px;
      padding: 7px 4px 9px;
      display: grid;
      place-items: center;
      gap: 2px;
      border-radius: 13px;
      border: 1px solid var(--line);
      background: var(--panel);
      color: var(--ink);
    }
    .dayChip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
    .dayChip.hasEntry:not(.active) { background: var(--good-soft); border-color: #b7e4ca; }
    .dayChip .wd { font-size: 0.64rem; font-weight: 900; opacity: 0.72; }
    .dayChip b { font-size: 0.95rem; line-height: 1; }
    .dayChip .mon { font-size: 0.62rem; font-weight: 850; opacity: 0.72; }
    .dayChip .dot { position: absolute; right: 6px; top: 6px; width: 7px; height: 7px; border-radius: 999px; background: var(--good); }
    .dayChip.active .dot { background: #fff; }

    .visuallyHidden { display: none !important; }
    .periodPlannerCard { display: grid; gap: 12px; }
    .periodPlannerTop {
      padding: 16px;
      border-radius: var(--radius-lg);
      background: linear-gradient(135deg, #0b2233 0%, #0e7490 100%);
      color: #fff;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 12px;
      align-items: start;
      box-shadow: var(--shadow-soft);
    }
    .periodPlannerTop small { display:block; color: rgba(255,255,255,0.7); font-size:0.68rem; font-weight:950; text-transform:uppercase; letter-spacing:.05em; }
    .periodPlannerTop b { display:block; margin-top: 4px; font-size: 1.35rem; letter-spacing:-.04em; line-height:1.05; }
    .periodPlannerTop span { display:block; margin-top: 6px; color: rgba(255,255,255,.78); font-size:.8rem; font-weight:800; line-height:1.3; }
    .periodPlannerTop strong { font-size: 1.35rem; letter-spacing:-.05em; white-space:nowrap; }
    .periodPlannerActions { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:8px; }
    .periodPlannerActions .soft { padding-left: 7px; padding-right: 7px; }
    .periodDayGrid { margin-top: 0; }
    .dayChip .dayBadge { display: none; }
    .dayChip .entryCountBadge {
      position: absolute;
      right: 5px;
      top: 5px;
      min-width: 17px;
      height: 17px;
      padding: 0 5px;
      border-radius: 999px;
      display: grid;
      place-items: center;
      background: rgba(255,255,255,.92);
      color: var(--brand-dark);
      font-size: 0.56rem;
      line-height: 1;
      font-weight: 950;
      box-shadow: 0 1px 5px rgba(0,0,0,.18);
      border: 1px solid rgba(255,255,255,.36);
      z-index: 1;
    }
    .dayChip .statusDot {
      position: absolute;
      left: 6px;
      top: 6px;
      width: 7px;
      height: 7px;
      border-radius: 999px;
      background: currentColor;
      opacity: .55;
    }
    .dayChip.status-rdo:not(.active) { background: rgba(100,116,139,.16); border-color: rgba(148,163,184,.45); }
    .dayChip.status-annual:not(.active) { background: rgba(124,58,237,.12); border-color: rgba(124,58,237,.35); }
    .dayChip.status-sick:not(.active) { background: rgba(245,158,11,.13); border-color: rgba(245,158,11,.42); }
    .dayChip.status-publicHoliday:not(.active) { background: rgba(14,165,233,.13); border-color: rgba(56,189,248,.42); }
    .dayChip.status-shift:not(.active) { background: var(--good-soft); border-color: #b7e4ca; }
    .dayChip.status-rdo .dayBadge { background: #64748b; }
    .dayChip.status-annual .dayBadge { background: var(--purple); }
    .dayChip.status-sick .dayBadge { background: #b45309; }
    .dayChip.status-publicHoliday .dayBadge { background: #0369a1; }
    .dayChip.status-shift .dayBadge { background: var(--good); }

    .dayChip.active.status-rdo { background:#475569; border-color:#94a3b8; color:#fff; box-shadow: 0 0 0 2px rgba(148,163,184,.28); }
    .dayChip.active.status-annual { background:#6d28d9; border-color:#a78bfa; color:#fff; box-shadow: 0 0 0 2px rgba(167,139,250,.24); }
    .dayChip.active.status-sick { background:#b45309; border-color:#fbbf24; color:#fff; box-shadow: 0 0 0 2px rgba(251,191,36,.22); }
    .dayChip.active.status-publicHoliday { background:#0369a1; border-color:#7dd3fc; color:#fff; box-shadow: 0 0 0 2px rgba(125,211,252,.22); }
    .dayChip.active.status-shift { background: var(--good); border-color:#86efac; color:#fff; }
    .dayChip.status-rdo b,
    .dayChip.status-annual b,
    .dayChip.status-sick b,
    .dayChip.status-publicHoliday b { transform: none; }

    .periodDayPanel {
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      background: var(--panel-soft);
      padding: 13px;
      display: grid;
      gap: 9px;
    }
    .periodDayPanelHeader { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
    .periodDayPanelHeader small { color: var(--muted); font-size:.68rem; text-transform:uppercase; letter-spacing:.05em; font-weight:950; }
    .periodDayPanelHeader b { display:block; font-size:1.1rem; line-height:1.1; letter-spacing:-.03em; margin-top:3px; }
    .periodDayPanelHeader span { color: var(--muted); font-size:.76rem; font-weight:800; line-height:1.3; }
    .dayStatusPill { padding: 7px 10px; border-radius:999px; border:1px solid var(--line); color:var(--ink); background:var(--panel); font-size:.7rem; font-weight:950; white-space:nowrap; }
    .dayStatusPill.rdo { color:#67e8f9; border-color:rgba(34,211,238,.35); background:rgba(14,116,144,.18); }
    .dayStatusPill.annual { color:#c4b5fd; border-color:rgba(124,58,237,.35); background:rgba(124,58,237,.14); }
    .dayStatusPill.sick { color:#fbbf24; border-color:rgba(245,158,11,.38); background:rgba(245,158,11,.12); }
    .dayStatusPill.shift { color:#86efac; border-color:rgba(34,197,94,.35); background:rgba(34,197,94,.10); }
    .periodSavedList { display:grid; gap:7px; }
    .periodSavedEntry {
      border:1px solid var(--line);
      background:var(--panel);
      border-radius:14px;
      padding:10px;
      text-align:left;
      color:var(--ink);
      display:grid;
      grid-template-columns:minmax(0,1fr) auto;
      gap:8px;
      align-items:center;
    }
    .periodSavedEntry b { display:block; font-size:.86rem; }
    .periodSavedEntry span { display:block; color:var(--muted); font-size:.72rem; font-weight:800; line-height:1.3; margin-top:2px; }
    .periodActionGrid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:8px; }
    .periodActionGrid .primary { grid-column: 1 / -1; }
    .dangerSoft {
      border: 1px solid rgba(239,68,68,.25);
      background: rgba(239,68,68,.10);
      color: #ef4444;
      border-radius: 16px;
      padding: 12px 13px;
      font-weight: 950;
      font-size: .88rem;
    }
    .compactHint { margin: 0; }

    .formGrid, .settingsGrid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0,1fr));
      gap: 11px;
    }
    .settingsGrid { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .full { grid-column: 1 / -1; }

    .shiftNumberControl {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 8px;
      align-items: stretch;
    }

    .shiftNumberControl input {
      min-width: 0;
    }

    .shiftNumberControl button {
      min-width: 86px;
      padding-left: 12px;
      padding-right: 12px;
      white-space: nowrap;
    }

    .dayPrompt {
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      background: var(--panel-soft);
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
      margin-bottom: 12px;
    }
    .promptDate { font-size: 1.15rem; font-weight: 950; letter-spacing: -0.03em; }
    .promptSub { margin-top: 4px; color: var(--muted); font-size: 0.8rem; line-height: 1.3; font-weight: 700; }
    .promptActions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

    /* v2.12 entry-flow cleanup: keep the selected day and save controls available while entering long forms. */
    #view-add .dayPrompt {
      position: sticky;
      top: 74px;
      z-index: 35;
      background: color-mix(in srgb, var(--panel-soft) 94%, transparent);
      backdrop-filter: blur(14px);
      box-shadow: 0 8px 20px rgba(16,24,40,0.10);
    }
    html[data-theme="dark"] #view-add .dayPrompt {
      background: color-mix(in srgb, var(--panel-soft) 92%, transparent);
      box-shadow: 0 8px 24px rgba(0,0,0,0.34);
    }
    #view-add .entryTypePanel,
    #view-add .entryFormGrid,
    #view-add #shiftNo {
      scroll-margin-top: 158px;
    }
    #view-add #entryForm {
      padding-bottom: 104px;
    }
    #view-add #entryForm > .btnRow {
      position: sticky;
      bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 10px);
      z-index: 45;
      margin: 14px -2px 8px;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 20px;
      background: color-mix(in srgb, var(--panel) 94%, transparent);
      backdrop-filter: blur(16px);
      box-shadow: 0 -10px 28px rgba(16,24,40,0.13);
      display: grid;
      grid-template-columns: repeat(2, minmax(0,1fr));
      gap: 8px;
    }
    #view-add #entryForm > .btnRow button {
      min-width: 0;
      min-height: 46px;
      padding-left: 9px;
      padding-right: 9px;
      white-space: normal;
      line-height: 1.1;
    }
    #view-add #entryForm > .btnRow button.primary { box-shadow: none; }
    html[data-theme="dark"] #view-add #entryForm > .btnRow {
      background: color-mix(in srgb, var(--panel) 92%, transparent);
      box-shadow: 0 -10px 30px rgba(0,0,0,0.42);
    }

    /* v2.14/v2.15/v2.16/v2.17 add-entry tidy-up: reduce repeated scrolling and keep the current day context visible. */

    /* v2.15: make the selected day truly sticky inside the add-entry card. */
    #view-add > .card,
    #view-add .cardBody,
    #view-add #entryForm {
      overflow: visible;
    }
    #view-add .dayPrompt {
      position: sticky !important;
      top: calc(var(--topbar-offset, 64px) + env(safe-area-inset-top));
      z-index: 90;
    }
    #view-add .entryTypePanel {
      position: relative;
    }
    #view-add #shiftPartField.shiftPartInline {
      margin-top: 8px;
      padding: 9px;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: var(--panel);
    }
    #view-add #shiftPartField.shiftPartInline label {
      margin-bottom: 6px;
    }
    #view-add #shiftPartField.shiftPartInline .shiftPartGrid {
      grid-template-columns: repeat(3, minmax(0,1fr));
      gap: 6px;
    }
    #view-add #shiftPartField.shiftPartInline .shiftPartBtn {
      min-height: 40px;
      padding: 7px 6px;
      border-radius: 13px;
      font-size: 0.78rem;
    }
    #view-add #shiftPartField.shiftPartInline .shiftPartHelp {
      margin-top: 6px;
      line-height: 1.25;
    }

    #view-add > .screenTitle {
      margin-bottom: 8px;
    }
    #view-add > .screenTitle p {
      display: none;
    }
    #view-add .cardBody {
      padding-top: 10px;
    }
    #view-add .dayPrompt {
      top: 64px;
      grid-template-columns: minmax(0, 1fr);
      gap: 8px;
      margin: -2px -2px 10px;
      padding: 11px;
    }
    #view-add .dayPrompt label {
      font-size: 0.68rem;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      color: var(--muted);
      font-weight: 950;
    }
    #view-add .promptDate {
      font-size: 1.08rem;
    }
    #view-add .promptSub {
      font-size: 0.74rem;
      margin-top: 2px;
    }
    #view-add .promptActions {
      justify-content: stretch;
      display: grid;
      grid-template-columns: repeat(3, minmax(0,1fr));
    }
    #view-add .promptActions button {
      min-width: 0;
      padding-left: 6px;
      padding-right: 6px;
    }
    .entryQuickStats {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 7px;
    }
    .entryQuickStats span {
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 5px 8px;
      background: var(--panel);
      color: var(--ink);
      font-size: 0.68rem;
      font-weight: 900;
      line-height: 1.05;
      white-space: nowrap;
    }
    .entryQuickStats span.warn {
      background: rgba(245,158,11,0.12);
      border-color: rgba(245,158,11,0.25);
      color: #b45309;
    }
    html[data-theme="dark"] .entryQuickStats span.warn { color: #fbbf24; }
    #view-add .entryTypePanel {
      padding: 10px;
      gap: 8px;
      margin-bottom: 10px;
    }
    #view-add .entryTypeGrid {
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 6px;
    }
    #view-add .entryTypeBtn {
      min-height: 44px;
      padding: 7px 8px;
      border-radius: 14px;
    }
    #view-add .entryTypeBtn span {
      display: none;
    }
    #view-add .entryTypeHint {
      display: none;
    }
    #view-add .entryFormGrid {
      gap: 9px;
    }
    #view-add .entryField label,
    #view-add .detailsInner label {
      font-size: 0.72rem;
    }
    #view-add .inputHelp,
    #view-add .entryGuideChips,
    #view-add .shiftPartHelp {
      font-size: 0.68rem;
    }
    #view-add #optionalEntryDetails {
      margin-top: 10px;
    }
    #view-add #optionalEntryDetails summary {
      padding: 12px 13px;
      font-weight: 950;
    }
    #view-add #saveAddAnotherBtn {
      border-color: rgba(14,116,144,0.32);
      background: rgba(14,116,144,0.12);
      color: var(--brand-dark);
      font-weight: 950;
    }
    html[data-theme="dark"] #view-add #saveAddAnotherBtn {
      color: #7de7f7;
      background: rgba(32,184,206,0.14);
      border-color: rgba(32,184,206,0.34);
    }
    .dayHistoryHeader {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 8px;
    }
    .dayHistoryStats {
      display: grid;
      grid-template-columns: repeat(3, minmax(0,1fr));
      gap: 6px;
      margin: 2px 0 2px;
    }
    .dayHistoryStat {
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 7px 8px;
      background: var(--panel-soft);
      min-width: 0;
    }
    .dayHistoryStat span {
      display: block;
      color: var(--muted);
      font-size: 0.62rem;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }
    .dayHistoryStat b {
      display: block;
      margin-top: 2px;
      font-size: 0.82rem;
      line-height: 1.1;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .dayHistoryList {
      display: grid;
      gap: 7px;
    }
    .dayHistoryActions {
      display: grid;
      grid-template-columns: repeat(3, minmax(0,1fr));
      gap: 5px;
      min-width: 176px;
    }
    .dayHistoryActions button {
      padding: 7px 6px;
      font-size: 0.68rem;
      min-width: 0;
    }
    .dayHistoryEmpty {
      border: 1px dashed var(--line);
      border-radius: 16px;
      padding: 10px 12px;
      color: var(--muted);
      background: var(--panel-soft);
      font-size: 0.78rem;
      font-weight: 800;
    }
    @media (max-width: 560px) {
      #view-add .formGrid, #view-add .settingsGrid { grid-template-columns: 1fr; }
      #view-add .entryTypeGrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
      #view-add .entryTypeBtn { text-align: center; padding-left: 4px; padding-right: 4px; }
      #view-add .entryTypeBtn b { font-size: 0.76rem; }
      .dayHistoryCard { grid-template-columns: 1fr; }
      .dayHistoryActions { grid-template-columns: repeat(3, minmax(0,1fr)); min-width: 0; }
      .dayHistoryStats { grid-template-columns: repeat(3, minmax(0,1fr)); }
    }

    .dayEntryHistory {
      display: grid;
      gap: 8px;
      margin: -2px 0 12px;
    }

    .dayEntryHistory.empty { display: none; }

    .dayHistoryTitle {
      color: var(--muted);
      font-size: 0.72rem;
      font-weight: 950;
      letter-spacing: 0.03em;
      text-transform: uppercase;
      margin: 2px 0 0;
    }

    .dayHistoryCard {
      width: 100%;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: var(--panel);
      color: var(--ink);
      padding: 10px 12px;
      text-align: left;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
    }

    .dayHistoryCard.active {
      border-color: var(--brand);
      background: linear-gradient(135deg, rgba(14,116,144,0.16), rgba(32,184,206,0.08));
      box-shadow: 0 0 0 3px rgba(14,116,144,0.12);
    }

    .dayHistoryCard b {
      display: block;
      font-size: 0.94rem;
      line-height: 1.18;
      letter-spacing: -0.02em;
    }

    .dayHistoryCard span {
      display: block;
      margin-top: 3px;
      color: var(--muted);
      font-size: 0.72rem;
      line-height: 1.26;
      font-weight: 760;
    }

    .dayHistoryEdit {
      border-radius: 999px;
      background: rgba(14,116,144,0.12);
      border: 1px solid rgba(14,116,144,0.26);
      color: var(--brand-dark);
      padding: 6px 9px;
      font-size: 0.7rem;
      font-weight: 950;
      white-space: nowrap;
    }

    html[data-theme="dark"] .dayHistoryEdit {
      color: #7de7f7;
      background: rgba(32,184,206,0.12);
      border-color: rgba(32,184,206,0.34);
    }


    .entryTypePanel {
      margin: 0 0 12px;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      background: var(--panel-soft);
      display: grid;
      gap: 10px;
    }

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

    .entryTypeBtn {
      min-height: 54px;
      border-radius: 16px;
      background: var(--panel);
      color: var(--ink);
      display: grid;
      align-content: center;
      gap: 2px;
      text-align: left;
      padding: 9px 10px;
    }

    .entryTypeBtn b { font-size: 0.84rem; line-height: 1.05; }
    .entryTypeBtn span { color: var(--muted); font-size: 0.64rem; font-weight: 800; line-height: 1.18; }
    .entryTypeBtn.active { border-color: var(--brand); background: rgba(14,116,144,0.14); box-shadow: 0 0 0 3px rgba(14,116,144,0.10); }
    html[data-theme="dark"] .entryTypeBtn.active { background: rgba(32,184,206,0.13); }

    .entryTypeHint {
      margin: 0;
      color: var(--muted);
      font-size: 0.74rem;
      line-height: 1.35;
      font-weight: 760;
    }

    .shiftPartGrid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 7px;
    }
    .shiftPartBtn {
      min-height: 42px;
      border-radius: 14px;
      padding: 8px 7px;
      background: var(--panel);
      border: 1px solid var(--line);
      text-align: center;
      font-size: .76rem;
      font-weight: 950;
      color: var(--ink);
    }
    .shiftPartBtn.active {
      border-color: var(--brand);
      background: rgba(14,116,144,0.14);
      box-shadow: 0 0 0 3px rgba(14,116,144,0.10);
      color: var(--brand-dark);
    }
    html[data-theme="dark"] .shiftPartBtn.active { background: rgba(32,184,206,0.13); color: #7de7f7; }
    .shiftPartHelp {
      margin-top: 7px;
      color: var(--muted);
      font-size: .7rem;
      line-height: 1.3;
      font-weight: 800;
    }
    .shiftPartHelp.warn { color: var(--warn); }
    .shiftPartHelp.good { color: var(--good); }
    .shiftPartHelp.bad { color: var(--bad); }
    @media (max-width: 390px) { .shiftPartGrid { grid-template-columns: 1fr; } }


    .entryGuideChips { display:flex; flex-wrap:wrap; gap:6px; margin-top:9px; }
    .entryGuideChips span { display:inline-flex; align-items:center; padding:5px 8px; border-radius:999px; border:1px solid var(--line); background:var(--panel); color:var(--muted); font-size:.64rem; font-weight:900; line-height:1.15; }
    .bridgeBox { border:1px dashed var(--line); border-radius:var(--radius-md); padding:10px; background:var(--panel-soft); }
    .bridgeGrid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    @media (max-width: 420px) { .bridgeGrid { grid-template-columns: 1fr; } }

    .entryField.hiddenByType { display: none !important; }

    .dayHistoryHeader {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin: 2px 0 0;
    }

    .dayHistoryHeader .dayHistoryTitle { margin: 0; }

    .dayHistoryList { display: grid; gap: 8px; }

    .dayHistoryCard {
      width: 100%;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: var(--panel);
      color: var(--ink);
      padding: 10px 12px;
      text-align: left;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
    }

    .dayHistoryActions {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    .dayHistoryActions button {
      min-height: 30px;
      padding: 5px 8px;
      border-radius: 999px;
      font-size: 0.68rem;
      font-weight: 950;
      white-space: nowrap;
    }

    .dayHistoryActions .danger { color: var(--bad); background: var(--bad-soft); }

    @media (max-width: 560px) {
      .entryTypeGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .dayHistoryCard { grid-template-columns: 1fr; }
      .dayHistoryActions { justify-content: flex-start; }
    }

    details.inlineDetails {
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      background: var(--panel);
      overflow: hidden;
      margin-top: 12px;
    }
    details.inlineDetails summary {
      list-style: none;
      padding: 13px 14px;
      cursor: pointer;
      display: flex;
      justify-content: space-between;
      gap: 10px;
      align-items: center;
      font-weight: 950;
    }
    details.inlineDetails summary::-webkit-details-marker { display: none; }
    details.inlineDetails summary::after { content: 'Open'; background: var(--panel-soft); border: 1px solid var(--line); border-radius: 999px; color: var(--muted); padding: 4px 9px; font-size: 0.72rem; }
    details.inlineDetails[open] summary::after { content: 'Close'; }
    .detailsInner { padding: 0 14px 14px; border-top: 1px solid var(--line); }

    .inlineCheck {
      display: flex;
      align-items: center;
      gap: 10px;
      min-height: 44px;
      padding: 10px 12px;
      border: 1px solid var(--line);
      border-radius: var(--radius-md);
      background: var(--panel);
    }
    .inlineCheck input { width: auto; min-height: auto; }
    .inlineCheck span { font-size: 0.9rem; font-weight: 800; }

    .btnRow { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 13px; }
    .btnRow button { flex: 1 1 130px; }

    .entryList { display: grid; gap: 10px; }
    .entryCard {
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      background: var(--panel);
      padding: 12px;
      display: grid;
      gap: 10px;
    }
    .entryTop { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
    .entryDate { font-weight: 950; font-size: 1rem; letter-spacing: -0.02em; }
    .entryShift { margin-top: 2px; color: var(--muted); font-size: 0.82rem; font-weight: 750; }
    .entryMoney { text-align: right; font-weight: 950; font-size: 1.05rem; color: var(--brand-dark); white-space: nowrap; }
    .entryFacts { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
    .fact { padding: 8px; border-radius: 12px; background: var(--panel-soft); border: 1px solid #edf0f4; min-width: 0; }
    .fact .k { display: block; color: var(--muted); font-size: 0.68rem; font-weight: 850; }
    .fact .v { display: block; margin-top: 3px; font-size: 0.85rem; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .tagRow { display: flex; flex-wrap: wrap; gap: 6px; }
    .tag { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-size: 0.72rem; font-weight: 900; }
    .tag.leave { background: #eee8ff; color: var(--purple); }
    .tag.warn { background: var(--warn-soft); color: var(--warn); }
    .tag.good { background: var(--good-soft); color: var(--good); }
    .entryNotes { margin: 0; color: var(--muted); font-size: 0.82rem; line-height: 1.35; }
    .smallActions { display: flex; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }

    /* v1.80 compact fortnight entries */
    .entryPeriodHero {
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      background: linear-gradient(135deg, rgba(34,190,210,0.12), var(--panel));
      padding: 14px;
      display: grid;
      gap: 12px;
      margin-bottom: 12px;
    }
    html[data-theme="dark"] .entryPeriodHero { background: linear-gradient(135deg, rgba(34,190,210,0.14), rgba(13,29,37,0.96)); }
    .entryPeriodTop { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
    .entryPeriodTitle { font-weight: 950; font-size: 1.08rem; letter-spacing: -0.02em; }
    .entryPeriodSub { margin-top: 4px; color: var(--muted); font-weight: 800; font-size: 0.82rem; line-height: 1.35; }
    .entrySummaryPills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
    .entrySummaryPill { border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,0.58); padding: 9px 10px; min-width: 0; }
    html[data-theme="dark"] .entrySummaryPill { background: rgba(255,255,255,0.035); }
    .entrySummaryPill small { display:block; color: var(--muted); font-size: 0.67rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.02em; }
    .entrySummaryPill b { display:block; margin-top: 3px; font-size: 0.92rem; font-weight: 950; overflow:hidden; text-overflow: ellipsis; white-space: nowrap; }
    .entryWeekList { display: grid; gap: 12px; }
    .entryWeekGroup { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); overflow: hidden; }
    .entryWeekHead { display:flex; justify-content: space-between; align-items:flex-start; gap:10px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--panel-soft); }
    .entryWeekHead b { font-size: 1rem; font-weight: 950; }
    .entryWeekHead small { display:block; margin-top: 3px; color: var(--muted); font-weight: 800; line-height: 1.3; }
    .entryWeekAmount { text-align:right; font-weight:950; color: var(--brand-dark); white-space: nowrap; }
    .entryCompactList { display: grid; gap: 8px; padding: 10px; }
    .entryCompactCard { border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,0.58); overflow:hidden; }
    html[data-theme="dark"] .entryCompactCard { background: rgba(255,255,255,0.025); }
    .entryCompactCard summary { list-style: none; cursor: pointer; padding: 11px 12px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: start; }
    .entryCompactCard summary::-webkit-details-marker { display: none; }
    .entryCompactTitle { font-weight: 950; font-size: 0.98rem; letter-spacing: -0.02em; }
    .entryCompactMeta { margin-top: 3px; color: var(--muted); font-size: 0.78rem; font-weight: 800; line-height: 1.35; }
    .entryCompactMini { margin-top: 7px; display:flex; flex-wrap:wrap; gap: 6px; }
    .entryCompactMini span { display:inline-flex; align-items:center; padding: 4px 8px; border-radius: 999px; background: var(--panel-soft); border: 1px solid var(--line); color: var(--muted); font-size: 0.69rem; font-weight: 900; }
    .entryCompactAmount { text-align:right; color: var(--brand-dark); font-weight: 950; font-size: 1rem; white-space: nowrap; }
    .entryCompactChevron { display:block; margin-top: 4px; color: var(--muted); font-size: 0.72rem; font-weight: 900; }
    .entryCompactCard[open] .entryCompactChevron { color: var(--brand); }
    .entryDetailPanel { border-top: 1px solid var(--line); padding: 10px 12px 12px; display: grid; gap: 10px; }
    .entryDetailGrid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 7px; }
    .entryDetailMetric { border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft); padding: 8px; min-width:0; }
    .entryDetailMetric small { display:block; color: var(--muted); font-size: 0.66rem; font-weight:900; }
    .entryDetailMetric b { display:block; margin-top: 3px; font-size: 0.82rem; font-weight:950; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .entryDetailActions { display:flex; justify-content:flex-end; gap:7px; flex-wrap:wrap; }


    .breakdownTitleBar { align-items: flex-start; gap: 12px; }
    .breakdownTitleBar .statusPill { flex: 0 0 auto; margin-top: 3px; }
    .fortnightShiftSectionHead { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
    .fortnightShiftSectionHead h3 { margin: 0 0 4px; }
    .fortnightShiftSectionHead .note { margin: 0; }
    .fortnightShiftSectionHead .soft { flex: 0 0 auto; }
    .fortnightShiftList { display: grid; gap: 12px; }
    .breakdownLinkCard {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      margin-top: 14px;
      padding: 16px 18px;
      border-radius: 22px;
      border: 1px solid rgba(148, 163, 184, .18);
      background: rgba(15, 31, 40, .72);
      cursor: pointer;
      transition: transform .12s ease, border-color .12s ease, background .12s ease;
    }
    .breakdownLinkCard:hover,
    .breakdownLinkCard:focus-visible {
      outline: none;
      transform: translateY(-1px);
      border-color: rgba(35, 202, 224, .5);
      background: rgba(16, 47, 58, .82);
    }
    .breakdownLinkCard strong { display: block; color: #f8fafc; font-size: 1.05rem; margin-bottom: 4px; }
    .breakdownLinkCard span { color: #aebbc5; font-weight: 800; }
    .breakdownLinkCard .linkArrow { color: #67e8f9; font-size: 1.4rem; line-height: 1; }

    .fortnightShiftDay {
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      background: linear-gradient(180deg, var(--panel), rgba(255,255,255,0.72));
      overflow: hidden;
    }
    html[data-theme="dark"] .fortnightShiftDay { background: linear-gradient(180deg, rgba(22,39,48,0.96), rgba(12,25,31,0.98)); }
    .fortnightShiftDayHead {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 12px;
      padding: 13px 14px;
      border-bottom: 1px solid var(--line);
      background: var(--panel-soft);
      align-items: start;
    }
    .fortnightShiftDayDate { display: block; font-size: 1rem; letter-spacing: -0.02em; line-height: 1.15; }
    .fortnightShiftDaySub { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
    .miniBadge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 4px 8px;
      border-radius: 999px;
      background: var(--panel);
      border: 1px solid var(--line);
      color: var(--muted);
      font-size: 0.68rem;
      font-weight: 900;
      line-height: 1;
      white-space: nowrap;
    }
    .miniBadge.money { color: var(--brand-dark); }
    .miniBadge.warn { color: var(--warn); background: var(--warn-soft); border-color: rgba(245,158,11,0.25); }
    .fortnightShiftDayTotal { text-align: right; white-space: nowrap; font-size: 0.98rem; font-weight: 950; color: var(--brand-dark); line-height: 1.1; }
    .fortnightShiftDayTotal small { display: block; margin-top: 6px; color: var(--muted); font-size: 0.72rem; font-weight: 900; }
    .fortnightShiftParts { display: grid; gap: 8px; padding: 10px; }
    .fortnightShiftPart {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 10px;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: var(--panel);
      align-items: start;
    }
    .fortnightShiftPartTop { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
    .fortnightShiftTitle { font-size: 1rem; font-weight: 950; letter-spacing: -0.02em; line-height: 1.15; }
    .fortnightShiftSub { margin-top: 4px; color: var(--muted); font-size: 0.76rem; font-weight: 850; }
    .fortnightShiftMoney { text-align: right; white-space: nowrap; font-size: 0.98rem; font-weight: 950; color: var(--ink); }
    .fortnightShiftMoney small { display: block; margin-top: 4px; color: var(--muted); font-size: 0.72rem; font-weight: 850; }
    .fortnightShiftMetaGrid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; }
    .fortnightShiftFact {
      border: 1px solid var(--line);
      background: var(--panel-soft);
      border-radius: 12px;
      padding: 7px 8px;
      min-width: 0;
    }
    .fortnightShiftFact span { display: block; color: var(--muted); font-size: 0.63rem; font-weight: 900; line-height: 1; }
    .fortnightShiftFact b { display: block; margin-top: 4px; color: var(--ink); font-size: 0.78rem; font-weight: 950; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .fortnightShiftTags { display: flex; flex-wrap: wrap; gap: 6px; }
    .fortnightShiftTag { padding: 4px 8px; border-radius: 999px; font-size: 0.68rem; font-weight: 900; background: var(--blue-soft); color: var(--blue); }
    .fortnightShiftTag.good { background: var(--good-soft); color: var(--good); }
    .fortnightShiftTag.warn { background: var(--warn-soft); color: var(--warn); }
    .fortnightShiftFooter { margin: 0 10px 10px; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 0.74rem; font-weight: 850; padding: 8px 10px; border-radius: 12px; background: var(--panel-soft); border: 1px solid var(--line); }
    html[data-theme="dark"] .fortnightShiftDayTotal { color: #7de7f7; }
    html[data-theme="dark"] .miniBadge.money { color: #7de7f7; }
    @media (max-width: 390px) {
      .fortnightShiftDayHead { grid-template-columns: 1fr; }
      .fortnightShiftDayTotal { text-align: left; }
      .fortnightShiftMetaGrid { grid-template-columns: 1fr; }
    }

    .weekGrid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
    .weekBlock { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); padding: 12px; }
    .weekBlock h3 { margin: 0 0 10px; font-size: 0.96rem; }
    .weekRows { display: grid; gap: 7px; }
    .weekRow { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 0.86rem; }
    .weekRow strong { color: var(--ink); white-space: nowrap; }

    .metricGrid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
    .metric { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); padding: 12px; }
    .metric .k { color: var(--muted); font-size: 0.72rem; font-weight: 850; }
    .metric .v { margin-top: 5px; font-size: 1.04rem; font-weight: 950; letter-spacing: -0.03em; }
    button.metric { width: 100%; text-align: left; color: var(--ink); box-shadow: none; }
    button.metric .k::after { content: ' · tap for value'; color: var(--brand); font-weight: 950; }

    .payslipMatchGrid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin-top: 12px; }
    .payslipMatchActions { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; margin-top: 12px; }
    .payslipMatchResults { display: grid; gap: 8px; margin-top: 12px; }
    .payslipMatchRow { display: grid; grid-template-columns: minmax(88px, .9fr) repeat(3, minmax(0,1fr)); gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-soft); padding: 9px 10px; font-size: .78rem; font-weight: 850; }
    .payslipMatchRow.header { color: var(--muted); background: transparent; border: 0; padding-top: 0; padding-bottom: 0; font-size: .68rem; text-transform: uppercase; letter-spacing: .045em; }
    .payslipMatchRow span:not(:first-child) { text-align: right; white-space: nowrap; }
    .payslipMatchRow .diffGood { color: var(--good); }
    .payslipMatchRow .diffWarn { color: var(--warn); }
    .payslipMatchRow .diffBad { color: var(--bad); }
    .payslipMatchNotice { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel-soft); color: var(--muted); font-size: .8rem; line-height: 1.35; font-weight: 760; }
    .payslipMatchNotice.good { background: var(--good-soft); color: var(--good); border-color: #b7e4ca; }
    .payslipMatchNotice.warn { background: var(--warn-soft); color: var(--warn); border-color: #f7d48c; }
    .classificationChecker { margin-top: 12px; display: grid; gap: 9px; }
    .classificationCheckerHeader { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel-soft); }
    .classificationCheckerHeader b { display:block; font-size: .9rem; letter-spacing: -.01em; }
    .classificationCheckerHeader small { display:block; margin-top: 3px; color: var(--muted); font-size: .72rem; line-height: 1.3; font-weight: 760; }
    .classificationBadge { display:inline-flex; align-items:center; justify-content:center; min-height: 27px; padding: 5px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: .68rem; font-weight: 950; white-space: nowrap; }
    .classificationBadge.good { background: var(--good-soft); color: var(--good); border-color: #b7e4ca; }
    .classificationBadge.warn { background: var(--warn-soft); color: var(--warn); border-color: #f7d48c; }
    .classificationBadge.bad { background: var(--bad-soft); color: var(--bad); border-color: #f6c6c1; }
    .classificationCard { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel); padding: 10px 12px; display:grid; gap: 6px; }
    .classificationCard.good { background: var(--good-soft); border-color: #b7e4ca; }
    .classificationCard.warn { background: var(--warn-soft); border-color: #f7d48c; }
    .classificationCard.bad { background: var(--bad-soft); border-color: #f6c6c1; }
    .classificationCard b { display:block; font-size: .84rem; }
    .classificationCard p { margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.35; font-weight: 760; }
    .classificationCard.bad p, .classificationCard.warn p, .classificationCard.good p { color: inherit; opacity: .9; }
    .classificationMiniGrid { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 7px; }
    .classificationMini { border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft); padding: 8px 9px; min-width: 0; }
    .classificationMini small { display:block; color: var(--muted); font-size: .64rem; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
    .classificationMini strong { display:block; margin-top: 3px; font-size: .88rem; white-space: nowrap; overflow:hidden; text-overflow: ellipsis; }
    .classificationCandidates { display:grid; gap: 6px; }
    .classificationCandidate { display:flex; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft); padding: 8px 9px; font-size: .74rem; font-weight: 840; }
    .classificationCandidate span:last-child { text-align:right; white-space:nowrap; }
    .auditSummaryGrid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 9px; margin-top: 12px; }
    .auditMetric { border: 1px solid var(--line); border-radius: 14px; background: var(--panel-soft); padding: 10px 11px; min-width: 0; }
    .auditMetric small { display: block; color: var(--muted); font-size: .66rem; font-weight: 950; text-transform: uppercase; letter-spacing: .045em; }
    .auditMetric b { display: block; margin-top: 4px; font-size: 1rem; line-height: 1.1; letter-spacing: -.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .auditEntryList { display: grid; gap: 9px; margin-top: 12px; }
    .auditEntryCard { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); padding: 12px; display: grid; gap: 10px; }
    .auditEntryTop { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: start; }
    .auditEntryTop b { display: block; font-size: .98rem; line-height: 1.15; letter-spacing: -.02em; }
    .auditEntryTop span { display: block; margin-top: 3px; color: var(--muted); font-size: .72rem; line-height: 1.28; font-weight: 760; }
    .auditEntryTop strong { white-space: nowrap; font-size: .94rem; color: var(--brand-dark); }
    .auditMiniGrid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 7px; }
    .auditMini { border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft); padding: 8px; min-width: 0; }
    .auditMini small { display:block; color: var(--muted); font-size: .62rem; font-weight: 900; }
    .auditMini b { display:block; margin-top: 3px; font-size: .78rem; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .auditReason { margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.35; font-weight: 760; }
    .auditReason.good { color: var(--good); }
    .auditReason.warn { color: var(--warn); }
    .auditReason.bad { color: var(--bad); }
    .calibrationHero { display: grid; gap: 9px; }
    .calibrationLineList { display: grid; gap: 8px; margin-top: 12px; }
    .calibrationRow { display: grid; grid-template-columns: minmax(112px, 1.05fr) repeat(3, minmax(0, .75fr)) minmax(110px, 1.05fr); gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-soft); padding: 9px 10px; font-size: .76rem; font-weight: 850; }
    .calibrationRow.header { color: var(--muted); background: transparent; border: 0; padding-top: 0; padding-bottom: 0; font-size: .64rem; text-transform: uppercase; letter-spacing: .045em; }
    .calibrationRow span:not(:first-child) { text-align: right; white-space: nowrap; }
    .calibrationRow span:last-child { text-align: left; white-space: normal; color: var(--muted); font-weight: 760; }
    .calibrationRow .diffGood { color: var(--good); }
    .calibrationRow .diffWarn { color: var(--warn); }
    .calibrationRow .diffBad { color: var(--bad); }
    .simPayGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
    .simPayMetric { border: 1px solid var(--line); background: var(--panel-soft); border-radius: 14px; padding: 10px 12px; }
    .simPayMetric small { display: block; color: var(--muted); font-size: .68rem; font-weight: 850; text-transform: uppercase; letter-spacing: .035em; }
    .simPayMetric b { display: block; margin-top: 4px; font-size: 1.02rem; }
    .simPayMetric.muted b { color: var(--muted); }
    .simBucketList { display: grid; gap: 7px; margin-top: 10px; }
    .simBucketRow { display: grid; grid-template-columns: minmax(120px, 1fr) auto; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-soft); padding: 9px 10px; font-size: .78rem; font-weight: 850; }
    .simBucketRow span:last-child { text-align: right; white-space: nowrap; }
    .simBucketRow.dim { opacity: .72; }
    .simulationOnlyNote { margin-top: 10px; color: var(--muted); font-size: .82rem; line-height: 1.45; }
    .calibrationVariantList { display: grid; gap: 9px; margin-top: 12px; }
    .calibrationVariant { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); padding: 12px; display: grid; gap: 8px; }
    .calibrationVariantTop { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
    .calibrationVariantTop b { display: block; font-size: .94rem; line-height: 1.2; }
    .calibrationVariantTop small { display: block; margin-top: 3px; color: var(--muted); font-size: .72rem; line-height: 1.3; font-weight: 760; }
    .calibrationVariantTop strong { color: var(--brand-dark); white-space: nowrap; }
    .calibrationVariant .diffGood { color: var(--good); }
    .calibrationVariant .diffWarn { color: var(--warn); }
    .calibrationVariant .diffBad { color: var(--bad); }
    .calibrationTrainingList { display: grid; gap: 9px; margin-top: 12px; }
    .quickSnapCard { border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(135deg, rgba(14,116,144,.10), rgba(148,163,184,.08)); padding: 12px; display: grid; gap: 9px; margin-top: 12px; }
    .quickSnapHead { display:flex; justify-content:space-between; gap:10px; align-items:flex-start; }
    .quickSnapHead b { display:block; font-size:.98rem; line-height:1.15; letter-spacing:-.02em; }
    .quickSnapHead small { display:block; color:var(--muted); font-size:.70rem; font-weight:850; line-height:1.35; margin-top:3px; }
    .quickSnapTable { display:grid; gap:5px; }
    .quickSnapRow { display:grid; grid-template-columns: minmax(68px,.85fr) minmax(36px,.40fr) minmax(50px,.55fr) minmax(56px,.58fr) minmax(96px,1.25fr); gap:6px; align-items:center; border:1px solid var(--line); border-radius:12px; background:var(--panel); padding:7px 8px; font-size:.64rem; font-weight:900; }
    .quickSnapRow.candidateImpact { grid-template-columns: minmax(56px,.68fr) minmax(32px,.30fr) minmax(38px,.38fr) minmax(38px,.38fr) minmax(54px,.50fr) minmax(54px,.50fr) minmax(118px,1.45fr); }
    .quickSnapRow.header { background:transparent; border:0; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; font-size:.56rem; padding-top:0; padding-bottom:0; }
    .quickSnapRow span { min-width:0; overflow:hidden; text-overflow:ellipsis; }
    .quickSnapRow span:not(:first-child):not(:last-child) { text-align:right; white-space:nowrap; }
    .quickSnapRow span:last-child { text-align:left; white-space:normal; line-height:1.18; overflow:visible; text-overflow:clip; }
    .quickSnapRow .diffGood { color:var(--good); }
    .quickSnapRow .diffWarn { color:var(--warn); }
    .quickSnapRow .diffBad { color:var(--bad); }
    .quickSnapTiny { color:var(--muted); font-size:.70rem; font-weight:760; line-height:1.35; margin:0; }
    .replayDetailList { display:grid; gap:10px; margin-top:12px; }
    .replayLineMini { display:grid; grid-template-columns:minmax(100px,1fr) repeat(3,minmax(0,.72fr)); gap:6px; align-items:center; border:1px solid var(--line); border-radius:12px; background:var(--panel-soft); padding:7px 8px; font-size:.68rem; font-weight:850; }
    .replayLineMini.header { color:var(--muted); background:transparent; border:0; text-transform:uppercase; letter-spacing:.04em; font-size:.58rem; }
    .replayLineMini span:not(:first-child) { text-align:right; white-space:nowrap; }
    @media (max-width: 620px) {
      .quickSnapRow { grid-template-columns: minmax(58px,.78fr) minmax(30px,.38fr) minmax(46px,.50fr) minmax(50px,.55fr) minmax(92px,1.35fr); font-size:.54rem; gap:4px; padding:6px; }
      .quickSnapRow.candidateImpact { grid-template-columns: minmax(48px,.62fr) minmax(26px,.28fr) minmax(32px,.34fr) minmax(31px,.32fr) minmax(46px,.48fr) minmax(46px,.48fr) minmax(98px,1.42fr); font-size:.46rem; gap:3px; }
      .quickSnapRow.header { font-size:.49rem; }
      .quickSnapHead { display:grid; }
      .replayLineMini { grid-template-columns:1fr; gap:3px; }
      .replayLineMini.header { display:none; }
      .replayLineMini span:not(:first-child) { text-align:left; }
      .replayLineMini span:nth-child(2)::before { content:'Engine: '; color:var(--muted); }
      .replayLineMini span:nth-child(3)::before { content:'Payslip: '; color:var(--muted); }
      .replayLineMini span:nth-child(4)::before { content:'Diff: '; color:var(--muted); }
    }

    @media (max-width: 620px) {
      .calibrationRow { grid-template-columns: 1fr; gap: 3px; }
      .calibrationRow.header { display: none; }
      .calibrationRow span:not(:first-child), .calibrationRow span:last-child { text-align: left; }
      .calibrationRow span:nth-child(2)::before { content: 'Engine: '; color: var(--muted); }
      .calibrationRow span:nth-child(3)::before { content: 'Payslip: '; color: var(--muted); }
      .calibrationRow span:nth-child(4)::before { content: 'Diff: '; color: var(--muted); }
      .calibrationRow span:nth-child(5)::before { content: 'Cause: '; color: var(--muted); }
    }
    .auditJumpRow { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; margin-top: 12px; }
    @media (max-width: 700px) {
      .payslipMatchGrid { grid-template-columns: repeat(2, minmax(0,1fr)); }
      .payslipMatchActions { grid-template-columns: 1fr; }
      .payslipMatchRow { grid-template-columns: 1fr; gap: 3px; }
      .payslipMatchRow.header { display: none; }
      .payslipMatchRow span:not(:first-child) { text-align: left; }
      .payslipMatchRow span:nth-child(2)::before { content: 'App: '; color: var(--muted); }
      .payslipMatchRow span:nth-child(3)::before { content: 'Payslip: '; color: var(--muted); }
      .payslipMatchRow span:nth-child(4)::before { content: 'Diff: '; color: var(--muted); }
      .classificationCheckerHeader { display: grid; }
      .classificationMiniGrid { grid-template-columns: 1fr; }
      .classificationCandidate { display: grid; }
      .classificationCandidate span:last-child { text-align:left; }
      .auditSummaryGrid { grid-template-columns: repeat(2, minmax(0,1fr)); }
      .auditMiniGrid { grid-template-columns: repeat(2, minmax(0,1fr)); }
      .auditEntryTop { grid-template-columns: 1fr; }
      .auditEntryTop strong { justify-self: start; }
    }

    .analyticsSummary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-bottom:12px; }
    .analyticsHero { padding:14px; border-radius:var(--radius-lg); background:linear-gradient(135deg, rgba(14,116,144,.20), rgba(8,51,68,.08)); border:1px solid var(--line); margin-bottom:12px; }
    .analyticsHero small { display:block; color:var(--muted); font-weight:900; font-size:.72rem; }
    .analyticsHero b { display:block; margin-top:4px; font-size:1.6rem; line-height:1; letter-spacing:-.05em; }
    .analyticsCompare { display:grid; gap:8px; margin:12px 0; }
    .analyticsCompareRow { display:grid; grid-template-columns:72px minmax(0,1fr) 82px; gap:8px; align-items:center; color:var(--muted); font-size:.72rem; font-weight:900; }
    .analyticsTrack { height:12px; border-radius:999px; background:var(--panel-soft); border:1px solid var(--line); overflow:hidden; }
    .analyticsFill { height:100%; border-radius:999px; background:linear-gradient(90deg,#22d3ee,#0891b2); width:var(--w,0%); }
    .analyticsFill.net { background:linear-gradient(90deg,#22c55e,#15803d); }
    .analyticsFill.tax { background:linear-gradient(90deg,#f59e0b,#b45309); }
    .analyticsFill.super { background:linear-gradient(90deg,#a78bfa,#6d28d9); }
    .periodAnalyticsList { display:grid; gap:9px; max-height:38vh; overflow:auto; padding-right:2px; }
    .periodAnalyticsRow { border:1px solid var(--line); background:var(--panel-soft); border-radius:14px; padding:10px; display:grid; gap:7px; }
    .periodAnalyticsTop { display:flex; justify-content:space-between; gap:10px; font-size:.78rem; font-weight:950; }
    .periodAnalyticsMeta { color:var(--muted); font-size:.68rem; font-weight:850; }
    .ytdLegend { display:flex; flex-wrap:wrap; gap:8px; margin:10px 0 12px; color:var(--muted); font-size:.68rem; font-weight:950; }
    .ytdLegend span { display:inline-flex; align-items:center; gap:5px; padding:5px 8px; border:1px solid var(--line); border-radius:999px; background:var(--panel-soft); }
    .ytdDot { width:8px; height:8px; border-radius:999px; background:#22d3ee; box-shadow:0 0 0 2px rgba(34,211,238,.12); }
    .ytdDot.net { background:#22c55e; box-shadow:0 0 0 2px rgba(34,197,94,.12); }
    .ytdDot.tax { background:#f59e0b; box-shadow:0 0 0 2px rgba(245,158,11,.12); }
    .ytdDot.super { background:#a78bfa; box-shadow:0 0 0 2px rgba(167,139,250,.12); }
    .periodAnalyticsBars { display:grid; gap:6px; }
    .periodAnalyticsBarRow { display:grid; grid-template-columns:42px minmax(0,1fr) 78px; gap:7px; align-items:center; color:var(--muted); font-size:.64rem; font-weight:950; }
    .periodAnalyticsBarLabel { color:var(--muted); }
    .periodAnalyticsBarValue { text-align:right; color:var(--muted); white-space:nowrap; }
    .periodAnalyticsBar { height:8px; border-radius:999px; background:rgba(148,163,184,.18); overflow:hidden; }
    .periodAnalyticsBar span { display:block; height:100%; width:var(--w,0%); background:#22d3ee; border-radius:999px; }
    .periodAnalyticsBar.net span { background:#22c55e; }
    .periodAnalyticsBar.tax span { background:#f59e0b; }
    .leaveValueGrid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
    .leaveValueNote { margin:12px 0 0; color:var(--muted); font-size:.78rem; line-height:1.35; }

    .trackerStack { display: grid; gap: 12px; }
    .trackerHeader { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
    .trackerHeader h3 { margin: 0; font-size: 1rem; letter-spacing: -0.02em; }
    .trackerHeader p { margin: 3px 0 0; color: var(--muted); font-size: 0.8rem; line-height: 1.35; }
    .statList { display: grid; gap: 8px; }
    .statRow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel); }
    .statRow span { color: var(--muted); font-size: 0.82rem; font-weight: 800; }
    .statRow b { font-size: 0.95rem; white-space: nowrap; }
    .shiftStatRow { display: grid; grid-template-columns: 1fr auto; align-items: center; }
    .shiftStatMain { display: grid; gap: 4px; min-width: 0; }
    .shiftStatTitle { color: var(--text) !important; font-size: 0.92rem !important; font-weight: 900 !important; }
    .shiftStatMeta { color: var(--muted); font-size: 0.76rem; font-weight: 800; line-height: 1.25; }
    .shiftStatCount { text-align: right; }
    .trackerTopGrid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin-bottom: 10px; }
    .trackerSubhead { margin: 12px 0 8px; color: var(--muted); font-size: .7rem; font-weight: 950; text-transform: uppercase; letter-spacing: .055em; }
    .trackerDetails { margin-top: 10px; }
    .trackerDetails summary { min-height: 52px; }
    .trackerDetails .serviceStatsDetailsBody { display: grid; gap: 8px; }
    .trackerDetails .metricGrid { margin-top: 0; }
    .compactStatList { display: grid; gap: 8px; }

    .serviceStatsSummary {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 9px;
      margin-bottom: 12px;
    }

    .serviceInsightGrid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 9px;
      margin-bottom: 12px;
    }

    .serviceInsightCard {
      border: 1px solid rgba(32,184,206,0.30);
      border-radius: var(--radius-lg);
      background: linear-gradient(135deg, rgba(32,184,206,0.14), rgba(14,116,144,0.05));
      padding: 12px;
      min-width: 0;
    }

    .serviceInsightCard small,
    .serviceStatsSummaryCard small {
      display: block;
      color: var(--muted);
      font-size: 0.66rem;
      font-weight: 950;
      text-transform: uppercase;
      letter-spacing: 0.055em;
    }

    .serviceInsightCard b,
    .serviceStatsSummaryCard b {
      display: block;
      margin-top: 4px;
      font-size: 1.05rem;
      line-height: 1.08;
      letter-spacing: -0.02em;
    }

    .serviceInsightCard span,
    .serviceStatsSummaryCard span {
      display: block;
      margin-top: 5px;
      color: var(--muted);
      font-size: 0.72rem;
      font-weight: 800;
      line-height: 1.25;
    }

    .serviceStatsSummaryCard {
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      background: var(--panel-soft);
      padding: 12px;
      min-width: 0;
    }

    .serviceStatsToolbar {
      margin: 0 0 10px;
    }

    .serviceStatsToolbar label {
      display: block;
      margin-bottom: 6px;
      color: var(--muted);
      font-size: 0.72rem;
      font-weight: 850;
    }

    .serviceStatsRows {
      display: grid;
      gap: 8px;
    }

    .serviceStatsRow {
      display: grid;
      grid-template-columns: 72px minmax(0, 1fr) auto;
      gap: 9px;
      align-items: center;
      padding: 10px 12px;
      border: 1px solid var(--line);
      border-radius: var(--radius-md);
      background: var(--panel);
    }

    .serviceStatsRoute {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 50px;
      max-width: 70px;
      padding: 6px 8px;
      border-radius: 999px;
      border: 1px solid rgba(32,184,206,0.28);
      background: rgba(32,184,206,0.12);
      color: var(--brand-dark);
      font-size: 0.78rem;
      font-weight: 950;
      white-space: nowrap;
      line-height: 1;
    }

    html[data-theme="dark"] .serviceStatsRoute { color: #7de7f7; }

    .serviceStatsMain {
      min-width: 0;
      display: grid;
      gap: 2px;
    }

    .serviceStatsDest {
      color: var(--ink);
      font-size: 0.85rem;
      font-weight: 950;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .serviceStatsMeta {
      color: var(--muted);
      font-size: 0.68rem;
      font-weight: 800;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .serviceStatsCount {
      color: var(--ink);
      font-size: 0.95rem;
      font-weight: 950;
      white-space: nowrap;
      text-align: right;
    }



    .serviceStatsDetails {
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      background: var(--panel-soft);
      overflow: hidden;
    }

    .serviceStatsDetails summary {
      cursor: pointer;
      list-style: none;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 12px;
      min-height: 50px;
      user-select: none;
    }

    .serviceStatsDetails summary::-webkit-details-marker { display: none; }

    .serviceStatsDetailsTitle {
      display: grid;
      gap: 2px;
      min-width: 0;
    }

    .serviceStatsDetailsTitle b {
      font-size: 0.9rem;
      font-weight: 950;
      color: var(--ink);
      line-height: 1.1;
    }

    .serviceStatsDetailsTitle small {
      color: var(--muted);
      font-size: 0.68rem;
      font-weight: 850;
      line-height: 1.2;
    }

    .serviceStatsDetailsCount {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      color: var(--brand-dark);
      font-size: 0.74rem;
      font-weight: 950;
      white-space: nowrap;
    }

    html[data-theme="dark"] .serviceStatsDetailsCount { color: #7de7f7; }

    .serviceStatsDetailsCount::after {
      content: '▾';
      display: inline-block;
      transition: transform 0.15s ease;
      font-size: 0.72rem;
    }

    .serviceStatsDetails[open] .serviceStatsDetailsCount::after { transform: rotate(180deg); }

    .serviceStatsDetailsBody {
      border-top: 1px solid var(--line);
      padding: 10px;
    }

    @media (max-width: 390px) {
      .serviceStatsRow { grid-template-columns: 62px minmax(0, 1fr) auto; gap: 7px; padding-left: 9px; padding-right: 9px; }
      .serviceStatsRoute { min-width: 44px; max-width: 62px; padding-left: 6px; padding-right: 6px; font-size: 0.72rem; }
      .serviceStatsDest { font-size: 0.78rem; }
      .serviceStatsMeta { font-size: 0.62rem; }
      .serviceStatsCount { font-size: 0.85rem; }
    }

    .profilePills { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
    .profilePill { padding: 7px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-soft); color: var(--muted); font-weight: 900; font-size: 0.76rem; }
    .profilePill.active { background: var(--brand); color: #fff; border-color: var(--brand); }



    .guideShell { display: grid; gap: 14px; }
    .guideNavTitle {
      display: grid;
      gap: 3px;
      padding: 2px 2px 0;
    }
    .guideNavTitle h3 { margin: 0; font-size: 1rem; letter-spacing: -0.02em; }
    .guideNavTitle p { margin: 0; color: var(--muted); font-size: 0.82rem; line-height: 1.35; }
    .guideIndexStatus {
      border: 1px solid rgba(34,197,218,.35);
      border-radius: var(--radius-lg);
      background: linear-gradient(135deg, rgba(34,197,218,.16), rgba(14,116,144,.08));
      padding: 14px 16px;
      display: grid;
      gap: 3px;
    }
    .guideIndexStatus b { display: block; font-size: 0.95rem; }
    .guideIndexStatus small { color: var(--muted); font-size: 0.78rem; line-height: 1.3; }
    .guideTabs {
      display: grid;
      grid-template-columns: 1fr;
      gap: 8px;
      overflow: visible;
      padding: 0;
    }
    .guideTab {
      width: 100%;
      min-height: 58px;
      border-radius: var(--radius-lg);
      background: var(--panel);
      color: var(--ink);
      border: 1px solid var(--line);
      font-size: 0.84rem;
      padding: 11px 12px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      text-align: left;
      box-shadow: var(--shadow-soft);
    }
    .guideTab span:first-child { min-width: 0; }
    .guideTab b { display: block; font-size: 0.92rem; line-height: 1.1; }
    .guideTab small { display: block; margin-top: 4px; color: var(--muted); font-size: 0.72rem; line-height: 1.25; }
    .guideTab .arrow { color: var(--muted); font-weight: 950; }
    .guideTab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
    .guideTab.active small, .guideTab.active .arrow { color: rgba(255,255,255,.78); }
    .guideShell.guideFocused .guideNavTitle, .guideShell.guideFocused .guideIndexStatus, .guideShell.guideFocused .guideTabs { display: none; }
    .guideBack {
      border: 1px solid var(--line);
      background: var(--panel-soft);
      color: var(--ink);
      border-radius: 999px;
      padding: 12px 14px;
      min-height: 44px;
      font-size: 0.88rem;
      font-weight: 950;
      text-align: left;
      box-shadow: var(--shadow-soft);
    }
    .guideBack:active { transform: translateY(1px); }
    .guidePanel { display: none; }
    .guidePanel.active { display: grid; gap: 12px; }
    .guideIntro {
      border: 1px solid var(--line);
      border-radius: var(--radius-xl);
      background: linear-gradient(135deg, var(--blue-soft), var(--panel));
      padding: 14px;
      display: grid;
      gap: 8px;
    }
    .guideIntro h3, .guideSection h3, .exampleCard h3 { margin: 0; font-size: 1rem; letter-spacing: -0.02em; }
    .guideIntro p, .guideSection p, .exampleCard p { margin: 0; color: var(--muted); line-height: 1.42; font-size: 0.86rem; }
    .guideIndex { display: grid; gap: 8px; }
    .guideIndexButton {
      width: 100%;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      text-align: left;
      border-radius: var(--radius-lg);
      background: var(--panel);
      border: 1px solid var(--line);
      padding: 12px;
      box-shadow: var(--shadow-soft);
    }
    .guideIndexButton span { min-width: 0; }
    .guideIndexButton b { display: block; font-size: 0.95rem; }
    .guideIndexButton small { display: block; margin-top: 3px; color: var(--muted); font-size: 0.76rem; line-height: 1.25; }
    .guideSection {
      border: 1px solid var(--line);
      border-radius: var(--radius-xl);
      background: var(--panel);
      padding: 14px;
      display: grid;
      gap: 10px;
    }
    .guideGrid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
    .guideMini {
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      background: var(--panel-soft);
      padding: 12px;
    }
    .guideMini b { display: block; margin-bottom: 5px; font-size: 0.9rem; }
    .guideMini span { display: block; color: var(--muted); font-size: 0.8rem; line-height: 1.35; }
    .guideClickable {
      position: relative;
      cursor: pointer;
      text-align: left;
      transition: transform .12s ease, border-color .12s ease, background .12s ease;
    }
    .guideClickable::after {
      content: '›';
      position: absolute;
      top: 10px;
      right: 12px;
      color: var(--muted);
      font-weight: 950;
      font-size: 1.1rem;
      line-height: 1;
    }
    .guideMini.guideClickable { padding-right: 34px; }
    .guideClickable:active { transform: translateY(1px); }
    .guideClickable:hover { border-color: rgba(32,184,206,0.55); }
    .formulaBox {
      border: 1px solid var(--line);
      border-radius: var(--radius-md);
      background: var(--field);
      padding: 11px 12px;
      display: grid;
      gap: 5px;
      font-weight: 850;
      font-size: 0.86rem;
    }
    .formulaBox small { color: var(--muted); font-weight: 750; line-height: 1.35; }
    .exampleStack { display: grid; gap: 10px; }
    .exampleCard {
      border: 1px solid var(--line);
      border-radius: var(--radius-xl);
      background: var(--panel);
      padding: 14px;
      display: grid;
      gap: 10px;
    }
    .exampleRows { display: grid; gap: 6px; }
    .exampleRow { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 0.84rem; }
    .exampleRow:last-child { border-bottom: 0; }
    .exampleRow strong { color: var(--ink); white-space: nowrap; }
    .guideCallout {
      border: 1px solid #b9e4ee;
      border-radius: var(--radius-md);
      background: var(--blue-soft);
      color: var(--blue);
      padding: 10px 12px;
      font-size: 0.84rem;
      line-height: 1.4;
      font-weight: 750;
    }
    .guideChecklist { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
    .guideChecklist li { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 10px 12px; background: var(--panel-soft); color: var(--muted); font-size: 0.84rem; line-height: 1.35; }
    .guideChecklist b { color: var(--ink); }

    .emptyState { padding: 24px 14px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius-lg); background: var(--panel); font-weight: 750; }
    .note { color: var(--muted); font-size: 0.84rem; line-height: 1.42; }
    .importantNote { margin: 12px 0 0; padding: 10px 12px; border-radius: var(--radius-md); background: var(--blue-soft); color: var(--blue); border: 1px solid #cfe2f3; font-size: 0.82rem; line-height: 1.35; font-weight: 750; }

    .status { display: none; margin-top: 11px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--good-soft); color: var(--good); border: 1px solid #b7e4ca; font-size: 0.84rem; font-weight: 850; }
    .status.show { display: block; }


    body.menuOpen { overflow: hidden; }

    .searchPanel {
      position: fixed;
      inset: 0;
      z-index: 1200;
      display: none;
      background: rgba(16,24,40,0.36);
      padding: 0;
      overflow: hidden;
    }
    .searchPanel.show { display: block; }
    .menuSheet {
      width: min(680px, 100%);
      height: 100vh;
      height: 100dvh;
      max-height: 100vh;
      max-height: 100dvh;
      background: var(--bg);
      box-shadow: 20px 0 50px rgba(16,24,40,0.24);
      display: grid;
      grid-template-rows: auto minmax(0, 1fr);
      overflow: hidden;
    }
    .menuTop {
      background: linear-gradient(135deg, #083344 0%, #0e7490 100%);
      color: #fff;
      padding: 14px;
      display: grid;
      gap: 12px;
    }
    .menuIdentity { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
    .menuIdentity b { font-size: 1.05rem; }
    .menuSearch { position: relative; }
    .menuSearch input { padding-left: 38px; border: 0; background: var(--panel); }
    .menuSearch span { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
    .menuBody { min-height: 0; padding: 12px 12px calc(110px + env(safe-area-inset-bottom)); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
    .menuList { display: grid; gap: 8px; padding-bottom: 12px; }
    .menuItem {
      min-height: 58px;
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      border-radius: var(--radius-lg);
      background: var(--panel);
      box-shadow: var(--shadow-soft);
      text-align: left;
    }
    .menuItemLeft { display: flex; align-items: center; gap: 12px; min-width: 0; }
    .menuIcon { width: 28px; text-align: center; font-size: 1.05rem; }
    .menuLabel { min-width: 0; }
    .menuLabel b { display: block; font-size: 0.95rem; }
    .menuLabel small { display: block; color: var(--muted); font-size: 0.72rem; margin-top: 2px; }
    .menuArrow { font-size: 1.25rem; color: var(--muted); }

    .modalBackdrop {
      position: fixed;
      inset: 0;
      z-index: 80;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 16px;
      background: rgba(16,24,40,0.48);
    }
    .modalBackdrop.show { display: flex; }
    .modal {
      width: min(540px, 100%);
      overflow: hidden;
      border-radius: var(--radius-xl);
      border: 1px solid var(--line);
      background: var(--panel);
      box-shadow: 0 24px 80px rgba(16,24,40,0.28);
    }
    .modalHeader { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 15px 16px; border-bottom: 1px solid var(--line); }
    .modalHeader h3 { margin: 0; font-size: 1.08rem; }
    .modalBody { padding: 16px; }
    .modalBody ul { padding-left: 20px; }

    .guideDetailBackdrop {
      position: fixed;
      inset: 0;
      z-index: 86;
      display: none;
      align-items: flex-end;
      justify-content: center;
      padding: 12px;
      background: rgba(2, 6, 23, 0.58);
    }
    .guideDetailBackdrop.show { display: flex; }
    .guideDetailSheet {
      width: min(680px, 100%);
      max-height: min(82vh, 760px);
      border-radius: 28px 28px 20px 20px;
      background: var(--panel);
      color: var(--ink);
      border: 1px solid var(--line);
      box-shadow: 0 -18px 55px rgba(15, 23, 42, 0.32);
      overflow: hidden;
      display: grid;
      grid-template-rows: auto 1fr;
    }
    .guideDetailHeader {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 12px;
      padding: 18px 18px 12px;
      border-bottom: 1px solid var(--line);
      background: linear-gradient(135deg, rgba(32,184,206,0.16), rgba(255,255,255,0.02));
    }
    .guideDetailHeader h3 { margin: 0; font-size: 1.12rem; letter-spacing: -0.03em; line-height: 1.12; }
    .guideDetailHeader p { margin: 4px 0 0; color: var(--muted); font-size: 0.78rem; line-height: 1.35; font-weight: 750; }
    .guideDetailBody {
      overflow: auto;
      -webkit-overflow-scrolling: touch;
      padding: 14px;
      display: grid;
      gap: 12px;
    }
    .guideDetailBlock {
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      background: var(--panel-soft);
      padding: 12px;
      display: grid;
      gap: 8px;
    }
    .guideDetailBlock h4 { margin: 0; font-size: 0.96rem; letter-spacing: -0.02em; }
    .guideDetailBlock p { margin: 0; color: var(--muted); font-size: 0.86rem; line-height: 1.42; }
    .guideDetailList { margin: 0; padding-left: 18px; color: var(--muted); font-size: 0.86rem; line-height: 1.42; }
    .guideDetailList li { margin: 4px 0; }
    .guideDetailExample {
      border: 1px solid rgba(32,184,206,0.38);
      border-radius: var(--radius-lg);
      background: linear-gradient(135deg, rgba(32,184,206,0.12), var(--panel-soft));
      padding: 12px;
      display: grid;
      gap: 8px;
    }
    .guideDetailExample b { font-size: 0.9rem; }
    .guideDetailExample p { margin: 0; color: var(--muted); font-size: 0.84rem; line-height: 1.38; }
    html[data-theme="dark"] .guideDetailBackdrop { background: rgba(0,0,0,0.62); }
    html[data-theme="dark"] .guideDetailSheet { background: #0b171d; border-color: #22343d; box-shadow: 0 -18px 55px rgba(0,0,0,0.55); }

    .bottomNav {
      position: fixed;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: 60;
      min-height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
      padding-bottom: env(safe-area-inset-bottom);
      background: var(--top-gradient);
      border-top: 1px solid rgba(255,255,255,0.20);
      box-shadow: 0 -10px 26px rgba(16,24,40,0.18);
      display: flex;
      justify-content: center;
    }
    .bottomNavInner {
      width: min(620px, 100%);
      display: grid;
      grid-template-columns: repeat(4, minmax(0,1fr));
      padding: 6px 8px;
      gap: 4px;
    }
    .navBtn {
      min-height: 56px;
      border: 0;
      background: transparent;
      border-radius: 16px;
      display: grid;
      place-items: center;
      gap: 2px;
      padding: 6px 4px;
      color: rgba(255,255,255,0.74);
    }
    .navBtn .navIcon { font-size: 1.15rem; line-height: 1; }
    .navBtn span:last-child { font-size: 0.66rem; font-weight: 850; }
    .navBtn.active {
      color: #fff;
      background: rgba(255,255,255,0.18);
      box-shadow: inset 0 0 0 1px rgba(255,255,255,0.16);
    }



    .libraryToolbar {
      display: grid;
      grid-template-columns: 1fr 0.85fr 0.85fr;
      gap: 9px;
      margin-bottom: 12px;
    }

    .libraryStatsGrid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 9px;
      margin-bottom: 12px;
    }

    .libraryStatCard, .shiftCard {
      border: 1px solid var(--line);
      background: var(--panel-soft);
      border-radius: var(--radius-lg);
      padding: 12px;
      box-shadow: var(--shadow-soft);
    }

    .libraryStatCard small, .shiftCard small {
      display: block;
      color: var(--muted);
      font-size: 0.68rem;
      text-transform: uppercase;
      letter-spacing: 0.055em;
      font-weight: 950;
    }

    .libraryStatCard b {
      display: block;
      margin-top: 4px;
      font-size: 0.98rem;
      line-height: 1.15;
    }

    .libraryStatCard span {
      display: block;
      margin-top: 5px;
      color: var(--muted);
      font-size: 0.78rem;
      line-height: 1.25;
      font-weight: 750;
    }

    .shiftList {
      display: grid;
      gap: 9px;
    }

    .shiftCard {
      width: 100%;
      min-height: 96px;
      text-align: left;
      color: var(--ink);
      display: grid;
      gap: 9px;
    }

    .shiftCardTop {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      align-items: flex-start;
    }

    .shiftCardTitle {
      font-size: 1.05rem;
      font-weight: 950;
      letter-spacing: -0.02em;
    }

    .shiftCardSub {
      color: var(--muted);
      font-size: 0.78rem;
      line-height: 1.3;
      font-weight: 750;
    }

    .shiftEstimatePill {
      flex: 0 0 auto;
      border-radius: 999px;
      padding: 6px 9px;
      background: rgba(14,116,144,0.12);
      border: 1px solid rgba(14,116,144,0.26);
      color: var(--brand-dark);
      font-size: 0.72rem;
      font-weight: 950;
      white-space: nowrap;
    }

    html[data-theme="dark"] .shiftEstimatePill {
      color: #7de7f7;
      background: rgba(32,184,206,0.12);
      border-color: rgba(32,184,206,0.34);
    }

    .shiftMetaRow {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .shiftMetaRow .tag { margin: 0; }

    .libraryNote {
      margin: 0 0 12px;
      color: var(--muted);
      font-size: 0.82rem;
      line-height: 1.38;
    }

    .shiftDetailGrid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 9px;
      margin-bottom: 12px;
    }

    .shiftDetailMetric {
      padding: 11px;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: var(--panel-soft);
    }

    .shiftDetailMetric small {
      display: block;
      color: var(--muted);
      font-size: 0.68rem;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: 0.055em;
    }

    .shiftDetailMetric b {
      display: block;
      margin-top: 3px;
      font-size: 0.95rem;
    }

    .shiftEstimateList {
      display: grid;
      gap: 8px;
      margin: 10px 0 12px;
    }

    .shiftEstimateRow {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      align-items: center;
      padding: 11px;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: var(--panel-soft);
      font-weight: 900;
    }

    .shiftEstimateRow span {
      color: var(--muted);
      font-weight: 850;
    }



    .routeTimeline {
      display: grid;
      gap: 9px;
      margin-top: 12px;
    }

    .routeEvent {
      display: grid;
      grid-template-columns: 72px minmax(0, 1fr);
      gap: 10px;
      padding: 11px;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: var(--panel-soft);
    }

    .routeEventTime {
      font-size: 0.82rem;
      font-weight: 950;
      color: var(--brand);
      line-height: 1.25;
      word-break: keep-all;
    }

    html[data-theme="dark"] .routeEventTime { color: #7de7f7; }

    .routeEventBody { min-width: 0; }

    .routeEventKicker {
      display: inline-block;
      margin-bottom: 3px;
      color: var(--muted);
      font-size: 0.64rem;
      line-height: 1.2;
      font-weight: 950;
      text-transform: uppercase;
      letter-spacing: 0.055em;
    }

    .routeEventTitle {
      margin: 0 0 4px;
      font-size: 0.93rem;
      line-height: 1.22;
      font-weight: 950;
    }

    .routeEventDetail,
    .routeEventMeta,
    .routeEventNotes {
      margin: 3px 0 0;
      color: var(--muted);
      font-size: 0.78rem;
      line-height: 1.32;
      font-weight: 750;
    }

    .routeEventCodes {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 7px;
    }

    .routeEventCodes span {
      border-radius: 999px;
      padding: 4px 7px;
      background: rgba(14,116,144,0.10);
      border: 1px solid rgba(14,116,144,0.24);
      color: var(--brand-dark);
      font-size: 0.68rem;
      font-weight: 950;
    }

    html[data-theme="dark"] .routeEventCodes span {
      color: #7de7f7;
      background: rgba(32,184,206,0.10);
      border-color: rgba(32,184,206,0.30);
    }

    .shiftDetailActions {
      display: grid;
      grid-template-columns: 1fr;
      gap: 8px;
      margin-top: 10px;
    }

    .srOnly {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0,0,0,0);
      white-space: nowrap;
      border: 0;
    }



    .routeRefToolbar {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 10px;
      align-items: end;
      margin: 12px 0;
    }

    .routeRefSummary {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 9px;
      margin-bottom: 12px;
    }

    .routeRefSummaryCard {
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      background: var(--panel-soft);
      padding: 12px;
    }

    .routeRefSummaryCard small {
      display: block;
      color: var(--muted);
      font-size: 0.68rem;
      font-weight: 950;
      text-transform: uppercase;
      letter-spacing: 0.055em;
    }

    .routeRefSummaryCard b {
      display: block;
      margin-top: 4px;
      font-size: 1.08rem;
      letter-spacing: -0.02em;
    }

    .routeCodeTableWrap {
      overflow-x: visible;
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      background: var(--panel-soft);
    }

    .routeCodeCompact {
      display: block;
      width: 100%;
    }

    .routeCodeHeader,
    .routeCodeRow {
      display: grid;
      grid-template-columns: 70px minmax(0, 1fr) 58px 58px;
      gap: 7px;
      align-items: center;
      padding: 10px 10px;
    }

    .routeCodeHeader {
      color: var(--muted);
      font-size: 0.59rem;
      letter-spacing: 0.055em;
      text-transform: uppercase;
      font-weight: 950;
      background: rgba(14,116,144,0.08);
      border-bottom: 1px solid var(--line);
    }

    .routeCodeRow {
      min-height: 58px;
      border-bottom: 1px solid var(--line);
      font-size: 0.78rem;
    }

    .routeCodeRow:last-child { border-bottom: 0; }

    .routeCodeRoute {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 48px;
      max-width: 68px;
      border-radius: 999px;
      padding: 5px 8px;
      background: rgba(32,184,206,0.12);
      border: 1px solid rgba(32,184,206,0.28);
      color: var(--brand-dark);
      font-weight: 950;
      white-space: nowrap;
      line-height: 1;
    }

    html[data-theme="dark"] .routeCodeRoute { color: #7de7f7; }

    .routeCodeDest {
      min-width: 0;
      color: var(--ink);
      font-weight: 950;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      line-height: 1.18;
    }

    .routeCodeDest small {
      display: block;
      margin-top: 2px;
      color: var(--muted);
      font-size: 0.62rem;
      font-weight: 850;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .routeCodeCell {
      color: var(--brand-dark);
      font-weight: 950;
      white-space: nowrap;
      text-align: center;
      font-size: 0.78rem;
    }

    html[data-theme="dark"] .routeCodeCell { color: #7de7f7; }

    @media (max-width: 390px) {
      .routeCodeHeader,
      .routeCodeRow {
        grid-template-columns: 62px minmax(0, 1fr) 50px 50px;
        gap: 5px;
        padding-left: 8px;
        padding-right: 8px;
      }
      .routeCodeRoute { min-width: 42px; max-width: 60px; padding-left: 6px; padding-right: 6px; }
      .routeCodeCell { font-size: 0.72rem; }
      .routeCodeDest { font-size: 0.74rem; }
    }

    @media (min-width: 850px) {
      .homeGrid { display: grid; grid-template-columns: 0.94fr 1.06fr; gap: 14px; align-items: start; }
      .quickGrid { grid-template-columns: repeat(3, minmax(0,1fr)); }
      .homeQuickGrid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    }

    @media (max-width: 620px) {
      .topBarInner { padding-left: 12px; padding-right: 12px; }
      .appShell { padding-left: 10px; padding-right: 10px; }
      .moneyHeroTop { grid-template-columns: 1fr; padding: 16px; }
      .heroMetrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
      .quickGrid { grid-template-columns: repeat(2, minmax(0,1fr)); }
      .quickTile { min-height: 76px; }
      .quickTile.primaryTile { min-height: 88px; }
      .workflowActions { grid-template-columns: 1fr; }
      .homeProgressChips { gap: 4px; }
      .homeProgressChip { min-height: 42px; border-radius: 10px; }
      .miniDashboard, .weekGrid, .settingsGrid { grid-template-columns: 1fr; }
      .formGrid { grid-template-columns: 1fr 1fr; }
      .formGrid .full { grid-column: 1 / -1; }
      .entryFacts, .metricGrid { grid-template-columns: 1fr 1fr; }
      .entrySummaryPills { grid-template-columns: repeat(2, minmax(0,1fr)); }
      .entryDetailGrid { grid-template-columns: repeat(2, minmax(0,1fr)); }
      .entryPeriodTop { align-items:flex-start; }
      .periodScroller { grid-template-columns: repeat(2, minmax(0,1fr)); }
      .periodChoice { min-height: 88px; }
      .periodChoice.currentPeriod { order: -1; grid-column: 1 / -1; }
      .selectedPeriodSummary { align-items: flex-start; flex-direction: column; }
      .periodToolsRow, .periodActionsRow { grid-template-columns: 1fr; }
      .guideGrid { grid-template-columns: 1fr; }
      .libraryToolbar, .libraryStatsGrid, .shiftDetailGrid, .routeRefToolbar, .routeRefSummary { grid-template-columns: 1fr; }
      .serviceStatsSummary { grid-template-columns: repeat(2, minmax(0,1fr)); }
      .serviceInsightGrid { grid-template-columns: 1fr; }
      .routeEvent { grid-template-columns: 1fr; }
      .routeEventTime { font-size: 0.86rem; }
      .dayChips { gap: 5px; }
      .dayChip { min-height: 52px; border-radius: 11px; }
      .dayPrompt { grid-template-columns: 1fr; }
      #view-add .dayPrompt { top: 70px; }
      #view-add #entryForm > .btnRow { grid-template-columns: repeat(2, minmax(0,1fr)); }
      .promptActions { justify-content: stretch; }
      .promptActions button { flex: 1 1 66px; }
    }

    @media (max-width: 380px) {
      .brandText h1 { font-size: 1rem; }
      .brandText p { font-size: 0.72rem; }
      .formGrid { grid-template-columns: 1fr; }
      .entryFacts, .metricGrid { grid-template-columns: 1fr; }
      .entrySummaryPills, .entryDetailGrid { grid-template-columns: 1fr; }
    }
  

    /* v1.80 dashboard compact hero calendar cleanup */
    .moneyHeroTop {
      padding-bottom: 6px;
      gap: 8px;
    }
    .heroSideActions {
      align-self: start;
      padding-top: 2px;
    }
    .heroCalendarPanel.compactHeroCalendar {
      margin: 0 16px 10px;
      padding: 0;
      border: 0;
      border-radius: 0;
      background: transparent;
      box-shadow: none;
    }
    .compactHeroCalendarHeader {
      align-items: center;
      margin-bottom: 8px;
    }
    .compactHeroCalendarHeader b {
      font-size: .78rem;
      color: rgba(255,255,255,.76);
      letter-spacing: .01em;
    }
    .compactHeroCalendar .heroCalendarOpen {
      padding: 7px 11px;
      font-size: .66rem;
      background: rgba(255,255,255,.13);
      border-color: rgba(255,255,255,.18);
    }
    .compactHeroCalendar .homeProgressChips {
      gap: 4px;
    }
    .compactHeroCalendar .homeProgressChip {
      min-height: 47px;
      border-radius: 13px;
      padding: 5px 2px;
    }
    .compactHeroCalendar .homeProgressChip small {
      font-size: .56rem;
    }
    .compactHeroCalendar .homeProgressChip b {
      font-size: .9rem;
    }
    .heroCalendarHint.compactHeroHint {
      margin-top: 7px;
      font-size: .62rem;
      color: rgba(255,255,255,.54);
      line-height: 1.25;
    }
    .moneyHero .heroMetrics {
      margin-top: 2px;
    }
    @media (max-width: 620px) {
      .moneyHeroTop {
        grid-template-columns: minmax(0,1fr) auto;
        padding: 16px 16px 4px;
      }
      .heroSideActions { min-width: 92px; }
      .heroChartBtn { min-width: 86px; height: 46px; border-radius: 17px; }
      .moneyHero .statusPill.compact { min-width: 86px; }
      .heroCalendarPanel.compactHeroCalendar { margin: 0 16px 10px; }
      .heroCalendarHint.compactHeroHint { display: none; }
    }
    @media (max-width: 380px) {
      .heroSideActions { min-width: 82px; }
      .heroChartBtn { min-width: 78px; padding: 0 9px; }
      .heroChartBtn::after { font-size: .66rem; }
      .moneyHero .statusPill.compact { min-width: 78px; font-size: .68rem; }
      .compactHeroCalendar .homeProgressChip { min-height: 43px; }
    }

  

    /* v2.17 shift-entry overhaul: reduce sticky clutter and make the Add/Edit screen dropdown-first. */
    /* v2.19 menu overlay fix: menu must sit above add-entry sticky day card. */
    #view-add #entryForm {
      padding-bottom: 24px !important;
    }
    #view-add .dayPrompt {
      top: calc(var(--topbar-offset, 58px) + env(safe-area-inset-top)) !important;
      z-index: 92 !important;
      grid-template-columns: minmax(0, 1fr);
      gap: 6px;
      padding: 8px 9px !important;
      margin: -2px 0 8px !important;
      border-radius: 15px !important;
      box-shadow: 0 5px 14px rgba(16,24,40,0.08) !important;
    }
    #view-add .dayPrompt label {
      font-size: 0.62rem !important;
      line-height: 1;
    }
    #view-add .promptDate {
      font-size: 0.96rem !important;
      line-height: 1.05;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    #view-add .promptSub {
      display: none !important;
    }
    #view-add .entryQuickStats {
      margin-top: 4px !important;
      gap: 4px !important;
    }
    #view-add .entryQuickStats span {
      padding: 3px 5px !important;
      font-size: 0.62rem !important;
      line-height: 1.05 !important;
    }
    #view-add .promptActions {
      display: grid !important;
      grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
      gap: 4px !important;
    }
    #view-add .promptActions button {
      min-height: 32px !important;
      padding: 5px 4px !important;
      font-size: 0.72rem !important;
      border-radius: 11px !important;
    }
    body.menuOpen #view-add .dayPrompt {
      visibility: hidden !important;
      pointer-events: none !important;
    }

    /* v2.19 menu navigation fix: keep bottom navigation usable while Menu is open. */
    body.menuOpen .searchPanel.show {
      bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
      height: auto;
    }
    body.menuOpen .menuSheet {
      height: calc(100dvh - var(--bottom-nav-height) - env(safe-area-inset-bottom));
      max-height: calc(100dvh - var(--bottom-nav-height) - env(safe-area-inset-bottom));
    }
    body.menuOpen .bottomNav {
      z-index: 1300;
      display: flex !important;
    }
    body.menuOpen .menuBody {
      padding-bottom: calc(18px + env(safe-area-inset-bottom));
    }
    body.menuOpen #bottomMenuBtn {
      color: var(--brand);
      background: #ecfeff;
    }
    html[data-theme="dark"] body.menuOpen #bottomMenuBtn {
      background: rgba(20,184,166,0.14);
    }
    #view-add .entryTypePanel {
      padding: 9px !important;
      margin: 0 0 8px !important;
      border: 1px solid var(--line);
      border-radius: 18px;
      background: var(--panel-soft);
    }
    #view-add .entrySelectRow {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      align-items: start;
    }
    #view-add .entrySelectRow .entryField {
      margin: 0;
      min-width: 0;
    }
    #view-add .entryTypeGrid,
    #view-add #shiftPartField.shiftPartInline .shiftPartGrid,
    #view-add #shiftPartField.shiftPartInline .shiftPartHelp,
    #view-add .entryTypeHint,
    #view-add .entryGuideChips {
      display: none !important;
    }
    #view-add #shiftPartField.shiftPartInline {
      margin: 0 !important;
      padding: 0 !important;
      border: 0 !important;
      border-radius: 0 !important;
      background: transparent !important;
    }
    #view-add .entryFormGrid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px !important;
      align-items: start;
    }
    #view-add .entryFormGrid .entryField {
      min-width: 0;
    }
    #view-add .entryFormGrid input,
    #view-add .entryFormGrid select,
    #view-add .entrySelectRow select,
    #view-add #optionalEntryDetails input,
    #view-add #optionalEntryDetails select,
    #view-add #optionalEntryDetails textarea {
      min-height: 42px;
      font-size: 0.92rem;
    }
    #view-add .entryFormGrid label,
    #view-add .entrySelectRow label,
    #view-add #optionalEntryDetails label {
      font-size: 0.68rem !important;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      color: var(--muted);
      font-weight: 950;
    }
    #view-add .inputHelp {
      display: none !important;
    }
    #view-add #optionalEntryDetails summary {
      padding: 10px 12px !important;
      border-radius: 14px;
    }
    #view-add #entryForm > .btnRow {
      position: static !important;
      bottom: auto !important;
      z-index: auto !important;
      margin: 10px 0 0 !important;
      padding: 8px !important;
      grid-template-columns: repeat(2, minmax(0,1fr)) !important;
      border-radius: 16px !important;
      box-shadow: none !important;
      backdrop-filter: none !important;
    }
    #view-add #entryForm > .btnRow button {
      min-height: 42px !important;
      padding: 8px 7px !important;
      font-size: 0.78rem !important;
      border-radius: 13px !important;
    }
    #view-add .dayEntryHistory {
      margin-top: 10px;
      max-height: 190px;
      overflow: auto;
      -webkit-overflow-scrolling: touch;
    }
    #view-add .dayEntryHistory.empty {
      max-height: none;
    }
    #view-add .dayHistoryHeader,
    #view-add .dayHistoryStats {
      gap: 5px !important;
    }
    #view-add .dayHistoryCard {
      padding: 8px !important;
      gap: 6px !important;
    }
    #view-add .dayHistoryActions {
      gap: 5px !important;
    }
    #view-add .dayHistoryActions button {
      min-height: 30px !important;
      padding: 5px 6px !important;
      font-size: 0.68rem !important;
    }
    @media (max-width: 420px) {
      #view-add .entryFormGrid,
      #view-add .entrySelectRow {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
      #view-add .shiftNumberControl {
        grid-template-columns: minmax(0, 1fr) auto;
      }
      #view-add .entryFormGrid select,
      #view-add .entrySelectRow select {
        padding-left: 9px;
        padding-right: 28px;
      }
    }

  

    /* v2.20.3 subtle profile / workmate mode */
    .profileIconBtn {
      min-height: 34px;
      padding: 5px 8px 5px 5px;
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      gap: 7px;
      border: 1px solid rgba(255,255,255,0.20);
      background: rgba(255,255,255,0.12);
      color: #fff;
      box-shadow: none;
      max-width: 132px;
    }
    .profileIconBtn:active { transform: translateY(1px); }
    .profileIconAvatar {
      width: 24px;
      height: 24px;
      border-radius: 999px;
      display: grid;
      place-items: center;
      background: rgba(255,255,255,0.18);
      border: 1px solid rgba(255,255,255,0.18);
      font-size: .76rem;
      line-height: 1;
      flex: 0 0 auto;
    }
    .profileIconText {
      display: block;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: .72rem;
      font-weight: 950;
      letter-spacing: -.01em;
    }
    .profilePopoverBackdrop {
      position: fixed;
      inset: 0;
      z-index: 75;
      display: grid;
      align-items: start;
      justify-items: end;
      padding: calc(62px + env(safe-area-inset-top)) 12px 12px;
      background: rgba(2, 6, 23, .22);
      backdrop-filter: blur(3px);
    }
    .profilePopoverBackdrop[hidden] { display: none; }
    .profileSwitchCard {
      width: min(382px, 100%);
      border-radius: 22px;
      border: 1px solid var(--line);
      background: var(--panel);
      color: var(--ink);
      box-shadow: 0 20px 55px rgba(15,23,42,0.28);
      overflow: hidden;
    }
    .profileSwitchInner {
      padding: 13px;
      display: grid;
      gap: 10px;
    }
    .profileSwitchTop {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 10px;
    }
    .profileSwitchTop h3 { margin: 0; font-size: .95rem; letter-spacing: -.02em; }
    .profileSwitchTop p { margin: 3px 0 0; color: var(--muted); font-size: .73rem; line-height: 1.28; font-weight: 750; }
    .profileTopActions { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
    .profileBadge {
      min-width: 72px;
      text-align: center;
      border-radius: 999px;
      padding: 6px 9px;
      color: var(--brand-dark);
      background: var(--blue-soft);
      border: 1px solid rgba(14,116,144,.22);
      font-size: .68rem;
      font-weight: 950;
    }
    .profileCloseBtn {
      width: 32px;
      min-height: 32px;
      height: 32px;
      padding: 0;
      border-radius: 999px;
      display: grid;
      place-items: center;
      background: var(--panel-soft);
      border: 1px solid var(--line);
      color: var(--muted);
      font-size: 1.05rem;
      line-height: 1;
    }
    .profileSwitchGrid {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 10px;
      align-items: end;
    }
    .profileActions {
      display: grid;
      grid-template-columns: repeat(3, minmax(0,1fr));
      gap: 7px;
      align-items: center;
    }
    .profileActions button { white-space: nowrap; min-width: 0; padding-left: 8px; padding-right: 8px; font-size: .72rem; }
    .profileHint {
      margin: 5px 0 0;
      color: var(--muted);
      font-size: .68rem;
      line-height: 1.3;
      font-weight: 750;
    }
    .profileWarn {
      margin: 2px 0 0;
      padding: 8px 10px;
      border-radius: 14px;
      background: var(--warn-soft);
      color: var(--warn);
      font-size: .72rem;
      font-weight: 800;
      line-height: 1.35;
    }
    @media (max-width: 720px) {
      .profileIconBtn { max-width: 112px; }
      .profileIconText { max-width: 70px; }
      .profilePopoverBackdrop { justify-items: center; padding: calc(62px + env(safe-area-inset-top)) 10px 10px; }
      .profileSwitchCard { width: min(420px, 100%); }
    }




    /* v2.24 Backup Centre */
    .backupCentreCard {
      margin-top: 12px;
      padding: 12px;
      border-radius: var(--radius-lg);
      border: 1px solid var(--line);
      background: var(--panel);
      box-shadow: var(--shadow-soft);
    }
    .backupCentreHead {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: flex-start;
      margin-bottom: 10px;
    }
    .backupCentreHead h3 { margin: 0; font-size: 0.98rem; }
    .backupCentreHead p { margin: 3px 0 0; color: var(--muted); font-size: 0.78rem; line-height: 1.3; }
    .backupCentreGrid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0,1fr));
      gap: 8px;
    }
    .backupCentreGrid > div {
      padding: 10px;
      border-radius: var(--radius-md);
      border: 1px solid var(--line);
      background: var(--soft);
      display: grid;
      gap: 3px;
      min-width: 0;
    }
    .backupCentreGrid b { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
    .backupCentreGrid span { font-size: 0.82rem; font-weight: 850; overflow-wrap: anywhere; }
    .backupProfileSummary {
      margin-top: 10px;
      display: grid;
      gap: 6px;
    }
    .backupProfileRow {
      padding: 9px 10px;
      border-radius: var(--radius-md);
      border: 1px solid var(--line);
      background: var(--soft);
      display: flex;
      justify-content: space-between;
      gap: 10px;
      align-items: center;
      min-width: 0;
    }
    .backupProfileRow b { font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .backupProfileRow span { color: var(--muted); font-size: 0.76rem; font-weight: 750; text-align: right; overflow-wrap: anywhere; }
    .backupCentreControls { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
    #backupHealthPill.backupGood { background: rgba(15, 122, 69, 0.14); color: #0f7a45; border-color: rgba(15, 122, 69, 0.22); }
    #backupHealthPill.backupWarn { background: rgba(180, 83, 9, 0.14); color: #b45309; border-color: rgba(180, 83, 9, 0.22); }
    #backupHealthPill.backupDanger { background: rgba(185, 28, 28, 0.14); color: #b91c1c; border-color: rgba(185, 28, 28, 0.22); }
    html[data-theme="dark"] #backupHealthPill.backupGood { color: #7ee2a8; }
    html[data-theme="dark"] #backupHealthPill.backupWarn { color: #fbbf24; }
    html[data-theme="dark"] #backupHealthPill.backupDanger { color: #fca5a5; }
    @media (max-width: 520px) {
      .backupCentreGrid { grid-template-columns: 1fr; }
      .backupProfileRow { align-items: flex-start; flex-direction: column; }
      .backupProfileRow span { text-align: left; }
    }

    /* v2.23 PWA safety / update layer */
    .appStatusPill { cursor: pointer; font-family: inherit; }
    .pwaSafetyBanner {
      margin: 0 0 12px;
      padding: 12px;
      border-radius: var(--radius-lg);
      border: 1px solid var(--line);
      background: var(--panel);
      box-shadow: var(--shadow-soft);
      display: grid;
      grid-template-columns: auto minmax(0,1fr);
      gap: 10px;
      align-items: center;
    }
    .pwaSafetyBanner[hidden] { display: none !important; }
    .pwaSafetyIcon {
      width: 32px;
      height: 32px;
      border-radius: 999px;
      display: grid;
      place-items: center;
      font-weight: 950;
      color: #fff;
      background: var(--accent);
    }
    .pwaSafetyBanner.warn .pwaSafetyIcon { background: #b45309; }
    .pwaSafetyBanner.danger .pwaSafetyIcon { background: #b91c1c; }
    .pwaSafetyText { min-width: 0; display: grid; gap: 2px; }
    .pwaSafetyText b { font-size: 0.9rem; }
    .pwaSafetyText span { color: var(--muted); font-size: 0.78rem; line-height: 1.3; }
    .pwaSafetyActions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
    .pwaSafetyCard {
      margin-top: 12px;
      padding: 12px;
      border-radius: var(--radius-lg);
      border: 1px solid var(--line);
      background: var(--soft);
    }
    .pwaSafetyCardHead {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: flex-start;
      margin-bottom: 10px;
    }
    .pwaSafetyCardHead h3 { margin: 0; font-size: 0.98rem; }
    .pwaSafetyCardHead p { margin: 3px 0 0; color: var(--muted); font-size: 0.78rem; line-height: 1.3; }
    .pwaSafetyGrid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0,1fr));
      gap: 8px;
    }
    .pwaSafetyGrid > div {
      padding: 10px;
      border-radius: var(--radius-md);
      border: 1px solid var(--line);
      background: var(--panel);
      display: grid;
      gap: 3px;
      min-width: 0;
    }
    .pwaSafetyGrid b { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
    .pwaSafetyGrid span { font-size: 0.82rem; font-weight: 850; overflow-wrap: anywhere; }
    .pwaSafetyControls { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
    @media (max-width: 520px) {
      .pwaSafetyGrid { grid-template-columns: 1fr; }
    }

    /* v2.25 Payslip Evidence / Dispute Pack */
    .evidencePackCard { background: var(--panel); }
    .evidencePackTop { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: start; }
    .evidencePackTop p { margin-top: 4px; }
    .evidencePackText { width: 100%; min-height: 210px; resize: vertical; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-soft); color: var(--ink); padding: 10px 11px; font: 760 .74rem/1.42 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }
    .evidencePackText:focus { outline: 2px solid rgba(14,116,144,.18); border-color: var(--brand); }
    @media (max-width: 760px) {
      .evidencePackTop { grid-template-columns: 1fr; }
      .evidencePackText { min-height: 260px; font-size: .7rem; }
    }

/* v2.25.2 patch notes modal scroll fix */
.modalBackdrop {
  z-index: 2500;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
}
.modal {
  max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 28px);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.modalHeader {
  flex: 0 0 auto;
}
.modalBody {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}
@supports not (height: 100dvh) {
  .modal {
    max-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 28px);
  }
}
@media (max-width: 640px) {
  .modalBackdrop {
    align-items: flex-start;
    padding-top: calc(env(safe-area-inset-top) + 10px);
    padding-bottom: calc(env(safe-area-inset-bottom) + 10px);
  }
  .modal {
    width: 100%;
    max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 20px);
  }
}
