/* CDL Verification — same Acads-Notion tokens as UPMC2 */
:root {
  --ink: #191918; --text-strong: #37352f; --text-body: #55534e; --text-subtle: #6b6a66; --text-faint: #8f8d88;
  --surface: #ffffff; --surface-inset: #fbfbfa; --surface-muted: #f6f5f4; --surface-hover: #f3f2f0; --surface-sunken: #f1f0ee;
  --line: #ecebe8; --border: #e3e2df; --border-strong: #c9c7c2; --border-hover: #9d9b96;
  --primary: #0b66c3; --primary-hover: #0a579f; --primary-soft: #e8f1fc; --primary-soft-hover: #d8e8fa; --link: #0b5cad;
  --good: #2f9e44; --good-ink: #1d6b31; --good-soft: #dff3e2; --good-tint: #eef8f0;
  --warn: #d9731a; --warn-ink: #8a4510; --warn-soft: #fcebd9; --warn-tint: #fdf1e5; --warn-edge: #f3d2b3;
  --bad: #c2410c; --bad-ink: #9a3412; --bad-soft: #fde4d8; --bad-tint: #fef3ee;
  --violet: #7c4ddb; --violet-ink: #51308f; --violet-soft: #efe6fb;
  --r7: 7px; --r9: 9px; --r12: 12px; --r16: 16px; --pill: 999px;
  --shadow-sm: 2px 2px 0 #191918;
  --shadow-card: 0 0 0 1px rgba(25,25,24,.05), 0 12px 30px -16px rgba(25,25,24,.12);
  --shadow-window: 0 30px 80px -20px rgba(25,25,24,.18), 0 8px 20px -8px rgba(25,25,24,.08);
  --tap: 44px; --container: 1320px; --header-h: 58px;
  --sans: "Schibsted Grotesk", "Helvetica Neue", Helvetica, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 15px; line-height: 1.5; color: var(--text-body); background: var(--surface-muted); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--link); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
h1, h2, h3 { color: var(--ink); margin: 0; letter-spacing: -.02em; }
h1 { font-size: 26px; font-weight: 800; } h2 { font-size: 18px; font-weight: 800; } h3 { font-size: 15px; font-weight: 700; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-subtle); } .faint { color: var(--text-faint); font-size: 12.5px; }
.hidden { display: none !important; }

/* header */
.topbar { position: sticky; top: 0; z-index: 20; height: var(--header-h); background: rgba(255,255,255,.9); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar .in { max-width: var(--container); margin: 0 auto; height: 100%; padding: 0 20px; display: flex; align-items: center; gap: 12px; }
.mark { width: 32px; height: 32px; border-radius: var(--r9); border: 1.5px solid var(--ink); box-shadow: var(--shadow-sm); background: #fff; display: grid; place-items: center; flex: none; }
.mark img { height: 24px; }
.brand { font-weight: 900; color: var(--ink); letter-spacing: -.03em; font-size: 17px; white-space: nowrap; }
.brand small { display: block; font-weight: 500; font-size: 11.5px; color: var(--text-subtle); letter-spacing: 0; line-height: 1.1; }
.demo-flag { font-size: 12px; font-weight: 700; color: var(--warn-ink); background: var(--warn-tint); border: 1px solid var(--warn-edge); padding: 3px 9px; border-radius: var(--pill); white-space: nowrap; }
.nav { display: flex; gap: 2px; margin-left: 8px; }
.nav a { text-decoration: none; color: var(--text-subtle); font-weight: 600; font-size: 14px; padding: 7px 11px; border-radius: var(--r7); white-space: nowrap; }
.nav a:hover { background: var(--surface-hover); color: var(--ink); }
.nav a.on { background: var(--surface-sunken); color: var(--ink); }
.nav .count { background: var(--bad); color: #fff; font-size: 11px; border-radius: var(--pill); padding: 0 6px; margin-left: 4px; }
.sp { flex: 1; }
.help-btn { border: 1px solid var(--border); background: var(--surface); border-radius: var(--pill); min-height: 36px; padding: 0 12px; font-weight: 600; cursor: pointer; color: var(--text-strong); white-space: nowrap; }
.who { position: relative; }
.menu-btn { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--pill); padding: 3px 12px 3px 3px; min-height: 38px; cursor: pointer; font-weight: 600; color: var(--text-strong); white-space: nowrap; }
.av { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-sunken); color: var(--ink); display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r12); box-shadow: var(--shadow-card); min-width: 220px; padding: 6px; z-index: 30; display: grid; }
.menu .who-line { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; font-size: 13px; }
.menu .who-line b { display: block; color: var(--ink); font-size: 14px; }
.menu button { text-align: left; border: 0; background: none; padding: 10px; border-radius: var(--r7); font-weight: 600; color: var(--text-strong); cursor: pointer; }
.menu button:hover { background: var(--surface-hover); }

