/* Porchlight staff screens, Direction Z (DESIGN_SYSTEM.md). Colours only through tokens.css. */
@import url("tokens.css");

* { box-sizing: border-box; }
html { background: var(--pale); }
body {
  margin: 0; font: 14px/1.45 var(--font); background: var(--pale); color: var(--ink);
  font-variant-numeric: tabular-nums; cursor: default; overflow-x: hidden;
}
/* Cursor rule (DESIGN_SYSTEM 14) */
input, textarea, select, button { font: inherit; color: var(--ink); }
input, textarea, [contenteditable] { cursor: text; }
input[type=checkbox], input[type=radio], input[type=file], select { cursor: pointer; }
a, button, [role=button], [role=tab], summary, label, .clickable { cursor: pointer; }
button:disabled, .btn[aria-disabled=true], input:disabled, select:disabled { cursor: not-allowed; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--teal-ring); outline-offset: 1px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.top { background: var(--navy); color: var(--white); display: flex; align-items: center; gap: 18px; padding: 0 28px; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; letter-spacing: .01em; color: var(--white); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { display: block; border-radius: 6px; }
.agency { white-space: nowrap; border: 1px solid var(--top-line); border-radius: var(--r-ctl); font-size: 13px; color: var(--top-soft); display: flex; align-items: center; }
.agency.one { padding: 4px 10px; }
.agency select { background: transparent; border: 0; color: var(--top-soft); padding: 4px 8px; font-size: 13px; max-width: 220px; }
.agency select option { color: var(--ink); background: var(--white); }
.nav { display: flex; gap: 2px; margin-left: 4px; min-width: 0; }
.nav a { white-space: nowrap; color: var(--top-text); font-size: 13.5px; padding: 17px 11px 14px; border-bottom: 3px solid transparent; }
.nav a:hover { color: var(--white); text-decoration: none; }
.nav a.on { color: var(--white); border-bottom-color: var(--teal); }
.nav a b { background: var(--teal); color: var(--navy); border-radius: 9px; padding: 0 7px; font-size: 11px; margin-left: 6px; font-weight: 600; }
.nav-mobile { display: none; }
.top .sp { flex: 1; }
.copilot-btn { height: 30px; border: 1px solid var(--top-line); background: transparent; color: var(--white); border-radius: var(--r-ctl); padding: 0 12px; font-size: 13px; white-space: nowrap; }
.copilot-btn:hover { border-color: var(--top-soft); }
.me-menu { position: relative; }
.me-menu summary { list-style: none; }
.me-menu summary::-webkit-details-marker { display: none; }
.me { width: 30px; height: 30px; border-radius: 50%; background: var(--top-fill); display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--white); }
.me-pop { position: absolute; right: 0; top: 38px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-shell); padding: 12px 14px; z-index: 30; min-width: 220px; color: var(--ink); }
.me-email { font-size: 12.5px; color: var(--sec); margin-bottom: 8px; word-break: break-all; }
.strip { background: var(--r); color: var(--white); font-size: 12px; font-weight: 600; letter-spacing: .05em; padding: 6px 28px; display: flex; gap: 18px; flex-wrap: wrap; }
.strip span { opacity: .92; font-weight: 500; letter-spacing: .02em; }
.strip span:empty { display: none; }

