
:root{
  color-scheme:dark;
  --bg:#0f1012; --surface:#18191c; --surface-2:#1d1e22; --sunk:#141518; --raise:#222327;
  --ink:#f0efec; --ink-2:#c6c5c0; --muted:#9c9c97; --faint:#6f706c; --line:#2b2d32; --line-2:#3a3c42;
  --brand:#F1420B; --brand-ink:#0b0b0c; --brand-tint:rgba(241,66,11,.14); --brand-soft:#ff7a4d;
  --teal:#2A93C1; --teal-tint:rgba(42,147,193,.16);
  --accent:#7aa7ff; --accent-tint:#1c2a44;
  --good:#5bcf78; --good-tint:#15291b; --good-mark:#0ca30c;
  --watch:#f2b84a; --watch-tint:#2d2412; --watch-mark:#fab219;
  --bad:#f27b7b; --bad-tint:#331a1a; --bad-mark:#d03b3b;
  --none:#a9a9a4; --none-tint:#242528;
  --series:#3987e5;
  --pl-labor:#d95926; --pl-oh:#9085e9; --pl-fee:#d55181; --pl-profit:#0ca30c;
  --hl:#ffffff0a; --scrim:rgba(4,5,6,.62);
  --shadow:0 1px 2px rgba(0,0,0,.4);
  --shadow-pop:0 16px 40px rgba(0,0,0,.55),0 2px 6px rgba(0,0,0,.4);
  --r:14px; --r-sm:10px;
  --side:248px;
}
:root[data-theme="light"]{
  color-scheme:light;
  --bg:#f5f5f2; --surface:#ffffff; --surface-2:#fafaf8; --sunk:#f0f0ec; --raise:#ffffff;
  --ink:#15171c; --ink-2:#454a54; --muted:#676c76; --faint:#8b8f97; --line:#e5e4df; --line-2:#d6d5cf;
  --brand-tint:rgba(241,66,11,.10); --brand-soft:#c2370a;
  --teal-tint:rgba(42,147,193,.12);
  --accent:#1f5fbf; --accent-tint:#e8f0fc;
  --good:#0f7a32; --good-tint:#e6f4ea; --good-mark:#0ca30c;
  --watch:#8f5a00; --watch-tint:#fdf2d8; --watch-mark:#e09b00;
  --bad:#c02a2a; --bad-tint:#fbe8e7; --bad-mark:#d03b3b;
  --none:#5d626b; --none-tint:#eeeeea;
  --series:#2a78d6;
  --pl-labor:#eb6834; --pl-oh:#6250d6; --pl-fee:#e87ba4; --pl-profit:#0ca30c;
  --hl:#15171c08; --scrim:rgba(20,22,28,.38);
  --shadow:0 1px 2px rgba(20,22,28,.05),0 1px 1px rgba(20,22,28,.03);
  --shadow-pop:0 16px 40px rgba(20,22,28,.18),0 2px 6px rgba(20,22,28,.08);
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);
  font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  font-size:14px;line-height:1.5;-webkit-font-smoothing:antialiased;overflow-x:hidden}
