/* ═══════════════════════════════════════════════
   FTE Tracker — styles.css
   Design system re-skin per design/MOBBIN-AUDIT.md,
   visual target design/FTE-Tracker-Redesign.html.

   TOKENS: the block below is the single source of
   colour. Nothing else in this file may hard-code a
   colour, with one exception — the @media print
   rules, which are deliberately paper ink (black on
   white) and must not follow the screen theme.

   The theme attribute is written to #root (a div) by
   applyTheme() in js/ui.js, so the dark block is a
   plain [data-theme=dark] selector, NOT :root[...].
   ═══════════════════════════════════════════════ */

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

:root{
  color-scheme:light;
  --font:"Inter",ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --font-mono:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,monospace;

  /* ── surfaces — warm neutral with a faint green cast ── */
  --bg:#f3f4f3;
  --surface:#ffffff;
  --surface-2:#f8f9f8;
  --surface-3:#eaece9;
  --border:#e2e5e1;
  --border-2:#cbd0c8;

  /* ── text ── */
  --text:#131a17;
  --text-2:#454e49;
  --text-3:#6b756e;

  /* ── brand: the identity mark, chart fill, focus ring, spine ── */
  --brand:#3eb87a;

  /* ── accent: links, active nav, selection, small glyphs ── */
  --accent:#2a9460;
  --accent-ink:#16603c;
  --accent-bg:#eef8f2;
  --accent-br:#cfe9dc;

  /* ── primary button ground (5.3:1 on --on-ink) ── */
  --ink:#1f7b4e;
  --on-ink:#ffffff;

  /* ── the topbar plane: the only dark plane in the product ── */
  --nav:#0f2340;
  --nav-2:#1a3357;
  --nav-fg:#e7edf6;
  --nav-fg-2:#8fa4c2;

  /* ── status ── */
  --ok:#16603c;     --ok-bg:#eef8f2;     --ok-br:#cfe9dc;
  --warn:#8a5206;   --warn-bg:#fcf3e2;   --warn-br:#ecd8ab;
  --danger:#a8241a; --danger-bg:#fdece9; --danger-br:#f2c6c1;

  /* ── shape ── */
  --radius:8px;
  --radius-lg:12px;
  --radius-xl:16px;

  /* ── depth ladder: e1 card · e2 lifted · e3 overlay ── */
  --shadow-1:0 1px 2px rgba(19,26,23,.06);
  --shadow-2:0 4px 12px rgba(19,26,23,.08),0 1px 3px rgba(19,26,23,.05);
  --shadow-3:0 16px 44px rgba(10,14,12,.20);
  --overlay:rgba(10,14,12,.45);
  --shadow-overlay:var(--shadow-3);
  --shadow-pop:var(--shadow-2);

  /* ── fund / leave identity colours (never status, never green) ── */
  --rw:#a3376b;    --rw-bg:#fbeaf1;    --rw-br:#eec4d6;
  --sti:#1d6fa5;   --sti-bg:#e6f0f8;   --sti-br:#bcd8ea;
  --leave:#6d4fae; --leave-bg:#efeaf9; --leave-br:#d6cbee;
  --fund-4:#a8661a; --fund-4-bg:#fdf1e2; --fund-4-br:#efd5b0;
  --fund-x:#5b6472; --fund-x-bg:#f0f2f4; --fund-x-br:#d5dae0;

  /* Fund INK: the same identity, darkened only where it has to carry text
     (the 2-letter chip code). The base tokens above stay exactly as
     DIRECTION.md sets them and remain the fill colour for bars and dots.
     Only --fund-4 needed darkening: #a8661a is 4.1:1 on its own tint. */
  --rw-ink:var(--rw); --sti-ink:var(--sti); --leave-ink:var(--leave);
  --fund-4-ink:#7c4a0f; --fund-x-ink:var(--fund-x);

  /* Focus ring: --brand is 2.5:1 on white, below the 3:1 WCAG needs for a
     focus indicator, so light uses --accent (3.8:1) and dark --brand. */
  --ring:var(--accent);

  /* ── motion ── */
  --ease:cubic-bezier(.2,.8,.2,1);

  /* ═══ LEGACY ALIASES — every pre-redesign token name
     keeps working so no existing rule breaks. ═══ */
  --navy:var(--ink);
  --navy2:var(--text-2);
  --accent2:var(--accent-ink);
  --soft:var(--surface-2);
  --muted:var(--text-3);
  --card:var(--surface);
  --input-bg:var(--surface-2);
  --body-bg:var(--bg);
  --topbar-bg:var(--nav);
  --sidebar-bg:var(--surface);
  --entry-hover:var(--surface-2);
  --modal-bg-c:var(--surface);
}

[data-theme=dark]{
  color-scheme:dark;

  --bg:#0a0d0b;
  --surface:#121613;
  --surface-2:#171c19;
  --surface-3:#212822;
  --border:#242b26;
  --border-2:#343d37;

  --text:#e9ece9;
  --text-2:#b0b8b2;
  --text-3:#87918a;

  --brand:#4ecb8c;

  --accent:#3eb87a;
  --accent-ink:#6fd6a0;
  --accent-bg:#10261c;
  --accent-br:#1c4433;

  --ink:#3eb87a;
  --on-ink:#08130d;

  --nav:#0a1526;
  --nav-2:#152238;
  --nav-fg:#e7edf6;
  --nav-fg-2:#7d92b0;

  --ok:#6fd6a0;     --ok-bg:#10261c;     --ok-br:#1c4433;
  --warn:#e0a758;   --warn-bg:#2a1e0c;   --warn-br:#4a3517;
  --danger:#f08a7f; --danger-bg:#2c1210; --danger-br:#4d201c;

  --shadow-1:0 1px 2px rgba(0,0,0,.40);
  --shadow-2:0 4px 12px rgba(0,0,0,.46),0 1px 3px rgba(0,0,0,.36);
  --shadow-3:0 16px 44px rgba(0,0,0,.60);
  --overlay:rgba(0,0,0,.62);
  --shadow-overlay:var(--shadow-3);
  --shadow-pop:var(--shadow-2);

  --rw:#e089ae;    --rw-bg:#2f1522;    --rw-br:#4d2438;
  --sti:#6cb4e0;   --sti-bg:#0f2434;   --sti-br:#1d3c53;
  --leave:#a794db; --leave-bg:#241d38; --leave-br:#3b3057;
  --fund-4:#dda05a; --fund-4-bg:#2b1e0d; --fund-4-br:#4b3618;
  --fund-x:#8d98a6; --fund-x-bg:#1b2027; --fund-x-br:#333b45;
  --rw-ink:var(--rw); --sti-ink:var(--sti); --leave-ink:var(--leave);
  --fund-4-ink:var(--fund-4); --fund-x-ink:var(--fund-x);
  --ring:var(--brand);

  /* The legacy aliases MUST be restated here. A custom property is resolved
     where it is declared, so --navy:var(--ink) declared on :root would keep
     the light value even after --ink changes on this element. */
  --navy:var(--ink);
  --navy2:var(--text-2);
  --accent2:var(--accent-ink);
  --soft:var(--surface-2);
  --muted:var(--text-3);
  --card:var(--surface);
  --input-bg:var(--surface-2);
  --body-bg:var(--bg);
  --topbar-bg:var(--nav);
  --sidebar-bg:var(--surface);
  --entry-hover:var(--surface-2);
  --modal-bg-c:var(--surface);
  --ease:cubic-bezier(.2,.8,.2,1);
}

html,body{height:100%;margin:0;padding:0}
body{font-family:var(--font);font-size:13px;line-height:1.45;background:var(--bg);color:var(--text);height:100%;overflow:hidden;-webkit-font-smoothing:antialiased;transition:background .2s,color .2s}
.screen{display:none;width:100%;height:100vh;overflow:hidden}
.screen.active{display:flex;height:100vh}

/* AUTH */
.auth-wrap{flex:1;display:flex;align-items:center;justify-content:center;background:var(--bg);height:100vh;position:relative;overflow:hidden}
.auth-box{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:32px;width:400px;position:relative;z-index:2;transition:background .2s;max-height:92vh;overflow-y:auto}
.auth-logo{text-align:center;margin-bottom:22px}
.auth-logo .brand{font-family:var(--font);font-size:18px;font-weight:600;color:var(--text);letter-spacing:-.01em}
.auth-logo .sub{font-size:11px;color:var(--text-3);letter-spacing:.14em;text-transform:uppercase;margin-top:4px;font-weight:600}
.dot{width:7px;height:7px;background:var(--accent);border-radius:50%;display:inline-block;margin:0 5px;vertical-align:middle}
.auth-title{font-size:18px;font-weight:600;color:var(--text);letter-spacing:-.01em;margin-bottom:4px}
.auth-desc{font-size:13px;color:var(--muted);margin-bottom:20px}
.field{margin-bottom:14px}
.field label{font-size:11px;font-weight:600;color:var(--text-3);text-transform:uppercase;letter-spacing:.06em;display:block;margin-bottom:6px}
.field input,.field select,.field textarea{width:100%;padding:9px 12px;border:1px solid var(--border-2);border-radius:var(--radius);font-size:13px;font-family:var(--font);color:var(--text);background:var(--surface);outline:none;transition:border-color .15s,background .2s,color .2s}
.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-bg)}
.field.error input,.field.error select{border-color:var(--danger)}
.err-msg{font-size:12px;color:var(--danger);margin-top:4px;display:none}
.field.error .err-msg{display:block}
.field select{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23646b7a' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;cursor:pointer}
.field textarea{resize:vertical;min-height:70px}
.half-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.btn-primary{width:100%;padding:11px;background:var(--ink);color:var(--on-ink);border:1px solid var(--ink);border-radius:var(--radius);font-size:13px;font-weight:600;font-family:var(--font);cursor:pointer;transition:opacity .15s;letter-spacing:0}
.btn-primary:hover{opacity:.9}
.btn-primary:active{opacity:.82}
.btn-primary:disabled,.btn-save:disabled,.btn-outline:disabled{opacity:.5;cursor:not-allowed}
.btn-accent{background:var(--ink)!important;color:var(--on-ink)!important;border-color:var(--ink)!important}
.btn-accent:hover{opacity:.9}
.btn-outline{width:100%;padding:11px;background:var(--surface);color:var(--text);border:1px solid var(--border-2);border-radius:var(--radius);font-size:13px;font-weight:500;font-family:var(--font);cursor:pointer;transition:background .15s,border-color .15s;margin-top:8px}
.btn-outline:hover{background:var(--surface-2)}
.auth-switch{text-align:center;margin-top:14px;font-size:13px;color:var(--muted)}
.auth-switch a{color:var(--accent);cursor:pointer;font-weight:500}
.pw-strength{margin-top:6px}
.pw-bars{display:flex;gap:4px;margin-bottom:4px}
.pw-bar{flex:1;height:3px;border-radius:3px;background:var(--border);transition:background .3s}
.pw-bar.weak{background:var(--danger)}
.pw-bar.fair{background:var(--warn)}
.pw-bar.strong{background:var(--ok)}
.pw-label{font-size:12px;color:var(--muted)}
.token-box{background:var(--accent-bg);border:1px solid var(--accent-br);border-radius:var(--radius-lg);padding:14px 16px;margin:14px 0;text-align:center}
.token-code{font-size:26px;font-weight:700;letter-spacing:8px;color:var(--accent-ink);font-family:var(--font-mono);font-variant-numeric:tabular-nums;margin:8px 0}
.token-meta{font-size:12px;color:var(--muted)}
.token-timer{font-size:13px;font-weight:600;color:var(--warn);margin-top:6px}
.info-banner{background:var(--sti-bg);border:1px solid var(--sti-br);border-radius:var(--radius);padding:11px 14px;font-size:12px;color:var(--sti);margin-bottom:14px;line-height:1.5}

/* APP */
.app-wrap{flex:1;display:flex;flex-direction:column;height:100vh;overflow:hidden;background:var(--body-bg);transition:background .25s}
.topbar{background:var(--nav);color:var(--nav-fg);border-bottom:1px solid var(--nav-2);box-shadow:none;display:flex;align-items:center;justify-content:space-between;padding:0 20px;height:52px;flex-shrink:0;position:relative;z-index:20}
.topbar-brand{font-family:var(--font);font-size:14px;font-weight:600;letter-spacing:-.015em;color:var(--nav-fg)}
.topbar-brand span{color:var(--brand)}
.topbar-right{display:flex;align-items:center;gap:10px}
.topbar-user{font-size:12px;color:var(--nav-fg-2)}
.topbar-user strong{color:var(--nav-fg);font-weight:600}
/* controls that sit ON the navy plane read out of the nav ramp, not the page ramp */
.topbar .btn-sm{background:transparent;border-color:var(--nav-2);color:var(--nav-fg-2)}
.topbar .btn-sm:hover{background:var(--nav-2);color:var(--nav-fg)}
.topbar .btn-sm.accent{color:var(--brand);border-color:var(--nav-2)}
.topbar .btn-sm.accent:hover{background:var(--nav-2);color:var(--brand)}
.topbar .btn-sm.danger,.topbar .btn-sm.btn-reset{border-color:var(--nav-2);color:var(--nav-fg-2)}
.topbar .btn-sm.danger:hover,.topbar .btn-sm.btn-reset:hover{background:var(--nav-2);color:var(--nav-fg)}
.topbar .notif-bell{color:var(--nav-fg-2)}
.topbar .notif-bell:hover{background:var(--nav-2);color:var(--nav-fg)}
.topbar *:focus-visible{outline-color:var(--brand)!important}
/* horizontal nav items rendered into the topbar (13px/600, brand rule on the bar's edge) */
.topbar .nav-item{color:var(--nav-fg-2);font-size:13px;font-weight:600;height:52px;border-radius:0;margin-bottom:0;align-self:stretch;padding:0 12px}
.topbar .nav-item:hover{background:var(--nav-2);color:var(--nav-fg)}
.topbar .nav-item.active{background:transparent;color:var(--nav-fg)}
.topbar .nav-item.active::before{content:'';position:absolute;left:0;right:0;bottom:0;top:auto;width:auto;height:3px;background:var(--brand);border-radius:0}
.btn-sm{padding:5px 11px;border-radius:var(--radius);font-size:12px;font-family:var(--font);cursor:pointer;font-weight:500;border:1px solid var(--border-2);background:var(--surface);color:var(--text);transition:background .15s,border-color .15s}
.btn-sm:hover{background:var(--surface-2)}
.btn-sm.btn-reset{border-color:var(--danger-br);color:var(--danger)}
.btn-sm.btn-reset:hover{background:var(--danger-bg);color:var(--danger)}
.btn-sm.danger{border-color:var(--danger-br);color:var(--danger)}
.btn-sm.danger:hover{background:var(--danger-bg)}
.btn-sm.accent{border-color:var(--border-2);color:var(--accent-ink)}
.btn-sm.accent:hover{background:var(--accent-bg);color:var(--accent-ink)}
.app-body{flex:1;display:flex;overflow:hidden}

/* SIDEBAR */
.sidebar{width:240px;background:var(--surface);border-right:1px solid var(--border);display:flex;flex-direction:column;padding:14px 0;overflow-y:auto;flex-shrink:0;transition:background .2s,border-color .2s}
.sidebar-sect{padding:0 16px;margin-bottom:18px}
.sidebar-label{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--text-3);margin-bottom:8px}
.fund-card{background:var(--surface);border-radius:var(--radius);padding:11px;margin-bottom:8px;border:1px solid var(--border);transition:background .2s}
.fund-card-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:3px}
.fund-name{font-size:13px;font-weight:600;color:var(--text)}
.fund-tag{font-size:11px;font-weight:700;border-radius:5px;padding:2px 6px;letter-spacing:.5px}
.tag-rw{background:var(--danger-bg);color:var(--rw)}
.tag-sti{background:var(--sti-bg);color:var(--sti)}
.tag-generic{background:var(--surface-3);color:var(--muted)}
.fund-sub{font-size:12px;color:var(--muted);margin-bottom:8px}
.fund-bar-wrap{height:4px;background:var(--surface-3);border-radius:2px;overflow:hidden}
.fund-bar{height:100%;border-radius:3px;transition:width .5s}
.fund-bar.rw-bar{background:var(--rw)}
.fund-bar.sti-bar{background:var(--sti)}
.fund-bar.generic-bar{background:var(--accent)}
.fund-nums{display:flex;justify-content:space-between;margin-top:5px;font-size:12px;color:var(--muted)}
.nav-item{display:flex;align-items:center;gap:10px;height:34px;padding:0 10px;border-radius:var(--radius);cursor:pointer;font-size:13px;font-weight:500;color:var(--text-2);transition:background .15s,color .15s;margin-bottom:2px;position:relative}
.nav-item:hover{background:var(--surface-2);color:var(--text)}
.nav-item.active{background:var(--accent-bg);color:var(--accent-ink);font-weight:600}
/* THE GREEN SPINE — a 3px leading rule on the active thing */
.nav-item.active::before{content:'';position:absolute;left:-6px;top:5px;bottom:5px;width:3px;background:var(--accent);border-radius:2px}
.nav-item svg{flex-shrink:0}
.nav-badge{margin-left:auto;background:var(--danger-bg);color:var(--danger);border:1px solid var(--danger-br);font-size:11px;font-weight:600;font-variant-numeric:tabular-nums;min-width:18px;height:18px;border-radius:9px;display:inline-flex;align-items:center;justify-content:center;padding:0 5px;flex-shrink:0}
.nav-badge.warn{background:var(--warn-bg);color:var(--warn);border-color:var(--warn-br)}
.sidebar-week{background:var(--surface);border-radius:var(--radius);padding:12px;margin:0 16px 14px;border:1px solid var(--border)}
.sidebar-week-label{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--text-3);margin-bottom:8px}
.sw-row{display:flex;justify-content:space-between;font-size:12px;color:var(--muted);margin-bottom:4px}
.sw-row strong{color:var(--text);font-weight:600}
.sw-bar-wrap{height:4px;background:var(--surface-3);border-radius:2px;overflow:hidden;margin-top:8px}
.sw-bar{height:100%;background:var(--ink);border-radius:2px;transition:width .4s;width:0%}
.sidebar-hint{font-size:12px;color:var(--muted);padding:0 16px 14px;line-height:1.5}
.btn-import-entry{display:flex;align-items:center;justify-content:center;gap:6px;width:calc(100% - 32px);margin:0 16px 10px;padding:9px 14px;border-radius:var(--radius);border:1px dashed var(--border);background:transparent;color:var(--muted);font-size:12px;font-weight:600;font-family:var(--font);cursor:pointer;transition:all .2s}
.btn-import-entry:hover{border-color:var(--border-2);color:var(--text);background:var(--surface-2)}
.btn-new-entry{display:flex;align-items:center;justify-content:center;gap:6px;width:calc(100% - 32px);margin:0 16px;padding:9px 14px;border-radius:var(--radius);border:1px solid var(--ink);background:var(--ink);color:var(--on-ink);font-size:13px;font-weight:600;font-family:var(--font);cursor:pointer;transition:opacity .15s}
.btn-new-entry:hover{opacity:.9}