.wrap { padding: 22px 28px 48px; max-width: 1600px; margin: 0 auto; }
h1 { margin: 0; font-size: 24px; line-height: 1.2; color: var(--navy); font-weight: 600; }
h2 { margin: 0; font-size: 20px; line-height: 1.2; color: var(--navy); font-weight: 600; }
h3 { margin: 0; font-size: 17px; line-height: 1.3; color: var(--navy); font-weight: 600; }
h4, .label { margin: 0 0 8px; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--mut); font-weight: 600; }
.sub { color: var(--mut); font-size: 13px; margin-top: 4px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.head { display: flex; gap: 24px; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; }
.muted { color: var(--mut); }
.s2 { display: block; font-weight: 400; font-size: 12px; color: var(--mut); line-height: 1.35; white-space: normal; }
.s2.r, .r-t { color: var(--r); }
.s2.a, .a-t { color: var(--a-text); }
.s2.b, .b-t { color: var(--blue); }
.s2.g, .g-t { color: var(--g-text); }

/* ---------- buttons and fields ---------- */
.btn { height: 34px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--white); color: var(--ink); border-radius: var(--r-ctl); padding: 0 12px; font-size: 13px; white-space: nowrap; }
.btn:hover { border-color: var(--line-hover); }
.btn .c { background: var(--band); color: var(--navy); border-radius: 8px; padding: 0 6px; font-size: 11px; font-weight: 600; }
.btn.pri { background: var(--blue); border-color: var(--blue); color: var(--white); font-weight: 500; }
.btn.pri:hover { background: var(--blue-hover); }
.btn.danger { color: var(--r); border-color: var(--r); }
.btn.sm { height: 30px; font-size: 12.5px; }
.btn:disabled, .btn[aria-disabled=true] { opacity: .45; }
.btn svg { flex: none; }
.lnk { border: 0; background: transparent; color: var(--blue); font-size: 12.5px; padding: 2px 4px; font-weight: 500; }
.lnk:hover { text-decoration: underline; }
.lnk:disabled { opacity: .45; text-decoration: none; }
.why { font-size: 12.5px; color: var(--r); }
.field { display: grid; gap: 4px; }
.field > span { font-size: 12px; font-weight: 500; color: var(--sec); }
.field small { font-size: 12px; color: var(--mut); }
.inp, select.inp, textarea.inp { height: 36px; border: 1px solid var(--line); background: var(--white); border-radius: var(--r-ctl); padding: 0 10px; font-size: 13.5px; width: 100%; min-width: 0; }
textarea.inp { height: auto; min-height: 84px; padding: 9px 10px; resize: vertical; }
.inp:focus { outline: 2px solid var(--teal-ring); outline-offset: 1px; border-color: var(--teal); }
.inp.bad { border-color: var(--r); }
.ferr { color: var(--r); font-size: 12.5px; }
.row-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }

/* ---------- board: headline band (judge change 3) ---------- */
.band { display: grid; grid-template-columns: minmax(260px, 1.6fr) 1fr 1fr; background: var(--white); border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r-shell) var(--r-shell) 0 0; }
.band > div { padding: 12px 16px 11px; border-left: 1px solid var(--line2); min-width: 0; }
.band > div:first-child { border-left: 0; }
.band .k { font-size: 12px; color: var(--mut); }
.band .v { display: flex; align-items: baseline; gap: 10px; margin-top: 2px; flex-wrap: wrap; }
.band .v b { font-size: 30px; line-height: 1.05; font-weight: 600; color: var(--navy); }
.band .v small { font-size: 12px; color: var(--sec); }
.band .late { box-shadow: inset 4px 0 0 var(--r); border-radius: var(--r-shell) 0 0 0; }
.band .late.has b { color: var(--r); }
.band .late.has { cursor: pointer; }
.band .late.has:hover { background: var(--row-hover); }
.band .late.on { background: var(--teal-ground); }
.band .late.none { box-shadow: none; }

/* stage bar */
.queues { display: grid; grid-template-columns: repeat(var(--qn, 8), minmax(0, 1fr)); background: var(--white); border: 1px solid var(--line); border-bottom: 0; }
.queues.first { border-radius: var(--r-shell) var(--r-shell) 0 0; }
.q { padding: 10px 14px 9px; border-left: 1px solid var(--line2); border-bottom: 3px solid transparent; min-width: 0; background: var(--white); border-top: 0; border-right: 0; text-align: left; }
.q:first-child { border-left: 0; }
.q .n { font-size: 20px; font-weight: 600; color: var(--navy); line-height: 1.15; }
.q .l { font-size: 12.5px; color: var(--sec); display: block; overflow-wrap: anywhere; line-height: 1.3; }
.q .lt { font-size: 11px; color: var(--r); font-weight: 600; margin-left: 6px; }
.q.on { border-bottom-color: var(--teal); background: var(--teal-ground); }
.q.on .l { color: var(--ink); font-weight: 500; }
.q:hover:not(.on) { background: var(--stage-hover); }
.q.zero .n { color: var(--zero); }