main { max-width: var(--container); margin: 0 auto; padding: 24px 20px 140px; }
.foot { text-align: center; padding: 0 16px 28px; font-size: 12.5px; color: var(--text-faint); }

/* buttons */
.btn { min-height: var(--tap); padding: 0 16px; border-radius: var(--r9); border: 1px solid var(--border); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14.5px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { border-color: var(--border-hover); background: var(--surface-inset); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; } .btn.primary:hover { background: var(--primary-hover); }
.btn.good { background: var(--good-ink); border-color: var(--good-ink); color: #fff; } .btn.good:hover { background: #175a29; }
.btn.soft { background: var(--primary-soft); border-color: transparent; color: var(--link); } .btn.soft:hover { background: var(--primary-soft-hover); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-body); } .btn.ghost:hover { background: var(--surface-hover); }
.btn.danger { color: var(--bad-ink); } .btn.danger:hover { background: var(--bad-tint); border-color: var(--bad); }
.btn.sm { min-height: 34px; padding: 0 11px; font-size: 13.5px; }
.btn.block { width: 100%; }

/* cards & layout */
.card { background: var(--surface); border-radius: var(--r16); box-shadow: var(--shadow-card); padding: 20px; }
.crumbs { font-size: 13.5px; color: var(--text-subtle); margin-bottom: 6px; } .crumbs a { color: var(--text-subtle); }
.head { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 18px; }
.head .grow { flex: 1; min-width: 240px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: 14px; }

/* login */
.login { max-width: 440px; margin: 40px auto; }
.login h1 { margin-bottom: 4px; }
.login .role { display: grid; gap: 10px; margin-top: 18px; }
.field { display: grid; gap: 5px; margin-bottom: 14px; }
.field > label, .field > .lab { font-size: 13px; font-weight: 700; color: var(--text-strong); }
.field .req { color: var(--bad); }
/* every box the same: one height (as buttons), border, corners, padding and text; drop-downs drawn like the text boxes */
input[type=text], input[type=number], input[type=date], input[type=search], input[type=email], input[type=password], input[type=tel], select, textarea {
  width: 100%; height: var(--tap); border: 1px solid var(--border-strong); border-radius: var(--r9); padding: 0 12px; background-color: #fff;
  font-size: 15px; line-height: 1.3; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
select { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236b6a66' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
input[type=date] { padding-right: 8px; }
input::placeholder, textarea::placeholder { color: var(--text-faint); opacity: 1; }
input:hover:not(:disabled):not(:focus), select:hover:not(:disabled):not(:focus), textarea:hover:not(:disabled):not(:focus) { border-color: var(--border-hover); }
input:disabled, select:disabled, textarea:disabled { background-color: var(--surface-muted); color: var(--text-faint); cursor: default; }
textarea { height: auto; min-height: 76px; padding: 10px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.field.miss input, .field.miss select, .field.miss textarea { border-color: var(--warn); background-color: var(--warn-tint); }
.field .err { font-size: 12.5px; color: var(--warn-ink); }

/* division picker */
.circle { margin-bottom: 22px; }
.circle h2 { margin-bottom: 10px; font-size: 15px; color: var(--text-subtle); text-transform: uppercase; letter-spacing: .04em; }
.divs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.div-card { display: block; text-decoration: none; color: inherit; background: var(--surface); border-radius: var(--r12); box-shadow: var(--shadow-card); padding: 16px; border: 1.5px solid transparent; }
.div-card:hover { border-color: var(--ink); }
.div-card h3 { font-size: 17px; margin-bottom: 2px; }
.bar { height: 8px; border-radius: var(--pill); background: var(--surface-sunken); overflow: hidden; display: flex; margin: 10px 0 6px; }
.bar i { display: block; height: 100%; }
.bar .c { background: var(--good); } .bar .r { background: #9fd4a9; } .bar .m { background: var(--warn); } .bar .p { background: var(--bad); }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-subtle); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: 0; }

/* status pills */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: var(--pill); white-space: nowrap; }
.pill.confirmed { background: var(--good-soft); color: var(--good-ink); }
.pill.ready { background: var(--primary-soft); color: var(--link); }
.pill.missing { background: var(--warn-soft); color: var(--warn-ink); }
.pill.problem { background: var(--bad-soft); color: var(--bad-ink); }
.pill.remove { background: var(--surface-sunken); color: var(--text-subtle); }
.pill.added { background: var(--violet-soft); color: var(--violet-ink); }
.cert { background: var(--good-tint); border: 1px solid #bfe3c6; border-radius: var(--r12); padding: 12px 14px; color: var(--good-ink); font-weight: 600; }

/* progress box on division page */
.prog { min-width: 300px; }
.prog .big { font-size: 28px; font-weight: 800; color: var(--ink); letter-spacing: -.03em; }

/* help strip */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.step { background: var(--surface); border-radius: var(--r12); padding: 12px 14px; box-shadow: var(--shadow-card); font-size: 13.5px; }
.step b { display: block; color: var(--ink); font-size: 14px; }
.step .n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; font-weight: 800; margin-right: 6px; }

/* filters */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { border: 1px solid var(--border); background: var(--surface); border-radius: var(--pill); padding: 6px 12px; font-weight: 600; font-size: 13.5px; cursor: pointer; color: var(--text-strong); min-height: 36px; }
.chip:hover { border-color: var(--border-hover); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .k { font-variant-numeric: tabular-nums; opacity: .7; margin-left: 4px; }
.tools { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.tools select { width: auto; min-width: 180px; }
.tools input[type=search] { width: 240px; }

/* people table */
.tbl-wrap { background: var(--surface); border-radius: var(--r12); box-shadow: var(--shadow-card); overflow-x: auto; }
table.people { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 1100px; }
.people th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--text-subtle); font-weight: 700; padding: 10px 8px; border-bottom: 1px solid var(--border); background: var(--surface-inset); position: sticky; top: 0; white-space: nowrap; }
.people td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.people tr { cursor: pointer; }
.people tbody tr:hover td { background: var(--surface-inset); }
.people tr.sel td { background: var(--primary-soft) !important; }
.people tr.gone td { opacity: .55; }
.people td.chg { background: #fff4cc; box-shadow: inset 3px 0 0 #e0a800; cursor: help; }
.people tbody tr:hover td.chg { background: #fbecb3; }
.chg-key { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-subtle); margin-left: 6px; }
.chg-key i { width: 14px; height: 14px; border-radius: 3px; background: #fff4cc; box-shadow: inset 3px 0 0 #e0a800; }
.was { font-size: 12px; color: #8a6500; margin-top: 4px; }
.people tr.gone .nm { text-decoration: line-through; }
.people td.num { white-space: nowrap; }
.btn.xs { min-height: 30px; padding: 0 10px; font-size: 13px; }
.people .acts-col { width: 1%; cursor: default; }
.racts { display: flex; gap: 5px; align-items: center; white-space: nowrap; }
.ib { position: relative; width: 32px; height: 32px; display: inline-grid; place-items: center; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; cursor: pointer; color: var(--text-body); padding: 0; }
.ib svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ib:hover:not(:disabled) { border-color: var(--border-hover); background: var(--surface-inset); color: var(--ink); }
.ib:disabled { color: var(--text-faint); opacity: .5; cursor: default; }
.ib.verify:not(:disabled) { color: var(--good-ink); border-color: var(--good); }
.ib.verify:not(:disabled):hover { background: var(--good-ink); color: #fff; }
.ib.save { color: #fff; background: var(--primary); border-color: var(--primary); }
.ib.on { opacity: 1; background: var(--good-ink); border-color: var(--good-ink); color: #fff; }
.ib::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 12px; font-weight: 600;
  padding: 4px 8px; border-radius: 6px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s; z-index: 5; }
.ib:hover::after { opacity: 1; }
.people tbody tr:first-child .ib::after { bottom: auto; top: calc(100% + 6px); }   /* the header would cover it */
.people .nm { font-weight: 700; color: var(--ink); white-space: nowrap; }
.people .linkish { display: block; border: 0; background: none; padding: 0; font: inherit; font-weight: 700; cursor: pointer; text-align: left; }
.people .linkish:hover:not(:disabled) { text-decoration: underline; color: var(--link); }
.people .linkish:disabled { cursor: default; color: var(--ink); }
.people tr.editing td { background: var(--primary-soft) !important; vertical-align: top; cursor: default; }
.people tr.editing select, .people tr.editing input { height: 34px; padding: 0 8px; font-size: 13px; min-width: 120px; }
.people tr.editing select { padding-right: 28px; background-position: right 9px center; }
.people tr.editing input + input, .people tr.editing select + input, .people tr.editing input + datalist + * { margin-top: 5px; }
.people tr.editing .miss { border-color: var(--warn); background-color: var(--warn-tint); }
.people .sub { font-size: 12px; color: var(--text-faint); }
.people .fill { display: inline-block; font-size: 11.5px; font-weight: 700; color: var(--warn-ink); background: var(--warn-soft); border-radius: 5px; padding: 1px 6px; }
.people select.duty { min-height: 34px; padding: 4px 8px; font-size: 13px; min-width: 200px; }
.people select.duty.empty { border-color: var(--warn); background: var(--warn-tint); color: var(--warn-ink); font-weight: 700; }
.tag { display: inline-block; font-size: 11.5px; background: var(--surface-sunken); border-radius: 5px; padding: 1px 6px; margin: 1px 2px 1px 0; white-space: nowrap; }
.empty-row { padding: 36px; text-align: center; color: var(--text-subtle); }
.below { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; align-items: center; }

/* bulk bar */
.bulk { position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 25; background: var(--ink); color: #fff; border-radius: var(--r16); padding: 10px 12px;
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap; box-shadow: var(--shadow-window); max-width: calc(100% - 32px); }
.bulk b { padding: 0 6px; white-space: nowrap; }
.bulk select { width: auto; min-height: 36px; padding: 4px 8px; font-size: 13.5px; color: var(--ink); }
.bulk .btn { min-height: 36px; }
.bulk .btn.ghost { color: #fff; } .bulk .btn.ghost:hover { background: rgba(255,255,255,.12); }

/* drawer */
.scrim { position: fixed; inset: 0; background: rgba(25,25,24,.28); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 40; }
.scrim.on { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--surface); z-index: 41; box-shadow: var(--shadow-window);
  transform: translateX(105%); transition: transform .25s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column; }
.drawer.on { transform: none; }
.dr-head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.dr-head h2 { font-size: 19px; }
.dr-body { padding: 16px 18px 24px; overflow-y: auto; flex: 1; }
.dr-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; background: var(--surface-inset); }
.dr-foot .sp { flex: 1; }
.sec { margin-bottom: 18px; }
.sec > h3 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-subtle); margin-bottom: 10px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.sec.duty-sec { background: var(--surface-inset); border: 1px solid var(--line); border-radius: var(--r12); padding: 14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--r9); overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 0 16px; font-weight: 600; cursor: pointer; height: calc(var(--tap) - 2px); }
.seg button + button { border-left: 1px solid var(--border-strong); }
.seg button.on { background: var(--ink); color: #fff; }
.field.miss .seg { border-color: var(--warn); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { border: 1.5px solid var(--border); background: #fff; border-radius: var(--r9); padding: 10px 12px; text-align: left; font-weight: 600; font-size: 14px; cursor: pointer; min-height: 48px; color: var(--text-strong); }
.tile:hover { border-color: var(--border-hover); }
.tile.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.field.miss .tile:not(.on) { border-color: var(--warn-edge); }
.toggles { display: flex; flex-wrap: wrap; gap: 6px; }
.tog { border: 1px solid var(--border); background: #fff; border-radius: var(--pill); padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text-body); }
.tog.on { background: var(--primary-soft); border-color: var(--primary); color: var(--link); }
.tog:disabled { opacity: .35; cursor: default; }
.tog.add { border-style: dashed; color: var(--link); background: transparent; }
.tog .x { border: 0; background: none; color: inherit; font-size: 15px; line-height: 1; padding: 0 0 0 4px; cursor: pointer; }
.picked { display: flex; align-items: center; gap: 12px; }
.chosen { background: var(--ink); color: #fff; border-radius: var(--r9); padding: 10px 14px; font-weight: 700; font-size: 14px; }
.linkbtn { border: 0; background: none; color: var(--link); font-weight: 600; font-size: 13.5px; cursor: pointer; padding: 4px 2px; text-decoration: underline; }
.other-pick { margin-top: 8px; padding: 10px; border: 1px dashed var(--border); border-radius: var(--r9); background: #fff; display: grid; gap: 8px; justify-items: start; }
.check { display: flex; gap: 8px; align-items: center; font-size: 13.5px; cursor: pointer; }
.check input { width: 17px; height: 17px; }
.banner { border-radius: var(--r12); padding: 12px 14px; margin-bottom: 14px; font-size: 14px; }
.banner.bad { background: var(--bad-tint); border: 1px solid #f5c2ab; color: var(--bad-ink); }
.banner.warn { background: var(--warn-tint); border: 1px solid var(--warn-edge); color: var(--warn-ink); }
.banner.info { background: var(--primary-soft); color: var(--link); }
.banner.good { background: var(--good-tint); border: 1px solid #bfe3c6; color: var(--good-ink); }
.banner .row { margin-top: 8px; }
.sim { font-size: 13px; margin-top: 6px; }

/* modal */
.modal-wrap { position: fixed; inset: 0; z-index: 50; display: none; place-items: center; background: rgba(25,25,24,.35); padding: 16px; }
.modal-wrap.on { display: grid; }
.modal { background: #fff; border-radius: var(--r16); box-shadow: var(--shadow-window); width: min(520px, 100%); max-height: 90vh; overflow-y: auto; padding: 22px; }
.modal h2 { margin-bottom: 6px; }
.modal ol { padding-left: 20px; margin: 10px 0; } .modal li { margin-bottom: 8px; }
.modal .acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }

/* dashboard */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--surface); border-radius: var(--r12); box-shadow: var(--shadow-card); padding: 14px 16px; }
.kpi .v { font-size: 26px; font-weight: 800; color: var(--ink); letter-spacing: -.03em; }
.kpi .l { font-size: 13px; color: var(--text-subtle); }
.dash { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
table.plain { width: 100%; border-collapse: collapse; font-size: 14px; }
.plain th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--text-subtle); padding: 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.plain td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.plain .bar { margin: 0; min-width: 110px; }
.hbar { display: grid; grid-template-columns: 170px 1fr 38px; gap: 8px; align-items: center; font-size: 13px; margin-bottom: 7px; }
.hbar .t { height: 14px; background: var(--surface-sunken); border-radius: 4px; overflow: hidden; }
.hbar .t i { display: block; height: 100%; background: var(--primary); border-radius: 4px; }
.hbar.blank .t i { background: var(--warn); }
.hbar .n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); }

/* toast */
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r9);
  font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: all .2s; z-index: 60; max-width: calc(100% - 32px); }
.toast.on { opacity: 1; transform: translateX(-50%); }

@media (max-width: 900px) {
  .dash { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
}
@media (max-width: 640px) {
  main { padding: 16px 16px 140px; }
  .topbar .in { padding: 0 16px; gap: 8px; }
  .brand small, .hide-sm, .demo-flag { display: none; }
  .steps { grid-template-columns: 1fr; }
  .two, .tiles { grid-template-columns: 1fr; }
  .tools input[type=search], .tools select { width: 100%; }
  .prog { min-width: 0; width: 100%; }
  h1 { font-size: 22px; }
  .hbar { grid-template-columns: 120px 1fr 34px; }
}
@media print {
  .topbar, .foot, .bulk, .drawer, .scrim, .toast { display: none !important; }
}

/* DL / CDL | Ban Sahayak tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 4px 0 16px; overflow-x: auto; }
.tab { border: 0; background: none; padding: 10px 14px; font: inherit; font-weight: 700; font-size: 15px; color: var(--text-subtle); cursor: pointer;
  border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.tab .k { font-size: 12px; font-weight: 700; background: var(--surface-inset); color: var(--text-subtle); border-radius: 999px; padding: 1px 8px; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); border-bottom-color: var(--primary); }
.tab.on .k { background: var(--primary-soft); color: var(--link); }
.circle h2 a { color: inherit; text-decoration: none; } .circle h2 a:hover { color: var(--link); text-decoration: underline; }
.pill.bs { background: #e8f1e4; color: #2f5d23; }
.fixed-pay { font-weight: 700; font-size: 15px; padding: 10px 12px; background: var(--surface-inset); border-radius: var(--r9); }
/* Track changes switch */
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .sl { width: 36px; height: 20px; border-radius: 999px; background: var(--border-strong); position: relative; transition: background .15s; flex: none; }
.switch .sl::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch input:checked + .sl { background: #e0a800; }
.switch input:checked + .sl::after { transform: translateX(16px); }
.switch input:focus-visible + .sl { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Remarks: optional, and the hint must not look like filled-in text */
.optional::placeholder { color: #a3a3a3; font-style: italic; opacity: 1; }
.opt { font-size: 11.5px; font-weight: 600; color: var(--text-faint); background: var(--surface-inset); border-radius: 5px; padding: 1px 6px; margin-left: 4px; text-transform: lowercase; }
.people .rmk { font-size: 12.5px; color: var(--text-body); max-width: 240px; white-space: normal; }

/* live: saving indicator and loading state */
.sync { font-size: 13px; font-weight: 600; color: var(--good-ink); white-space: nowrap; }
.sync.on { color: var(--text-subtle); }

.login .err { min-height: 18px; margin: 4px 0 8px; }

/* sign-up and sign-in */
.login .alt { text-align: center; margin: 12px 0 0; font-size: 14px; }
.login .banner { margin-bottom: 14px; }
.login form, form.login { max-width: 520px; }
.mine-link { display: block; margin-bottom: 16px; padding: 14px 16px; text-decoration: none; color: var(--ink); font-size: 15px; }
.mine-link:hover { border-color: var(--primary); }
/* admin users page */
.users tr.u-row { cursor: pointer; } .users tr.u-row:hover td { background: var(--surface-inset); }
.users tr.none td:first-child b { color: var(--warn-ink); }
.users tr.u-detail td { background: var(--surface-inset); }
.ucount { display: inline-block; min-width: 26px; text-align: center; font-weight: 800; border-radius: 999px; padding: 2px 8px; }
.ucount.zero { background: var(--warn-soft); color: var(--warn-ink); }
.ucount.one { background: #e3f3e6; color: var(--good-ink); }
.ucount.many { background: #fff1c2; color: #8a6500; }

/* loading animation (as in UPMC) */
.loader { text-align: center; padding: 30px 20px 26px; margin-bottom: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r16);
  animation: up .45s cubic-bezier(.2,.8,.2,1) both; }
.loader .tree { width: 74px; height: 74px; display: block; margin: 0 auto 10px; overflow: visible; }
.loader .tree path { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.loader .canopy { stroke: var(--good); fill: var(--good-tint) !important; stroke-dasharray: 150; stroke-dashoffset: 150;
  animation: draw 2.8s cubic-bezier(.2,.8,.2,1) infinite, sway 2.8s ease-in-out infinite; transform-origin: 32px 49px; }
.loader .trunk { --len: 60; stroke: var(--ink); stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw 2.8s cubic-bezier(.2,.8,.2,1) infinite; }
.loader .ground { stroke: var(--border-strong); }
.loader .ld-title { display: block; color: var(--ink); font-size: 17px; font-weight: 800; letter-spacing: -0.015em; }
.loader .ld-step { margin: 10px 0 0; font-size: 14px; color: var(--text-body); min-height: 22px; transition: opacity .22s, transform .22s; }
.loader .ld-tip { margin: 14px auto 0; max-width: 460px; font-size: 13px; color: var(--violet-ink); background: var(--violet-soft); padding: 8px 12px;
  border-radius: var(--r9); transition: opacity .22s, transform .22s; }
.loader .ld-slow { margin: 10px 0 0; min-height: 18px; }
.loader .out { opacity: 0; transform: translateY(4px); }
.ibar { position: relative; height: 6px; max-width: 260px; margin: 14px auto 0; background: var(--line); border-radius: var(--pill); overflow: hidden; }
.ibar i { position: absolute; top: 0; bottom: 0; width: 40%; border-radius: inherit; background: linear-gradient(90deg, var(--good), var(--primary)); animation: slide 1.4s ease-in-out infinite; }
.skeleton { height: 92px; border-radius: var(--r12); background: linear-gradient(90deg, var(--surface-sunken), var(--surface-inset), var(--surface-sunken)); background-size: 200% 100%; animation: sh 1.2s infinite; }
.sk-rows { display: grid; gap: 8px; } .skeleton.row { height: 44px; border-radius: var(--r9); }
.btn .spin { display: inline-block; width: 15px; height: 15px; margin-right: 8px; vertical-align: -2px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes draw { 0% { stroke-dashoffset: var(--len, 150); } 45%, 75% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: calc(var(--len, 150) * -1); } }
@keyframes sway { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(2.5deg); } }
@keyframes slide { 0% { left: -40%; } 100% { left: 100%; } }
@keyframes sh { to { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loader .canopy, .loader .trunk { stroke-dashoffset: 0; animation: none; } .ibar i, .skeleton, .btn .spin { animation: none; } }

.pw { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; background: var(--surface-sunken); padding: 2px 6px; border-radius: 5px; color: var(--ink); }