.main-content{flex:1;overflow-y:auto;overflow-x:hidden;padding:24px;transition:background .25s;-webkit-overflow-scrolling:touch;scroll-behavior:auto;will-change:scroll-position;contain:strict;}
.main-content::-webkit-scrollbar{width:5px}
.main-content::-webkit-scrollbar-track{background:transparent}
.main-content::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}
.main-content::-webkit-scrollbar-thumb:hover{background:var(--muted)}

/* CALENDAR */
.cal-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;flex-wrap:wrap;gap:10px}
.cal-title{font-size:20px;font-weight:600;color:var(--text);letter-spacing:-.01em}
.cal-controls{display:flex;align-items:center;gap:8px}
.cal-nav-btn{background:var(--surface);border:1px solid var(--border-2);border-radius:var(--radius);width:32px;height:32px;display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--text-2);transition:background .15s,color .15s;font-size:13px}
.cal-nav-btn:hover{background:var(--surface-2);color:var(--text)}
.month-nav-label{font-size:13px;font-weight:600;color:var(--text);min-width:110px;text-align:center}
.cal-today-btn{height:32px;padding:0 12px;border-radius:var(--radius);border:1px solid var(--border-2);background:var(--surface);font-size:12px;font-weight:500;font-family:var(--font);color:var(--text-2);cursor:pointer;transition:background .15s,color .15s}
.cal-today-btn:hover{background:var(--surface-2);color:var(--text)}
.cal-grid-wrap{background:var(--surface);border-radius:var(--radius-lg);border:1px solid var(--border);overflow:hidden;transition:background .2s}
.cal-dow-row{display:grid;grid-template-columns:48px repeat(7,1fr);background:var(--surface-2);border-bottom:1px solid var(--border);padding:8px 0}
.cal-dow{text-align:center;font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--text-3)}
.cal-dow.weekend{color:var(--text-3)}
.cal-grid{display:grid;grid-template-columns:48px repeat(7,1fr)}
.cal-cell{min-height:90px;padding:8px;border-right:1px solid var(--border);border-bottom:1px solid var(--border);position:relative;cursor:pointer;transition:background .15s}
.cal-cell:nth-child(8n){border-right:none}
/* leading per-week quota cell (gear sets that week's override) */
.cal-week{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;background:var(--soft);border-right:1px solid var(--border);border-bottom:1px solid var(--border);padding:6px 3px;cursor:pointer;transition:background .15s}
.cal-week:hover{background:var(--surface-2)}
.cal-week.sel-week{background:var(--accent-bg)}
.cal-week-quota{font-size:11px;font-weight:800;color:var(--muted);line-height:1;letter-spacing:.3px}
.cal-week.has-override .cal-week-quota{color:var(--accent-ink)}
.cal-week-gear{width:22px;height:22px;border-radius:6px;border:1px solid var(--border);background:var(--card);color:var(--muted);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;transition:border-color .15s,color .15s}
.cal-week-gear:hover{border-color:var(--border-2);color:var(--text);background:var(--surface-2)}
.cal-week.has-override .cal-week-gear{border-color:var(--accent-br);color:var(--accent-ink)}
.cal-cell:hover{background:var(--surface-2)}
.cal-cell.other-month{opacity:.4}
.cal-cell.today .cal-day-num{background:var(--ink);color:var(--on-ink);border-radius:50%;width:22px;height:22px;display:flex;align-items:center;justify-content:center}
.cal-cell.selected{background:var(--accent-bg);box-shadow:inset 0 0 0 2px var(--accent)}
.cal-cell.selected .cal-day-num{background:var(--ink);color:var(--on-ink);border-radius:50%;width:22px;height:22px;display:flex;align-items:center;justify-content:center}
.cal-cell.weekend-cell{background:var(--surface-2)}
.cal-cell.day-complete{border-top:2px solid var(--ok)}
.cal-cell.day-over{border-top:2px solid var(--danger)}
.cal-cell.day-incomplete{border-top:2px solid var(--warn)}
.cal-day-num{font-size:12px;font-weight:600;color:var(--text);margin-bottom:4px;line-height:1}
/* compact chips that flow left→right and wrap (more per row, not one full line each) */
.cal-entries{display:flex;flex-flow:row wrap;gap:3px;margin-top:4px}
.cal-entry-pill{display:inline-flex;align-items:center;gap:3px;padding:1px 6px;border-radius:5px;white-space:nowrap;border:1px solid transparent;line-height:1.5;max-width:100%}
.cal-entry-pill .pill-fund{font-size:11px;font-weight:800;letter-spacing:.3px;text-transform:uppercase;overflow:hidden;text-overflow:ellipsis;max-width:78px}
.cal-entry-pill .status-ico{flex-shrink:0}
/* leave / license chips = black (light text on dark in dark mode) */
.cal-entry-pill.leave-pill{background:var(--leave-bg);border-color:var(--leave-br);color:var(--leave)}
/* status styling: pending = 50% dim · rejected = bright red + pulsing (something's wrong) */
.cal-entry-pill.cal-pill-pending{opacity:.5}
.cal-entry-pill.cal-pill-rejected{background:var(--danger-bg) !important;border-color:var(--danger) !important;color:var(--danger) !important}
.cal-entry-pill.cal-pill-rejected .pill-fund,.cal-entry-pill.cal-pill-rejected .status-ico{color:var(--danger) !important}
.cal-entry-pill.cal-pill-rejected .pill-fund{text-decoration:line-through;text-decoration-thickness:1px}
.pill-rw{background:var(--rw-bg);color:var(--rw);border-color:var(--rw-br)}
.pill-sti{background:var(--sti-bg);color:var(--sti);border-color:var(--sti-br)}
.pill-generic{background:var(--accent-bg);color:var(--accent-ink);border-color:var(--accent-br)}
[data-theme=dark] .pill-rw{background:var(--rw-bg);border-color:var(--rw-br)}
[data-theme=dark] .pill-sti{background:var(--sti-bg);border-color:var(--sti-br)}
.day-total-badge{position:absolute;bottom:5px;right:6px;font-size:11px;font-weight:700;color:var(--muted)}
.cal-add-btn{position:absolute;bottom:4px;left:5px;background:none;border:none;color:var(--text-3);font-size:16px;cursor:pointer;padding:0;line-height:1;opacity:0;transition:opacity .2s}
.cal-cell:hover .cal-add-btn{opacity:1}
.cal-legend{display:flex;gap:18px;margin-top:12px;flex-wrap:wrap}
.legend-item{display:flex;align-items:center;gap:5px;font-size:12px;color:var(--muted)}
.legend-dot{width:8px;height:8px;border-radius:50%}
.entries-panel{background:var(--surface);border-radius:var(--radius-lg);border:1px solid var(--border);padding:18px;margin-top:16px;transition:background .2s}
.entries-panel-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
.entries-panel-title{font-size:15px;font-weight:600;color:var(--text)}
.entry-row{display:flex;align-items:center;gap:12px;padding:9px 12px;border-radius:var(--radius);border:1px solid var(--border);margin-bottom:6px;background:var(--surface);transition:background .15s}
.entry-row:hover{background:var(--surface-2)}
.entry-row-clickable{cursor:pointer}
.entry-row-clickable:hover .entry-activity{color:var(--text)}
.entry-activity{font-size:13px;font-weight:600;color:var(--text);transition:color .15s}
.entry-desc{font-size:12px;color:var(--muted);margin-top:2px}
.entry-fund-tag{font-size:11px;font-weight:700;padding:3px 8px;border-radius:6px;white-space:nowrap;flex-shrink:0}
.entry-dur{font-size:13px;font-weight:700;color:var(--text);white-space:nowrap;margin-left:auto}
.entry-del{background:none;border:none;color:var(--muted);cursor:pointer;font-size:11px;padding:3px 7px;border-radius:6px;transition:all .2s;font-family:var(--font)}
.entry-del:hover{background:var(--danger-bg);color:var(--danger)}
.empty-state{text-align:center;padding:30px;color:var(--muted);font-size:13px}
.section-title{font-size:16px;font-weight:600;color:var(--text);letter-spacing:-.01em;margin-bottom:14px}

/* ENTRY STATUS ICONS (pending / approved / rejected) */
.status-ico{line-height:1;flex-shrink:0;font-size:12px}
.st-pending{color:var(--warn)}
.st-approved{color:var(--ok)}
.st-rejected{color:var(--danger)}
.cal-entry-pill .status-ico{font-size:11px}
.lock-badge{display:inline-flex;align-items:center;gap:4px;font-size:11px;font-weight:600;color:var(--text-2);background:var(--surface-3);border:1px solid var(--border);border-radius:5px;padding:2px 7px;white-space:nowrap}
.edited-badge{display:inline-flex;align-items:center;gap:4px;padding:3px 9px;border-radius:6px;font-size:11px;font-weight:700;background:var(--warn-bg);border:1px solid var(--warn-br);color:var(--warn);white-space:nowrap}

/* MODAL */
.modal-overlay{display:none;position:fixed;inset:0;background:var(--overlay);z-index:100;align-items:center;justify-content:center;backdrop-filter:blur(3px)}
.modal-overlay.open{display:flex}
.modal{background:var(--surface);border:1px solid var(--border-2);border-radius:var(--radius-lg);padding:20px;width:440px;max-width:95vw;max-height:88vh;overflow-y:auto;box-shadow:var(--shadow-overlay);transition:background .2s}
.modal-title{font-size:15px;font-weight:600;color:var(--text);margin-bottom:4px;display:flex;align-items:center;gap:8px}
.modal-sub{font-size:12px;color:var(--muted);margin-bottom:18px}
.modal-actions{display:flex;gap:10px;margin-top:16px}
.btn-cancel{flex:1;padding:10px;background:var(--surface);color:var(--text-2);border:1px solid var(--border-2);border-radius:var(--radius);font-size:13px;font-weight:500;font-family:var(--font);cursor:pointer;transition:background .15s}
.btn-cancel:hover{background:var(--surface-2);color:var(--text)}
.btn-save{flex:2;padding:10px;background:var(--ink);color:var(--on-ink);border:1px solid var(--ink);border-radius:var(--radius);font-size:13px;font-weight:600;font-family:var(--font);cursor:pointer;transition:opacity .15s}
.btn-save:hover{opacity:.9}
.time-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.dur-display{text-align:center;padding:6px;font-size:13px;font-weight:600;color:var(--text);font-variant-numeric:tabular-nums;background:var(--surface-2);border-radius:var(--radius);margin-top:5px;border:1px solid var(--border)}
/* Work / License segmented toggle in the entry modal */
.seg-toggle{display:flex;gap:2px;background:var(--surface-2);border:1px solid var(--border-2);border-radius:var(--radius);padding:2px;margin-bottom:14px}
.seg-btn{flex:1;padding:7px;border:1px solid transparent;background:transparent;border-radius:5px;font-size:12px;font-weight:500;font-family:var(--font);color:var(--text-2);cursor:pointer;transition:background .15s,color .15s}
.seg-btn.active{background:var(--surface);color:var(--text);border-color:var(--border-2);font-weight:600}

/* ── entry modal v3: time blocks, type-ahead combos, hours drag ── */
.fund-block{background:var(--soft);border-radius:var(--radius-lg);border:1px solid var(--border);padding:12px 13px;margin-bottom:10px}
.fb-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}
.block-x{background:none;border:none;color:var(--muted);cursor:pointer;font-size:21px;line-height:1;padding:0 4px;transition:color .15s}
.block-x:hover{color:var(--danger)}
.fb-x-row{display:flex;justify-content:flex-end;margin:-4px -4px 2px}
.ent-cap{font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.7px;display:block;margin:10px 0 5px}
.fund-block .ent-cap:first-of-type{margin-top:2px}
.ent-combo{width:100%;padding:9px 12px;border:1px solid var(--border-2);border-radius:var(--radius);font-size:13px;font-family:var(--font);color:var(--text);background:var(--input-bg);outline:none}
.ent-combo:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-bg)}
/* modern dropdown (styled native select) for the entry form */
.ent-select{width:100%;padding:10px 38px 10px 12px;border:1px solid var(--border-2);border-radius:var(--radius);font-size:14px;font-weight:500;font-family:var(--font);color:var(--text);background-color:var(--input-bg);outline:none;cursor:pointer;-webkit-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23646b7a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 14px center;transition:border-color .15s,box-shadow .15s,background-color .25s}
.ent-select:hover{border-color:var(--border-2)}
.ent-select:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-bg)}
.ent-select.is-empty{color:var(--muted)}
.ent-select option{background:var(--input-bg);color:var(--text);font-weight:500}
.ent-select option[value=""]{color:var(--muted)}
.add-block-btn{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;padding:9px 14px;margin-bottom:14px;border-radius:var(--radius);border:1px dashed var(--border);background:transparent;color:var(--muted);font-size:13px;font-weight:600;font-family:var(--font);cursor:pointer;transition:all .2s}
.add-block-btn:hover{border-color:var(--border-2);color:var(--text);background:var(--surface-2)}
.hb-tip{font-size:12px;color:var(--muted);text-align:center;margin:2px 0 12px}

.hb{margin-top:14px}
.hb-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.hb-cap{font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.7px}
.hb-typewrap{display:inline-flex;align-items:center;gap:4px}
.hb-num{width:64px;padding:5px 8px;border:1px solid var(--border-2);border-radius:var(--radius);text-align:right;font-size:14px;font-weight:600;font-variant-numeric:tabular-nums;font-family:var(--font);color:var(--text);background:var(--surface);outline:none}
.hb-num:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-bg)}
.hb-unit{font-size:12px;color:var(--muted);font-weight:600}
.hb-range{-webkit-appearance:none;appearance:none;width:100%;height:22px;background:transparent;outline:none;cursor:pointer;margin:0}
.hb-range::-webkit-slider-runnable-track{height:10px;border-radius:6px;
  background:linear-gradient(to right,var(--accent) 0,var(--accent) var(--pct,100%),var(--border) var(--pct,100%),var(--border) 100%)}
.hb-range.ot::-webkit-slider-runnable-track{
  background:linear-gradient(to right,var(--accent2) 0,var(--warn) var(--pct,100%),var(--border) var(--pct,100%),var(--border) 100%)}