/* toolbar */
.tools { display: flex; gap: 10px; align-items: center; background: var(--white); border: 1px solid var(--line); padding: 10px 14px; flex-wrap: wrap; }
.viewsrow { display: flex; gap: 10px; align-items: center; background: var(--white); border: 1px solid var(--line); border-top: 0; padding: 7px 14px; flex-wrap: wrap; }
.views { display: flex; gap: 4px; flex-wrap: wrap; }
.chip { height: 28px; border: 1px solid var(--line); background: var(--white); border-radius: 14px; padding: 0 10px; font-size: 12px; color: var(--sec); white-space: nowrap; }
.chip b { font-weight: 600; color: var(--navy); margin-left: 4px; }
.chip.on { border-color: var(--teal); background: var(--teal-ground); color: var(--ink); }
.search { flex: 1 1 220px; max-width: 380px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 0 10px; height: 34px; background: var(--pale); min-width: 180px; }
.search:focus-within { outline: 2px solid var(--teal-ring); outline-offset: 1px; }
.search input { border: 0; background: transparent; outline: 0; flex: 1; min-width: 0; font-size: 13.5px; }
.search .in { font-size: 11.5px; color: var(--mut); white-space: nowrap; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-tag); padding: 0 6px; }
.tools .sp { flex: 1; }
.tools .meta { font-size: 12.5px; color: var(--mut); white-space: nowrap; }
.pop { position: relative; }
.pop-panel { position: absolute; top: 40px; left: 0; z-index: 20; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-shell); padding: 14px; min-width: 260px; display: grid; gap: 10px; }
.pop-panel.right { left: auto; right: 0; }
.pop-panel .checks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; font-size: 13px; }
.pop-panel .checks label { display: flex; gap: 7px; align-items: center; white-space: nowrap; }
.pop-panel .acts { display: flex; gap: 8px; justify-content: flex-end; }

/* bulk bar */
.bulk { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--band); border: 1px solid var(--line); border-top: 0; padding: 8px 14px; font-size: 13px; }
.bulk b { color: var(--navy); }
.bulk .sp { flex: 1; }
.bulk-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bulk-form .inp { height: 32px; width: auto; min-width: 150px; }
.preview { background: var(--white); border: 1px solid var(--line); border-top: 0; padding: 10px 14px; font-size: 13px; color: var(--sec); }
.preview ul { margin: 6px 0 0; padding-left: 18px; }