.num,td,th,.mono{font-variant-numeric:tabular-nums}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
:focus-visible{outline:2px solid var(--brand);outline-offset:2px;border-radius:6px}
.muted{color:var(--muted)} .faint{color:var(--faint)}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
svg.i{width:16px;height:16px;flex:none;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.eyebrow{font-family:Oswald,Inter,sans-serif;text-transform:uppercase;letter-spacing:.16em;font-size:11px;font-weight:500;color:var(--muted)}

/* ---------- preview ribbon ---------- */
.ribbon{position:sticky;top:0;z-index:45;height:38px;overflow:hidden;display:flex;align-items:center;gap:12px;flex-wrap:nowrap;padding:0 20px;white-space:nowrap;background:var(--sunk);border-bottom:1px solid var(--line);font-size:12.5px;color:var(--muted)}
.ribbon b{color:var(--ink-2);font-weight:600}
.ribbon .sp{flex:1}
.ribbon .seg button{padding:3px 10px;font-size:12px}

/* ---------- shell ---------- */
.shell{display:grid;grid-template-columns:var(--side) minmax(0,1fr);min-height:calc(100vh - 38px);background:linear-gradient(to right,var(--surface) calc(var(--side) - 1px),var(--line) calc(var(--side) - 1px),var(--line) var(--side),transparent var(--side))}
.side{position:sticky;top:38px;align-self:start;height:calc(100vh - 38px);display:flex;flex-direction:column;background:var(--surface);border-right:1px solid var(--line);padding:10px 14px 8px;overflow:hidden}
.brand{display:flex;align-items:center;gap:11px;padding:2px 8px 8px}
.brand .mark{width:32px;height:32px;border-radius:9px;background:var(--brand);color:var(--brand-ink);display:grid;place-items:center;font-family:Oswald,Inter,sans-serif;font-weight:600;font-size:12px;letter-spacing:.04em}
.brand .nm{font-weight:700;font-size:15.5px;letter-spacing:-.01em;line-height:1.1}
.brand .nm small{display:block;font-weight:500;font-size:11.5px;color:var(--muted);letter-spacing:0}
/* THE NAVIGATION COLUMN. The nav is longer than a short window, so the nav scrolls on
   its own and the account block stays pinned at the bottom of the column. Nothing is
   ever cut in half: an item is either fully in view or one scroll away. */
.nav{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}
.nav-grp{margin:6px 0 0;padding:0 10px}
.nav a{display:flex;align-items:center;gap:11px;height:30px;padding:0 10px;border-radius:9px;color:var(--ink-2);font-weight:550;font-size:13.5px;position:relative}
.nav a:hover{background:var(--hl);color:var(--ink)}
.nav a.cur{background:var(--brand-tint);color:var(--ink)}
.nav a.cur::before{content:"";position:absolute;left:-14px;top:8px;bottom:8px;width:3px;border-radius:0 3px 3px 0;background:var(--brand)}
.nav a.cur svg{color:var(--brand)}
.nav a .ct{margin-left:auto;font-size:11px;font-weight:650;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:var(--brand);color:var(--brand-ink);display:grid;place-items:center}
.side .foot{margin-top:6px;padding-top:8px;border-top:1px solid var(--line)}
.me{display:flex;align-items:center;gap:10px;padding:5px 8px;border-radius:10px}
.me .who{min-width:0;flex:1}
.me .who b{display:block;font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.me .who span{font-size:11.5px;color:var(--muted)}

.main{min-width:0;display:flex;flex-direction:column}
.top{position:sticky;top:38px;z-index:30;display:flex;align-items:center;gap:12px;height:62px;padding:0 28px;background:color-mix(in srgb,var(--bg) 86%,transparent);backdrop-filter:saturate(1.4) blur(10px);-webkit-backdrop-filter:saturate(1.4) blur(10px);border-bottom:1px solid var(--line)}
.top .crumb{display:flex;align-items:center;gap:8px;min-width:0;font-weight:650;font-size:15px}
.top .crumb span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.top .sp{flex:1}
.tz{display:inline-flex;align-items:center;gap:6px;color:var(--muted);font-size:12px;white-space:nowrap}
.tz svg{width:13px;height:13px}
.iconbtn.burger{display:none}
.timer-pill{display:inline-flex;align-items:center;gap:8px;height:36px;padding:0 6px 0 12px;border-radius:999px;border:1px solid var(--line-2);background:var(--surface);font-size:13px;white-space:nowrap}
.timer-pill .t{font-weight:650;font-variant-numeric:tabular-nums}
.timer-pill.on{border-color:color-mix(in srgb,var(--brand) 55%,var(--line-2))}
.timer-pill .pulse{width:8px;height:8px;border-radius:50%;background:var(--faint)}
.timer-pill.on .pulse{background:var(--brand);box-shadow:0 0 0 0 var(--brand);animation:pulse 1.6s infinite}
@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(241,66,11,.5)}70%{box-shadow:0 0 0 7px rgba(241,66,11,0)}100%{box-shadow:0 0 0 0 rgba(241,66,11,0)}}
.timer-pill .go{width:26px;height:26px;border-radius:50%;border:0;display:grid;place-items:center;background:var(--brand);color:var(--brand-ink)}
.timer-pill .go svg{width:12px;height:12px;fill:currentColor;stroke:none}
.iconbtn{position:relative;width:36px;height:36px;border-radius:10px;border:1px solid var(--line-2);background:var(--surface);display:grid;place-items:center;color:var(--ink-2);flex:none}
.iconbtn:hover{border-color:var(--muted);color:var(--ink)}
.iconbtn .badge{position:absolute;top:-4px;right:-4px;min-width:17px;height:17px;padding:0 4px;border-radius:999px;background:var(--brand);color:var(--brand-ink);font-size:10px;font-weight:700;display:grid;place-items:center;border:2px solid var(--bg)}
.avatar{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;font-size:11.5px;font-weight:700;color:#0b0b0c;flex:none;letter-spacing:.02em}
.avatar.sm{width:24px;height:24px;font-size:9.5px}
.avatar.lg{width:40px;height:40px;font-size:14px}
.stack{display:inline-flex;align-items:center}
.stack .avatar{border:2px solid var(--surface);margin-left:-7px}
.stack .avatar:first-child{margin-left:0}
.stack .more{margin-left:6px;font-size:12px;color:var(--muted)}

.content{width:100%;max-width:1360px;margin:0 auto;padding:26px 28px 64px}
.page-h{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:0 0 20px}
.page-h h1{font-size:26px;line-height:1.15;letter-spacing:-.022em;margin:4px 0 0;font-weight:700}
.page-h .sub{color:var(--muted);margin-top:6px;font-size:13.5px}
.page-h .acts{display:flex;gap:8px;flex-wrap:wrap;align-items:center}

/* ---------- primitives ---------- */
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow);min-width:0}
.pad{padding:20px 22px}
.sec{margin:0 0 22px}
.sec-h{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 0 12px}
.sec-h h2{font-size:16px;margin:0;font-weight:650;letter-spacing:-.005em}
.sec-h .hint{color:var(--muted);font-size:12.5px}
.card-h{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:16px 20px;border-bottom:1px solid var(--line)}
.card-h h2,.card-h h3{font-size:15px;margin:0;font-weight:650}
.card-h .hint{color:var(--muted);font-size:12.5px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;height:36px;padding:0 14px;border-radius:10px;border:1px solid var(--line-2);background:var(--surface);color:var(--ink);font-weight:600;font-size:13px;white-space:nowrap}
.btn:hover{border-color:var(--muted)}
.btn.primary{background:var(--brand);border-color:var(--brand);color:var(--brand-ink)}
.btn.primary:hover{filter:brightness(1.08)}
.btn.danger{background:var(--bad-mark);border-color:var(--bad-mark);color:#fff}
.btn.danger-ghost{color:var(--bad);border-color:color-mix(in srgb,var(--bad) 40%,var(--line-2))}
.btn.danger-ghost:hover{background:var(--bad-tint)}
.btn.ghost{background:transparent;border-color:transparent;color:var(--ink-2)}
.btn.ghost:hover{background:var(--hl);color:var(--ink)}
.btn.sm{height:30px;padding:0 10px;font-size:12.5px;border-radius:8px}
.btn.lg{height:42px;padding:0 18px;font-size:14px}
.btn:disabled{opacity:.45;cursor:not-allowed}
.btn svg{width:15px;height:15px}
.linkbtn{border:0;background:none;padding:0;color:var(--brand-soft);font-weight:600;font-size:12.5px}
.linkbtn:hover{text-decoration:underline}
.seg{display:inline-flex;background:var(--sunk);border:1px solid var(--line);border-radius:10px;padding:3px;gap:2px;flex-wrap:wrap}
.seg button{border:0;background:transparent;padding:6px 12px;border-radius:7px;font-size:13px;font-weight:600;color:var(--ink-2);white-space:nowrap}
.seg button:hover{color:var(--ink)}
.seg button[aria-pressed="true"]{background:var(--raise);color:var(--ink);box-shadow:var(--shadow)}
.seg button .c{color:var(--muted);font-weight:500;margin-left:4px}
.field{display:flex;flex-direction:column;gap:6px;min-width:0}
.field>span,.lbl{font-size:12.5px;font-weight:600;color:var(--ink-2)}
.field .help{font-size:12px;color:var(--muted);font-weight:400}
.in,select.in,textarea.in{width:100%;height:38px;border:1px solid var(--line-2);border-radius:10px;padding:0 12px;background:var(--sunk);color:var(--ink);outline:none;min-width:0}
textarea.in{height:auto;padding:10px 12px;resize:vertical}
select.in{appearance:none;-webkit-appearance:none;padding-right:34px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239c9c97' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;cursor:pointer}
.in:focus{border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-tint)}
.in-pre{position:relative}
.in-pre>em{position:absolute;left:12px;top:50%;transform:translateY(-50%);font-style:normal;color:var(--muted);font-weight:600;pointer-events:none}
.in-pre>.in{padding-left:26px}
.in-pre>i{position:absolute;right:12px;top:50%;transform:translateY(-50%);font-style:normal;color:var(--muted);font-size:12.5px;pointer-events:none}
.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.search{position:relative;flex:1 1 240px;max-width:340px}
.search .in{padding-left:36px;background:var(--surface)}
.search svg{position:absolute;left:12px;top:11px;color:var(--muted)}
.toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 14px}
.toolbar .sp{flex:1}
.toolbar select.in{width:auto;background-color:var(--surface)}
.switch{position:relative;display:inline-flex;align-items:center;gap:9px;cursor:pointer;font-size:13px;font-weight:550;color:var(--ink-2)}
.switch input{position:absolute;opacity:0;pointer-events:none}
.switch .tr{width:34px;height:20px;border-radius:999px;background:var(--line-2);position:relative;transition:background .15s;flex:none}
.switch .tr::after{content:"";position:absolute;top:3px;left:3px;width:14px;height:14px;border-radius:50%;background:#fff;transition:transform .15s}
.switch input:checked+.tr{background:var(--brand)}
.switch input:checked+.tr::after{transform:translateX(14px)}
.switch input:focus-visible+.tr{outline:2px solid var(--brand);outline-offset:2px}

.chip{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 9px;border-radius:999px;background:var(--sunk);border:1px solid var(--line);font-size:12px;font-weight:550;color:var(--ink-2);white-space:nowrap;max-width:100%}
.chip .nm{overflow:hidden;text-overflow:ellipsis}
.chip b{font-weight:650;color:var(--ink);font-variant-numeric:tabular-nums}
.cdot{width:9px;height:9px;border-radius:3px;flex:none;display:inline-block}
.tag{display:inline-flex;align-items:center;gap:5px;height:22px;padding:0 8px;border-radius:6px;font-size:11.5px;font-weight:600;background:var(--none-tint);color:var(--ink-2);white-space:nowrap}
.tag.model-hourly{background:var(--teal-tint);color:color-mix(in srgb,var(--teal) 70%,var(--ink))}
.tag.model-weekly{background:var(--accent-tint);color:var(--accent)}
.tag.model-monthly{background:color-mix(in srgb,#9085e9 18%,transparent);color:color-mix(in srgb,#9085e9 75%,var(--ink))}
.tag.model-fixed{background:var(--brand-tint);color:var(--brand-soft)}
.st{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 10px 0 8px;border-radius:999px;font-size:12px;font-weight:650;white-space:nowrap}
.st svg{width:13px;height:13px}
.st.good{background:var(--good-tint);color:var(--good)}
.st.watch{background:var(--watch-tint);color:var(--watch)}
.st.bad{background:var(--bad-tint);color:var(--bad)}
.st.info{background:var(--accent-tint);color:var(--accent)}
.st.none{background:var(--none-tint);color:var(--none)}
.st.void{background:var(--none-tint);color:var(--muted);text-decoration:line-through}
.delta{display:inline-flex;align-items:center;gap:3px;font-weight:650;font-variant-numeric:tabular-nums;white-space:nowrap}
.delta.good{color:var(--good)} .delta.bad{color:var(--bad)} .delta.flat{color:var(--muted)}
.delta svg{width:14px;height:14px}
.kpi .v .delta{white-space:normal;flex-wrap:wrap}
.bar{height:6px;border-radius:3px;background:var(--sunk);overflow:hidden;position:relative}
.bar>i{display:block;height:100%;border-radius:3px;background:var(--series)}
.bar>i.good{background:var(--good-mark)} .bar>i.watch{background:var(--watch-mark)} .bar>i.bad{background:var(--bad-mark)} .bar>i.brand{background:var(--brand)}
.bar.lg{height:10px;border-radius:5px}
.bar.lg>i{border-radius:5px}
.empty{padding:40px 20px;text-align:center;color:var(--muted)}
.empty svg{width:28px;height:28px;color:var(--faint);margin-bottom:8px}
.note{color:var(--muted);font-size:12.5px;line-height:1.55}
.callout{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--line);background:var(--surface-2);border-radius:12px;padding:12px 14px;font-size:13px;color:var(--ink-2)}
.callout svg{margin-top:2px;color:var(--teal)}
.callout.warn{border-color:color-mix(in srgb,var(--bad) 35%,var(--line));background:var(--bad-tint);color:var(--ink)}
.callout.warn svg{color:var(--bad)}
hr.sep{border:0;border-top:1px solid var(--line);margin:18px 0}

/* ---------- week switcher ---------- */
.weeksw{display:inline-flex;align-items:center;gap:4px;background:var(--surface);border:1px solid var(--line-2);border-radius:12px;padding:3px}
.weeksw .iconbtn{width:32px;height:32px;border:0;background:transparent}
.weeksw .iconbtn:hover{background:var(--hl)}
.weeksw .lbl2{padding:0 10px;font-weight:650;font-size:13.5px;white-space:nowrap;min-width:150px;text-align:center}

/* ---------- KPI ---------- */
.kpis{display:grid;grid-template-columns:minmax(0,1.6fr) repeat(3,minmax(0,1fr));gap:12px;margin:0 0 22px}
.kpi{padding:16px 18px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow);min-width:0;display:flex;flex-direction:column}
.kpi .k{display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--muted);font-size:12.5px;font-weight:600}
.kpi .v{font-size:26px;font-weight:700;letter-spacing:-.022em;margin-top:6px;line-height:1.1;font-variant-numeric:tabular-nums}
.kpi .v small{font-size:13px;color:var(--muted);font-weight:500;letter-spacing:0;margin-left:6px}
.kpi .s{color:var(--muted);font-size:12px;margin-top:auto;padding-top:10px}
.kpi .s b{color:var(--ink-2);font-weight:600}
.kpi.goal .v{font-size:32px}
.kpi.goal .bar{margin-top:14px}
.kpi.goal .scale{display:flex;justify-content:space-between;color:var(--muted);font-size:11.5px;margin-top:7px;font-variant-numeric:tabular-nums}
.kpi.warn .v{color:var(--watch)}
button.kpi{text-align:left;cursor:pointer;font:inherit;color:inherit}
button.kpi:hover{border-color:var(--line-2)}