.hb-range::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;margin-top:-5px;width:20px;height:20px;border-radius:50%;background:var(--surface);border:3px solid var(--ink)}
.hb-range.ot::-webkit-slider-thumb{border-color:var(--warn)}
.hb-range::-moz-range-track{height:10px;border-radius:6px;background:var(--border)}
.hb-range::-moz-range-progress{height:10px;border-radius:6px;background:var(--accent)}
.hb-range.ot::-moz-range-progress{background:var(--warn)}
.hb-range::-moz-range-thumb{width:18px;height:18px;border:3px solid var(--ink);border-radius:50%;background:var(--surface)}
.hb-scale{position:relative;height:13px;margin-top:7px;font-size:12px;color:var(--muted)}
.hb-scale span{position:absolute;transform:translateX(-50%);white-space:nowrap}
.hb-scale span:first-child{transform:translateX(0)}
.hb-scale span:last-child{transform:translateX(-100%)}
.hb-otline{display:flex;justify-content:center;margin-top:12px}
.hb-ot{padding:5px 18px;border-radius:var(--radius);border:1px solid var(--border);background:transparent;color:var(--muted);font-size:11px;font-weight:700;font-family:var(--font);cursor:pointer;transition:all .15s}
.hb-ot:hover{border-color:var(--warn)}
.hb-ot.on{border-color:var(--warn-br);background:var(--warn-bg);color:var(--warn)}
/* per-block Work / Leave toggle */
.blk-seg{display:flex;gap:2px;flex:1;background:var(--surface-2);border:1px solid var(--border-2);border-radius:var(--radius);padding:2px}
.blk-seg-btn{flex:1;padding:5px;border:1px solid transparent;background:transparent;border-radius:4px;font-size:12px;font-weight:500;font-family:var(--font);color:var(--text-2);cursor:pointer;transition:background .15s,color .15s}
.blk-seg-btn.active{background:var(--surface);color:var(--text);border-color:var(--border-2);font-weight:600}
/* native custom-color picker (funds: wizard + manage) */
input.color-pick{width:32px!important;height:32px;flex:0 0 auto;min-width:0;padding:0;border:1px solid var(--border);border-radius:var(--radius);background:none;cursor:pointer}
input.color-pick::-webkit-color-swatch-wrapper{padding:3px}
input.color-pick::-webkit-color-swatch{border:none;border-radius:5px}
/* manage rows: "In use" tag + "Option" popup menu (same size) */
.mg-opt,.mg-inuse{display:inline-flex;align-items:center;justify-content:center;height:30px;font-size:12px;font-weight:600;font-family:var(--font);padding:0 14px;border-radius:var(--radius);line-height:1;white-space:nowrap}
.mg-opt{border:1px solid var(--border);background:var(--card);color:var(--text);cursor:pointer;transition:border-color .15s,color .15s}
.mg-opt:hover{background:var(--surface-2);color:var(--text)}
.mg-inuse{border:1px solid var(--border);background:var(--soft);color:var(--muted)}
.mg-menu{position:absolute;z-index:3000;min-width:180px;background:var(--surface);border:1px solid var(--border-2);border-radius:var(--radius-lg);box-shadow:var(--shadow-pop);padding:4px}
.mg-menu button{display:block;width:100%;text-align:left;padding:9px 13px;border:none;background:none;border-radius:6px;font-size:13px;font-weight:500;color:var(--text);cursor:pointer;font-family:var(--font)}
.mg-menu button:hover{background:var(--surface-2)}
.mg-menu button.danger{color:var(--danger)}
.mg-menu button.danger:hover{background:var(--danger-bg)}
/* user editor: Funds / Group-services tabs */
.um-tabs{display:flex;gap:2px;background:var(--surface-2);border:1px solid var(--border-2);border-radius:var(--radius);padding:2px;margin-bottom:12px}
.um-tab{flex:1;padding:7px;border:1px solid transparent;background:transparent;border-radius:5px;font-size:12px;font-weight:500;font-family:var(--font);color:var(--text-2);cursor:pointer;transition:background .15s,color .15s}
.um-tab.active{background:var(--surface);color:var(--text);border-color:var(--border-2);font-weight:600}

/* Group Services manage tab: collapse toggle + scrollable activity list */
.grp-tog{width:24px;height:24px;flex-shrink:0;margin-right:6px;border:1px solid var(--border);background:var(--card);border-radius:var(--radius);color:var(--muted);font-size:16px;line-height:1;font-weight:700;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .15s}
.grp-tog:hover{border-color:var(--border-2);color:var(--text);background:var(--surface-2)}
.act-scroll{max-height:240px;overflow-y:auto;margin-top:2px;padding-right:2px}
.act-scroll .entry-row{margin-left:30px}
.act-add{display:flex;gap:8px;margin:9px 0 0 30px;padding-top:10px;border-top:1px dashed var(--border)}
.act-add-inp{flex:1;padding:8px 11px;border:1px solid var(--border);border-radius:var(--radius);background:var(--input-bg);color:var(--text);font-size:13px;font-family:var(--font)}
.act-add-inp:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-bg)}

/* license / leave entry tag (calendar pills, list, detail) */
.leave-tag{display:inline-flex;align-items:center;gap:4px;font-size:11px;font-weight:600;padding:2px 7px;border-radius:5px;background:var(--leave-bg);color:var(--leave);border:1px solid var(--leave-br)}
/* people views — org hierarchy tree + list rows */
.tree-node{margin-bottom:2px}
.tree-children{margin-left:18px;padding-left:16px;border-left:1px solid var(--border);margin-top:4px}
.tree-row{display:flex;align-items:center;gap:11px;padding:9px 12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);margin-bottom:6px;transition:border-color .15s,background .15s}
.tree-row.clickable{cursor:pointer}
.tree-row.clickable:hover{border-color:var(--border-2);background:var(--surface-2)}
.tree-row.dim{opacity:.5}
.tree-row.inactive{opacity:.55}
.people-pending{background:var(--warn-bg);color:var(--warn);border:1px solid var(--warn-br);font-size:11px;font-weight:600;font-variant-numeric:tabular-nums;border-radius:9px;padding:1px 8px;flex-shrink:0;white-space:nowrap}
@keyframes appspin{to{transform:rotate(360deg)}}
/* role visibility toggle pills (Users / My Team toolbars) */
.role-toggle{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border-radius:var(--radius);border:1px solid var(--border);background:var(--card);color:var(--muted);font-size:12px;font-weight:600;font-family:var(--font);cursor:pointer;transition:border-color .15s,color .15s,background .15s,opacity .15s;white-space:nowrap}
.role-toggle:hover{background:var(--surface-2);color:var(--text)}
.role-toggle .role-toggle-dot{width:9px;height:9px;border-radius:50%;background:var(--border-2);flex-shrink:0;transition:background .15s}
.role-toggle.on{border-color:var(--accent-br);color:var(--accent-ink);background:var(--accent-bg)}
.role-toggle.on .role-toggle-dot{background:var(--accent)}
/* collapsible org-tree: +/− toggle sits to the LEFT of each row, on its own */
.tree-line{display:flex;align-items:center;gap:10px}
.tree-line>.tree-row{flex:1;margin-bottom:0}
.tree-toggle{width:24px;height:24px;border-radius:var(--radius);border:1px solid var(--border);background:var(--card);color:var(--muted);font-size:16px;font-weight:700;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;padding:0;transition:border-color .15s,color .15s,background .15s}
.tree-toggle:hover{border-color:var(--border-2);color:var(--text);background:var(--surface-2)}
.tree-toggle.open{color:var(--text);border-color:var(--border-2)}
.tree-toggle-spacer{width:24px;flex-shrink:0}
.tree-node{margin-bottom:6px}
.tree-line>.tree-row{margin-bottom:0}
/* gear/settings icon button on a person row */
.tree-gear{width:30px;height:30px;border-radius:var(--radius);border:1px solid var(--border);background:var(--card);color:var(--muted);cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;padding:0;transition:border-color .15s,color .15s,background .15s}
.tree-gear:hover{border-color:var(--border-2);color:var(--text);background:var(--surface-2)}
/* disabled mini buttons (rename/delete locked when an item is in use) */
.btn-mini:disabled{opacity:.4;cursor:not-allowed;border-color:var(--border)!important;color:var(--muted)!important;background:var(--soft)!important}
.btn-mini:disabled:hover{border-color:var(--border)!important;color:var(--muted)!important;background:var(--soft)!important}
.mg-inuse-tag{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:var(--muted);background:var(--soft);border:1px solid var(--border);border-radius:6px;padding:2px 8px;white-space:nowrap}
.fund-info{display:flex;gap:10px;margin-bottom:12px;flex-wrap:wrap}
.fund-info-item{flex:1;min-width:120px;background:var(--soft);border-radius:var(--radius);padding:10px;border:1px solid var(--border)}
.fi-name{font-size:11px;color:var(--muted);font-weight:600;text-transform:uppercase;letter-spacing:.6px;margin-bottom:3px}
.fi-val{font-size:14px;font-weight:700}
.fi-rw{color:var(--rw)}
.fi-sti{color:var(--sti)}
.fi-generic{color:var(--text)}
.alert-box{background:var(--warn-bg);border:1px solid var(--warn-br);border-radius:var(--radius);padding:9px 12px;font-size:12px;color:var(--warn);display:none;margin-bottom:10px}
.alert-box.show{display:block}
.modal-day-hint{font-size:12px;color:var(--muted);margin-top:4px;font-style:italic}

/* "More dates" chips in entry modal */
.date-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.date-chip{display:inline-flex;align-items:center;gap:6px;padding:3px 9px;border-radius:var(--radius);background:var(--surface-2);border:1px solid var(--border);font-size:12px;color:var(--text);font-weight:500}
.date-chip button{background:none;border:none;color:var(--muted);cursor:pointer;font-size:12px;padding:0;line-height:1}
.date-chip button:hover{color:var(--danger)}

/* — DAILY FUND STATUS PANEL inside modal — */
.day-fund-status{background:var(--surface);border-radius:var(--radius);border:1px solid var(--border);padding:11px 13px;margin-bottom:12px}
.day-fund-status-title{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.8px;color:var(--muted);margin-bottom:9px}
.dfs-row{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px;font-size:12px}
.dfs-row:last-child{margin-bottom:0}
.dfs-fund{font-weight:600;color:var(--text)}
.dfs-bar-wrap{flex:1;height:5px;background:var(--border);border-radius:3px;overflow:hidden;margin:0 10px}
.dfs-bar{height:100%;border-radius:3px;transition:width .4s}
.dfs-nums{font-size:12px;color:var(--muted);white-space:nowrap}

/* ENTRY DETAIL MODAL */
.ed-modal{background:var(--surface);border:1px solid var(--border-2);border-radius:var(--radius-lg);padding:0;width:520px;max-width:95vw;max-height:88vh;overflow:hidden;box-shadow:var(--shadow-overlay);transition:background .2s;display:flex;flex-direction:column}
.ed-header{padding:16px 20px;border-bottom:1px solid var(--border);background:var(--surface-2);color:var(--text);flex-shrink:0}
.ed-header-top{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:10px}
.ed-header-title{font-size:15px;font-weight:600;color:var(--text);display:flex;align-items:center;gap:8px}
.ed-header-close{background:var(--surface);border:1px solid var(--border-2);border-radius:var(--radius);width:28px;height:28px;display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--text-2);font-size:15px;transition:background .15s,color .15s;flex-shrink:0}
.ed-header-close:hover{background:var(--surface-2);color:var(--text)}
.ed-fund-badge{display:inline-flex;align-items:center;gap:6px;padding:3px 8px;border-radius:5px;font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase}
.ed-body{padding:20px 24px;overflow-y:auto;flex:1}
.ed-grid{display:grid;grid-template-columns:1fr 1fr;gap:0}
.ed-field{padding:10px 0;border-bottom:1px solid var(--border)}
.ed-field:last-child{border-bottom:none}
.ed-field.full{grid-column:1/-1}
.ed-label{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.8px;color:var(--muted);margin-bottom:4px}
.ed-value{font-size:13px;font-weight:500;color:var(--text)}
.ed-footer{padding:12px 20px;border-top:1px solid var(--border);display:flex;gap:8px;flex-shrink:0;background:var(--surface-2)}
.status-pill{display:inline-flex;align-items:center;gap:5px;padding:3px 8px;border-radius:5px;font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;white-space:nowrap}
.status-pending{background:var(--warn-bg);color:var(--warn);border:1px solid var(--warn-br)}
.status-approved{background:var(--ok-bg);color:var(--ok);border:1px solid var(--ok-br)}
.status-rejected{background:var(--danger-bg);color:var(--danger);border:1px solid var(--danger-br)}
.status-generated{background:var(--sti-bg);color:var(--sti);border:1px solid var(--sti-br)}
.status-submitted{background:var(--warn-bg);color:var(--warn);border:1px solid var(--warn-br)}
.alloc-snapshot-badge{display:inline-flex;align-items:center;gap:4px;padding:3px 9px;border-radius:6px;font-size:11px;font-weight:700;background:var(--soft);border:1px solid var(--border);color:var(--muted)}
.alloc-snapshot-badge.rw{background:var(--rw-bg);border-color:var(--rw-br);color:var(--rw)}
.alloc-snapshot-badge.sti{background:var(--sti-bg);border-color:var(--sti-br);color:var(--sti)}

/* SETTINGS */
.settings-section{background:var(--surface);border-radius:var(--radius-lg);border:1px solid var(--border);padding:18px;margin-bottom:14px;transition:background .2s}
.settings-section-title{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--text-3);margin-bottom:6px}
.settings-section-desc{font-size:12px;color:var(--muted);margin-bottom:16px}
.settings-row{display:flex;align-items:center;justify-content:space-between;padding:11px 0;border-bottom:1px solid var(--border)}
.settings-row:last-child{border-bottom:none;padding-bottom:0}
.sr-label{font-size:14px;font-weight:500;color:var(--text)}
.sr-sub{font-size:11px;color:var(--muted);margin-top:2px}
.toggle{position:relative;width:40px;height:22px;flex-shrink:0}
.toggle input{opacity:0;width:0;height:0}
.toggle-slider{position:absolute;cursor:pointer;inset:0;background:var(--border-2);border-radius:11px;transition:background .15s}
.toggle-slider:before{content:'';position:absolute;width:16px;height:16px;left:3px;bottom:3px;background:var(--surface);border-radius:50%;transition:transform .15s}
input:checked+.toggle-slider{background:var(--ink)}
input:checked+.toggle-slider:before{transform:translateX(18px)}
.theme-cards{display:flex;gap:10px}
.theme-card{flex:1;border:2px solid var(--border);border-radius:var(--radius-lg);padding:12px;cursor:pointer;text-align:center;transition:all .2s;background:var(--soft)}
.theme-card.active{border-color:var(--ink)}
.theme-card-label{font-size:12px;font-weight:600;color:var(--text)}
.theme-card-sub{font-size:11px;color:var(--muted);margin-top:2px}
.size-opts{display:flex;gap:8px}
.size-opt{flex:1;padding:7px;border-radius:var(--radius);border:1px solid var(--border);background:transparent;font-size:12px;font-weight:600;font-family:var(--font);color:var(--muted);cursor:pointer;transition:all .2s}
.size-opt.active{border-color:var(--border-2);color:var(--text);background:var(--surface);font-weight:600}
.zoom-row{display:flex;align-items:center;gap:10px;margin-top:10px}
.zoom-row input{flex:1;accent-color:var(--accent)}
.profile-row{display:flex;align-items:center;gap:12px;padding:12px 0}
.profile-avatar{width:40px;height:40px;background:var(--surface-3);border:1px solid var(--border);border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:600;font-size:14px;color:var(--text);flex-shrink:0}
.profile-name{font-size:15px;font-weight:600;color:var(--text)}
.profile-email{font-size:12px;color:var(--muted);margin-top:1px}
.profile-role{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;margin-top:4px;padding:2px 7px;border-radius:5px;display:inline-block}
.role-user{background:var(--surface-3);color:var(--text-2)}
.role-admin{background:var(--ink);color:var(--on-ink)}
.role-manager{background:var(--surface-3);color:var(--text-2)}
.role-supervisor{background:var(--accent-bg);color:var(--accent-ink)}
.btn-danger{width:100%;padding:10px;background:var(--surface);color:var(--danger);border:1px solid var(--danger-br);border-radius:var(--radius);font-size:13px;font-weight:600;font-family:var(--font);cursor:pointer;transition:background .15s}
.btn-danger:hover{background:var(--danger-bg);color:var(--danger)}