/* table */
.tbl { background: var(--white); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r-shell) var(--r-shell); overflow: hidden; }
table.grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.grid th { text-align: left; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--mut); font-weight: 600; padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--head-ground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; user-select: none; }
.grid th.sortable { cursor: pointer; }
.grid th.sortable:hover { color: var(--navy); }
.grid th.sorted { color: var(--navy); }
.grid th.sorted::after { content: ""; display: inline-block; margin-left: 6px; border: 4px solid transparent; border-top-color: var(--navy); vertical-align: -1px; }
.grid th.sorted.asc::after { border-top-color: transparent; border-bottom-color: var(--navy); vertical-align: 2px; }
.grid td { padding: 10px 12px; border-bottom: 1px solid var(--line2); vertical-align: middle; font-size: 13px; overflow: hidden; }
.grid td.nowrap { white-space: nowrap; text-overflow: ellipsis; }
.grid th.ck, .grid td.ck { width: 40px; padding-left: 14px; padding-right: 0; }
.grid tbody tr.open { cursor: pointer; }
.grid tbody tr.open:hover td { background: var(--row-hover); }
.grid tbody tr.sel td { background: var(--row-sel); }
.grid tbody tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--teal); }
.grid tbody tr:last-child td { border-bottom: 0; }
.nm { font-weight: 600; color: var(--ink); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nm-sub { display: block; font-size: 12px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fold { display: none; }
.docs { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.seg { display: flex; gap: 2px; width: 56px; flex: none; }
.seg i { flex: 1; height: 7px; border-radius: var(--r-seg); background: var(--track); }
.seg i.ok { background: var(--g); }
.seg i.back { background: var(--a); }
.days { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.meter { position: relative; width: 52px; height: 7px; border-radius: 4px; background: var(--track); flex: none; overflow: hidden; }
.meter i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--bb); border-radius: 4px; }
.meter.over i { background: var(--r); }
.meter.near i { background: var(--a); }
.days .t em { font-style: normal; color: var(--mut); }
.over-c { color: var(--r); font-weight: 600; font-size: 12px; display: block; }
.paused { color: var(--mut); font-size: 12.5px; display: block; }
.who { display: flex; align-items: center; gap: 7px; min-width: 0; white-space: nowrap; }
.who .wn { overflow: hidden; text-overflow: ellipsis; }
.av { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 10.5px; font-weight: 600; background: var(--band); color: var(--navy); flex: none; }
.av.none { background: var(--white); border: 1px dashed var(--dash-av); color: var(--mut); }
.unas { color: var(--mut); font-style: italic; }
.due { color: var(--r); font-weight: 500; display: block; }
.today { color: var(--navy); font-weight: 600; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: var(--r-pill); padding: 2px 8px; font-size: 11.5px; font-weight: 500; max-width: 100%; white-space: normal; line-height: 1.35; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.p-b { background: var(--band); color: var(--navy); }
.p-g { background: var(--gbg); color: var(--g-text); }
.p-a { background: var(--abg); color: var(--a-text); }
.p-r { background: var(--rbg); color: var(--r-text); }
.p-n { background: var(--n); color: var(--sec); }
.badge { display: inline-block; border: 1px solid var(--a); color: var(--a-text); background: var(--abg); border-radius: var(--r-tag); font-size: 11px; font-weight: 600; padding: 0 6px; letter-spacing: .03em; }
.tag { display: inline-block; border: 1px solid var(--line); border-radius: var(--r-tag); padding: 1px 8px; font-size: 12px; color: var(--sec); background: var(--white); white-space: nowrap; }
.tag.add { border-style: dashed; color: var(--blue); }
.foot { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; font-size: 12.5px; color: var(--mut); border-top: 1px solid var(--line); flex-wrap: wrap; }
.foot .pager { display: flex; gap: 8px; align-items: center; }
.empty { padding: 36px; text-align: center; color: var(--mut); font-size: 14px; }
.empty .btn { margin-top: 12px; }
.errline { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border-left: 3px solid var(--r); background: var(--rbg); color: var(--r-text); padding: 8px 12px; font-size: 13px; border-radius: 0 var(--r-ctl) var(--r-ctl) 0; margin: 0 0 12px; }
.skel { display: grid; gap: 10px; padding: 14px; }
.skel i, .sk { display: block; height: 10px; border-radius: 4px; background: var(--track); }
.grid td .sk { width: 70%; }
.grid td .sk + .sk { width: 45%; margin-top: 6px; height: 8px; }

/* file shown under the board */
.divider { display: flex; align-items: center; gap: 14px; margin: 34px 0 14px; color: var(--mut); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.divider a { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12.5px; }

/* ---------- applicant file (P7) ---------- */
.file { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-shell); overflow: hidden; }
.fhead { display: flex; align-items: center; gap: 14px; padding: 16px 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.fhead .big { width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: var(--white); display: grid; place-items: center; font-weight: 600; font-size: 15px; flex: none; }
.fhead .s2 { font-size: 12.5px; }
.fhead .sp { flex: 1; }
.fhead .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.claim { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px 22px; background: var(--band); border-bottom: 1px solid var(--line); font-size: 13px; color: var(--sec); }
.claim b { color: var(--navy); }
.steps { display: grid; grid-template-columns: repeat(var(--sn, 9), minmax(0, 1fr)); padding: 16px 22px 14px; border-bottom: 1px solid var(--line); background: var(--head-ground); }
.st { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; min-width: 0; background: transparent; border: 0; padding: 0 2px; }
.st::before { content: ""; position: absolute; top: 14px; left: -50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.st:first-child::before { display: none; }
.st.done::before, .st.cur::before { background: var(--g); }
.st .dot { position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 600; background: var(--white); border: 2px solid var(--line); color: var(--mut); }
.st.done .dot { background: var(--g); border-color: var(--g); color: var(--white); }
.st.cur .dot { border-color: var(--teal); background: var(--teal); color: var(--navy); box-shadow: 0 0 0 4px var(--teal-halo); }
.st.skip .dot { border-style: dashed; border-color: var(--na-ring); }
.st.view .dot { outline: 2px solid var(--blue); outline-offset: 2px; }
.st .lb { font-size: 12px; color: var(--sec); line-height: 1.25; overflow-wrap: anywhere; }
.st.cur .lb { color: var(--navy); font-weight: 600; }
.st.skip .lb { color: var(--na-text); }
.st .lb small { display: block; color: var(--mut); font-weight: 400; font-size: 11px; }
.st .lb small.late { color: var(--r); font-weight: 500; }
.steps-compact { display: none; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--head-ground); font-size: 13px; }
.steps-compact .bar { display: grid; grid-template-columns: repeat(var(--sn, 9), 1fr); gap: 3px; margin-top: 6px; }
.steps-compact .bar i { height: 7px; border-radius: var(--r-seg); background: var(--track); }
.steps-compact .bar i.done { background: var(--g); }
.steps-compact .bar i.cur { background: var(--teal); }
.fbody { display: grid; grid-template-columns: 270px minmax(0, 1fr); }
.rail { border-right: 1px solid var(--line); padding: 18px 20px 22px; background: var(--rail-ground); min-width: 0; }
.rail section { margin-bottom: 20px; }
.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px 12px; font-size: 13px; margin: 0; }
.facts dt { color: var(--mut); }
.facts dd { margin: 0; color: var(--ink); text-align: right; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tags .inp { height: 28px; width: 130px; font-size: 12.5px; }
.prio { display: inline-flex; gap: 4px; vertical-align: middle; }
.prio i { width: 16px; height: 6px; border-radius: var(--r-seg); background: var(--track); }
.prio i.on { background: var(--r); }
.prio-w { font-size: 12px; color: var(--sec); margin-left: 8px; }
.kv { font-size: 13px; display: grid; gap: 6px; }
.kv div { display: flex; justify-content: space-between; gap: 10px; }
.kv .ok { color: var(--g); font-weight: 500; }
.kv .no { color: var(--r); font-weight: 500; }
.kv .wait { color: var(--a-text); font-weight: 500; }
.main { padding: 18px 22px 22px; min-width: 0; }
.stephead { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 10px; flex-wrap: wrap; }
.stephead .s2 { font-size: 12.5px; margin-top: 2px; }
.stephead .sp { flex: 1; }
.stephead .acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.missing { display: flex; gap: 6px; flex-wrap: wrap; border-left: 3px solid var(--r); background: var(--rbg); color: var(--r-text); padding: 8px 12px; border-radius: 0 var(--r-ctl) var(--r-ctl) 0; font-size: 13px; margin-bottom: 12px; }
.missing b { font-weight: 600; }
.missing.none { border-left-color: var(--g); background: var(--gbg); color: var(--g-text); }
.ruleline { display: block; font-size: 12.5px; color: var(--sec); background: var(--band); border-radius: var(--r-ctl); padding: 7px 12px; margin-bottom: 14px; }
.ruleline b { color: var(--navy); font-weight: 600; }
.inline-form { border: 1px solid var(--line); border-radius: var(--r-shell); padding: 12px 14px; margin-bottom: 14px; display: grid; gap: 10px; background: var(--head-ground); }
.dgroup { border: 1px solid var(--line); border-radius: var(--r-shell); margin-bottom: 12px; overflow: hidden; }
.dgroup .gh { display: flex; justify-content: space-between; padding: 8px 14px; background: var(--head-ground); border-bottom: 1px solid var(--line2); font-size: 12px; font-weight: 600; color: var(--sec); letter-spacing: .03em; }
.drow { display: grid; grid-template-columns: 22px minmax(130px, 1.3fr) minmax(150px, 1.6fr) 100px minmax(120px, auto); gap: 12px; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--line2); font-size: 13px; }
.drow:last-child { border-bottom: 0; }
.ic { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--white); }
.ic.ok { background: var(--g); }
.ic.back { background: var(--a); }
.ic.miss { background: var(--white); border: 2px solid var(--r); }
.ic.wait { background: var(--white); border: 2px solid var(--blue); }
.ic.na { background: var(--white); border: 2px dashed var(--na-ring); }
.drow .dn { font-weight: 500; min-width: 0; }
.drow .dn small { display: block; color: var(--mut); font-weight: 400; font-size: 11.5px; }
.drow .stt { font-size: 12.5px; }
.stt.ok { color: var(--g-text); } .stt.back { color: var(--a-text); } .stt.miss { color: var(--r); } .stt.wait { color: var(--blue); }
.drow .when { color: var(--mut); font-size: 12.5px; }
.drow .da { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.drow.na { background: var(--na-ground); }
.drow.na .dn, .drow.na .stt { color: var(--na-text); }
.nafold { border: 1px solid var(--line); border-radius: var(--r-shell); margin-bottom: 12px; overflow: hidden; background: var(--na-ground); }
.nafold summary { padding: 8px 14px; font-size: 12.5px; color: var(--na-text); list-style: none; }
.nafold summary::-webkit-details-marker { display: none; }
.nafold summary::before { content: "+ "; }
.nafold[open] summary::before { content: "- "; }
.panes { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pane { min-width: 0; }
.nbox .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; font-size: 12px; color: var(--mut); flex-wrap: wrap; }
.tl { list-style: none; margin: 0; padding: 0; font-size: 13px; max-height: 420px; overflow-y: auto; }
.tl li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 10px; padding-bottom: 12px; position: relative; }
.tl li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--bb); margin-top: 6px; margin-left: 3px; }
.tl li.note::before { background: var(--navy); }
.tl li::after { content: ""; position: absolute; left: 6px; top: 16px; bottom: 0; width: 2px; background: var(--line2); }
.tl li:last-child::after { display: none; }
.tl small { display: block; color: var(--mut); font-size: 11.5px; }
.tl .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.convo { border: 1px solid var(--line); border-radius: var(--r-shell); overflow: hidden; }
.convo .held { background: var(--r); color: var(--white); font-size: 12px; font-weight: 600; letter-spacing: .04em; padding: 6px 12px; }
.convo .held span { font-weight: 500; letter-spacing: .01em; opacity: .92; }
.thread { padding: 12px; display: grid; gap: 8px; max-height: 320px; overflow-y: auto; background: var(--head-ground); }
.msg { max-width: 80%; border: 1px solid var(--line); background: var(--white); border-radius: var(--r-shell); padding: 8px 10px; font-size: 13px; }
.msg.out { justify-self: end; background: var(--band); border-color: var(--band); }
.msg .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg small { display: block; color: var(--mut); font-size: 11.5px; margin-top: 4px; }
.compose { padding: 12px; display: grid; gap: 8px; border-top: 1px solid var(--line); }
.compose .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.compose .inp { width: auto; }
.sec-block { margin-top: 20px; }