/* ---------- weekly grid ---------- */
.wk-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
table{width:100%;border-collapse:separate;border-spacing:0;font-size:13px}
.wk{min-width:1060px}
.wk th,.wk td{padding:0 10px;height:42px;text-align:right;border-bottom:1px solid var(--line);white-space:nowrap}
.wk thead th{height:48px;color:var(--muted);font-weight:650;font-size:11px;letter-spacing:.04em;text-transform:uppercase;background:var(--surface-2);position:sticky;top:0}
.wk thead th .d{display:block;font-size:11.5px;letter-spacing:0;text-transform:none;font-weight:500;color:var(--faint);margin-top:1px}
.wk th.cl,.wk td.cl{text-align:left;position:sticky;left:0;z-index:2;background:var(--surface);padding-left:20px;min-width:250px;max-width:280px}
.wk thead th.cl{z-index:3;background:var(--surface-2)}
.wk td.cl .nm{display:inline-flex;align-items:center;gap:9px;max-width:100%;font-weight:600;color:var(--ink)}
.wk td.cl .nm span{overflow:hidden;text-overflow:ellipsis}
.wk td.cl .mt{display:block;font-size:11.5px;color:var(--muted);font-weight:450;margin:-2px 0 0 18px}
.wk tbody tr.row td{height:50px}
.wk tbody tr.row:hover td{background:var(--surface-2)}
.wk td.day{color:var(--ink-2);min-width:58px}
.wk td.day.zero,.wk td .zero{color:var(--faint)}
.wk th.today,.wk td.today{background:color-mix(in srgb,var(--brand) 7%,var(--surface))}
.wk thead th.today{color:var(--brand-soft);background:color-mix(in srgb,var(--brand) 10%,var(--surface-2))}
.wk thead th.today .d{color:var(--brand-soft)}
.wk td.future{color:var(--faint)}
.wk td.tot{font-weight:700;color:var(--ink)}
.wk td.amt{font-weight:600;color:var(--ink)}
.wk td.tg{min-width:170px;padding-right:20px}
.wk th:last-child{padding-right:20px}
.tgt{display:flex;align-items:center;gap:10px;justify-content:flex-end}
.tgt .bar{width:64px;flex:none}
.tgt .tx{font-size:12.5px;min-width:74px;text-align:right}
.wk tr.grp td{height:38px;background:var(--sunk);border-bottom:1px solid var(--line);text-align:left}
.wk tr.grp td.cl{background:var(--sunk)}
.wk tr.grp .gl{display:flex;align-items:center;gap:10px}
.wk tr.grp .gl .eyebrow{color:var(--ink-2)}
.wk tr.grp td.gs{text-align:right;font-weight:600;color:var(--ink-2);font-size:12.5px}
.wk tfoot td{height:50px;font-weight:700;background:var(--surface-2);border-bottom:0;color:var(--ink)}
.wk tfoot td.cl{background:var(--surface-2)}
.man{display:inline-block;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:6px solid var(--watch-mark);margin-left:5px;vertical-align:2px}
.wk-legend{display:flex;gap:18px;flex-wrap:wrap;align-items:center;padding:12px 20px;border-top:1px solid var(--line);color:var(--muted);font-size:12px}
.wk-legend span{display:inline-flex;align-items:center;gap:6px}
.wk-legend .sw{width:12px;height:12px;border-radius:3px;background:color-mix(in srgb,var(--brand) 18%,var(--surface))}