/* ALL ENTRIES */
.all-entries-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;flex-wrap:wrap;gap:10px}
.all-entries-search{display:flex;align-items:center;gap:8px;flex:1;max-width:320px}
.search-input{flex:1;padding:7px 11px;border:1px solid var(--border-2);border-radius:var(--radius);font-size:13px;font-family:var(--font);color:var(--text);background:var(--input-bg);outline:none;transition:border-color .2s}
.search-input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-bg)}
.all-entries-actions{display:flex;align-items:center;gap:8px}
.btn-export{padding:7px 12px;border-radius:var(--radius);border:1px solid var(--border-2);background:var(--surface);font-size:12px;font-weight:500;font-family:var(--font);color:var(--text-2);cursor:pointer;transition:background .15s,color .15s;display:flex;align-items:center;gap:6px}
.btn-export:hover{background:var(--surface-2);color:var(--text)}
/* colorful import/export/download action pills */
.btn-io{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;border-radius:var(--radius);font-size:13px;font-weight:500;font-family:var(--font);cursor:pointer;transition:background .15s,opacity .15s;border:1px solid var(--border-2);background:var(--surface);color:var(--text);white-space:nowrap}
.btn-io:hover{background:var(--surface-2)}
.btn-io.solid{background:var(--ink);color:var(--on-ink);border-color:var(--ink)}
.btn-io.solid:hover{opacity:.9;background:var(--ink)}
.btn-io.ghost{background:transparent;color:var(--text-2);border-color:transparent}
.btn-io.ghost:hover{background:var(--surface-2);color:var(--text)}
.btn-io.blue{background:var(--ink);color:var(--on-ink);border-color:var(--ink)}
.btn-io.blue:hover{opacity:.9;background:var(--ink)}
.all-entry-table{width:100%;border-collapse:collapse;font-size:13px}
.all-entry-table th{text-align:left;padding:8px 12px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--text-3);background:var(--surface);border-bottom:1px solid var(--border);white-space:nowrap}
.all-entry-table td{padding:9px 12px;border-bottom:1px solid var(--border);color:var(--text);vertical-align:middle}
.all-entry-table tr.clickable-row{cursor:pointer;transition:background .15s}
.all-entry-table tr.clickable-row:hover td{background:var(--surface-2)}
.all-entry-table tr.clickable-row:hover .row-activity{color:var(--text)}
.row-activity{font-weight:600;transition:color .15s}
.all-entry-table .tag{display:inline-block;padding:2px 7px;border-radius:5px;font-size:11px;font-weight:700}
.click-hint{font-size:12px;color:var(--muted);opacity:0;transition:opacity .15s;display:flex;align-items:center;gap:3px}
.clickable-row:hover .click-hint{opacity:1}

/* DASHBOARD */
.dash-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;flex-wrap:wrap;gap:12px}
.dash-title{display:flex;align-items:center;gap:10px}
.dash-title h2{font-size:20px;font-weight:600;color:var(--text);letter-spacing:-.01em}
.dash-filters{display:flex;gap:10px;flex-wrap:wrap;background:var(--surface);border-radius:var(--radius-lg);border:1px solid var(--border);padding:14px 16px;margin-bottom:16px}
.dash-filter-group{display:flex;flex-direction:column;gap:4px}
.dash-filter-label{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.8px;color:var(--muted)}
.dash-filter-input{padding:7px 11px;border:1px solid var(--border);border-radius:var(--radius);font-size:12px;font-family:var(--font);color:var(--text);background:var(--input-bg);outline:none;transition:border-color .2s}
.dash-filter-input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-bg)}
.dash-alloc-warning{display:flex;align-items:flex-start;gap:12px;background:var(--warn-bg);border:1px solid var(--warn-br);border-radius:var(--radius-lg);padding:14px 16px;margin-bottom:20px}
.dash-alloc-icon{flex-shrink:0;width:22px;height:22px;border-radius:50%;background:var(--surface);border:1px solid var(--warn-br);color:var(--warn);font-weight:700;font-size:13px;display:flex;align-items:center;justify-content:center;line-height:1}
.dash-alloc-head{font-weight:700;color:var(--text);font-size:13px;margin-bottom:3px}
.dash-alloc-sub{font-size:12px;color:var(--muted);margin-bottom:10px;line-height:1.45}
.dash-alloc-actions{display:flex;flex-wrap:wrap;gap:8px}
.dash-alloc-btn{padding:6px 12px;border:1px solid var(--warn-br);background:var(--surface);color:var(--warn);border-radius:var(--radius);font-size:12px;font-weight:600;font-family:var(--font);cursor:pointer;transition:background .15s}
.dash-alloc-btn:hover{background:var(--warn-bg);color:var(--warn)}
.dash-stats-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:14px;margin-bottom:20px}
.stat-card{background:var(--surface);border-radius:var(--radius-lg);border:1px solid var(--border);padding:14px 16px;transition:background .2s}
.stat-card-label{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.8px;color:var(--muted);margin-bottom:6px}
.stat-card-val{font-size:26px;font-weight:600;color:var(--text);font-variant-numeric:tabular-nums;letter-spacing:-.02em;line-height:1.1}
.stat-card-sub{font-size:12px;color:var(--muted);margin-top:3px}
.dash-charts-row{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:20px}
.dash-chart-card{background:var(--surface);border-radius:var(--radius-lg);border:1px solid var(--border);padding:16px;transition:background .2s}
.dash-chart-title{font-size:13px;font-weight:700;color:var(--text);margin-bottom:14px}
.donut-wrap{display:flex;align-items:center;gap:16px}
.donut-legend{display:flex;flex-direction:column;gap:8px}
.donut-legend-item{display:flex;align-items:center;gap:7px;font-size:12px}
.donut-legend-dot{width:10px;height:10px;border-radius:50%;flex-shrink:0}
.dash-table-wrap{background:var(--surface);border-radius:var(--radius-lg);border:1px solid var(--border);overflow:hidden;transition:background .2s}
.dash-table-header{padding:12px 16px;border-bottom:1px solid var(--border);font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--text-3);background:var(--surface);display:flex;align-items:center;justify-content:space-between;min-height:44px}
.dash-table{width:100%;border-collapse:collapse;font-size:13px}
.dash-table th{text-align:left;padding:8px 14px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--text-3);background:var(--surface);border-bottom:1px solid var(--border);white-space:nowrap}
.dash-table td{padding:9px 14px;border-bottom:1px solid var(--border);color:var(--text);vertical-align:middle}
.dash-table tr:last-child td{border-bottom:none}
.dash-table tr:hover td{background:var(--surface-2)}
.dash-table .total-row td{font-weight:600;background:var(--surface-2)}
.print-btn{height:32px;padding:0 14px;border-radius:var(--radius);border:1px solid var(--ink);background:var(--ink);color:var(--on-ink);font-size:13px;font-weight:600;font-family:var(--font);cursor:pointer;transition:opacity .15s;display:flex;align-items:center;gap:7px}
.print-btn:hover{opacity:.9}

/* VIEWS / GENERIC CARDS */
.view-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:14px;margin-top:16px;transform:translateZ(0)}
.view-card{background:var(--surface);border-radius:var(--radius-lg);border:1px solid var(--border);padding:16px;transition:background .15s,border-color .15s;cursor:pointer}
.view-card:hover{background:var(--surface-2);border-color:var(--border-2)}
.view-card-title{font-size:14px;font-weight:700;color:var(--text);margin-bottom:4px}
.view-card-sub{font-size:12px;color:var(--muted)}
.view-card-stat{font-size:22px;font-weight:600;color:var(--text);margin-top:10px;font-variant-numeric:tabular-nums;letter-spacing:-.02em}
.view-card-meta{font-size:11px;color:var(--muted);margin-top:2px}
.view-bar-mini{height:3px;border-radius:2px;background:var(--surface-3);margin-top:10px;overflow:hidden}
.view-bar-fill{height:100%;border-radius:2px;background:var(--ink)}
.status-badge{display:inline-block;padding:2px 7px;border-radius:5px;font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase}
.status-complete{background:var(--ok-bg);color:var(--ok);border:1px solid var(--ok-br)}
.status-incomplete{background:var(--warn-bg);color:var(--warn);border:1px solid var(--warn-br)}
.status-over{background:var(--danger-bg);color:var(--danger);border:1px solid var(--danger-br)}
.status-none{background:var(--surface-3);color:var(--text-2);border:1px solid var(--border)}

/* QUOTA HISTORY / PRINT */
.history-modal{background:var(--surface);border:1px solid var(--border-2);border-radius:var(--radius-lg);padding:20px;width:680px;max-width:95vw;max-height:88vh;overflow-y:auto;box-shadow:var(--shadow-overlay);transition:background .2s}
.print-sig-section{margin-top:30px;padding-top:20px;border-top:2px solid #ccc;page-break-inside:avoid}
.print-sig-row{display:grid;grid-template-columns:1fr 1fr 1fr;gap:30px;margin-top:20px}
.print-sig-block{display:flex;flex-direction:column;align-items:center;gap:6px}
.print-sig-line{width:100%;border-bottom:1px solid #333;height:36px;margin-bottom:4px}
.print-sig-label{font-size:11px;font-weight:600;color:#333;text-align:center;letter-spacing:.5px}
.print-sig-sub{font-size:11px;color:#777;text-align:center}

/* FUND ALLOCATION TABLE */
.fund-alloc-table{width:100%;border-collapse:collapse;font-size:13px;margin-top:6px}
/* Snapshot editor rows */
.snap-row{transition:background .15s}
.snap-row:hover{background:var(--surface-2)}
#snap-edit-rows .snap-row:last-child{border-bottom:none!important}
.fund-alloc-table th{text-align:left;padding:8px 10px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--text-3);background:var(--surface);border-bottom:1px solid var(--border)}
.fund-alloc-table th:nth-child(1){width:30px;text-align:center}
.fund-alloc-table th:nth-child(3){text-align:center}
.fund-alloc-table th:nth-child(4){text-align:center}
.fund-alloc-table td{padding:7px 10px;border-bottom:1px solid var(--border);vertical-align:middle}
.fund-alloc-table tr:last-child td{border-bottom:none}
.fund-alloc-table td:nth-child(1){text-align:center}
.fund-alloc-table td:nth-child(3){text-align:center}
.fund-alloc-table td:nth-child(4){text-align:center}
.alloc-checkbox{width:15px;height:15px;accent-color:var(--accent);cursor:pointer}
.alloc-input{width:68px;padding:4px 8px;border:1px solid var(--border);border-radius:var(--radius);font-size:12px;font-family:var(--font);color:var(--text);background:var(--input-bg);text-align:center}
.alloc-input:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-bg)}
.alloc-input:disabled{opacity:.4;cursor:not-allowed;background:var(--soft)}
.assign-checkbox{width:15px;height:15px;accent-color:var(--navy);cursor:pointer}

/* Category dropdown */
.cat-dropdown-toggle{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-radius:var(--radius);border:1px solid var(--border);background:var(--input-bg);cursor:pointer;font-size:13px;color:var(--text);font-family:var(--font);font-weight:500;transition:border-color .2s;user-select:none}
.cat-dropdown-toggle:hover{border-color:var(--border-2);background:var(--surface-2)}
.cat-dropdown-toggle.open{border-color:var(--accent);border-bottom-left-radius:0;border-bottom-right-radius:0}
.cat-dropdown-count{font-size:11px;font-weight:600;font-variant-numeric:tabular-nums;padding:1px 7px;border-radius:5px;background:var(--accent-bg);color:var(--accent-ink)}
.cat-dropdown-chevron{transition:transform .2s;color:var(--muted)}
.cat-dropdown-chevron.open{transform:rotate(180deg)}
.cat-dropdown-panel{border:1px solid var(--accent);border-top:none;border-bottom-left-radius:10px;border-bottom-right-radius:10px;background:var(--input-bg);overflow:hidden;max-height:0;transition:max-height .25s ease}
.cat-dropdown-panel.open{max-height:400px}
.cat-dropdown-item{display:flex;align-items:center;gap:10px;padding:10px 14px;border-top:1px solid var(--border);cursor:pointer;transition:background .15s;font-size:13px;color:var(--text)}
.cat-dropdown-item:first-child{border-top:none}
.cat-dropdown-item:hover{background:var(--surface-2)}
.cat-dropdown-item input[type=checkbox]{width:15px;height:15px;accent-color:var(--accent);cursor:pointer;flex-shrink:0}
.cat-dropdown-item.checked{background:var(--accent-bg);color:var(--accent-ink);font-weight:500}

/* TOAST */
.toast{position:fixed;bottom:20px;left:50%;transform:translateX(-50%) translateY(8px);background:var(--ink);color:var(--on-ink);padding:9px 16px;border-radius:var(--radius);font-size:12px;font-weight:500;z-index:999;opacity:0;transition:opacity .15s,transform .15s;white-space:nowrap;pointer-events:none;box-shadow:var(--shadow-overlay);display:inline-flex;align-items:center;gap:8px}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
.toast.err{box-shadow:var(--shadow-overlay),inset 3px 0 0 var(--danger)}
.toast.warn{box-shadow:var(--shadow-overlay),inset 3px 0 0 var(--warn)}
.toast.ok{box-shadow:var(--shadow-overlay),inset 3px 0 0 var(--ok)}

/* IMPORT MODAL */
.import-format{background:var(--soft);border-radius:var(--radius);padding:12px;font-size:12px;color:var(--muted);margin-top:10px;border:1px solid var(--border)}
.import-err{font-size:12px;color:var(--danger);padding:9px 12px;background:var(--danger-bg);border-radius:var(--radius);border:1px solid var(--danger-br);display:none}
.import-preview{font-size:13px;color:var(--accent);font-weight:600;display:none;margin-top:8px}

.emp-remove-btn{width:100%;padding:10px;background:var(--surface);color:var(--danger);border:1px solid var(--danger-br);border-radius:var(--radius);font-size:13px;font-weight:600;font-family:var(--font);cursor:pointer;transition:background .15s;margin-top:4px}
.emp-remove-btn:hover{background:var(--danger-bg);color:var(--danger)}

::-webkit-scrollbar{width:5px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}
::-webkit-scrollbar-thumb:hover{background:var(--muted)}

/* Fund custom dropdown */
.fund-opt{padding:9px 16px;font-size:13px;color:var(--text);cursor:pointer;transition:background .12s;font-family:var(--font)}
.fund-opt:hover{background:var(--surface-2)}
.fund-opt.selected{color:var(--accent-ink);font-weight:600;background:var(--accent-bg)}

/* ═══════════════════════════════════════════════
   NEW IN V2 — SETUP WIZARD
   ═══════════════════════════════════════════════ */
.wizard-box{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:32px;width:520px;max-width:94vw;position:relative;z-index:2;max-height:92vh;overflow-y:auto;transition:background .2s}
.wiz-dots{display:flex;align-items:center;justify-content:center;gap:8px;margin-bottom:18px}
.wiz-dot{width:8px;height:8px;border-radius:50%;background:var(--border-2);transition:background .2s,transform .2s}
.wiz-dot.active{background:var(--ink);transform:scale(1.3)}
.wiz-dot.done{background:var(--ok)}
.wiz-step-label{text-align:center;font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:1.5px;margin-bottom:14px;font-weight:700}
.wiz-actions{display:flex;gap:10px;margin-top:18px}
.wiz-actions .btn-outline{margin-top:0;flex:1}
.wiz-actions .btn-primary{flex:2}
.wiz-list-row{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.wiz-list-row input[type=text],.wiz-input{flex:1;padding:9px 12px;border:1px solid var(--border);border-radius:var(--radius);font-size:13px;font-family:var(--font);color:var(--text);background:var(--input-bg);outline:none;transition:border-color .2s;min-width:0}
.wiz-list-row input[type=text]:focus,.wiz-input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-bg)}
.wiz-row-del{background:none;border:none;color:var(--muted);cursor:pointer;font-size:15px;padding:4px 9px;border-radius:6px;transition:all .2s;line-height:1;flex-shrink:0}
.wiz-row-del:hover{background:var(--danger-bg);color:var(--danger)}
.wiz-add-row{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;padding:9px;border-radius:var(--radius);border:1px dashed var(--border);background:transparent;color:var(--muted);font-size:12px;font-weight:600;font-family:var(--font);cursor:pointer;transition:all .2s;margin-top:4px}
.wiz-add-row:hover{border-color:var(--border-2);color:var(--text);background:var(--surface-2)}
.color-palette{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.color-swatch{width:22px;height:22px;border-radius:50%;cursor:pointer;border:2px solid transparent;transition:transform .15s,border-color .15s;flex-shrink:0;padding:0}
.color-swatch.selected{border-color:var(--ink);transform:scale(1.15)}
.wiz-summary-row{display:flex;justify-content:space-between;font-size:13px;padding:8px 0;border-bottom:1px solid var(--border);color:var(--text)}
.wiz-summary-row:last-child{border-bottom:none}
.wiz-summary-row span:first-child{color:var(--muted)}

/* ═══════════════════════════════════════════════
   NEW IN V2 — NOTIFICATION BELL + PANEL
   ═══════════════════════════════════════════════ */
.notif-bell{position:relative;background:transparent;border:1px solid transparent;border-radius:var(--radius);width:30px;height:30px;display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--text-2);transition:background .15s,color .15s}
.notif-bell:hover{background:var(--surface-2);color:var(--text)}
.notif-badge{position:absolute;top:-5px;right:-5px;background:var(--danger-bg);color:var(--danger);border:1px solid var(--danger-br);font-size:11px;font-weight:700;font-variant-numeric:tabular-nums;min-width:17px;height:17px;border-radius:9px;display:flex;align-items:center;justify-content:center;padding:0 4px;line-height:1}
.notif-panel{position:absolute;top:38px;right:0;width:340px;max-width:90vw;background:var(--surface);border:1px solid var(--border-2);border-radius:var(--radius-lg);box-shadow:var(--shadow-pop);z-index:90;overflow:hidden;color:var(--text);transition:background .2s}
.notif-panel-head{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid var(--border);font-size:12px;font-weight:700;color:var(--text)}
.notif-mark-all{font-size:12px;color:var(--accent-ink);cursor:pointer;font-weight:500;background:none;border:none;font-family:var(--font);padding:0}
.notif-mark-all:hover{text-decoration:underline}
.notif-list{max-height:340px;overflow-y:auto}
.notif-item{padding:11px 16px;border-bottom:1px solid var(--border);font-size:12px;color:var(--text);line-height:1.45;cursor:pointer;transition:background .15s}
.notif-item:hover{background:var(--surface-2)}
.notif-item:last-child{border-bottom:none}
.notif-item.unread{background:var(--surface-2);border-left:2px solid var(--accent)}
.notif-time{font-size:12px;color:var(--muted);margin-top:3px}
.notif-empty{padding:26px;text-align:center;font-size:12px;color:var(--muted)}

