@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ════════════════════════════════════════════════════════════════
   SCHEDULE STATION — global theme
   Base: Clean Operations system (below) + Hi-Vis Lime overrides (bottom).
   Link this one file on every page; pages add no palette CSS of their own.
   ════════════════════════════════════════════════════════════════ */
:root{
  --bg:#F4F6F9;
  --surface:#ffffff;
  --ink:#141A23;
  --ink-2:#33415A;
  --muted:#7A8597;
  --muted-2:#94A0B2;
  --line:#E7EAF0;
  --line-2:#E8EBF1;
  --primary:#3056D3;
  --primary-d:#274BC0;
  --primary-wash:#ECF0FD;
  --navy:#0E1B33;
  --navy-2:#172642;
  --navy-line:#26375A;
  --green:#11824A;
  --green-wash:#E4F6EC;
  --amber:#B7791F;
  --amber-wash:#FBF1DD;
  --font:'Plus Jakarta Sans', system-ui, sans-serif;
}
*{ box-sizing:border-box; }
.co{ font-family:var(--font); color:var(--ink); -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility; }
.co .tnum{ font-variant-numeric:tabular-nums; }
.placeholder-img{ background-image:repeating-linear-gradient(45deg,currentColor 0 1px,transparent 1px 7px); opacity:.5; }

/* shared mark / glyph holder */
.co .mark{ display:flex; align-items:center; justify-content:center; }

/* ─────────────────────────────────────────────────────────────
   MOBILE  (.m*)  — 390-wide phone webview
   ───────────────────────────────────────────────────────────── */
.mscr{ width:100%; height:100%; display:flex; flex-direction:column; overflow:hidden; position:relative; background:var(--bg); }
.mscr .grow{ flex:1; min-height:0; overflow:hidden; }

/* status bar */
.m-status{ height:44px; display:flex; align-items:center; justify-content:space-between; padding:0 22px; font-size:14px; font-weight:600; flex-shrink:0; }
.m-status .dots{ display:flex; align-items:center; gap:6px; }