/* ---------- P&L ---------- */
.pl-ctl{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.pl-dsw{display:flex;align-items:center;gap:6px;font-size:12px}
.seg.sm button{padding:4px 9px;font-size:12px}
.pl-i{display:inline-flex;vertical-align:-3px;margin-left:5px;color:var(--faint);cursor:help}
.pl-i svg.i{width:14px;height:14px}
.pl-sidebox{padding:18px 20px;border-left:1px solid var(--line);background:var(--surface-2);border-radius:0 0 var(--r) 0;min-width:0}
.pl-th{font-size:12.5px;font-weight:650;color:var(--ink-2);display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:4px}
.pl-th span{font-weight:500;color:var(--muted)}
.pl-mini{display:block;width:100%;height:auto;overflow:visible}
.pl-mini text{font-size:11px}
.pl-mini text.lv{fill:var(--ink);font-weight:650}
.pl-tnote{margin:6px 0 0;font-size:12px}
/* A: storage bar */
.pla{display:grid;grid-template-columns:minmax(0,1fr) 320px}
.pla-main{padding:20px 22px;min-width:0}
.pla-hero{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.pla-big{font-size:36px;font-weight:700;letter-spacing:-.025em;line-height:1.1;font-variant-numeric:normal}
.pla-of{color:var(--ink-2);font-size:14px}
.pla-of b{color:var(--ink);font-weight:650}
.pla-meta{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:8px;font-size:12.5px}
.pla-meta .tag{margin-right:4px}
.sbar-wrap{position:relative;margin-top:18px}
.sbar{display:flex;gap:2px;height:26px;border-radius:7px;overflow:hidden}
.sbar .sg{flex-basis:0;min-width:3px;display:block}
.sg-labor{background:var(--pl-labor)} .sg-overhead{background:var(--pl-oh)} .sg-fee{background:var(--pl-fee)} .sg-profit{background:var(--pl-profit)} .sg-loss{background:var(--bad-mark)} .sg-empty{background:var(--line)}
.sbar-over{position:absolute;top:-4px;bottom:-4px;right:0;border:2px solid var(--bad-mark);border-left:0;border-radius:0 9px 9px 0;background:repeating-linear-gradient(45deg,color-mix(in srgb,var(--bad-mark) 30%,transparent) 0 4px,transparent 4px 8px)}
.sbar-rev{position:absolute;top:-8px;bottom:-8px;width:2px;margin-left:-1px;background:var(--ink)}
.sbar-scale{display:flex;justify-content:space-between;gap:10px;margin-top:6px;font-size:11.5px;color:var(--muted)}
.pl-over{display:flex;align-items:center;gap:6px;margin:10px 0 0;color:var(--bad);font-size:13px;font-weight:600}
.sleg{list-style:none;margin:16px 0 0;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px 18px}
/* Each legend figure sits centered under its label (Nathan, 27 Nov). */
.sleg li{min-width:0;text-align:center}
.sl-k{display:flex;align-items:center;justify-content:center;gap:7px;font-size:12.5px;font-weight:600;color:var(--ink-2)}
.sl-k .dot{width:10px;height:10px;border-radius:50%;flex:none}
.sl-v{font-size:16px;font-weight:700;margin-top:2px}
.sleg li.is-profit .sl-v{font-size:17px}
.sl-p{font-size:12px;color:var(--muted)}
.sl-s{font-size:11.5px;color:var(--faint);margin-top:2px;line-height:1.4}
.pl-mix{display:flex;flex-wrap:wrap;gap:4px 14px;margin-top:16px;padding-top:12px;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}
.pl-mix b{color:var(--ink-2);font-weight:600;font-variant-numeric:tabular-nums}
.pl-mix em{font-style:normal;color:var(--faint)}
.pl-mix-k{font-weight:650;color:var(--ink-2)}
/* B: statement */
.plb{display:grid;grid-template-columns:minmax(0,1fr) 320px}
.pls{padding:8px 22px 16px;min-width:0}
.pls-r{display:grid;grid-template-columns:minmax(0,1fr) 130px 150px;gap:12px;align-items:baseline;padding:8px 0}
.pls-h{font-size:11.5px;color:var(--muted);font-weight:600;border-bottom:1px solid var(--line);padding:8px 0}
.pls-sec{font-size:11.5px;font-weight:650;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;padding:12px 0 2px}
.pls-k span{font-weight:550}
.pls-k small{display:block;font-size:11.5px;color:var(--muted);margin-top:1px}
.pls-v{text-align:right;font-weight:600}
.pls-d{text-align:right;font-size:12px}
.pls-d .delta{font-weight:600}
.pls-dm{display:none}
@media (max-width:640px){.pls-dm{display:inline}}
.pls-sub .pls-k{padding-left:14px}
.pls-sub .pls-k span{font-weight:450;color:var(--ink-2)}
.pls-sub .pls-v{font-weight:500;color:var(--ink-2)}
.pls-tot{border-top:1px solid var(--line)}
.pls-tot .pls-k span,.pls-tot .pls-v{font-weight:700}
.pls-net{border-top:3px double var(--line-2);padding-top:12px}
.pls-net .pls-k span{font-weight:750;font-size:15px}
.pls-net .pls-v{font-weight:750;font-size:18px}
.pls-m{padding-top:2px}
.pls-m .pls-k span{font-weight:550;color:var(--ink-2)}
.pls-foot{margin:10px 0 0;font-size:12px}
.oh-lr{grid-template-columns:minmax(200px,2fr) 150px 140px 110px 100px 50px;padding-top:9px;padding-bottom:9px}
/* ---------- team hours ---------- */
.people{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:12px}
.person{padding:16px 18px}
.person .hd{display:flex;align-items:center;gap:12px}
.person .hd .who{flex:1;min-width:0}
.person .hd .who b{display:block;font-weight:650;font-size:14px}
.person .hd .who span{font-size:12px;color:var(--muted)}
.person .hrs{text-align:right}
.person .hrs b{display:block;font-size:20px;font-weight:700;letter-spacing:-.02em;font-variant-numeric:tabular-nums;line-height:1.15}
.person .hrs span{font-size:11.5px;color:var(--muted)}
.person .bar{margin:12px 0}
.person .chips{display:flex;flex-wrap:wrap;gap:6px}

/* ---------- list rows (responsive table) ---------- */
.lst{overflow:hidden}
.lr{display:grid;gap:16px;align-items:center;padding:13px 20px;border-top:1px solid var(--line)}
.lr:first-child{border-top:0}
.lr.head{padding-top:11px;padding-bottom:11px;background:var(--surface-2);color:var(--muted);font-size:11px;font-weight:650;letter-spacing:.04em;text-transform:uppercase}
.lr:not(.head):hover{background:var(--surface-2)}
.lr .r{text-align:right}
.lr .cl{font-weight:650;color:var(--ink);display:flex;align-items:center;gap:10px;min-width:0}
.lr .cl span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lr .sm2{display:block;font-size:12px;color:var(--muted);font-weight:450}
.lr .acts{display:flex;justify-content:flex-end;gap:4px}
.lr.void{opacity:.6}
.lbl-m{display:none}
.clients-lr{grid-template-columns:minmax(200px,1.5fr) 150px 130px 120px minmax(170px,1fr) 90px 84px}
.team-lr{grid-template-columns:minmax(220px,1.6fr) 170px 110px 110px 90px 86px 84px}
.inv-lr{grid-template-columns:130px minmax(170px,1.4fr) 150px 80px 110px 120px 100px 120px}
.req-lr{grid-template-columns:minmax(170px,1.2fr) minmax(170px,1.2fr) minmax(200px,2fr) 110px 170px}
.hb-lr{grid-template-columns:minmax(200px,1.5fr) 130px 110px minmax(150px,1fr) 110px}
.rpt-lr{grid-template-columns:minmax(180px,2fr) 100px 100px 110px minmax(120px,1fr)}

/* team multi-select */
.ms{position:relative}
.ms-btn{display:flex;align-items:center;gap:8px;width:100%;min-height:36px;padding:4px 10px;border:1px solid var(--line-2);border-radius:10px;background:var(--sunk);text-align:left}
.ms-btn:hover{border-color:var(--muted)}
.ms-btn .lab{font-size:12.5px;color:var(--ink-2);white-space:nowrap}
.ms-btn .car{margin-left:auto;color:var(--muted)}
.ms-btn.ro{background:transparent;border-color:transparent;cursor:default;padding-left:0}
.pop{position:absolute;z-index:50;top:calc(100% + 6px);left:0;width:280px;max-width:calc(100vw - 32px);background:var(--raise);border:1px solid var(--line-2);border-radius:12px;box-shadow:var(--shadow-pop);padding:8px}
.pop.right{left:auto;right:0}
.pop .in{height:34px;margin-bottom:6px}
.pop ul{list-style:none;margin:0;padding:0;max-height:280px;overflow:auto}
.pop li label{display:flex;align-items:center;gap:10px;padding:7px 8px;border-radius:8px;cursor:pointer;font-size:13px}
.pop li label:hover{background:var(--hl)}
.pop li .rl{margin-left:auto;font-size:11.5px;color:var(--muted)}
.pop .pf{display:flex;justify-content:space-between;align-items:center;gap:8px;border-top:1px solid var(--line);margin-top:6px;padding:8px 4px 2px;font-size:12px;color:var(--muted)}
.cb{appearance:none;-webkit-appearance:none;width:17px;height:17px;border-radius:5px;border:1.5px solid var(--line-2);background:var(--sunk);display:grid;place-items:center;flex:none;margin:0;cursor:pointer}
.cb:checked{background:var(--brand);border-color:var(--brand)}
.cb:checked::after{content:"";width:9px;height:5px;border-left:2px solid var(--brand-ink);border-bottom:2px solid var(--brand-ink);transform:rotate(-45deg) translate(1px,-1px)}
.menu{min-width:190px;width:auto;padding:6px}
.menu button{display:flex;align-items:center;gap:9px;width:100%;padding:8px 10px;border:0;background:none;border-radius:8px;font-size:13px;text-align:left;color:var(--ink-2)}
.menu button:hover{background:var(--hl);color:var(--ink)}
.menu button.dz{color:var(--bad)}
.menu button.dz:hover{background:var(--bad-tint)}
.menu .sepl{height:1px;background:var(--line);margin:5px 2px}

/* ---------- log hours ---------- */
.tracker{padding:16px;display:grid;grid-template-columns:minmax(0,2fr) minmax(170px,1fr) minmax(160px,1fr);gap:12px;align-items:end}
.tracker .task .in{height:44px;font-size:15px}
.tracker .row2{grid-column:1/-1;display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding-top:4px}
.tracker .row2 .sp{flex:1}
.tracker .clock{font-size:26px;font-weight:700;letter-spacing:-.01em;font-variant-numeric:tabular-nums;min-width:130px;text-align:right}
.tracker .dur{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.tracker .dur .in{width:92px;text-align:center}
.quick{display:flex;gap:6px;flex-wrap:wrap}
.quick button{height:30px;padding:0 10px;border-radius:8px;border:1px solid var(--line-2);background:var(--surface);font-size:12.5px;font-weight:600;color:var(--ink-2)}
.quick button:hover,.quick button[aria-pressed="true"]{border-color:var(--brand);color:var(--ink)}
.log-grid{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:18px;align-items:start;margin-top:18px}
.day-h{display:flex;align-items:center;justify-content:space-between;padding:12px 20px;background:var(--surface-2);border-bottom:1px solid var(--line);font-weight:650;font-size:13px}
.day-h .t{font-variant-numeric:tabular-nums;color:var(--ink-2)}
.ent{display:grid;grid-template-columns:minmax(0,1fr) auto auto 80px auto;gap:14px;align-items:center;padding:12px 20px;border-bottom:1px solid var(--line)}
.ent:last-child{border-bottom:0}
.ent:hover{background:var(--surface-2)}
.ent .tk{font-weight:600;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ent .meta{display:flex;gap:6px;flex-wrap:wrap;margin-top:4px;align-items:center}
.ent .du{font-weight:700;font-variant-numeric:tabular-nums;text-align:right;font-size:14px}
.ent .src{color:var(--muted)}
.ent .acts{display:flex;gap:2px}
.ent .acts .iconbtn{width:30px;height:30px;border:0;background:transparent}
.ent .acts .iconbtn:hover{background:var(--hl)}
.new-flash{animation:flash 1.6s ease-out}
@keyframes flash{0%{background:var(--brand-tint)}100%{background:transparent}}
.donut-wrap{display:flex;flex-direction:column;align-items:center;gap:16px;padding:20px}
.legend{display:flex;flex-direction:column;gap:8px;width:100%}
.legend .li{display:flex;align-items:center;gap:9px;font-size:13px}
.legend .li .nm{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ink-2)}
.legend .li b{font-variant-numeric:tabular-nums;font-weight:650}

/* ---------- timesheets ---------- */
.tsc{margin-bottom:10px;overflow:hidden}
.tsc>summary{list-style:none;display:grid;grid-template-columns:minmax(200px,1.6fr) 100px 100px minmax(160px,1.2fr) 120px auto;gap:16px;align-items:center;padding:14px 20px;cursor:pointer}
.tsc>summary::-webkit-details-marker{display:none}
.tsc>summary:hover{background:var(--surface-2)}
.tsc .chev{transition:transform .15s;color:var(--muted)}
.tsc[open] .chev{transform:rotate(90deg)}
.tsc .body{border-top:1px solid var(--line);padding:16px 20px;background:var(--surface-2)}
.mbar{display:flex;height:10px;border-radius:5px;overflow:hidden;gap:2px;background:var(--sunk)}
.mbar i{display:block;height:100%}
.mlist{display:flex;flex-wrap:wrap;gap:6px 16px;margin-top:10px;font-size:12.5px;color:var(--ink-2)}
.mlist span{display:inline-flex;align-items:center;gap:6px}
.mini{width:100%;margin-top:14px}
.mini th,.mini td{padding:8px 10px;text-align:left;border-bottom:1px solid var(--line);white-space:nowrap}
.mini th{color:var(--muted);font-size:11px;font-weight:650;letter-spacing:.04em;text-transform:uppercase}
.mini td.r,.mini th.r{text-align:right}
.mini td.wrap{white-space:normal}
.mini tr:last-child td{border-bottom:0}
.mini-wrap{overflow-x:auto}

/* ---------- reports ---------- */
.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 18px}
.chart{padding:18px 20px}
.chart svg{display:block;width:100%;height:220px;overflow:visible}
.chart text{fill:var(--muted);font-size:11px;font-family:inherit}
.tip{position:fixed;z-index:90;pointer-events:none;background:var(--ink);color:var(--bg);border-radius:9px;padding:8px 11px;font-size:12px;line-height:1.5;box-shadow:var(--shadow-pop);display:none;min-width:130px}
.tip .t{font-weight:700;margin-bottom:2px}
.tip .r{display:flex;justify-content:space-between;gap:14px}
.tip .r span:first-child{opacity:.72}

/* ---------- admin ---------- */
.adm{display:grid;grid-template-columns:220px minmax(0,1fr);gap:24px;align-items:start}
.rail{position:sticky;top:80px;display:flex;flex-direction:column;gap:2px}
.rail a{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:9px;color:var(--ink-2);font-weight:550;font-size:13px}
.rail a:hover{background:var(--hl);color:var(--ink)}
.rail a.cur{background:var(--surface);color:var(--ink);box-shadow:var(--shadow);border:1px solid var(--line)}
.dept{display:grid;grid-template-columns:28px minmax(0,1fr) 120px auto;gap:12px;align-items:center;padding:10px 20px;border-top:1px solid var(--line)}
.dept:first-child{border-top:0}
.dept .grip{display:flex;flex-direction:column;gap:0}
.dept .grip button{border:0;background:none;color:var(--muted);height:16px;padding:0;display:grid;place-items:center}
.dept .grip button:hover{color:var(--ink)}
.dept .grip button:disabled{opacity:.25}
.dept .in{background:transparent;border-color:transparent;font-weight:600;padding-left:8px}
.dept .in:hover{border-color:var(--line-2)}
.dept .in:focus{background:var(--sunk)}
.dept .use{font-size:12.5px;color:var(--muted);text-align:right}
.dept.off .in{color:var(--muted);text-decoration:line-through}

/* ---------- overlays ---------- */
.scrim{position:fixed;inset:0;z-index:70;background:var(--scrim);animation:fade .15s ease-out}
@keyframes fade{from{opacity:0}to{opacity:1}}
.drawer{position:fixed;z-index:71;top:0;right:0;bottom:0;width:min(560px,100vw);background:var(--surface);border-left:1px solid var(--line);box-shadow:var(--shadow-pop);display:flex;flex-direction:column;animation:slide .2s ease-out}
@keyframes slide{from{transform:translateX(24px);opacity:.4}to{transform:none;opacity:1}}
.drawer .dh{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:20px 24px;border-bottom:1px solid var(--line)}
.drawer .dh h2{margin:2px 0 0;font-size:19px;letter-spacing:-.015em}
.drawer .db{flex:1;overflow-y:auto;padding:22px 24px;display:flex;flex-direction:column;gap:18px}
.drawer .df{display:flex;gap:8px;justify-content:flex-end;align-items:center;padding:14px 24px;border-top:1px solid var(--line);background:var(--surface-2)}
.drawer .df .sp{flex:1}
.modal{position:fixed;z-index:71;left:50%;top:50%;transform:translate(-50%,-50%);width:min(480px,calc(100vw - 32px));max-height:calc(100vh - 48px);overflow-y:auto;background:var(--surface);border:1px solid var(--line-2);border-radius:16px;box-shadow:var(--shadow-pop);animation:pop .16s ease-out}
@keyframes pop{from{opacity:0;transform:translate(-50%,-48%) scale(.98)}to{opacity:1;transform:translate(-50%,-50%)}}
.modal .mb{padding:24px}
.modal h2{margin:0 0 6px;font-size:18px;letter-spacing:-.01em}
.modal .mf{display:flex;gap:8px;justify-content:flex-end;padding:14px 24px;border-top:1px solid var(--line);background:var(--surface-2);border-radius:0 0 16px 16px}
.modal .ic{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;margin-bottom:14px}
.modal .ic.bad{background:var(--bad-tint);color:var(--bad)}
.modal .ic svg{width:20px;height:20px}
.facts{display:grid;grid-template-columns:auto 1fr;gap:8px 18px;margin:16px 0;padding:14px 16px;border:1px solid var(--line);border-radius:12px;background:var(--sunk);font-size:13px}
.facts dt{color:var(--muted)}
.facts dd{margin:0;font-weight:650;text-align:right;font-variant-numeric:tabular-nums}
.modelpick{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.modelpick label{position:relative;display:flex;flex-direction:column;gap:2px;padding:11px 12px 11px 38px;border:1px solid var(--line-2);border-radius:12px;cursor:pointer;background:var(--sunk)}
.modelpick label:hover{border-color:var(--muted)}
.modelpick input{position:absolute;opacity:0}
.modelpick label::before{content:"";position:absolute;left:13px;top:14px;width:15px;height:15px;border-radius:50%;border:1.5px solid var(--line-2);background:var(--surface)}
.modelpick label:has(input:checked){border-color:var(--brand);background:var(--brand-tint)}
.modelpick label:has(input:checked)::before{border:5px solid var(--brand)}
.modelpick label:has(input:focus-visible){outline:2px solid var(--brand);outline-offset:2px}
.modelpick b{font-size:13.5px}
.modelpick span{font-size:12px;color:var(--muted)}
/* The FIXED PROJECT's MILESTONES (Nathan's rule 2). Each milestone is a row that is
   edited and saved on its own — the project's amount is the SUM of the rows. */
.milestone-box{margin:14px 0 0;padding:14px;border:1px solid var(--line-2);border-radius:12px;background:var(--sunk)}
/* Dated billing (migration 042): the add form wraps on a narrow screen; the row in force
   today is marked. */
.bh-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px 12px;align-items:end;margin-top:10px}
.bh-form button{justify-self:start}
#client-edit-billing-history tr.bh-now td{font-weight:600}
/* THE MILESTONE TABLE. Six columns do not fit the narrow column the client editor
   gives this box: the table was spilling out of its own box and the last columns
   (FUNDS, LANDED) were cut off. So each milestone is a BLOCK - the field's name
   beside the field - and every column is reachable at every width. The DOM is
   unchanged (the same inputs, the same data-f names), so saving still works. */
.milestone-table{margin-top:6px;font-size:12.5px;width:100%}
.milestone-table thead{display:none}
.milestone-table tbody tr{display:block;padding:10px 0;border-top:1px solid var(--line-2)}
.milestone-table tbody tr:first-child{border-top:0}
.milestone-table tbody td{display:grid;grid-template-columns:92px minmax(0,1fr);gap:6px 10px;align-items:center;padding:4px 0;border:0;vertical-align:top}
.milestone-table tbody td::before{content:attr(data-l);grid-column:1;grid-row:1;font-size:10.5px;font-weight:650;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.milestone-table tbody td>*{grid-column:2}
.milestone-table tbody td.ms-actions,.milestone-table tbody td.muted{grid-template-columns:minmax(0,1fr)}
.milestone-table tbody td.ms-actions::before,.milestone-table tbody td.muted::before{content:none}
.milestone-table .in{height:34px;font-size:12.5px;width:100%;min-width:0}
.milestone-table input[type=date]{padding:0 8px}
.milestone-table .in-pre{width:100%}
.milestone-table .in:disabled{opacity:.5}
.ms-check{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;white-space:nowrap}
.ms-actions{display:flex;gap:6px;flex-wrap:wrap}
.ms-actions button{padding:5px 10px;font-size:12px}
.amt-box{border:1px dashed var(--line-2);border-radius:12px;padding:14px;display:flex;flex-direction:column;gap:12px;animation:fade .2s}
.colors{display:flex;gap:8px;flex-wrap:wrap}
.colors button{width:26px;height:26px;border-radius:8px;border:2px solid transparent;padding:0}
.colors button[aria-pressed="true"]{border-color:var(--ink);box-shadow:0 0 0 2px var(--surface) inset}
.toast{position:fixed;z-index:95;left:50%;bottom:24px;transform:translateX(-50%);background:var(--ink);color:var(--bg);padding:11px 16px;border-radius:12px;box-shadow:var(--shadow-pop);font-weight:600;font-size:13px;display:flex;align-items:center;gap:9px;animation:pop2 .2s ease-out;max-width:calc(100vw - 32px)}
@keyframes pop2{from{opacity:0;transform:translate(-50%,8px)}to{opacity:1;transform:translate(-50%,0)}}
.notif{width:340px}
.notif .nh{padding:6px 8px 8px;font-weight:650;display:flex;justify-content:space-between}
.notif .ni{display:flex;gap:10px;padding:9px 8px;border-radius:8px;font-size:13px}
.notif .ni:hover{background:var(--hl)}
.notif .ni .dt{width:8px;height:8px;border-radius:50%;background:var(--brand);margin-top:6px;flex:none}
.notif .ni .dt.rd{background:transparent}
.notif .ni small{display:block;color:var(--muted);font-size:11.5px}

/* ---------- login ---------- */
.login{min-height:calc(100vh - 38px);display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr)}
.login .art{position:relative;overflow:hidden;background:#050505;color:#F5F1EA;padding:48px;display:flex;flex-direction:column;justify-content:space-between}
.login .art::after{content:"";position:absolute;right:-120px;bottom:-120px;width:420px;height:420px;border-radius:50%;background:radial-gradient(circle,rgba(241,66,11,.55),rgba(241,66,11,0) 70%)}
.login .art h2{font-family:Fraunces,Georgia,serif;font-weight:500;font-size:44px;line-height:1.08;letter-spacing:-.02em;margin:0;max-width:460px}
.login .art p{color:#b9b5ad;max-width:420px}
.login .art .eyebrow{color:#b9b5ad}
.login .frm{display:grid;place-items:center;padding:32px 16px;background:var(--bg)}
.login form{width:min(380px,100%);display:flex;flex-direction:column;gap:14px}
.login form h1{margin:0;font-size:24px;letter-spacing:-.02em}
.or{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:12px}
.or::before,.or::after{content:"";flex:1;height:1px;background:var(--line)}

/* ---------- responsive ---------- */
@media (max-width:1180px){
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .log-grid{grid-template-columns:minmax(0,1fr)}
  .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .clients-lr{grid-template-columns:minmax(180px,1.5fr) 140px 120px minmax(160px,1fr) 84px}
  .clients-lr .c-tgt,.clients-lr .c-st{display:none}
}
@media (max-width:980px){
  .pla,.plb{grid-template-columns:minmax(0,1fr)}
  .pl-sidebox{border-left:0;border-top:1px solid var(--line);border-radius:0 0 var(--r) var(--r)}
  .sleg{grid-template-columns:repeat(2,minmax(0,1fr))}
  .shell{grid-template-columns:minmax(0,1fr)}
  .side{position:fixed;z-index:80;left:0;top:0;bottom:0;width:280px;transform:translateX(-100%);transition:transform .2s ease-out;box-shadow:var(--shadow-pop)}
  .side.open{transform:none}
  .side-scrim{position:fixed;inset:0;z-index:79;background:var(--scrim)}
  .iconbtn.burger{display:grid}
  .side{top:0;height:100vh}
  .top{padding:0 16px}
  .content{padding:20px 16px 56px}
  .adm{grid-template-columns:minmax(0,1fr)}
  .rail{position:static;flex-direction:row;overflow-x:auto;gap:4px;padding-bottom:4px}
  .rail a{white-space:nowrap}
  .tracker{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .tracker .task{grid-column:1/-1}
  /* list rows collapse to cards */
  .lr.head{display:none}
  .lr{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:10px 14px;padding:14px 16px}
  .lr>.full{grid-column:1/-1}
  .lr .r{text-align:left}
  .lr .acts{justify-content:flex-start}
  .lbl-m{display:block;font-size:11px;font-weight:650;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);margin-bottom:3px}
  .clients-lr .c-tgt,.clients-lr .c-st{display:block}
  .inv-lr .i-num{order:1}.inv-lr .i-st{order:2;justify-self:end}.inv-lr .i-cl{order:3;grid-column:1/-1}.inv-lr .i-per{order:4}.inv-lr .i-tot{order:5;text-align:right}.inv-lr .i-hrs{order:6}.inv-lr .i-due{order:7;text-align:right}.inv-lr .i-act{order:8;grid-column:1/-1}
  .inv-lr .i-tot .lbl-m,.inv-lr .i-due .lbl-m{text-align:right}
  .toolbar .seg{flex-wrap:nowrap;overflow-x:auto;max-width:100%}
  .shell{background:none!important}
  .tsc>summary{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px 14px}
  .tsc>summary>.full{grid-column:1/-1}
}
@media (max-width:640px){
  .tz .lg{display:none}
  .timer-pill .lbl3{display:none}
  .page-h h1{font-size:22px}
  .kpis{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}
  .kpis .goal,.kpis>.kpi:last-child{grid-column:1/-1}
  .kpi{padding:14px}
  .kpi .v{font-size:21px}
  .kpi.goal .v{font-size:26px}
  .stats{gap:10px}
  .grid2,.grid3{grid-template-columns:minmax(0,1fr)}
  .tracker{grid-template-columns:minmax(0,1fr);padding:14px}
  .tracker .clock{min-width:0;font-size:22px}
  .ent{grid-template-columns:minmax(0,1fr) auto;gap:8px 12px;padding:12px 16px}
  .ent .meta{grid-column:1/-1}
  .ent .src{display:none}
  .ent .acts{grid-column:2;grid-row:1}
  .ent .du{grid-column:2;grid-row:2;align-self:start}
  .ent .meta{grid-column:1;grid-row:2}
  .day-h{padding:12px 16px}
  .card-h{padding:14px 16px}
  .pad{padding:16px}
  .wk-legend{padding:12px 16px}
  .wk th.cl,.wk td.cl{min-width:180px;max-width:190px;padding-left:14px}
  .ribbon{padding:7px 12px;gap:8px}
  .ribbon .rtxt,.ribbon .linkbtn{display:none}
  .weeksw .lbl2{min-width:0;padding:0 6px;font-size:13px}
  .modelpick{grid-template-columns:minmax(0,1fr)}
  .drawer .dh,.drawer .db{padding-left:16px;padding-right:16px}
  .drawer .df{padding:12px 16px;flex-wrap:wrap}
  .dept{grid-template-columns:24px minmax(0,1fr) auto;padding:10px 14px}
  .dept .use{display:none}
  .login{grid-template-columns:minmax(0,1fr)}
  .login .art{display:none}
  .people{grid-template-columns:minmax(0,1fr)}
  .pla-main{padding:16px}
  .pla-big{font-size:30px}
  .pl-sidebox{padding:16px}
  .pls{padding:4px 16px 14px}
  .pls-r{grid-template-columns:minmax(0,1fr) auto;gap:0 12px}
  .pls-d{grid-column:2;text-align:right}
  .pls-h .pls-d{grid-column:1/-1;text-align:right;font-weight:500}
  .stats[style]{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}
  .facts{grid-template-columns:auto auto}
  .top .iconbtn.hide-m{display:none}
}

/* ===== Parity additions ===== */
.ss{position:relative}
.ss-native{position:absolute;left:0;top:0;width:1px;height:1px;opacity:0;pointer-events:none}
.ss-list{position:absolute;z-index:40;left:0;right:0;top:calc(100% + 4px);max-height:260px;overflow:auto;margin:0;padding:6px;list-style:none;background:var(--raise);border:1px solid var(--line-2);border-radius:10px;box-shadow:var(--shadow-pop)}
.ss-list li{padding:8px 10px;border-radius:7px;font-size:13.5px;cursor:pointer;color:var(--ink-2)}
.ss-list li.on,.ss-list li:hover{background:var(--sunk);color:var(--ink)}
.ss-list li.none{color:var(--muted);cursor:default}
.tracker .dur .tm .in{width:96px}
.lockhint{display:inline-flex;align-items:center;gap:5px;font-size:12px;color:var(--muted);white-space:nowrap}
.lockmark{display:inline-flex;align-items:center;gap:4px;height:22px;padding:0 7px;border-radius:6px;font-size:11.5px;font-weight:600;color:var(--watch);background:var(--watch-tint);white-space:nowrap}
.lockhint svg,.lockmark svg{width:13px;height:13px}
.capw{display:inline-flex;margin-top:4px;height:20px;font-size:11px;padding:0 6px}
.tg .capw{display:flex;width:max-content}
.wk td.miss,.wk th.miss{color:var(--bad)}
.wk td.amt.miss{color:var(--bad)}
.dt{display:inline-flex;align-items:center;gap:6px}
.dt .lbl3{font-size:12px;color:var(--muted);font-weight:600}
.dt .in{width:auto;height:36px}
.secret{padding:14px;border:1px dashed var(--line-2);border-radius:10px;background:var(--sunk);font-size:18px;letter-spacing:.06em;text-align:center;user-select:all;word-break:break-all}
.hist{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;font-size:12.5px;color:var(--ink-2)}
.hist li{padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:var(--sunk)}
.hist small{display:block;color:var(--muted);margin-top:2px}
.rpt-lr.exp{cursor:pointer}
.rpt-lr.exp:hover{background:var(--surface-2)}
.rpt-lr .chev{width:14px;height:14px;color:var(--muted);flex:none}
.rsub{padding:4px 20px 12px 52px;border-top:1px dashed var(--line);background:var(--surface-2)}
.sub-r{display:flex;justify-content:space-between;gap:12px;padding:6px 0;font-size:13px;border-bottom:1px solid var(--line)}
.sub-r:last-child{border-bottom:0}
.sub-r .cl{display:flex;align-items:center;gap:8px;min-width:0}
.trend{display:grid;grid-template-columns:60px minmax(0,1fr) 52px;gap:10px;align-items:center;font-size:12.5px;margin:6px 0}
.trend b{text-align:right}
.wgg{margin:0;padding-left:18px;font-size:13.5px;color:var(--ink-2);display:flex;flex-direction:column;gap:6px}
.lock-grid{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) minmax(0,1fr);gap:12px}
.hbset-g{display:grid;grid-template-columns:minmax(0,1.3fr) 150px auto auto;gap:12px;align-items:end}
.segr{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:7px;font-size:13px;font-weight:600;color:var(--ink-2);cursor:pointer}
.segr:has(input:checked){background:var(--raise);color:var(--ink);box-shadow:var(--shadow)}
.segr input{accent-color:var(--brand)}
.wt-lr{grid-template-columns:minmax(0,1fr) 140px minmax(0,1fr) 44px;padding-top:9px;padding-bottom:9px}
.cu-lr{grid-template-columns:minmax(200px,1.4fr) minmax(160px,1fr) 110px minmax(240px,auto)}
.hq-lr{grid-template-columns:minmax(170px,1.2fr) 90px minmax(160px,1.5fr) 110px minmax(120px,1fr) 170px;padding-top:10px;padding-bottom:10px}
.hb-lr{grid-template-columns:minmax(200px,1.5fr) 130px 100px minmax(140px,1fr) 100px 130px}
.hd-lr{grid-template-columns:minmax(170px,1.3fr) 80px 90px 100px 150px minmax(120px,1fr)}
.pinv-lr{grid-template-columns:minmax(130px,1fr) minmax(130px,1fr) 80px 110px 140px 90px 110px}
.tsacts{flex-wrap:wrap;align-items:center}
.mini td .acts{display:flex;justify-content:flex-end;gap:4px}
.mini td .iconbtn{width:30px;height:30px}
@media (max-width:980px){
  .lock-grid,.hbset-g{grid-template-columns:minmax(0,1fr)}
  .rsub{padding-left:16px}
  .lockhint span{white-space:normal}
}
.wk th,.wk td{padding:0 8px}
.wk th.cl,.wk td.cl{min-width:210px;max-width:240px}
.wk td.day{min-width:50px}
.wk td.tg{min-width:150px;padding-right:16px}
.tgt .bar{width:48px}


/* ==========================================================================
   THE ADAPTER - the real application under the approved design.

   Everything above this line is Lyra's design system, taken from the approved
   preview verbatim, so the new screens look exactly as the design says. What
   follows is the small, explicit set of rules that stand the REAL app up
   inside that design: the live app's token names point at the new palette, the
   live shell is the design's shell, and the live navigation items (which are
   tab BUTTONS in the running app) are made to look like the design's links.

   Nothing here deletes or hides a live screen.
   ========================================================================== */

:root {
  /* The live app names these differently; they now point at the design's
     palette, so every existing screen restyles without being rewritten. */
  --panel: var(--surface);
  --accent-orange: var(--brand);
  --danger: var(--bad);
  --ok: var(--good);
  --warn: var(--watch);
  /* The design's primary colour is the brand orange. The live app's --accent
     drives primary buttons and links, so it points at the brand. The design's
     own blue is kept under --info for the two places the design uses it. */
  --accent: var(--brand);
  --info: #7aa7ff;
  --info-tint: #1c2a44;
}
:root[data-theme="light"] {
  --info: #1f5fbf;
  --info-tint: #e8f0fc;
}
.tag.model-weekly { background: var(--info-tint); color: var(--info); }
.st.info { background: var(--info-tint); color: var(--info); }

/* The app shell owns the full height: the preview's "design preview" ribbon
   (a 38px strip that says the data is sample data) does not exist here. */
.shell { min-height: 100vh; }
.side { top: 0; height: 100vh; }
.top { top: 0; }
@media (max-width: 980px) {
  .side { top: 0; height: 100vh; }
  .top { top: 0; }
}

/* The live app's <main id="app"> wrapped everything with its own page
   padding. The design's shell does that now. */
main#app { max-width: none; margin: 0; padding: 0; }

/* --- THE NAVIGATION -----------------------------------------------------
   The live app's navigation items are tab buttons; the design's are links.
   They are <a> elements here (so the design's own .nav rules apply
   untouched) carrying the live class "tab" and the live data-tab attribute,
   so the running app's tab wiring keeps working exactly as it was. */
.nav a.tab {
  border: 0;
  border-left: 0;
  border-bottom: 0;
  background: none;
  text-align: left;
  width: 100%;
  cursor: pointer;
  font-family: inherit;
}
.nav a.tab svg { width: 16px; height: 16px; flex: none; color: var(--faint); }
.nav a.tab.cur svg, .nav a.tab.active svg { color: var(--brand); }
.nav a.tab.active { background: var(--brand-tint); color: var(--ink); }
/* The live app's own active-tab rule draws a left border; the design draws a
   3px brand bar with a pseudo-element instead. */
.nav a.tab.active::after { display: none; }
.nav a.tab .ct { margin-left: auto; font-size: 11px; font-weight: 650; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; }
.nav a.tab .ct[hidden] { display: none; }
@media (max-width: 768px) {
  .nav a.tab { border-bottom: 0; padding: 0 10px; }
  .nav a.tab.active { border-bottom-color: transparent; }
}

/* The nav groups are the design's group headings. The live app's tabs are
   grouped the same way the design groups them, and the two screens the
   design's own navigation drops - projects and assignments - are kept. */
.nav-grp { font-family: Oswald, Inter, sans-serif; }

/* --- THE TOP BAR -------------------------------------------------------- */
.top .crumb { color: var(--ink); }
.top .tz { color: var(--muted); }
.top .iconbtn { color: var(--ink-2); }
.top .iconbtn:hover { color: var(--ink); }
.top .whoami { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.top .whoami .link { background: none; color: var(--muted); border: 0; padding: 2px 4px; font-weight: 550; cursor: pointer; font-size: 12.5px; }
.top .whoami .link:hover { color: var(--ink); }
.notif-bell { position: relative; cursor: pointer; color: var(--muted); padding: 0; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); }
.notif-bell:hover { border-color: var(--muted); color: var(--ink); }
.notif-bell svg { width: 18px; height: 18px; }
.notif-count { position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--brand); color: var(--brand-ink); font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.notif-dropdown { position: absolute; top: calc(100% + 8px); right: 0; width: 320px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow-pop); z-index: 60; }
.notif-header { padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 650; font-size: 13px; }
.notif-list { max-height: 340px; overflow: auto; }

/* --- THE ACCOUNT BLOCK (the design's .me) -------------------------------- */
.me .who b { color: var(--ink); }
.me .who span { color: var(--muted); }
.side .foot-links { display: flex; gap: 6px; flex-wrap: wrap; padding: 6px 8px 0; }
.side .foot-links .link { background: none; color: var(--muted); border: 0; padding: 1px 6px; font-size: 11.5px; line-height: 1.3; cursor: pointer; border-radius: 6px; }
.side .foot-links .link:hover { color: var(--ink); background: var(--hl); }

/* --- THE TIMER PILL -----------------------------------------------------
   The live app's timer is a real feature (a client, a task, a start and a
   stop). The design shows the running timer as a pill in the top bar. The
   pill here shows the SAME timer - the same clock, the same stop - and the
   live timer card stays in the page where it was. Nothing is lost. */
.timer-pill { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 6px 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); }
.timer-pill.on { border-color: color-mix(in srgb, var(--brand) 55%, var(--line-2)); }
.timer-pill .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.timer-pill.on .pulse { background: var(--brand); animation: pulse 1.6s infinite; }
.timer-pill .t { font-weight: 650; font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
.timer-pill .go { width: 26px; height: 26px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); cursor: pointer; }
.timer-pill .go svg { width: 12px; height: 12px; fill: currentColor; stroke: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 60%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* --- THE SIGN-IN SCREEN --------------------------------------------------
   The design's sign-in screen: the brand panel beside the form. The live
   form keeps its ids, so its wiring is untouched. */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); }
.login .art { position: relative; overflow: hidden; background: #050505; color: #F5F1EA; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.login .art::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(241,66,11,.55), rgba(241,66,11,0) 70%); }
.login .art h2 { font-family: Fraunces, Georgia, serif; font-weight: 500; font-size: 44px; line-height: 1.08; letter-spacing: -.02em; margin: 0; max-width: 460px; }
.login .art p { color: #b9b5ad; max-width: 420px; }
.login .art .eyebrow { color: #b9b5ad; }
.login .frm { display: grid; place-items: center; padding: 32px 16px; background: var(--bg); }
.login form { width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; }
.login form h1 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.login .or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.login .or::before, .login .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login .field { display: flex; flex-direction: column; gap: 6px; }
.login .field > span { font-size: 12px; color: var(--muted); font-weight: 550; }
.login .in { height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); width: 100%; }
.login .in:focus { outline: none; border-color: var(--brand); }
.login .note { font-size: 12px; color: var(--muted); line-height: 1.5; }
.login .btn { width: 100%; }
.login .callout { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; font-size: 12.5px; }
.login .callout.warn { background: var(--watch-tint); color: var(--watch); }
.login .callout svg { width: 15px; height: 15px; flex: none; }
@media (max-width: 980px) {
  .login { grid-template-columns: minmax(0,1fr); }
  .login .art { display: none; }
}

/* --- THE LIVE APP'S OWN COMPONENTS, IN THE DESIGN'S SHAPE ---------------- */
.card, .dash-card, .dash-recent, .rpt-stat-card, .dash-revenue-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
button { border-radius: 9px; }
input, select, textarea { border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); }
table { font-size: 13px; }

/* ---------- Team list (Nathan, 2026-11-24: "clean up the design of this page") ----------
   One aligned table: every cell is a table cell (never display:flex on a td, which pulled
   the old actions cell out of the row and broke the row lines), one row height, the rate as
   text, the manager grant as a compact switch, the actions in a right-aligned menu. */
.team-table { border-collapse: collapse; width: 100%; table-layout: auto; }
.team-table th, .team-table td { height: 52px; padding: 0 14px; vertical-align: middle; border-bottom: 1px solid var(--line); white-space: nowrap; }
.team-table th { height: 40px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.team-table th.num, .team-table td.num { text-align: right; }
.team-table tbody tr:hover { background: var(--hl); }
.team-table .team-row-inactive td { color: var(--muted); }
.team-name-cell .team-sub-role { display: none; }
.team-name-cell .team-sub { display: none; font-size: 12px; color: var(--muted); font-weight: 400; overflow: hidden; text-overflow: ellipsis; }
.team-role-pill, .team-status-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.team-role-pill.team-role-admin { background: var(--brand-tint); color: var(--brand-soft); }
.team-role-pill.team-role-employee { background: var(--none-tint); color: var(--ink-2); }
.team-status-pill.is-active { background: var(--good-tint); color: var(--good); }
.team-status-pill.is-inactive { background: var(--none-tint); color: var(--muted); }
.team-mgr-switch { position: relative; width: 32px; height: 18px; padding: 0; border-radius: 999px; border: 1px solid var(--line-2); background: var(--sunk); vertical-align: middle; transition: background .15s; }
.team-mgr-switch .knob { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--faint); transition: transform .15s, background .15s; }
.team-mgr-switch[aria-checked="true"] { background: var(--brand); border-color: var(--brand); }
.team-mgr-switch[aria-checked="true"] .knob { transform: translateX(14px); background: #fff; }
.team-mgr-switch:disabled { opacity: .5; cursor: progress; }
.team-rate-text { border: 0; background: transparent; padding: 4px 6px; margin: 0 -6px; border-radius: 6px; font-variant-numeric: tabular-nums; color: var(--ink); font-size: 13px; }
.team-rate-text:hover { background: var(--hl); text-decoration: underline dotted; }
.team-col-actions, .team-actions-cell { width: 48px; text-align: right; }
.team-actions-cell { position: relative; }
.team-menu-btn { width: 30px; height: 30px; padding: 0; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--ink-2); font-size: 18px; line-height: 1; }
.team-menu-btn:hover, .team-menu-btn[aria-expanded="true"] { background: var(--hl); border-color: var(--line-2); color: var(--ink); }
.team-menu { position: absolute; right: 10px; top: 44px; z-index: 20; min-width: 180px; padding: 5px; display: flex; flex-direction: column; background: var(--raise); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow-pop); text-align: left; }
.team-menu button { border: 0; background: transparent; text-align: left; padding: 8px 10px; border-radius: 7px; font-size: 13px; font-weight: 550; color: var(--ink); }
.team-menu button:hover, .team-menu button:focus-visible { background: var(--hl); }
.team-menu button.danger { color: var(--bad); }
.team-menu button.danger:hover { background: var(--bad-tint); }
.team-menu .team-menu-note { padding: 8px 10px; font-size: 12px; color: var(--muted); white-space: normal; }

/* ---------- Client assignments: chips list, inline editor, matrix ---------- */
.assign-explainer { margin: -6px 0 10px; }
.assign-table { border-collapse: collapse; width: 100%; }
.assign-table th, .assign-table td { padding: 10px 14px; vertical-align: middle; border-bottom: 1px solid var(--line); }
.assign-table th { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.assign-table .client-name-cell { width: 220px; white-space: nowrap; }
.assign-chips-cell { line-height: 2; }
.assign-chips-cell .chip { margin: 2px 6px 2px 0; }
.assign-chip.is-inactive { opacity: .55; text-decoration: line-through; }
.assign-mgr-badge { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 4px; background: var(--brand-tint); color: var(--brand-soft); font-size: 10px; font-weight: 700; margin-left: 2px; }
.assign-col-actions { width: 80px; text-align: right; white-space: nowrap; }
.assign-table tr.is-editing td { border-bottom-color: transparent; background: var(--surface-2); }
.assign-editor-row td { background: var(--surface-2); }
.assign-editor { display: flex; flex-direction: column; gap: 10px; padding: 4px 0 6px; }
.assign-editor-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.assign-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; max-height: 260px; overflow: auto; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.assign-pick label.assign-pick-item { display: flex; flex-direction: row; align-items: center; gap: 8px; min-width: 0; padding: 6px 8px; border-radius: 7px; font-size: 13px; color: var(--ink); cursor: pointer; }
.assign-pick-item input { margin: 0; flex: none; width: auto; }
.assign-pick-item:hover { background: var(--hl); }
.assign-pick-item .nm { white-space: nowrap; }
.assign-pick-email { margin-left: auto; font-size: 11.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.assign-editor-foot { display: flex; align-items: center; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.assign-preview { margin-right: auto; font-size: 12.5px; color: var(--muted); }
.assign-preview.has-changes { color: var(--watch); font-weight: 600; }
.assign-matrix-bar { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin-bottom: 8px; }
.assign-matrix-bar .muted { margin-right: auto; }
.assign-matrix-wrap { overflow: auto; max-height: 70vh; border: 1px solid var(--line); border-radius: 10px; }
.assign-matrix { border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.assign-matrix th, .assign-matrix td { border-bottom: 1px solid var(--line); padding: 6px 10px; background: var(--surface); }
.assign-matrix thead th { position: sticky; top: 0; z-index: 2; vertical-align: bottom; height: 110px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.assign-matrix thead th span { display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg); }
.assign-matrix tbody th { position: sticky; left: 0; z-index: 1; text-align: left; white-space: nowrap; font-weight: 600; color: var(--accent); border-right: 1px solid var(--line); }
.assign-matrix .assign-mx-corner { left: 0; z-index: 3; text-align: left; vertical-align: bottom; border-right: 1px solid var(--line); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.assign-matrix td { text-align: center; }
.assign-matrix tr.is-changed th, .assign-matrix tr.is-changed td { background: var(--watch-tint); }
.assign-matrix tbody tr:hover td { background: var(--hl); }

@media (max-width: 768px) {
  .team-table .team-col-email, .team-table .team-col-status { display: none; }
  .team-name-cell .team-sub { display: block; max-width: 160px; }
  .team-name-cell { white-space: normal; line-height: 1.3; }
  .team-table th, .team-table td { padding: 0 8px; }
  .assign-table .client-name-cell { width: auto; white-space: normal; }
  .assign-table, .assign-table tbody, .assign-table tr, .assign-table td { display: block; width: 100%; }
  .assign-table thead { display: none; }
  .assign-table tr[data-cid]:not(.assign-editor-row) { display: grid; grid-template-columns: 1fr auto; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .assign-table tr td { border-bottom: 0; padding: 2px 4px; }
  .assign-table .assign-chips-cell { grid-column: 1 / -1; grid-row: 2; }
  .assign-table .assign-col-actions { grid-column: 2; grid-row: 1; width: auto; }
  .assign-pick { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .team-table .team-col-role { display: none; }
  .team-name-cell .team-sub-role { display: inline; }
  .team-table th { white-space: normal; line-height: 1.2; }
  .team-name-cell .team-sub { max-width: 150px; }
}

/* Record a payment received (vp-record-payment.js). Lives here, not in an injected <style>:
   the page CSP (style-src 'self') blocks injected styles. */
.vp-rpr .rpr-form{display:grid;grid-template-columns:1fr 1fr;gap:14px 16px;padding:18px 20px}
.vp-rpr .rpr-wide,.vp-rpr .rpr-sum,.vp-rpr .rpr-actions{grid-column:1/-1}
.vp-rpr .field em{font-style:normal;font-weight:400;color:var(--muted)}
.vp-rpr .rpr-sum{font-size:13px;color:var(--ink-2);min-height:18px}
.vp-rpr .rpr-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.vp-rpr .rpr-form .rpr-actions{margin-top:0}
.vp-rpr .rpr-done,.vp-rpr .rpr-stop{margin:16px 20px 0;padding:12px 14px;border-radius:10px;font-size:13px;line-height:1.5}
.vp-rpr .rpr-done{background:var(--good-tint);border:1px solid var(--good)}
.vp-rpr .rpr-stop{background:var(--bad-tint);border:1px solid var(--bad)}
.vp-rpr .faint{color:var(--muted);font-size:12px;margin-top:6px}
.vp-rpr .vp-state{padding:28px 20px;color:var(--muted)}
.vp-rpr .vp-err{color:var(--bad);font-size:12.5px;font-weight:600;padding:0 20px 14px;margin:0}
.vp-rpr .note{color:var(--muted);font-size:12.5px;margin:12px 4px}
@media(max-width:720px){.vp-rpr .rpr-form{grid-template-columns:1fr}}