/* ═══════════════════════════════════════════════
   NEW IN V2 — IMPERSONATION BANNER
   ═══════════════════════════════════════════════ */
.imp-banner{display:flex;align-items:center;justify-content:center;gap:12px;background:var(--warn-bg);color:var(--text);border-bottom:1px solid var(--warn-br);font-size:12px;font-weight:500;padding:8px 20px;flex-shrink:0;width:100%;position:sticky;top:0;z-index:30}
.imp-exit-btn{padding:4px 12px;border-radius:5px;border:1px solid var(--warn-br);background:var(--surface);color:var(--text);font-size:12px;font-weight:600;font-family:var(--font);cursor:pointer;transition:background .15s;flex-shrink:0}
.imp-exit-btn:hover{background:var(--surface-2)}

/* ═══════════════════════════════════════════════
   NEW IN V2 — QUARTERLY
   ═══════════════════════════════════════════════ */
.q-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:16px;margin-bottom:12px;transition:background .2s}
.q-card-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;flex-wrap:wrap;gap:8px}
.q-card-title{font-size:15px;font-weight:700;color:var(--text)}
.q-card-sub{font-size:12px;color:var(--muted);margin-top:2px}
.q-emp-row{display:flex;align-items:center;gap:10px;padding:9px 12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);margin-bottom:6px;font-size:13px;flex-wrap:wrap;color:var(--text)}
/* expanded package: ONE unified list (rows divided, not separate cards) */
/* left margin (toggle 24px + gap 10px) so employee rows align under the supervisor row */
.q-emp-list{margin:4px 0 8px 34px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);overflow:hidden}
.q-emp-list-row{display:flex;align-items:center;gap:11px;padding:10px 14px;border-bottom:1px solid var(--border)}
.q-emp-list-row:last-child{border-bottom:none}
.q-emp-list-foot{padding:11px 14px;font-size:13px;font-weight:600;color:var(--ok);background:var(--ok-bg);border-top:1px solid var(--border)}
.q-emp-list-foot.pending{color:var(--muted);background:transparent;font-weight:500}
.q-emp-list-foot.submitted{color:var(--text);background:transparent}
.q-emp-name{font-weight:600;color:var(--text)}
.q-check{width:20px;height:20px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:11px;font-weight:800;background:var(--border);color:var(--muted);flex-shrink:0;line-height:1}
.q-check.done{background:var(--ok-bg);color:var(--ok);border:1px solid var(--ok-br)}
.q-file-name{font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;max-width:180px;white-space:nowrap}
.q-row-actions{margin-left:auto;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.btn-mini{padding:5px 10px;border-radius:5px;border:1px solid var(--border-2);background:var(--surface);font-size:12px;font-weight:500;font-family:var(--font);color:var(--text-2);cursor:pointer;transition:background .15s,border-color .15s,color .15s}
.btn-mini:hover{background:var(--surface-2);color:var(--text)}
.btn-mini.solid{background:var(--ink);border-color:var(--ink);color:var(--on-ink)}
.btn-mini.solid:hover{opacity:.9;background:var(--ink);color:var(--on-ink)}
.btn-mini.solid:disabled,.btn-mini:disabled{opacity:.45;cursor:not-allowed}
.btn-mini.danger{border-color:var(--danger-br);color:var(--danger)}
.btn-mini.danger:hover{background:var(--danger-bg);color:var(--danger)}
.countdown-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:11px 12px;margin:0 16px 14px;font-size:12px;color:var(--text);font-weight:500;line-height:1.5}
.countdown-card .cd-days{font-size:18px;font-weight:600;color:var(--text);font-variant-numeric:tabular-nums}
.countdown-card.danger{border-color:var(--danger-br);background:var(--danger-bg)}
.countdown-card.danger .cd-days{color:var(--danger)}

/* ═══════════════════════════════════════════════
   NEW IN V2 — MANAGE TABS
   ═══════════════════════════════════════════════ */
.manage-tabs{display:flex;gap:6px;margin-bottom:18px;border-bottom:1px solid var(--border);flex-wrap:wrap}
.manage-tab{padding:9px 18px;font-size:13px;font-weight:600;color:var(--muted);cursor:pointer;border:none;background:transparent;font-family:var(--font);border-bottom:2px solid transparent;transition:all .2s;margin-bottom:-1px}
.manage-tab:hover{color:var(--text)}
.manage-tab.active{color:var(--text);border-bottom-color:var(--ink);font-weight:600}

/* ═══════════════════════════════════════════════
   NEW IN V2 — TEAM / USER CARDS
   ═══════════════════════════════════════════════ */