/* —— login —— */
.m-login{ background:var(--navy); color:#fff; }
.m-login .m-status{ color:#fff; }
.m-login .inner{ flex:1; display:flex; flex-direction:column; padding:8px 28px 30px; }
.m-login .logo{ width:60px; height:60px; border-radius:17px; background:linear-gradient(160deg,#2F5BD8,#1E3AA6); box-shadow:0 12px 30px rgba(20,40,120,.5); margin:18px auto 26px; }
.m-login h1{ font-size:27px; font-weight:700; letter-spacing:-.02em; text-align:center; margin:0 0 7px; }
.m-login .sub{ font-size:14px; color:#8FA0BE; text-align:center; margin:0 0 34px; }
.fld-l{ font-size:11.5px; font-weight:600; letter-spacing:.02em; color:#90A0BD; margin:0 0 7px 2px; text-transform:uppercase; }
.m-login .fld{ width:100%; height:50px; border-radius:13px; background:var(--navy-2); border:1px solid var(--navy-line); color:#fff; padding:0 15px; font:inherit; font-size:15px; }
.m-login .fld::placeholder{ color:#5E7099; }
.m-login .forgot{ text-align:right; font-size:13px; color:#7CA0E6; margin:10px 2px 26px; }
.m-login .ver{ text-align:center; font-size:11.5px; letter-spacing:.04em; color:#3F567F; margin-top:auto; padding-top:22px; }

/* primary buttons */
.btn-pri{ width:100%; height:52px; border:none; border-radius:13px; background:var(--primary); color:#fff; font:inherit; font-weight:700; font-size:15.5px; cursor:pointer; box-shadow:0 8px 20px rgba(48,86,211,.32); display:flex; align-items:center; justify-content:center; gap:9px; }
.btn-out{ width:100%; height:50px; border-radius:13px; background:#fff; border:1.5px solid #D5DCE7; color:var(--ink-2); font:inherit; font-weight:700; font-size:14.5px; display:flex; align-items:center; justify-content:center; gap:9px; cursor:pointer; }
.btn-ghost{ width:100%; height:46px; border:none; background:transparent; color:var(--muted); font:inherit; font-weight:600; font-size:14px; cursor:pointer; }

/* —— top bar —— */
.m-top{ height:60px; display:flex; align-items:center; justify-content:space-between; padding:0 20px; background:#fff; border-bottom:1px solid var(--line); flex-shrink:0; }
.m-top .ttl{ font-size:18px; font-weight:700; letter-spacing:-.01em; display:flex; align-items:center; gap:10px; }
.m-top .ttl .mk{ width:28px; height:28px; border-radius:9px; background:linear-gradient(160deg,#2F5BD8,#1E3AA6); }
.av{ border-radius:50%; background:#DCE6FB; color:#22386B; font-weight:700; display:flex; align-items:center; justify-content:center; }

/* —— search + filter —— */
.m-search{ margin:16px 20px 4px; height:46px; border-radius:12px; background:#fff; border:1px solid #E2E6EE; display:flex; align-items:center; gap:10px; padding:0 14px; color:#9AA4B4; font-size:14.5px; flex-shrink:0; }
.m-seg{ display:flex; gap:8px; padding:10px 20px 6px; flex-shrink:0; }
.m-seg span{ font-size:13px; font-weight:600; padding:7px 14px; border-radius:9px; color:#5C6677; background:#EAEEF4; white-space:nowrap; cursor:pointer; }
.m-seg span.on{ background:var(--primary); color:#fff; }

/* —— worker rows —— */
.m-list{ height:100%; overflow:hidden; padding-top:6px; }
.m-row{ display:flex; align-items:center; gap:13px; padding:12px 14px; background:#fff; margin:0 14px 9px; border:1px solid var(--line-2); border-radius:14px; cursor:pointer; }
.m-row .ra{ width:44px; height:44px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:14.5px; flex-shrink:0; }
.m-row .nm{ font-size:15px; font-weight:700; letter-spacing:-.01em; }
.m-row .mt{ font-size:12.5px; color:var(--muted); margin-top:2px; }
.pill{ font-size:11px; font-weight:700; padding:4px 10px; border-radius:20px; white-space:nowrap; }
.pill.on{ background:var(--green-wash); color:var(--green); }
.pill.off{ background:#EEF0F4; color:#8A94A4; }
.pill.amb{ background:var(--amber-wash); color:var(--amber); }
.dur{ font-size:12.5px; font-weight:600; color:var(--green); margin-top:5px; text-align:right; }

/* —— confirm —— */
.m-cfm{ padding:18px 20px; height:100%; overflow:hidden; display:flex; flex-direction:column; }
.m-cfm .who{ display:flex; align-items:center; gap:13px; margin:4px 0 16px; }
.m-cfm .who .ra{ width:50px; height:50px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:16px; flex-shrink:0; }
.m-cfm h2{ font-size:21px; font-weight:800; letter-spacing:-.02em; margin:0; }
.m-cfm .csub{ font-size:13px; color:var(--muted); margin:2px 0 0; }
.card{ background:#fff; border:1px solid var(--line-2); border-radius:16px; padding:17px; }
.card .k{ font-size:11px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--muted-2); }
.card .jb{ font-size:16px; font-weight:700; margin-top:3px; }
.grid2{ display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:15px; }
.grid2 .v{ font-size:14.5px; font-weight:600; margin-top:3px; }
.totrow{ margin-top:15px; padding-top:14px; border-top:1px solid #EEF0F4; display:flex; justify-content:space-between; align-items:baseline; }
.totrow .lbl{ font-size:13px; color:var(--muted); font-weight:600; }
.totrow b{ font-size:21px; font-weight:800; color:var(--primary); }
.totrow b.green{ color:var(--green); }
.cd{ height:5px; border-radius:4px; background:#E6EAF2; margin:18px 0 7px; overflow:hidden; }
.cd i{ display:block; height:100%; background:var(--primary); border-radius:4px; }
.cdnote{ font-size:11.5px; color:#9AA4B4; text-align:center; }
.stack{ display:flex; flex-direction:column; gap:10px; margin-top:16px; }

/* —— account bottom sheet —— */
.m-sheet-scrim{ position:absolute; inset:0; background:rgba(14,27,51,.42); display:flex; flex-direction:column; justify-content:flex-end; }
.m-sheet{ background:#fff; border-radius:22px 22px 0 0; padding:10px 0 26px; }
.m-sheet .grab{ width:40px; height:4px; border-radius:3px; background:#D6DCE6; margin:0 auto 14px; }
.m-sheet .prof{ display:flex; align-items:center; gap:14px; padding:6px 22px 18px; border-bottom:1px solid var(--line); }
.m-sheet .prof .ra{ width:52px; height:52px; border-radius:50%; background:#DCE6FB; color:#22386B; font-weight:700; font-size:17px; display:flex; align-items:center; justify-content:center; }
.m-sheet .prof .nm{ font-size:17px; font-weight:700; }
.m-sheet .prof .em{ font-size:13px; color:var(--muted); margin-top:2px; }
.m-sheet .opt{ display:flex; align-items:center; gap:14px; padding:15px 22px; font-size:15px; font-weight:600; color:var(--ink-2); cursor:pointer; }
.m-sheet .opt .ic{ width:22px; display:flex; justify-content:center; color:var(--muted); }
.m-sheet .opt.danger{ color:#C0392B; }
.m-sheet .envbadge{ margin:6px 22px 0; display:flex; align-items:center; justify-content:space-between; padding:12px 14px; background:var(--bg); border-radius:12px; font-size:12.5px; color:var(--muted); }
.m-sheet .envbadge b{ color:var(--green); }

/* toast */
.m-toast{ position:absolute; left:18px; right:18px; bottom:24px; background:#0E1B33; color:#fff; border-radius:14px; padding:14px 16px; display:flex; align-items:center; gap:12px; box-shadow:0 14px 34px rgba(14,27,51,.4); }
.m-toast .tk{ width:30px; height:30px; border-radius:50%; background:var(--green); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.m-toast .tt{ font-size:14px; font-weight:700; }
.m-toast .ts{ font-size:12px; color:#9FB0CE; margin-top:1px; }

/* ─────────────────────────────────────────────────────────────
   DESKTOP  (.dk*)  — 1440-wide web app
   ───────────────────────────────────────────────────────────── */
.dscr{ width:100%; height:100%; background:var(--bg); display:flex; overflow:hidden; position:relative; }

/* —— login (split) —— */
.dk-login{ width:100%; height:100%; display:flex; }
.dk-login .brand{ width:44%; background:var(--navy); color:#fff; padding:56px 60px; display:flex; flex-direction:column; position:relative; overflow:hidden; }
.dk-login .brand::after{ content:''; position:absolute; right:-120px; bottom:-120px; width:420px; height:420px; border-radius:50%; background:radial-gradient(circle at 30% 30%,rgba(48,86,211,.55),transparent 65%); }
.dk-login .brand .top{ display:flex; align-items:center; gap:13px; font-size:18px; font-weight:700; }
.dk-login .brand .logo{ width:42px; height:42px; border-radius:12px; background:linear-gradient(160deg,#2F5BD8,#1E3AA6); box-shadow:0 10px 26px rgba(20,40,120,.5); }
.dk-login .brand .lead{ margin-top:auto; position:relative; z-index:1; }
.dk-login .brand .lead h2{ font-size:42px; font-weight:800; letter-spacing:-.03em; line-height:1.08; margin:0 0 16px; }
.dk-login .brand .lead p{ font-size:16px; line-height:1.55; color:#9FB0CE; margin:0; max-width:380px; }
.dk-login .brand .ver{ margin-top:42px; font-size:12.5px; letter-spacing:.04em; color:#41587F; }
.dk-login .form{ flex:1; display:flex; align-items:center; justify-content:center; }
.dk-login .form .box{ width:380px; }
.dk-login .form h1{ font-size:28px; font-weight:800; letter-spacing:-.02em; margin:0 0 6px; }
.dk-login .form .s{ font-size:15px; color:var(--muted); margin:0 0 30px; }
.dk-fld-l{ font-size:12px; font-weight:700; letter-spacing:.02em; color:var(--ink-2); margin:0 0 8px 2px; }
.dk-fld{ width:100%; height:50px; border-radius:12px; background:#fff; border:1.5px solid #DCE2EC; color:var(--ink); padding:0 15px; font:inherit; font-size:15px; }
.dk-fld:focus{ outline:none; border-color:var(--primary); box-shadow:0 0 0 4px var(--primary-wash); }
.dk-login .form .forgot{ text-align:right; font-size:13px; color:var(--primary); font-weight:600; margin:11px 2px 26px; }

/* —— app shell —— */
.dk-side{ width:248px; background:var(--navy); color:#fff; display:flex; flex-direction:column; flex-shrink:0; padding:24px 16px; }
.dk-side .brand{ display:flex; align-items:center; gap:12px; padding:4px 10px 22px; font-size:17px; font-weight:700; letter-spacing:-.01em; }
.dk-side .brand .logo{ width:36px; height:36px; border-radius:10px; background:linear-gradient(160deg,#2F5BD8,#1E3AA6); box-shadow:0 8px 20px rgba(20,40,120,.45); }
.dk-side .nav{ display:flex; flex-direction:column; gap:4px; margin-top:8px; }
.dk-side .nav a{ display:flex; align-items:center; gap:13px; padding:11px 14px; border-radius:11px; font-size:14.5px; font-weight:600; color:#90A0BD; cursor:pointer; }
.dk-side .nav a .ic{ display:flex; }
.dk-side .nav a.on{ background:rgba(48,86,211,.22); color:#fff; }
.dk-side .nav a.on .ic{ color:#7FA0F0; }
.dk-side .foot{ margin-top:auto; }
.dk-side .envrow{ display:flex; align-items:center; justify-content:space-between; padding:11px 14px; border-radius:11px; background:rgba(255,255,255,.05); font-size:12px; color:#8FA0BE; margin-bottom:10px; }
.dk-side .envrow b{ color:#2FD27A; font-weight:700; }
.dk-side .me{ display:flex; align-items:center; gap:11px; padding:10px 12px; border-radius:12px; cursor:pointer; }
.dk-side .me:hover{ background:rgba(255,255,255,.05); }
.dk-side .me .ra{ width:38px; height:38px; border-radius:50%; background:#22386B; color:#fff; font-weight:700; font-size:13px; display:flex; align-items:center; justify-content:center; }
.dk-side .me .nm{ font-size:14px; font-weight:700; }
.dk-side .me .rl{ font-size:12px; color:#90A0BD; margin-top:1px; }

.dk-main{ flex:1; min-width:0; display:flex; flex-direction:column; overflow:hidden; }
.dk-head{ height:74px; background:#fff; border-bottom:1px solid var(--line); display:flex; align-items:center; justify-content:space-between; padding:0 30px; flex-shrink:0; }
.dk-head .h1{ font-size:21px; font-weight:800; letter-spacing:-.02em; }
.dk-head .sub{ font-size:13px; color:var(--muted); margin-top:2px; }
.dk-head .actions{ display:flex; align-items:center; gap:12px; }
.dk-search{ width:280px; height:42px; border-radius:11px; background:var(--bg); border:1px solid #E2E6EE; display:flex; align-items:center; gap:10px; padding:0 14px; color:#9AA4B4; font-size:14px; }
.dk-btn{ height:42px; padding:0 18px; border:none; border-radius:11px; background:var(--primary); color:#fff; font:inherit; font-weight:700; font-size:14px; display:flex; align-items:center; gap:8px; cursor:pointer; box-shadow:0 6px 16px rgba(48,86,211,.28); }

.dk-body{ flex:1; min-height:0; overflow:hidden; padding:26px 30px; }

/* stat cards */
.dk-stats{ display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-bottom:22px; }
.dk-stat{ background:#fff; border:1px solid var(--line-2); border-radius:16px; padding:18px 20px; }
.dk-stat .k{ font-size:12px; font-weight:600; color:var(--muted); display:flex; align-items:center; gap:8px; }
.dk-stat .k .dot{ width:8px; height:8px; border-radius:50%; }
.dk-stat .val{ font-size:30px; font-weight:800; letter-spacing:-.02em; margin-top:8px; }
.dk-stat .val small{ font-size:16px; font-weight:700; color:var(--muted); }
.dk-stat .delta{ font-size:12px; font-weight:600; margin-top:4px; color:var(--green); }

/* table */
.dk-panel{ background:#fff; border:1px solid var(--line-2); border-radius:18px; overflow:hidden; }
.dk-panel .ph{ display:flex; align-items:center; justify-content:space-between; padding:16px 22px; border-bottom:1px solid var(--line); }
.dk-panel .ph .t{ font-size:15px; font-weight:700; }
/* flash messages (django.contrib.messages) — shown once, globally, from app_base.html */
.flash-stack{ display:flex; flex-direction:column; gap:8px; padding:16px 22px 0; }
.flash{ border-radius:12px; padding:12px 16px; font-size:13.5px; font-weight:500; border:1px solid; line-height:1.5; }
.flash.success{ background:#EAF7E4; border-color:#BFE3AC; color:#2F6B1F; }
.flash.warning{ background:#FFF6E5; border-color:#F3D48A; color:#8A5A00; }
.flash.error{ background:#FBEAE8; border-color:#F0C2BD; color:#B23A2E; }
.flash.info{ background:#EAF1FB; border-color:#BBD3F0; color:#2E5C9A; }
.flash.debug{ background:var(--bg); border-color:var(--line-2); color:var(--muted); }

.dk-tabs{ display:flex; gap:6px; flex-wrap:wrap; }
.dk-tabs a, .dk-tabs span{ font-size:13px; font-weight:600; padding:6px 13px; border-radius:9px; color:#5C6677; background:var(--bg); cursor:pointer; text-decoration:none; display:inline-flex; align-items:center; line-height:1.4; }
.dk-tabs a.on, .dk-tabs span.on{ background:var(--primary); color:#fff; }
.dk-tbl{ width:100%; border-collapse:collapse; }
.dk-tbl thead th{ text-align:left; font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--muted-2); padding:13px 22px; border-bottom:1px solid var(--line); }
.dk-tbl td{ padding:15px 22px; border-bottom:1px solid #F0F2F6; font-size:14px; vertical-align:middle; }
.dk-tbl tbody tr:last-child td{ border-bottom:none; }
.dk-tbl tbody tr:hover{ background:#FAFBFD; }
.dk-tbl .wk{ display:flex; align-items:center; gap:12px; }
.dk-tbl .wk .ra{ width:40px; height:40px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:13.5px; flex-shrink:0; }
.dk-tbl .wk .nm{ font-size:14.5px; font-weight:700; letter-spacing:-.01em; }
.dk-tbl .wk .id{ font-size:12px; color:var(--muted); margin-top:1px; }
.dk-tbl .jb{ font-weight:600; }
.dk-tbl .jb .sm{ font-size:12px; color:var(--muted); font-weight:500; margin-top:1px; }
.dk-tbl .clk{ font-weight:700; color:var(--green); }
.dk-rowbtn{ height:36px; padding:0 16px; border-radius:9px; border:1.5px solid #D5DCE7; background:#fff; color:var(--ink-2); font:inherit; font-weight:700; font-size:13px; cursor:pointer; }
.dk-rowbtn.pri{ background:var(--primary); border-color:var(--primary); color:#fff; }
.dk-rowbtn.ghost{ border-color:transparent; color:var(--muted); }

/* —— modal —— */
.dk-scrim{ position:absolute; inset:0; background:rgba(14,27,51,.5); backdrop-filter:blur(2px); display:flex; align-items:center; justify-content:center; }
.dk-modal{ width:460px; background:#fff; border-radius:22px; padding:26px 28px 24px; box-shadow:0 30px 80px rgba(14,27,51,.4); }
.dk-modal .mh{ display:flex; align-items:flex-start; justify-content:space-between; }
.dk-modal .who{ display:flex; align-items:center; gap:14px; }
.dk-modal .who .ra{ width:54px; height:54px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:17px; flex-shrink:0; }
.dk-modal .who h2{ font-size:22px; font-weight:800; letter-spacing:-.02em; margin:0; }
.dk-modal .who .csub{ font-size:13px; color:var(--muted); margin:3px 0 0; }
.dk-modal .x{ width:34px; height:34px; border-radius:10px; background:var(--bg); border:none; color:var(--muted); cursor:pointer; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.dk-modal .mcard{ margin-top:20px; background:var(--bg); border:1px solid var(--line-2); border-radius:16px; padding:18px; }
.dk-modal .mrow{ display:flex; justify-content:space-between; align-items:baseline; padding:9px 0; }
.dk-modal .mrow + .mrow{ border-top:1px solid var(--line); }
.dk-modal .mrow .k{ font-size:13.5px; color:var(--muted); font-weight:600; }
.dk-modal .mrow .v{ font-size:14.5px; font-weight:700; }
.dk-modal .mrow.tot .v{ font-size:20px; font-weight:800; color:var(--primary); }
.dk-modal .mrow.tot .v.green{ color:var(--green); }
.dk-modal .cd{ margin:20px 0 7px; }
.dk-modal .mbtns{ display:flex; gap:11px; margin-top:18px; }
.dk-modal .mbtns .btn-pri{ flex:1; }
.dk-modal .mbtns .btn-out{ flex:1; }

/* ════════════════════════════════════════════════════════════════
   HI-VIS LIME — theme layer (Palette 05 · lime & charcoal)
   Token re-map + the handful of spots where brand color is baked in.
   ════════════════════════════════════════════════════════════════ */
:root{
  --bg:#F2F4ED; --surface:#ffffff;
  --ink:#1C1F18; --ink-2:#3A4036; --muted:#73776C; --muted-2:#9AA092;
  --line:#E5E8DF; --line-2:#E7EAE0;
  --primary:#6FA80A; --primary-d:#5C8C08; --primary-wash:#EEF4DC; --on-primary:#16200A;
  --navy:#21241B; --navy-2:#2B2F24; --navy-line:#3A3F30;
  --green:#1F7A3D; --green-wash:#E2F0E6;
  --amber:#566270; --amber-wash:#EAEDF0;
  --lime-grad:linear-gradient(160deg,#7FBE12,#5C8C08);
}
html{ scroll-behavior:smooth; }
body{ margin:0; background:var(--bg); color:var(--ink); font-family:var(--font); -webkit-font-smoothing:antialiased; }
a{ color:inherit; text-decoration:none; }

/* dark ink reads on the light lime primary */
.btn-pri{ color:var(--on-primary); box-shadow:0 8px 20px rgba(111,168,10,.34); }
.btn-pri svg{ stroke:var(--on-primary); }
.dk-btn{ color:var(--on-primary); box-shadow:0 6px 16px rgba(111,168,10,.30); }
.dk-btn svg{ stroke:var(--on-primary); }
.dk-rowbtn.pri{ color:var(--on-primary); }
.dk-tabs a.on, .dk-tabs span.on{ color:var(--on-primary); }
.m-seg span.on{ color:var(--on-primary); }

/* brand surfaces & logo tiles → lime gradient on charcoal */
.dk-login .brand .logo,
.dk-side .brand .logo,
.m-login .logo,
.m-top .ttl .mk{ background:var(--lime-grad); box-shadow:0 8px 20px rgba(70,100,10,.4); }
.dk-login .brand::after{ background:radial-gradient(circle at 30% 30%,rgba(111,168,10,.5),transparent 65%); }
.m-login{ background:var(--navy); }
.m-login .logo{ box-shadow:0 12px 30px rgba(70,100,10,.45); }
.m-login .forgot{ color:#A6D94B; }
.m-login .sub{ color:#8C9482; }
.m-login .fld-l{ color:#8C9482; }
.m-login .fld{ background:var(--navy-2); border-color:var(--navy-line); }
.m-login .ver{ color:#5A6150; }

/* sidebar nav active state in lime */
.dk-side .nav a.on{ background:rgba(111,168,10,.20); color:#fff; }
.dk-side .nav a.on .ic{ color:#A6D94B; }
.dk-side .envrow b{ color:#A6D94B; }
.dk-side .me .ra{ background:#3A3F30; color:#DDE9C4; }

/* avatars / account tiles off the blue defaults */
.av{ background:#E1EAD0; color:#4B5A22; }
.m-sheet .prof .ra{ background:#E1EAD0; color:#4B5A22; }

/* full-viewport app roots (these screens are real pages, not artboards) */
.app-screen.dscr{ width:100vw; height:100vh; }
.app-screen.mscr{ width:100%; max-width:430px; min-height:100vh; height:auto; margin:0 auto; box-shadow:0 0 0 1px var(--line); }
@media (max-width:430px){ .app-screen.mscr{ box-shadow:none; } }

/* clickable affordances on real pages */
.dk-side .nav a, .dk-tbl tbody tr, .m-row, .m-seg span, .dk-tabs span, .forgot, .csub-cancel{ cursor:pointer; }
.dk-rowbtn{ transition:background .12s, border-color .12s; }
.btn-pri, .btn-out, .dk-btn, .dk-rowbtn{ transition:transform .08s, box-shadow .12s, background .12s; }
.btn-pri:active, .dk-btn:active, .dk-rowbtn:active{ transform:translateY(1px); }
[v-cloak]{ display:none; }

/* keep single-line labels from wrapping in tight columns */
.dk-tbl .wk .nm{ white-space:nowrap; }
.dk-head .sub{ white-space:nowrap; }
.dk-btn{ white-space:nowrap; }

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE — one app, any screen.
   Below ~820px the fixed desktop shell stacks: sidebar → top strip,
   panes scroll with the page, grids collapse. Login splits → stacks.
   ════════════════════════════════════════════════════════════════ */
@media (max-width:820px){
  /* let real pages grow and the document scroll */
  .app-screen.dscr{ flex-direction:column; width:100%; height:auto; min-height:100vh; overflow:visible; }

  /* sidebar becomes a horizontal top bar with scrolling nav */
  .dk-side{ width:100%; flex-direction:row; flex-wrap:wrap; align-items:center; gap:8px 12px; padding:12px 16px; position:sticky; top:0; z-index:50; }
  .dk-side .brand{ padding:0; font-size:16px; }
  .dk-side .nav{ order:3; width:100%; flex-direction:row; overflow-x:auto; gap:4px; margin-top:4px; padding-bottom:2px; -webkit-overflow-scrolling:touch; }
  .dk-side .nav::-webkit-scrollbar{ height:0; }
  .dk-side .nav a{ flex-direction:column; gap:5px; padding:8px 13px; font-size:11px; white-space:nowrap; flex:0 0 auto; }
  .dk-side .nav a .nav-badge{ margin-left:6px; }
  .dk-side .foot{ margin-top:0; margin-left:auto; display:flex; align-items:center; gap:10px; }
  .dk-side .foot .envrow{ display:none; }
  .dk-side .foot .me{ padding:4px 6px; }
  .dk-side .foot .me .rl{ display:none; }

  /* main column scrolls naturally */
  .dk-main{ overflow:visible; min-height:0; }
  .dk-head{ height:auto; min-height:64px; padding:14px 18px; flex-wrap:wrap; gap:10px 14px; }
  .dk-head .actions{ flex-wrap:wrap; }
  .dk-body{ overflow:visible !important; padding:18px 16px; }
  .dk-body.scroll{ overflow:visible !important; }

  /* dense grids relax */
  .dk-stats{ grid-template-columns:1fr 1fr; }
  .rep-stats, .nwr-stats{ grid-template-columns:1fr 1fr !important; }

  /* wide tables scroll sideways inside their panel */
  .dk-panel{ overflow-x:auto; }
  .dk-tbl{ min-width:560px; }

  /* modals: pin to viewport, not the now-tall page */
  .dk-scrim{ position:fixed; padding:16px; }
  .dk-modal{ width:100%; max-width:460px; }

  /* ── login: split → stacked ── */
  .app-screen.dscr .dk-login{ flex-direction:column; height:auto; min-height:100vh; }
  .dk-login .brand{ width:100%; padding:30px 26px; }
  .dk-login .brand .lead{ margin-top:22px; }
  .dk-login .brand .lead h2{ font-size:32px; }
  .dk-login .brand .lead p{ font-size:14.5px; }
  .dk-login .brand .ver{ margin-top:22px; }
  .dk-login .brand::after{ width:300px; height:300px; right:-90px; bottom:-90px; }
  .dk-login .form{ padding:30px 0 44px; align-items:flex-start; }
  .dk-login .form .box{ width:100%; max-width:380px; margin:0 auto; padding:0 24px; }
}

@media (max-width:480px){
  .dk-stats, .rep-stats, .nwr-stats{ grid-template-columns:1fr !important; }
  .dk-head .dk-search{ width:100%; }
}