/* ---------- dashboards, settings, logs ---------- */
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-shell); margin-bottom: 18px; overflow: hidden; }
.panel > .ph { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel > .ph h3 { font-size: 15px; }
.panel > .ph .s2 { display: inline; }
.panel > .pb { padding: 14px 16px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--white); border: 1px solid var(--line); border-radius: var(--r-shell); margin-bottom: 18px; }
.tiles > div { padding: 12px 16px; border-left: 1px solid var(--line2); min-width: 0; }
.tiles > div:first-child { border-left: 0; }
.tiles .k { font-size: 12px; color: var(--mut); }
.tiles b { display: block; font-size: 30px; line-height: 1.05; font-weight: 600; color: var(--navy); margin-top: 2px; }
.tiles small { font-size: 12px; color: var(--sec); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.filters .field { min-width: 150px; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.bars { display: grid; gap: 6px; }
.bars .br { display: grid; grid-template-columns: minmax(90px, 160px) minmax(0, 1fr) 48px; gap: 10px; align-items: center; font-size: 13px; }
.bars .br .tr { height: 10px; background: var(--track); border-radius: var(--r-seg); overflow: hidden; }
.bars .br .tr i { display: block; height: 100%; background: var(--bb); }
.bars .br .tr i.r { background: var(--r); }
.bars .br .n { text-align: right; }
.trend { display: flex; align-items: flex-end; gap: 2px; height: 90px; border-bottom: 1px solid var(--line); }
.trend i { flex: 1; background: var(--bb); min-height: 1px; border-radius: 2px 2px 0 0; }
.trend-axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--mut); margin-top: 4px; }
.funnel { display: grid; gap: 6px; }
.settings-nav { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; }
.toggle-line { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.state-off { color: var(--r); font-weight: 600; }
.state-on { color: var(--g-text); font-weight: 600; }
.pre { white-space: pre-wrap; background: var(--head-ground); border: 1px solid var(--line2); border-radius: var(--r-ctl); padding: 10px 12px; font-size: 12.5px; color: var(--ink); overflow-wrap: anywhere; }
.inline-inp { height: 30px; width: 64px; border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 0 8px; font-size: 13px; text-align: right; }

/* ---------- modal and notice ---------- */
.modal-wrap { position: fixed; inset: 0; background: var(--scrim); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--white); border-radius: var(--r-shell); border: 1px solid var(--line); padding: 18px 20px; width: min(440px, 100%); display: grid; gap: 12px; }
.modal-b { display: grid; gap: 10px; font-size: 13.5px; color: var(--sec); }
.modal-a { display: flex; gap: 8px; justify-content: flex-end; }
.notice { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--navy); color: var(--white); padding: 9px 16px; border-radius: var(--r-ctl); font-size: 13px; z-index: 60; max-width: calc(100% - 32px); }
.notice.bad { background: var(--r); }