.team-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:14px}
.team-card{background:var(--surface);border-radius:var(--radius-lg);border:1px solid var(--border);padding:16px;cursor:pointer;transition:background .15s,border-color .15s}
.team-card:hover{background:var(--surface-2);border-color:var(--border-2)}
.team-card-head{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.team-avatar{width:36px;height:36px;border-radius:50%;background:var(--surface-3);border:1px solid var(--border);color:var(--text);font-weight:600;font-size:12px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.team-name{font-size:14px;font-weight:700;color:var(--text)}
.team-sub{font-size:12px;color:var(--muted);margin-top:1px}
.team-stat-row{display:flex;justify-content:space-between;font-size:12px;color:var(--muted);margin-top:6px}
.team-stat-row strong{color:var(--text)}
.team-card-actions{display:flex;gap:6px;margin-top:12px;flex-wrap:wrap}

/* ═══════════════════════════════════════════════
   PRINT STYLES — each month gets its own page
   ═══════════════════════════════════════════════ */
@media print{
  html,body{overflow:visible!important;background:#fff!important;color:#000!important;margin:0!important;padding:0!important;height:auto!important}
  #root{overflow:visible!important;height:auto!important;position:static!important}
  /* hide the ENTIRE app UI — only the print output prints (no leading blank page) */
  #sc-setup,#sc-login,#sc-force-pass,#sc-app,#modal-host,#toast,.modal-overlay,.no-print{display:none!important}
  #print-output-container{display:block!important}
  .print-sig-section{page-break-inside:avoid;break-inside:avoid}
}
@media screen{
  .print-only{display:none}
  #print-output-container{display:none}
}

/* ═══════════════════════════════════════════════
   NEW IN V2 BATCH 2 — §4d PRINT: one report per US Letter page
   ═══════════════════════════════════════════════ */
@page{size:letter;margin:0.5in}
@media print{
  /* Each report section starts on its own page */
  .print-month-section{
    page-break-before:always;
    break-before:page;
    /* never clip a report — let it flow to its own page */
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow:visible!important;
  }
  .print-month-section:first-child{
    page-break-before:avoid;
    break-before:avoid;
  }
}

/* ═══════════════════════════════════════════════
   NEW IN V2 BATCH 2 — §4b DASHBOARD MULTI-SELECT FILTER
   ═══════════════════════════════════════════════ */
.ms-wrap{position:relative;display:inline-block}
.ms-trigger{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:130px;padding:7px 11px;border:1px solid var(--border);border-radius:var(--radius);font-size:12px;font-family:var(--font);font-weight:500;color:var(--text);background:var(--input-bg);cursor:pointer;transition:border-color .2s;user-select:none;white-space:nowrap}
.ms-trigger:hover{border-color:var(--border-2);background:var(--surface-2)}
.ms-trigger.has-selection{border-color:var(--accent);color:var(--accent);font-weight:600}
.ms-trigger.open{border-color:var(--accent)}
.ms-trigger .ms-chevron{flex-shrink:0;color:var(--muted);transition:transform .2s;font-size:11px;line-height:1}
.ms-trigger.open .ms-chevron{transform:rotate(180deg)}
.ms-trigger.has-selection .ms-chevron{color:var(--accent)}
.ms-panel{position:absolute;top:calc(100% + 5px);left:0;width:230px;max-width:90vw;background:var(--surface);border:1px solid var(--border-2);border-radius:var(--radius-lg);box-shadow:var(--shadow-pop);z-index:120;overflow:hidden;color:var(--text);transition:background .2s}
.ms-search{display:block;width:calc(100% - 20px);margin:10px;padding:7px 11px;border:1px solid var(--border);border-radius:var(--radius);font-size:12px;font-family:var(--font);color:var(--text);background:var(--input-bg);outline:none;transition:border-color .2s}
.ms-search:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-bg)}
.ms-actions{display:flex;gap:8px;padding:0 10px 8px;border-bottom:1px solid var(--border)}
.ms-action-btn{flex:1;padding:5px 0;border:1px solid var(--border);border-radius:var(--radius);background:var(--soft);font-size:12px;font-weight:600;font-family:var(--font);color:var(--muted);cursor:pointer;transition:all .2s}
.ms-action-btn:hover{background:var(--surface-2);color:var(--text)}
.ms-list{max-height:260px;overflow-y:auto;padding:6px 0}
.ms-option{display:flex;align-items:center;gap:9px;padding:8px 14px;font-size:12px;color:var(--text);cursor:pointer;transition:background .12s;font-family:var(--font)}
.ms-option:hover{background:var(--surface-2)}
.ms-option input[type=checkbox]{width:15px;height:15px;accent-color:var(--accent);cursor:pointer;flex-shrink:0;margin:0}
.ms-option.checked{color:var(--accent-ink);font-weight:600;background:var(--accent-bg)}
.ms-empty{padding:14px;text-align:center;font-size:12px;color:var(--muted)}

/* ═══════════════════════════════════════════════
   NEW IN V2 BATCH 2 — §2 PER-USER APPROVAL PAGE
   ═══════════════════════════════════════════════ */
.appr-head{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:18px}
.appr-back-btn{padding:7px 14px;border-radius:var(--radius);border:1px solid var(--border);background:var(--card);font-size:12px;font-weight:600;font-family:var(--font);color:var(--muted);cursor:pointer;transition:all .2s}
.appr-back-btn:hover{background:var(--surface-2);color:var(--text)}
.appr-person{display:flex;flex-direction:column;gap:2px}
.appr-person-name{font-size:16px;font-weight:600;color:var(--text);letter-spacing:-.01em}
.appr-person-role{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.8px;color:var(--muted)}
.appr-period-nav{display:flex;align-items:center;gap:8px;margin-left:auto;flex-wrap:wrap}
.appr-period-btn{padding:6px 13px;border-radius:var(--radius);border:1px solid var(--border);background:var(--card);font-size:12px;font-weight:600;font-family:var(--font);color:var(--muted);cursor:pointer;transition:all .2s}
.appr-period-btn:hover:not(:disabled){background:var(--surface-2);color:var(--text)}
.appr-period-btn:disabled{opacity:.4;cursor:not-allowed}
.appr-period-label{font-size:13px;font-weight:600;color:var(--text);min-width:150px;text-align:center}
.appr-summary{display:flex;align-items:center;gap:18px;flex-wrap:wrap;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:12px 16px;margin-bottom:14px;font-size:13px;color:var(--text-2)}
.appr-summary strong{color:var(--text);font-weight:700}
.appr-summary .appr-approve-all{margin-left:auto}
.appr-row{display:flex;align-items:center;gap:12px;padding:9px 12px;border-radius:var(--radius);border:1px solid var(--border);margin-bottom:6px;background:var(--surface);transition:background .15s}
.appr-row:hover{background:var(--surface-2)}
.appr-row.clickable{cursor:pointer}
.appr-row-date{font-size:12px;font-weight:600;color:var(--text);white-space:nowrap;min-width:74px}
.appr-row-title{font-size:13px;font-weight:600;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.appr-row-dur{font-size:13px;font-weight:700;color:var(--text);white-space:nowrap;margin-left:auto}
.appr-row-actions{display:flex;gap:6px;flex-shrink:0}
.appr-btn-approve{padding:5px 11px;border-radius:5px;border:1px solid var(--ink);background:var(--ink);color:var(--on-ink);font-size:12px;font-weight:600;font-family:var(--font);cursor:pointer;transition:opacity .15s}
.appr-btn-approve:hover{opacity:.9}
.appr-btn-reject{padding:5px 11px;border-radius:5px;border:1px solid var(--danger-br);background:var(--surface);color:var(--danger);font-size:12px;font-weight:600;font-family:var(--font);cursor:pointer;transition:background .15s}
.appr-btn-reject:hover{background:var(--danger-bg);color:var(--danger)}

/* ═══════════════════════════════════════════════
   NEW IN V2 BATCH 2 — §5 WEEK-QUOTA OVERRIDE
   ═══════════════════════════════════════════════ */
.quota-edit-btn{background:none;border:none;color:var(--muted);cursor:pointer;font-size:13px;padding:2px 5px;border-radius:6px;line-height:1;transition:all .2s}
.quota-edit-btn:hover{background:var(--surface-2);color:var(--text)}
.quota-week-note{font-size:12px;font-weight:600;color:var(--accent);font-style:italic;margin-top:3px}

/* ═══════════════════════════════════════════════
   NEW IN V2 BATCH 2 — §6 QUARTERLY ADMIN WINDOWS / GATING
   ═══════════════════════════════════════════════ */
.q-disabled{opacity:.6;pointer-events:none}
.q-locked-msg{background:var(--soft);border:1px dashed var(--border);border-radius:var(--radius-lg);padding:16px 18px;font-size:13px;color:var(--muted);line-height:1.5;text-align:center}
.btn-submit-ready{background:var(--ink);color:var(--on-ink);border-color:var(--ink)}
.btn-submit-ready:hover{opacity:.9}
.btn-submit-wait{background:var(--surface-3);color:var(--text-3);border-color:var(--border);cursor:not-allowed}
.btn-submit-wait:hover{background:var(--surface-3);color:var(--text-3)}
/* quarterly Submit: gray (disabled) until all PDFs uploaded, then green (.ready) */
.q-submit-btn:disabled{background:var(--surface-3);color:var(--text-3);border-color:var(--border);cursor:not-allowed;opacity:1}
.q-submit-btn.ready{background:var(--ink);color:var(--on-ink);border-color:var(--ink)}
.q-submit-btn.ready:hover{opacity:.9}
.q-check-badge{color:var(--ok);font-weight:600;display:inline-flex;align-items:center;gap:5px;font-size:13px}
.q-win-open-badge{display:inline-flex;align-items:center;gap:4px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;padding:2px 7px;border-radius:5px;background:var(--ok-bg);color:var(--ok);border:1px solid var(--ok-br)}
.q-win-inactive-badge{display:inline-flex;align-items:center;gap:4px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;padding:2px 7px;border-radius:5px;background:var(--surface-3);color:var(--text-2);border:1px solid var(--border)}
.nav-badge.open-badge{background:var(--ok-bg);color:var(--ok);border-color:var(--ok-br)}


/* ═══════════════════════════════════════════════════════════════════════
   SHARED DESIGN SYSTEM LAYER
   Everything below is new in the redesign. It adds; it renames nothing.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── 1. Typography: one family, tabular figures on every number ───────── */
body,button,input,select,textarea,table{font-family:var(--font)}
button,input,select,textarea{font-size:inherit;color:inherit}

/* utility any module may use */
.num,.tnum,.ui-num{font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1}

/* every element that shows hours, percentages, counts, dates or money */
.stat-card-val,.stat-card-sub,.view-card-stat,.view-card-meta,
.entry-dur,.appr-row-dur,.appr-row-date,.appr-period-label,
.day-total-badge,.cal-day-num,.cal-week-quota,.cal-entry-pill,
.sw-row,.fund-nums,.dfs-nums,.fi-val,.ed-value,
.token-code,.token-timer,.hb-num,.hb-scale,.alloc-input,
.month-nav-label,.notif-time,.countdown-card,.legend-item,
.team-stat-row,.q-check,.q-emp-list-foot,.q-file-name,
.wiz-summary-row,.dash-filter-input,.import-preview,
.dash-table th,.dash-table td,
.all-entry-table th,.all-entry-table td,
.fund-alloc-table th,.fund-alloc-table td,
.nav-badge,.notif-badge,.people-pending,.cat-dropdown-count,
input[type=number],input[type=date],input[type=time],input[type=month],
.mg-inuse,.mg-inuse-tag,.dur-display,.profile-email{
  font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1;
}

/* ── 2. Icon convention: inline SVG, currentColor, never an emoji ─────── */
.ui-icon{width:16px;height:16px;flex:none;display:inline-block;vertical-align:-2px;
  stroke:currentColor;fill:none;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.ui-icon.lg{width:20px;height:20px}
.ui-icon.sm{width:14px;height:14px}
.ui-icon.xs{width:12px;height:12px}
.ui-icon.filled{fill:currentColor;stroke:none}

/* screen-reader-only text (labels for meters, pills, counts) */
.ui-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;padding:0;margin:-1px}

/* ── 3. uiEmptyState -> .ui-empty ─────────────────────────────────────
   <div class="ui-empty is-filtered|is-none|is-done">
     <div class="ui-empty-icon"><svg class="ui-icon">..</svg></div>
     <div class="ui-empty-title">..</div>
     <div class="ui-empty-body">..</div>
     <button class="ui-empty-action">..</button>
   </div>
   Modifier aliases accepted: .filtered/.none/.done and .ui-empty--filtered etc. */
.ui-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;
  text-align:center;gap:8px;padding:36px 24px;min-height:180px;
  background:var(--surface);border:1px dashed var(--border-2);border-radius:var(--radius-lg);color:var(--text-2)}
.ui-empty-icon{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;
  background:var(--surface-3);color:var(--text-3);margin-bottom:2px;flex:none}
.ui-empty-icon .ui-icon,.ui-empty-icon svg{width:18px;height:18px}
.ui-empty-title{font-size:14px;font-weight:600;color:var(--text)}
.ui-empty-body{font-size:13px;line-height:1.5;color:var(--text-3);max-width:46ch}
.ui-empty-action,.ui-empty>button{margin-top:6px;height:32px;padding:0 12px;
  border:1px solid var(--border-2);border-radius:var(--radius);background:var(--surface);
  color:var(--text);font-family:var(--font);font-size:13px;font-weight:500;cursor:pointer;
  display:inline-flex;align-items:center;gap:6px;transition:background .15s}
.ui-empty-action:hover,.ui-empty>button:hover{background:var(--surface-2)}
.ui-empty.is-done,.ui-empty.done,.ui-empty--done{border-style:solid;border-color:var(--ok-br);background:var(--ok-bg)}
.ui-empty.is-done .ui-empty-icon,.ui-empty.done .ui-empty-icon,.ui-empty--done .ui-empty-icon{
  background:var(--surface);border:1px solid var(--ok-br);color:var(--ok)}
.ui-empty.is-done .ui-empty-title,.ui-empty.done .ui-empty-title,.ui-empty--done .ui-empty-title{color:var(--text)}
.ui-empty.is-none,.ui-empty.none,.ui-empty--none{border-style:dashed}
.ui-empty.is-filtered,.ui-empty.filtered,.ui-empty--filtered{border-style:solid;border-color:var(--border)}

/* ── 4. uiMeter -> .ui-meter  (THE posted-vs-target allocation meter) ──
   <div class="ui-meter" style="--ui-meter-color:#0e7490">
     <div class="ui-meter-track">
       <span class="ui-meter-fill" style="width:62%"></span>
       <span class="ui-meter-tick" style="left:70%"></span>
     </div>
     <div class="ui-meter-label"><span>..</span><b>..</b></div>
     <span class="ui-sr">62 percent posted against a 70 percent target</span>
   </div> */
.ui-meter{display:block;width:100%;min-width:0}
/* display:block is load-bearing — uiMeter renders the track as a <span>, and
   height does not apply to an inline box, so without this the whole meter
   collapses to 0x0 and is invisible everywhere it is used. */
.ui-meter-track,.ui-meter>.track{display:block;position:relative;height:6px;border-radius:3px;background:var(--surface-3)}
.ui-meter-fill,.ui-meter-track>i{display:block;height:100%;border-radius:3px;max-width:100%;
  background:var(--ui-meter-color,var(--ink));transition:width .3s}
.ui-meter-tick,.ui-meter-track>b{position:absolute;top:-3px;width:2px;height:12px;margin-left:-1px;
  background:var(--text);opacity:.65;border-radius:1px}
.ui-meter-label{display:flex;align-items:baseline;justify-content:space-between;gap:10px;
  margin-top:6px;font-size:12px;color:var(--text-3);font-variant-numeric:tabular-nums}
.ui-meter-label b,.ui-meter-label strong{color:var(--text);font-weight:600}
.ui-meter-label .ui-meter-target{color:var(--text-3);font-weight:500}
.ui-meter.is-over .ui-meter-fill{background:var(--danger)}
.ui-meter.is-under .ui-meter-fill{background:var(--warn)}
.ui-meter.is-ok .ui-meter-fill{background:var(--ok)}
.ui-meter.sm .ui-meter-track{height:4px}
.ui-meter.lg .ui-meter-track{height:8px;border-radius:4px}

/* ── 5. uiDiffChip -> .ui-diff  (signed difference, icon + sign + pt) ── */
.ui-diff{display:inline-flex;align-items:center;gap:2px;white-space:nowrap;
  font-size:12px;font-weight:600;font-variant-numeric:tabular-nums;color:var(--text-2)}
.ui-diff .ui-icon,.ui-diff svg{width:12px;height:12px}
.ui-diff-unit{font-weight:500;color:var(--text-3);margin-left:1px}
.ui-diff.is-ok,.ui-diff.ok{color:var(--ok)}
.ui-diff.is-warn,.ui-diff.warn{color:var(--warn)}
.ui-diff.is-bad,.ui-diff.bad,.ui-diff.is-danger{color:var(--danger)}
.ui-diff.is-flat,.ui-diff.is-zero,.ui-diff.flat{color:var(--text-3)}

/* ── 6. uiStatusPill -> .ui-pill  (glyph PLUS the word, never colour alone) */
.ui-pill{display:inline-flex;align-items:center;gap:5px;height:20px;padding:0 7px;
  border-radius:5px;border:1px solid var(--border);background:var(--surface-3);color:var(--text-2);
  font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;white-space:nowrap}
.ui-pill .ui-icon,.ui-pill svg{width:12px;height:12px}
.ui-pill.is-pending,.ui-pill.pending,.ui-pill-pending{background:var(--warn-bg);color:var(--warn);border-color:var(--warn-br)}
.ui-pill.is-approved,.ui-pill.approved,.ui-pill-approved{background:var(--ok-bg);color:var(--ok);border-color:var(--ok-br)}
.ui-pill.is-rejected,.ui-pill.rejected,.ui-pill-rejected{background:var(--danger-bg);color:var(--danger);border-color:var(--danger-br)}
.ui-pill.is-locked,.ui-pill.locked,.ui-pill-locked{background:var(--surface-3);color:var(--text-2);border-color:var(--border-2)}
.ui-pill.is-draft,.ui-pill.draft,.ui-pill-draft{background:var(--surface);color:var(--text-3);border-style:dashed;border-color:var(--border-2)}

/* ── 7. uiPeriodLabel -> .ui-period  (the resolved literal range) ─────── */
.ui-period{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;
  font-size:12px;font-weight:500;color:var(--text-2);font-variant-numeric:tabular-nums}
.ui-period .ui-icon,.ui-period svg{width:12px;height:12px;color:var(--text-3)}
.ui-period b,.ui-period strong{color:var(--text);font-weight:600}

/* ── 8. uiAsOf -> .ui-asof  (provenance line on every aggregate) ─────── */
.ui-asof{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;
  font-size:12px;color:var(--text-3);font-variant-numeric:tabular-nums}
.ui-asof .ui-icon,.ui-asof svg{width:12px;height:12px}

/* ── 9. uiConfirm -> .ui-confirm  (itemised consequences, explicit click) */
.ui-confirm-overlay{position:fixed;inset:0;z-index:1000;background:var(--overlay);
  display:flex;align-items:center;justify-content:center;padding:20px}
.ui-confirm{width:460px;max-width:100%;max-height:calc(100vh - 40px);
  background:var(--surface);border:1px solid var(--border-2);border-radius:var(--radius-lg);
  box-shadow:var(--shadow-overlay);display:flex;flex-direction:column;overflow:hidden}
.ui-confirm-head{padding:16px 20px;border-bottom:1px solid var(--border);
  display:flex;gap:10px;align-items:flex-start}
.ui-confirm-head .ui-icon{margin-top:1px;color:var(--text-3)}
.ui-confirm.is-danger .ui-confirm-head .ui-icon{color:var(--danger)}
.ui-confirm-title{font-size:15px;font-weight:600;color:var(--text);margin:0}
.ui-confirm-body{padding:16px 20px;overflow:auto;display:flex;flex-direction:column;gap:12px;
  font-size:13px;line-height:1.5;color:var(--text-2)}
.ui-confirm-lede{color:var(--text-2)}
.ui-confirm-consequences{list-style:none;margin:0;padding:0;
  border:1px solid var(--border);border-radius:var(--radius);background:var(--surface-2)}
.ui-confirm-consequences li{display:flex;gap:9px;align-items:flex-start;
  padding:9px 12px;border-bottom:1px solid var(--border);font-size:13px;color:var(--text);line-height:1.45}
.ui-confirm-consequences li:last-child{border-bottom:0}
.ui-confirm-consequences li::before{content:"";flex:none;width:5px;height:5px;border-radius:50%;
  background:var(--text-3);margin-top:7px}
.ui-confirm.is-danger .ui-confirm-consequences li::before{background:var(--danger)}
.ui-confirm-ack{display:flex;align-items:flex-start;gap:8px;font-size:13px;color:var(--text);cursor:pointer}
.ui-confirm-ack input{accent-color:var(--accent);width:14px;height:14px;margin-top:2px;flex:none}
.ui-confirm-foot{padding:12px 20px;border-top:1px solid var(--border);
  display:flex;gap:8px;justify-content:flex-end;align-items:center;flex-wrap:wrap}
.ui-confirm-foot .ui-confirm-note{margin-right:auto;font-size:12px;color:var(--text-3)}
.ui-confirm-cancel,.ui-confirm-ok{height:32px;padding:0 14px;border-radius:var(--radius);
  font-family:var(--font);font-size:13px;font-weight:600;cursor:pointer;
  display:inline-flex;align-items:center;gap:6px;transition:background .15s,opacity .15s}
.ui-confirm-cancel{border:1px solid var(--border-2);background:var(--surface);color:var(--text);font-weight:500}
.ui-confirm-cancel:hover{background:var(--surface-2)}
.ui-confirm-ok{border:1px solid var(--ink);background:var(--ink);color:var(--on-ink)}
.ui-confirm-ok:hover{opacity:.9}
.ui-confirm-ok:disabled{opacity:.45;cursor:not-allowed}
.ui-confirm.is-danger .ui-confirm-ok{border-color:var(--danger);background:var(--danger-bg);color:var(--danger)}
.ui-confirm.is-danger .ui-confirm-ok:hover{opacity:1;background:var(--danger-bg);filter:none;border-color:var(--danger)}

/* ── 10. uiToastUndo -> .ui-toast-undo  (bulk actions carry a real Undo) */
.ui-toast-undo{position:fixed;left:50%;bottom:20px;transform:translate(-50%,8px);z-index:1000;
  display:inline-flex;align-items:center;gap:12px;max-width:min(560px,calc(100vw - 32px));
  background:var(--ink);color:var(--on-ink);border-radius:var(--radius);
  padding:8px 10px 8px 14px;font-size:12px;font-weight:500;line-height:1.4;
  box-shadow:var(--shadow-overlay);opacity:0;pointer-events:none;
  transition:opacity .15s,transform .15s}
.ui-toast-undo.show,.ui-toast-undo.is-open{opacity:1;transform:translate(-50%,0);pointer-events:auto}
.ui-toast-undo-msg{min-width:0;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}
.ui-toast-undo-btn{flex:none;height:24px;padding:0 10px;border-radius:5px;
  border:1px solid currentColor;background:transparent;color:inherit;
  font-family:var(--font);font-size:12px;font-weight:600;cursor:pointer;transition:opacity .15s}
.ui-toast-undo-btn:hover{opacity:.75}
.ui-toast-undo-close{flex:none;width:22px;height:22px;border:0;border-radius:4px;background:transparent;
  color:inherit;cursor:pointer;display:grid;place-items:center;opacity:.75}
.ui-toast-undo-close:hover{opacity:1}

/* ── 11. Accessibility ────────────────────────────────────────────────── */
/* A visible ring on every keyboard-focused control, in both themes.
   !important because a dozen legacy rules set outline:none on :focus. */
*:focus-visible{outline:2px solid var(--accent)!important;outline-offset:2px!important;border-radius:3px}
input:focus-visible,select:focus-visible,textarea:focus-visible,
.field input:focus-visible,.ent-combo:focus-visible,.ent-select:focus-visible,
.search-input:focus-visible,.alloc-input:focus-visible,.hb-num:focus-visible{outline-offset:1px!important}
.cal-cell:focus-visible,.cal-week:focus-visible{outline-offset:-2px!important}

/* Older finance staff: honour the OS reduced-motion setting everywhere. */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.01ms!important;animation-iteration-count:1!important;
    transition-duration:.01ms!important;scroll-behavior:auto!important
  }
}

/* Wide content must scroll inside itself, never the page. */
.dash-table-wrap,.tblw,#entries-all-wrap{overflow-x:auto}

/* The stated must-survive width. */
@media (max-width:1100px){
  .sidebar{width:212px}
  .main-content{padding:20px 16px}
  .dash-charts-row{grid-template-columns:1fr}
}

/* nav slots collapse when the nav renderer has not filled them */
#nav-container-approvals:empty,#nav-group-label-review:empty{display:none}


/* ═══════════════════════════════════════════════════════════════════════
   VISUAL DIRECTION v2 — design/DIRECTION.md
   Green is the identity again. This layer sits last in styles.css so it
   re-values depth, surface, radius and type on the REAL components, and
   adds the shared classes every module is expected to reuse.
   It renames nothing and removes nothing.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── §3 TYPOGRAPHY ─────────────────────────────────────────────────────
   Inter, tabular numerals on every figure. One scale, seven roles.
   Use the class OR copy the values; never invent an eighth size. */
/* the base size/rhythm changes; the base COLOUR stays --text so nothing
   that inherits (numbers, table cells, row names) washes out. Prose that
   should sit at --text-2 asks for it via .ui-body. */
body{font-size:13.5px;line-height:1.5}

.ui-display,.hours-slab-val,.stat-card-val{
  font-size:34px;line-height:1.05;font-weight:600;letter-spacing:-.03em;color:var(--text);
  font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1}
.ui-h1,.page-title,.cal-title,.dash-title h2,.appr-person-name{
  font-size:20px;line-height:1.3;font-weight:600;letter-spacing:-.015em;color:var(--text)}
.ui-h2,.card-title,.section-title,.entries-panel-title,.q-card-title,
.view-card-title,.team-name,.dash-chart-title,.modal-title,.ui-empty-title{
  font-size:15px;line-height:1.35;font-weight:600;letter-spacing:-.01em;color:var(--text)}
.ui-body{font-size:13.5px;line-height:1.5;font-weight:450;color:var(--text-2)}
.ui-num,.num-val{font-size:15px;line-height:1;font-weight:600;color:var(--text);
  font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1}
.ui-eyebrow,.eyebrow,.sidebar-label,.settings-section-title,.ent-cap,.hb-cap,
.dash-filter-label,.ed-label,.stat-card-label,.day-fund-status-title,
.sidebar-week-label,.appr-person-role,.fi-name{
  font-size:11px;line-height:1;font-weight:600;letter-spacing:.06em;
  text-transform:uppercase;color:var(--text-3)}
.ui-micro,.micro{font-size:11.5px;line-height:1.4;font-weight:450;color:var(--text-3)}

/* ── §6 THE QUIET CLASS ────────────────────────────────────────────────
   The owner: "the app has lots of text, simplify it." Every caption,
   hint and helper string in the product goes through .hint — one line,
   micro, --text-3, no full stop. .hint.is-gone removes it outright so a
   module can delete prose without deleting markup. */
.hint{display:block;font-size:11.5px;line-height:1.4;font-weight:450;color:var(--text-3);
  margin:0;letter-spacing:0}
.hint.inline{display:inline}
.hint.one-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.hint.is-gone,.is-gone{display:none!important}

/* Existing prose in the app is demoted to the same quiet register so the
   whole product goes quiet at once, without any module editing markup. */
.auth-desc,.modal-sub,.settings-section-desc,.sr-sub,.sidebar-hint,.hb-tip,
.q-card-sub,.view-card-sub,.team-sub,.stat-card-sub,.fund-sub,.entry-desc,
.modal-day-hint,.dash-alloc-sub,.notif-time,.q-file-name,.ui-empty-body,
.token-meta,.pw-label,.click-hint,.theme-card-sub,.profile-email{
  font-size:11.5px;line-height:1.4;font-weight:450;color:var(--text-3);font-style:normal}
.modal-sub:empty,.settings-section-desc:empty,.sr-sub:empty,.hint:empty{display:none}
/* A settings row says what it does through its right-aligned current value. */
.sr-value{font-size:13px;font-weight:500;color:var(--text-3);text-align:right;white-space:nowrap;
  font-variant-numeric:tabular-nums}

/* ── §2 DEPTH LADDER ───────────────────────────────────────────────────
   e0 flat · e1 card (border + shadow-1) · e2 lifted (shadow-2, no border)
   · e3 overlay (shadow-3). Utilities first, then the real components. */
.e0,.elev-0{box-shadow:none;border:1px solid var(--border)}
.e1,.elev-1,.card{background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius-lg);box-shadow:var(--shadow-1)}
.e2,.elev-2{border-color:transparent;box-shadow:var(--shadow-2)}
.e3,.elev-3{box-shadow:var(--shadow-3)}
.card.is-primary{background:var(--accent-bg);border-color:var(--accent-br);border-radius:var(--radius-xl)}

/* every card, list group and sheet section in the product */
.auth-box,.wizard-box,.entries-panel,.cal-grid-wrap,.settings-section,.stat-card,
.dash-chart-card,.dash-table-wrap,.view-card,.team-card,.q-card,.sidebar-week,
.fund-card,.appr-summary,.q-emp-list,.day-fund-status,.countdown-card,.dash-filters,
.fund-info-item,.token-box{
  border-radius:var(--radius-lg);box-shadow:var(--shadow-1)}
.view-card:hover,.team-card:hover{box-shadow:var(--shadow-2);border-color:transparent}
/* the card carrying a screen's primary number takes the accent ground */
.stat-card.is-primary,.stat-card.primary{background:var(--accent-bg);border-color:var(--accent-br);
  border-radius:var(--radius-xl);box-shadow:var(--shadow-2)}
/* Jobber device — a 3px fund-coloured top rule, Dashboard fund cards only */
.card-rule-top{border-top:3px solid var(--rule,var(--brand))}

/* e3 overlays */
.modal,.ed-modal,.history-modal,.ui-confirm,.notif-panel,.ms-panel,.mg-menu{
  border-radius:var(--radius-lg);box-shadow:var(--shadow-3)}
.modal,.ed-modal,.history-modal,.ui-confirm{border-radius:var(--radius-xl)}
.modal-overlay{backdrop-filter:blur(2px)}

/* ── §4.4 THE GREEN SPINE ──────────────────────────────────────────────
   The active thing carries a 3px --accent rule on its leading edge, and
   nothing else in the product uses a coloured edge rule. */
.has-spine{position:relative}
.has-spine::before{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;
  background:var(--accent);border-radius:0 2px 2px 0}
.cal-cell.today{position:relative}
.cal-cell.today::before{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;
  background:var(--accent)}
.notif-item.unread{border-left:3px solid var(--accent)}

/* ── §1 SURFACES: a header always sits lighter than its content ───────── */
.all-entry-table th,.dash-table th,.fund-alloc-table th,.dash-table-header,.cal-dow-row{
  background:var(--surface-2);color:var(--text-3)}
.dash-table tr:hover td,.all-entry-table tr.clickable-row:hover td,.snap-row:hover{
  background:var(--surface-2)}
.ed-header,.ed-footer{background:var(--surface-2)}

/* ── INPUTS ────────────────────────────────────────────────────────────
   e0: 1px --border-2, --input-bg ground, --radius, brand focus ring. */
.field input,.field select,.field textarea,.ent-combo,.ent-select,.search-input,
.alloc-input,.hb-num,.wiz-input,.wiz-list-row input[type=text],.act-add-inp,
.dash-filter-input,.ms-search,.ms-trigger,.cat-dropdown-toggle,.ui-range-date{
  background:var(--input-bg);border-color:var(--border-2);border-radius:var(--radius)}
.field input:focus,.field select:focus,.field textarea:focus,.ent-combo:focus,
.ent-select:focus,.search-input:focus,.alloc-input:focus,.hb-num:focus,
.wiz-input:focus,.act-add-inp:focus,.dash-filter-input:focus,.ms-search:focus,
.ui-range-date:focus{
  border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-bg);outline:none}
::placeholder{color:var(--text-3);opacity:1}
.field input:disabled,.field select:disabled,.field textarea:disabled,
.ent-select:disabled,.alloc-input:disabled{background:var(--surface-3);color:var(--text-3)}

/* ── BUTTONS — one green primary per screen, everything else neutral ──── */
.btn-primary,.btn-save,.btn-new-entry,.btn-io.solid,.btn-io.blue,.print-btn,
.btn-mini.solid,.appr-btn-approve,.btn-submit-ready,.q-submit-btn.ready,.ui-confirm-ok{
  background:var(--ink);border-color:var(--ink);color:var(--on-ink);border-radius:var(--radius);
  font-weight:600;box-shadow:var(--shadow-1)}
.btn-primary:hover,.btn-save:hover,.btn-new-entry:hover,.btn-io.solid:hover,
.btn-io.blue:hover,.print-btn:hover,.btn-mini.solid:hover,.appr-btn-approve:hover,
.btn-submit-ready:hover,.q-submit-btn.ready:hover,.ui-confirm-ok:hover{
  background:var(--accent-ink);border-color:var(--accent-ink);color:var(--on-ink);opacity:1}
.btn-outline,.btn-cancel,.btn-sm,.btn-mini,.btn-export,.btn-io,.cal-nav-btn,
.cal-today-btn,.appr-back-btn,.appr-period-btn,.mg-opt,.role-toggle,.size-opt{
  border-radius:var(--radius)}
/* text button — the non-primary action inside an open row's action bar */
.btn-text{height:30px;padding:0 10px;border:0;background:transparent;border-radius:var(--radius);
  font-family:var(--font);font-size:13px;font-weight:600;color:var(--text-2);cursor:pointer;
  display:inline-flex;align-items:center;gap:6px;transition:background .15s,color .15s}
.btn-text:hover{background:var(--surface-2);color:var(--text)}
.btn-text.is-danger{color:var(--danger)}
.btn-text.is-danger:hover{background:var(--danger-bg)}
/* the action bar pinned bottom-right of an open row */
.action-bar{display:flex;align-items:center;gap:6px;justify-content:flex-end;
  flex-wrap:wrap;margin-top:14px}
.action-bar .btn-text{order:0}
.action-bar .btn-primary,.action-bar .btn-mini.solid{order:1;width:auto;padding:0 14px;height:32px;
  display:inline-flex;align-items:center;gap:6px}

/* links */
a,.auth-switch a,.notif-mark-all{color:var(--accent-ink)}

/* checked toggles are green */
input:checked+.toggle-slider{background:var(--accent)}
.toggle-slider{border-radius:11px}
input[type=checkbox],input[type=radio],input[type=range]{accent-color:var(--accent)}

/* tabs */
.manage-tab.active{border-bottom-color:var(--accent);color:var(--text)}
.seg-btn.active,.blk-seg-btn.active,.um-tab.active{background:var(--surface);color:var(--text);
  border-color:var(--border-2);box-shadow:var(--shadow-1)}
.seg-toggle,.blk-seg,.um-tabs{background:var(--surface-3);border-color:var(--border)}

/* ── §4.1 THE FUND CHIP ────────────────────────────────────────────────
   A fund is never a bare dot. 20px rounded square, its -bg tint, its
   2-letter code, then the fund name at h2. Identical object everywhere.
     <span class="fund-chip fc-rw">RW</span>
     <span class="fund-chip" style="--fc:#a3376b;--fc-bg:#fbeaf1">RW</span> */
.fund-chip{width:20px;height:20px;flex:none;border-radius:var(--radius);
  display:inline-flex;align-items:center;justify-content:center;
  font-family:var(--font);font-size:10.5px;font-weight:700;line-height:1;letter-spacing:.02em;
  text-transform:uppercase;overflow:hidden;
  background:var(--fc-bg,var(--surface-3));color:var(--fc,var(--text-2));
  border:1px solid var(--fc-br,transparent)}
.fund-chip.lg{width:24px;height:24px;font-size:11.5px}
.fund-chip.sm{width:16px;height:16px;font-size:9.5px;border-radius:5px}
.fc-rw{--fc:var(--rw);--fc-bg:var(--rw-bg);--fc-br:var(--rw-br)}
.fc-sti{--fc:var(--sti);--fc-bg:var(--sti-bg);--fc-br:var(--sti-br)}
.fc-leave{--fc:var(--leave);--fc-bg:var(--leave-bg);--fc-br:var(--leave-br)}
.fc-4{--fc:var(--fund-4);--fc-bg:var(--fund-4-bg);--fc-br:var(--fund-4-br)}
.fc-x,.fc-other{--fc:var(--fund-x);--fc-bg:var(--fund-x-bg);--fc-br:var(--fund-x-br)}
.fc-generic{--fc:var(--accent-ink);--fc-bg:var(--accent-bg);--fc-br:var(--accent-br)}
/* chip + name, the one way a fund is written */
.fund-item{display:inline-flex;align-items:center;gap:9px;min-width:0}
.fund-item-name{font-size:15px;line-height:1.35;font-weight:600;letter-spacing:-.01em;
  color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fund-item.sm .fund-item-name{font-size:13.5px;font-weight:600}

/* ── §4.2 THE HOURS SLAB ───────────────────────────────────────────────
   One per screen, top-left of the content column.
     <div class="hours-slab">
       <div class="hours-slab-cap">Posted</div>
       <div class="hours-slab-val">72.5<span class="hours-slab-unit">h</span></div>
       <div class="hint">Nov 1–15</div>
     </div>                                                              */
.hours-slab{display:inline-flex;flex-direction:column;gap:3px;padding:12px 18px;
  min-width:140px;background:var(--accent-bg);border-radius:var(--radius-lg);
  border-left:3px solid var(--brand)}
.hours-slab-cap{font-size:11px;line-height:1;font-weight:600;letter-spacing:.06em;
  text-transform:uppercase;color:var(--text-3)}
.hours-slab-val{font-size:34px;line-height:1.05;font-weight:600;letter-spacing:-.03em;
  color:var(--text);font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1;
  display:flex;align-items:baseline;gap:2px}
.hours-slab-unit{font-size:13px;line-height:1;font-weight:500;letter-spacing:0;color:var(--text-3)}
.hours-slab.is-over{border-left-color:var(--warn)}
.hours-slab.is-over .hours-slab-val{color:var(--warn)}
.hours-slab.sm{padding:9px 14px;min-width:0}
.hours-slab.sm .hours-slab-val{font-size:24px}
.hours-slab-row{display:flex;align-items:flex-start;gap:14px;flex-wrap:wrap;margin-bottom:16px}

/* ── §4.3 THE CAPPED BAR ───────────────────────────────────────────────
   One 8px stacked horizontal bar, 2px gaps, 4px radius on the outer
   ends, fund colours largest-first. No donuts, no pie charts, ever.
     <div class="cap-bar">
       <i class="cap-bar-seg" style="--seg:var(--rw);width:48%"></i> ...
     </div>                                                             */
.cap-bar{display:flex;align-items:stretch;gap:2px;height:8px;width:100%;
  background:transparent;border-radius:4px}
.cap-bar-seg{height:8px;min-width:3px;border-radius:1px;
  background:var(--seg,var(--fund-x));transition:width .35s var(--ease)}
.cap-bar-seg:first-child{border-top-left-radius:4px;border-bottom-left-radius:4px}
.cap-bar-seg:last-child{border-top-right-radius:4px;border-bottom-right-radius:4px}
.cap-bar-rest{flex:1 1 auto;min-width:3px;background:var(--surface-3);border-radius:1px}
.cap-bar-rest:last-child{border-top-right-radius:4px;border-bottom-right-radius:4px}
/* the fund-chip legend that sits under it */
.cap-legend{display:flex;flex-direction:column;margin-top:12px}
.cap-legend-row{display:flex;align-items:center;gap:10px;min-height:34px;
  border-bottom:1px solid var(--border)}
.cap-legend-row:last-child{border-bottom:0}
.cap-legend-name{flex:1 1 auto;min-width:0;font-size:15px;line-height:1.35;font-weight:600;
  letter-spacing:-.01em;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cap-legend-val{flex:none;font-size:13px;font-weight:600;color:var(--text);
  font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap}
.cap-legend-val .pct{font-weight:500;color:var(--text-3);margin-left:6px}

/* ── §5 THE ACCORDION — uiAccordion() / uiAccBind() ────────────────────
   THE one list pattern for the whole app. Exactly one row open per group.
     <div class="ui-acc" data-acc-group="approvals">
       <div class="ui-acc-item is-open">
         <button class="ui-acc-head" aria-expanded="true">
           <span class="ui-acc-lead">..</span>
           <span class="ui-acc-title">
             <span class="ui-acc-name">Maria Rivera</span>
             <span class="ui-acc-meta">Nov 1–15 · 12 entries</span>
           </span>
           <span class="ui-acc-num">72.5h</span>
           <span class="ui-pill is-pending">Pending</span>
           <svg class="ui-acc-chev ui-icon">..</svg>
         </button>
         <div class="ui-acc-body">..</div>
       </div>
     </div>                                                              */
.ui-acc{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);
  box-shadow:var(--shadow-1);overflow:hidden}
.ui-acc.has-open{overflow:visible}
.ui-acc:has(>.ui-acc-item.is-open){overflow:visible}
.ui-acc-label{font-size:11px;line-height:1;font-weight:600;letter-spacing:.06em;
  text-transform:uppercase;color:var(--text-3);margin-bottom:8px;display:block}
.ui-acc-item{position:relative;background:var(--surface);
  transition:margin .16s var(--ease),box-shadow .16s var(--ease),border-radius .16s var(--ease)}
.ui-acc-item+.ui-acc-item{border-top:1px solid var(--border)}

/* row closed — 52px, one line, never two */
.ui-acc-head{display:flex;align-items:center;gap:12px;width:100%;min-height:52px;
  padding:0 16px;margin:0;border:0;background:transparent;text-align:left;cursor:pointer;
  font-family:var(--font);color:var(--text);transition:background .15s}
.ui-acc-head:hover{background:var(--surface-2)}
.ui-acc-head:focus-visible{outline:none!important;box-shadow:inset 0 0 0 2px var(--brand)}
.ui-acc-head>*{min-width:0}
.ui-acc-head>:first-child:not(.ui-acc-lead):not(.fund-chip):not(.ui-avatar):not(.ui-icon):not(svg){
  flex:1 1 auto}
.ui-acc-lead{flex:none;width:28px;display:inline-flex;align-items:center;justify-content:flex-start}
.ui-acc-title{flex:1 1 auto;min-width:0;display:flex;align-items:baseline;gap:8px;flex-wrap:nowrap;
  overflow:hidden}
.ui-acc-name{font-size:15px;line-height:1.35;font-weight:600;letter-spacing:-.01em;color:var(--text);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:none;max-width:100%;
  transition:font-size .16s var(--ease),color .15s}
.ui-acc-meta{font-size:11.5px;line-height:1.4;font-weight:450;color:var(--text-3);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.ui-acc-num{flex:none;font-size:15px;line-height:1;font-weight:600;color:var(--text);
  font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1;white-space:nowrap}
.ui-acc-badge{flex:none;display:inline-flex;align-items:center}
.ui-acc-chev{flex:none;width:16px;height:16px;color:var(--text-3);
  transition:transform .16s var(--ease)}
.ui-acc-item.is-open>.ui-acc-head>.ui-acc-chev,
.ui-acc-item.is-open .ui-acc-chev{transform:rotate(180deg)}
/* closed siblings only dim their name */
.ui-acc.has-open .ui-acc-item:not(.is-open) .ui-acc-name{color:var(--text-2)}

/* row open — lifts to e2, detaches, gains the green spine */
.ui-acc-item.is-open{margin:12px;border-radius:var(--radius-lg);box-shadow:var(--shadow-2);
  border-top-color:transparent;overflow:hidden;z-index:1}
.ui-acc-item.is-open+.ui-acc-item{border-top-color:transparent}
.ui-acc-item.is-open::before{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;
  background:var(--accent);z-index:2}
.ui-acc-item.is-open>.ui-acc-head{background:var(--surface);padding-left:19px}
.ui-acc-item.is-open>.ui-acc-head .ui-acc-name{font-size:17px}

/* body — always a step darker than its header */
.ui-acc-body{display:none;background:var(--surface-2);border-top:1px solid var(--border);
  padding:16px;color:var(--text-2);font-size:13.5px;line-height:1.5}
.ui-acc-item.is-open>.ui-acc-body{display:block;animation:uiAccIn .16s var(--ease)}
@keyframes uiAccIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
.ui-acc-body>.hours-slab-row:first-child,.ui-acc-body>.hours-slab:first-child{margin-top:0}
/* inputs inside a --surface-2 body step back up so they stay visible */
.ui-acc-body input,.ui-acc-body select,.ui-acc-body textarea,
.ui-acc-body .ent-combo,.ui-acc-body .ent-select,.ui-acc-body .search-input{
  background:var(--surface)}
/* detail rows inside a body */
.ui-acc-rows{display:flex;flex-direction:column;margin-top:14px;background:var(--surface);
  border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}
.ui-acc-row{display:flex;align-items:center;gap:12px;min-height:40px;padding:6px 12px;
  border-bottom:1px solid var(--border);font-size:13.5px;color:var(--text-2)}
.ui-acc-row:last-child{border-bottom:0}
.ui-acc-row>.ui-acc-row-main{flex:1 1 auto;min-width:0;color:var(--text);font-weight:500;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ui-acc-row>.ui-acc-row-val{flex:none;font-size:13px;font-weight:600;color:var(--text);
  font-variant-numeric:tabular-nums;white-space:nowrap}

/* dense variant */
.ui-acc.is-dense .ui-acc-head,.ui-acc.dense .ui-acc-head{min-height:44px;padding:0 12px}
.ui-acc.is-dense .ui-acc-name,.ui-acc.dense .ui-acc-name{font-size:13.5px}
.ui-acc.is-dense .ui-acc-body,.ui-acc.dense .ui-acc-body{padding:12px}

/* featured-first variant — Group Services, and any "one primary + many" */
.ui-acc.is-featured{background:transparent;border:0;box-shadow:none;overflow:visible}
.ui-acc.is-featured>.ui-acc-item:first-child{background:var(--surface);
  border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow-1);
  margin:0 0 12px;overflow:hidden}
.ui-acc.is-featured>.ui-acc-item:first-child>.ui-acc-body{display:block}
.ui-acc.is-featured>.ui-acc-item:first-child>.ui-acc-head .ui-acc-name{font-size:17px}
.ui-acc.is-featured>.ui-acc-item:first-child+.ui-acc-item{background:var(--surface);
  border:1px solid var(--border);border-top:1px solid var(--border);
  border-top-left-radius:var(--radius-lg);border-top-right-radius:var(--radius-lg);
  box-shadow:var(--shadow-1)}
.ui-acc.is-featured>.ui-acc-item:first-child~.ui-acc-item{border-left:1px solid var(--border);
  border-right:1px solid var(--border)}
.ui-acc.is-featured>.ui-acc-item:last-child{border-bottom:1px solid var(--border);
  border-bottom-left-radius:var(--radius-lg);border-bottom-right-radius:var(--radius-lg)}

/* ── §5 SIMPLE / ADVANCED — uiViewToggle() ─────────────────────────────
     <div class="ui-vt" role="group">
       <button class="ui-vt-btn is-active" aria-pressed="true">Simple</button>
       <button class="ui-vt-btn">Advanced</button>
     </div>                                                              */
.ui-vt{display:inline-flex;align-items:center;gap:2px;height:28px;padding:2px;flex:none;
  background:var(--surface-3);border:1px solid var(--border);border-radius:999px}
.ui-vt-btn{height:22px;padding:0 12px;border:0;border-radius:999px;background:transparent;
  font-family:var(--font);font-size:12px;font-weight:600;line-height:1;color:var(--text-2);
  cursor:pointer;white-space:nowrap;transition:background .15s,color .15s,box-shadow .15s}
.ui-vt-btn:hover{color:var(--text)}
.ui-vt-btn.is-active,.ui-vt-btn.active,.ui-vt-btn[aria-pressed=true]{
  background:var(--surface);color:var(--text);box-shadow:var(--shadow-1)}
.ui-vt-btn:focus-visible{outline:2px solid var(--brand)!important;outline-offset:1px!important}

/* the filter row the toggle is parked at the right end of */
.ui-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.ui-toolbar>.ui-vt{margin-left:auto}
.ui-toolbar-title{font-size:20px;line-height:1.3;font-weight:600;letter-spacing:-.015em;
  color:var(--text);margin-right:4px}
/* Advanced animates the full filter bar open beneath it; nothing hides in a modal */
.ui-adv{display:grid;grid-template-rows:0fr;transition:grid-template-rows .18s var(--ease)}
.ui-adv.is-open{grid-template-rows:1fr}
.ui-adv>*{overflow:hidden;min-height:0}
.ui-adv-inner{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;
  background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);
  padding:12px 14px;margin-bottom:14px}

/* ── §5 THE PERIOD RAIL — uiRangePicker() ──────────────────────────────
     <div class="ui-range is-custom">
       <button class="ui-range-seg is-active">Month</button> ...
       <span class="ui-range-custom">
         <input class="ui-range-date" type="date"><span class="ui-range-sep">to</span>
         <input class="ui-range-date" type="date"></span>
     </div>                                                              */
.ui-range{display:flex;align-items:center;gap:2px;flex-wrap:wrap;min-width:0}
.ui-range-seg{position:relative;height:28px;padding:0 10px;border:0;background:transparent;
  border-radius:var(--radius);font-family:var(--font);font-size:12.5px;font-weight:600;
  line-height:1;color:var(--text-3);cursor:pointer;white-space:nowrap;
  transition:color .15s,background .15s}
.ui-range-seg:hover{color:var(--text);background:var(--surface-2)}
.ui-range-seg.is-active,.ui-range-seg.active,.ui-range-seg[aria-pressed=true]{color:var(--text)}
.ui-range-seg.is-active::after,.ui-range-seg.active::after,.ui-range-seg[aria-pressed=true]::after{
  content:'';position:absolute;left:8px;right:8px;bottom:2px;height:2px;
  background:var(--accent);border-radius:1px}
.ui-range-seg:focus-visible{outline:2px solid var(--brand)!important;outline-offset:1px!important}
.ui-range-custom{display:none;align-items:center;gap:6px;margin-left:6px}
.ui-range.is-custom>.ui-range-custom,.ui-range-custom.is-open{display:inline-flex}
.ui-range-date{height:28px;padding:0 8px;border:1px solid var(--border-2);border-radius:var(--radius);
  background:var(--input-bg);color:var(--text);font-family:var(--font);font-size:12.5px;
  font-variant-numeric:tabular-nums;outline:none;min-width:0}
.ui-range-sep{font-size:11.5px;color:var(--text-3)}
.ui-range-label{font-size:12.5px;font-weight:500;color:var(--text-3);margin-left:8px;
  font-variant-numeric:tabular-nums;white-space:nowrap}

/* ── §5 HOURS IS A DRAG TRACK, NOT BUTTONS ─────────────────────────────
   6px --surface-3 track, --accent fill, 20px white thumb at e1, micro
   0 and 16 at the ends, floating value bubble. Past 8 the fill is warn. */
.hb-range{height:26px}
.hb-range::-webkit-slider-runnable-track{height:6px;border-radius:3px;
  background:linear-gradient(to right,var(--accent) 0,var(--accent) var(--pct,100%),
    var(--surface-3) var(--pct,100%),var(--surface-3) 100%)}
.hb-range.ot::-webkit-slider-runnable-track{
  background:linear-gradient(to right,var(--warn) 0,var(--warn) var(--pct,100%),
    var(--surface-3) var(--pct,100%),var(--surface-3) 100%)}
.hb-range::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;margin-top:-7px;
  width:20px;height:20px;border-radius:50%;background:var(--surface);
  border:1px solid var(--border-2);box-shadow:var(--shadow-1)}