/* ---------- copilot side panel (P18) ---------- */
.copilot { position: fixed; top: 0; right: 0; bottom: 0; width: 380px; max-width: 100%; background: var(--white); border-left: 1px solid var(--line); z-index: 40; display: flex; flex-direction: column; }
.copilot .ch { background: var(--navy); color: var(--white); height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; font-weight: 600; }
.copilot .ch button { background: transparent; border: 1px solid var(--top-line); color: var(--white); border-radius: var(--r-ctl); height: 30px; padding: 0 10px; font-size: 12.5px; }
.copilot .cb { flex: 1; overflow-y: auto; padding: 14px 16px; display: grid; gap: 12px; align-content: start; }
.copilot .cf { border-top: 1px solid var(--line); padding: 12px 16px; display: grid; gap: 8px; }
.qa-q { font-weight: 600; color: var(--navy); font-size: 13px; }
.qa-a { font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.act-card { border: 1px solid var(--line); border-radius: var(--r-shell); padding: 10px 12px; display: grid; gap: 8px; font-size: 13px; }
.act-card .row { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* ---------- sign in ---------- */
.signin { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: var(--pale); }
.signin .side { background: var(--navy); color: var(--white); display: flex; align-items: center; justify-content: center; gap: 16px; padding: 32px; }
.signin .side img { width: 72px; height: 72px; border-radius: 14px; }
.signin .side span { font-size: 32px; font-weight: 600; letter-spacing: .01em; }
.signin .form-side { display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.signin form { width: min(360px, 100%); display: grid; gap: 14px; }
.signin form .btn.pri { height: 40px; justify-content: center; font-size: 14px; }

/* ---------- responsive (1440, 1280, 960) ---------- */
@media (max-width: 1300px) {
  .c-last_activity_at { display: none; }
}
@media (max-width: 1180px) {
  .c-position, .c-office, .c-agency { display: none; }
  .nm { white-space: normal; overflow-wrap: anywhere; }
  .seg { width: 40px; }
  .docs { flex-direction: column; align-items: flex-start; gap: 4px; white-space: normal; }
  .grid th { white-space: normal; text-overflow: clip; line-height: 1.3; }
  .fold { display: block; }
  .who .wn { display: none; }
  .grid th .wn { display: none; }
  .grid th .wsh { display: inline; }
  .seg { width: 46px; }
  .top { gap: 12px; padding: 0 20px; }
  .nav a { padding: 17px 8px 14px; font-size: 13px; }
  .agency select { max-width: 150px; }
  .copilot-btn { padding: 0 8px; }
}
@media (min-width: 1181px) { .grid th .wsh { display: none; } }
@media (max-width: 1100px) {
  .band { grid-template-columns: minmax(220px, 1.4fr) 1fr 1fr; }
  .q { padding: 9px 10px 8px; }
  .q .l { font-size: 11.5px; line-height: 1.25; }
  .q .lt { display: block; margin: 0; }
  .fbody { grid-template-columns: 220px minmax(0, 1fr); }
  .drow { grid-template-columns: 22px minmax(110px, 1.1fr) minmax(120px, 1.4fr) minmax(90px, auto); }
  .drow .when { display: none; }
  .panes { grid-template-columns: 1fr; }
  .st .lb { font-size: 11px; }
  .wrap { padding: 20px 20px 40px; }
  .strip { padding: 6px 20px; }
  .two { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles > div:nth-child(3) { border-left: 0; }
  .tiles > div:nth-child(n+3) { border-top: 1px solid var(--line2); }
}
@media (max-width: 1020px) {
  .brand span { display: none; }
}
@media (max-width: 820px) {
  .nav { display: none; }
  .nav-mobile { display: block; height: 30px; border-radius: var(--r-ctl); border: 1px solid var(--top-line); background: transparent; color: var(--white); padding: 0 6px; }
  .nav-mobile option { color: var(--ink); background: var(--white); }
  .wrap { padding: 16px; }
  .strip { padding: 6px 16px; }
  .top { padding: 0 16px; }
  .queues { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .band { grid-template-columns: 1fr; }
  .band > div { border-left: 0; border-top: 1px solid var(--line2); }
  .fbody { grid-template-columns: 1fr; }
  .rail { border-right: 0; border-bottom: 1px solid var(--line); }
  .c-assignee, .c-follow_up_on { display: none; }
  .signin { grid-template-columns: 1fr; }
  .signin .side { padding: 24px; }
}
@media (max-width: 700px) {
  .steps { display: none; }
  .steps-compact { display: block; }
}
@media (prefers-reduced-motion: no-preference) {
  .grid tbody tr td { transition: background .12s; }
  .ic { transition: background .15s; }
}

/* ---- small helpers that replaced inline styles (the CSP blocks style attributes) ---- */
.m0 { margin: 0; }
.mb12 { margin: 0 0 12px; }
.mb14 { margin-bottom: 14px; }
.mt8 { margin-top: 8px; }
.mt14 { margin-top: 14px; }
.grow { flex: 1; }
.grow200 { flex: 1; min-width: 200px; }
.minw240 { min-width: 240px; }
.minw260 { min-width: 260px; }
.wauto { width: auto; min-width: 220px; }
.note13 { font-size: 13px; }
.fw6 { font-weight: 600; }
.stack10 { display: grid; gap: 10px; }
.stack6 { display: grid; gap: 6px; }
.bline { border-bottom: 1px solid var(--line); }
.blk { display: block; margin-top: 6px; }
.s2.still { margin: -4px 0 10px; }
.toggle-line.tl-row { padding: 10px 0; border-bottom: 1px solid var(--line2); }
.toggle-line.tl-row.last { border-bottom: 0; }
.tl-label { flex: 1; min-width: 220px; }
.inline-form.flush { border-radius: 0; border-top: 0; margin: 0; }
.inline-form.inset { margin: 12px 22px; }
.prio-sel { height: 28px; width: auto; margin-left: 8px; font-size: 12.5px; }
.tiles.t3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.trend.gap2 { gap: 2px; }
.tcol { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.trend .tcol i { display: block; flex: none; }
.trend .tcol i.ta { background: var(--bb); border-radius: 2px 2px 0 0; }
.trend .tcol i.th { background: var(--g); border-radius: 0; }

/* ---- sign-in and setup extras ---- */
.signin .lead { margin: -4px 0 14px; }
.signin-links { display: flex; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.okline { display: flex; border-left: 3px solid var(--g); background: var(--gbg); color: var(--g-text); padding: 8px 12px; font-size: 13px; border-radius: 0 var(--r-ctl) var(--r-ctl) 0; margin: 0 0 12px; }
.setup-steps { display: flex; gap: 18px; list-style: none; padding: 0; margin: 0 0 16px; font-size: 13px; color: var(--mut); counter-reset: st; }
.setup-steps li { counter-increment: st; display: flex; align-items: center; gap: 8px; }
.setup-steps li::before { content: counter(st); width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.setup-steps li.on { color: var(--navy); font-weight: 600; }
.setup-steps li.on::before { border-color: var(--teal); color: var(--navy); }
.setup-steps li.done::before { content: "\2713"; background: var(--g); border-color: var(--g); color: var(--white); }
.qr { display: flex; justify-content: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-shell); background: var(--white); margin: 10px 0; }
.qr img { display: block; width: 200px; height: 200px; }
.qr.none { font-size: 13px; color: var(--mut); }
.qr-key summary { cursor: pointer; font-size: 13px; color: var(--navy); }
.qr-key .pre { display: block; margin-top: 8px; letter-spacing: .08em; }

/* ---- document actions and the logged reveal on the file ---- */
.reveal-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.reveal-val { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }

/* structured phone screen on the file page */
.ps-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 18px; margin: 8px 0; }
.ps-q { border: 1px solid var(--line2); border-radius: 8px; padding: 8px 10px; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.ps-q legend { font-size: 12px; font-weight: 600; padding: 0 4px; }
.ps-q .toggle-line { gap: 6px; }

/* Hiring tools page tabs and file-page care sections (home care hiring, 2026-11-20) */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 16px; border-bottom: 1px solid var(--line, #d9dde3); }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; font: inherit; color: inherit; cursor: pointer; }
.tab.on { border-bottom-color: currentColor; font-weight: 600; }
.care-sec { margin-top: 16px; }
.care-group { border: 1px solid var(--line); border-radius: var(--r-ctl, 8px); background: var(--white); margin-top: 12px; }
.care-group > summary { cursor: pointer; padding: 10px 14px; font-weight: 600; }
.care-group > .care-sec { padding: 0 14px 12px; margin-top: 0; }