.hb-range.ot::-webkit-slider-thumb{border-color:var(--warn-br)}
.hb-range::-moz-range-track{height:6px;border-radius:3px;background:var(--surface-3)}
.hb-range::-moz-range-progress{height:6px;border-radius:3px;background:var(--accent)}
.hb-range.ot::-moz-range-progress{background:var(--warn)}
.hb-range::-moz-range-thumb{width:20px;height:20px;border:1px solid var(--border-2);
  border-radius:50%;background:var(--surface);box-shadow:var(--shadow-1)}
.hb-scale{font-size:11.5px;color:var(--text-3)}
/* the floating value bubble that rides the thumb */
.hb-track{position:relative}
.hb-bubble{position:absolute;top:-4px;transform:translate(-50%,-100%);pointer-events:none;
  padding:3px 8px;border-radius:var(--radius);background:var(--surface);color:var(--text);
  border:1px solid var(--border-2);box-shadow:var(--shadow-1);
  font-size:12.5px;font-weight:600;line-height:1;font-variant-numeric:tabular-nums;white-space:nowrap}
.hb-bubble.is-over{border-color:var(--warn-br);color:var(--warn)}

/* ── §6 ERRORS ARE NEVER A BANNER ──────────────────────────────────────
   The offending field takes a --danger border and one micro line beneath. */
.field.error input,.field.error select,.field.error textarea,
.is-invalid,input.is-invalid,select.is-invalid,textarea.is-invalid,
[aria-invalid=true]{border-color:var(--danger)!important;box-shadow:none}
.field.error input:focus,.is-invalid:focus,[aria-invalid=true]:focus{
  box-shadow:0 0 0 3px var(--danger-bg)}
.err-msg,.inline-err{font-size:11.5px;line-height:1.4;font-weight:450;color:var(--danger);
  margin-top:4px;background:none;border:0;padding:0}
.field.error .err-msg,.inline-err{display:block}
.inline-err:empty{display:none}
/* form-level failure: the same one line, to the left of a disabled submit */
.form-fail{display:flex;align-items:center;gap:10px;justify-content:flex-end;margin-top:12px}
.form-fail .inline-err{margin:0;margin-right:auto;text-align:left}

/* ── §6 EMPTY STATES — one glyph, one line, one button ─────────────────
   .ui-empty-body is kept in the DOM (modules pass it) but demoted to a
   single quiet line so it can never become a paragraph. */
.ui-empty{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);
  box-shadow:var(--shadow-1);border-style:solid;min-height:150px;padding:32px 24px;gap:6px}
.ui-empty-icon{width:auto;height:auto;background:none;border-radius:0;color:var(--text-3);
  margin-bottom:4px}
.ui-empty-icon .ui-icon,.ui-empty-icon svg{width:18px;height:18px}
.ui-empty-title{font-size:15px;line-height:1.35;font-weight:600;letter-spacing:-.01em;color:var(--text)}
.ui-empty-body{max-width:52ch;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden}
.ui-empty-body:empty{display:none}
.ui-empty-action,.ui-empty>button{height:32px;border-radius:var(--radius);
  background:var(--ink);border:1px solid var(--ink);color:var(--on-ink);font-weight:600;
  box-shadow:var(--shadow-1)}
.ui-empty-action:hover,.ui-empty>button:hover{background:var(--accent-ink);border-color:var(--accent-ink)}
.ui-empty.is-done,.ui-empty.done,.ui-empty--done{background:var(--accent-bg);border-color:var(--accent-br)}
.ui-empty.is-done .ui-empty-icon,.ui-empty.done .ui-empty-icon,.ui-empty--done .ui-empty-icon{
  background:none;border:0;color:var(--ok)}

/* ── SHARED PARTS RESTYLED TO THE NEW DIRECTION ───────────────────────── */
/* pill — 11px/600, --radius, -bg ground, -br border, ink text */
.ui-pill,.status-pill,.status-badge{height:20px;border-radius:var(--radius);font-size:11px;
  font-weight:600;letter-spacing:.04em}
.ui-pill{padding:0 8px;background:var(--surface-3);border-color:var(--border);color:var(--text-2)}
.ui-pill.is-approved,.ui-pill.approved,.ui-pill-approved{background:var(--ok-bg);color:var(--ok);
  border-color:var(--ok-br)}
/* meter — the track is --surface-3, the fill is brand unless told otherwise */
.ui-meter-track,.ui-meter>.track{height:8px;border-radius:4px;background:var(--surface-3)}
.ui-meter-fill,.ui-meter-track>i{border-radius:4px;background:var(--ui-meter-color,var(--brand))}
.ui-meter-tick,.ui-meter-track>b{top:-2px;height:12px;background:var(--text-3);opacity:.8}
.ui-meter-label{margin-top:6px;font-size:11.5px;color:var(--text-3)}
.ui-meter.is-ok .ui-meter-fill{background:var(--ok)}
/* diff chip */
.ui-diff{font-size:12.5px}
.ui-diff.is-ok,.ui-diff.ok{color:var(--ok)}
/* period label / as-of line */
.ui-period,.ui-asof{font-size:12.5px}
.ui-asof{font-size:11.5px}

/* the calendar keeps its identity but joins the new ladder */
.cal-cell.selected{background:var(--accent-bg);box-shadow:inset 0 0 0 2px var(--accent)}
/* --ink, not --accent: white on --accent is 3.8:1 and this is a number */
.cal-cell.today .cal-day-num,.cal-cell.selected .cal-day-num{background:var(--ink);
  color:var(--on-ink)}
.cal-entry-pill{border-radius:6px}
.cal-week.sel-week{background:var(--accent-bg)}

/* the sidebar stays light and calm under the navy bar */
.sidebar{background:var(--surface);border-right:1px solid var(--border)}
.sidebar-week,.fund-card,.countdown-card{background:var(--surface)}

/* ── ACCESSIBILITY — the focus ring is --brand, visible in both themes ── */
*:focus-visible{outline:2px solid var(--brand)!important;outline-offset:2px!important}
.ui-acc-head:focus-visible{outline:none!important;box-shadow:inset 0 0 0 2px var(--brand)}

@media (prefers-reduced-motion:reduce){
  .ui-acc-item.is-open>.ui-acc-body{animation:none}
  .ui-acc-item,.ui-acc-chev,.ui-acc-name,.ui-adv,.cap-bar-seg{transition:none!important}
}

/* ── CONTRAST CORRECTIONS (WCAG-AA, both themes) ──────────────────────
   Measured, not guessed. Four light-theme pairs from DIRECTION.md's
   table land under 4.5:1, so the token VALUES are kept exactly as
   specified and only the places where they carry text are re-pointed. */

/* 1. focus indicator: --brand is 2.5:1 on white. --ring is --accent in
      light (3.8:1), --brand in dark (8.9:1). Ring stays green either way. */
*:focus-visible{outline:2px solid var(--ring)!important;outline-offset:2px!important}
.ui-acc-head:focus-visible{outline:none!important;box-shadow:inset 0 0 0 2px var(--ring)}
.ui-vt-btn:focus-visible,.ui-range-seg:focus-visible{
  outline:2px solid var(--ring)!important;outline-offset:1px!important}
.topbar *:focus-visible{outline-color:var(--brand)!important}

/* 2. --text-3 on --accent-bg is 4.4:1, so the slab's label and unit,
      which sit on that ground, step up to --text-2 (8.2:1). */
.hours-slab-cap,.hours-slab-unit,.hours-slab .hint{color:var(--text-2)}

/* 3. the 2-letter fund code uses the fund's INK, not its fill colour. */
.fc-rw{--fc:var(--rw-ink)}
.fc-sti{--fc:var(--sti-ink)}
.fc-leave{--fc:var(--leave-ink)}
.fc-4{--fc:var(--fund-4-ink)}
.fc-x,.fc-other{--fc:var(--fund-x-ink)}

/* 4. --accent is 3.8:1 on white: fine for a rule, a fill or a ring, not
      for a word. Every pre-existing rule that painted TEXT with it moves
      to --accent-ink (7.6:1). Graphical uses keep --accent. */
.quota-week-note,.import-preview,.ms-trigger.has-selection,
.ms-trigger.has-selection .ms-chevron,.auth-switch a,.fund-opt.selected{
  color:var(--accent-ink)}

/* 5. a chart fill must clear 3:1 against its own track: --brand is 2.1:1
      on --surface-3 in light, --accent is 3.2:1. Meters and bars default
      to --accent; a caller passing --ui-meter-color still wins. */
.ui-meter-fill,.ui-meter-track>i{background:var(--ui-meter-color,var(--accent))}
.fund-bar.generic-bar,.sw-bar,.view-bar-fill{background:var(--accent)}

/* ── ACCORDION CORNERS ────────────────────────────────────────────────
   The group can drop overflow:hidden (so an open row's e2 shadow is not
   clipped), so the end rows round their own outer corners. */
.ui-acc>.ui-acc-item:first-child{border-top-left-radius:var(--radius-lg);
  border-top-right-radius:var(--radius-lg)}
.ui-acc>.ui-acc-item:last-child{border-bottom-left-radius:var(--radius-lg);
  border-bottom-right-radius:var(--radius-lg)}
.ui-acc>.ui-acc-item:first-child>.ui-acc-head{border-top-left-radius:inherit;
  border-top-right-radius:inherit}
.ui-acc>.ui-acc-item:last-child>.ui-acc-body{border-bottom-left-radius:inherit;
  border-bottom-right-radius:inherit}
.ui-acc>.ui-acc-item:not(.is-open){overflow:hidden}
