/*
 * Fairdoc dashboard prototype v2. Local demo, sample data only.
 * Proportions follow the supplied employer Reporting list and Edit report screenshots,
 * scaled to a 1280px viewport (reference px x 0.64).
 */
:root {
  --bg: #FBFAF7;
  --rail-steps: #F0EEE8;
  --paper: #FFFFFF;
  --sel: #ECEBE8;
  --hover: #F3F2EE;
  --line: #E7E5E0;        /* card borders, rail divider */
  --line-row: #EFEDE9;    /* table rows */
  --line-tab: #E2E0DA;    /* tab underline rule */
  --line-input: #9D9B99;  /* search + text inputs */
  --line-pill: #D9D7D2;   /* filter pills, outline buttons */
  --line-grid: #E4E1DC;   /* builder preview grid */
  --ink: #1F1E1A;
  --ink-2: #3A3934;
  --head: #55544E;        /* table header text */
  --muted: #6B6A64;
  --faint: #8F8D87;
  --dark: #24231F;
  --brand: #000099;
  --brand-tint: #D9DAF5;
  --ok: #2F7A46;
  --warn: #B07A1E;
  --info: #66738F;
  --idle: #A19D95;
  --danger: #A23B2E;
  --font: "Geist", Inter, "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --row-h: 52px;
}
.density-compact { --row-h: 42px; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 12.5px/1.4 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.noscript { padding: 24px; }
svg { flex: none; }

/* ---------------- Login (spare ivory page, small mark, narrow column) ---------------- */
.login { position: relative; min-height: 100vh; display: grid; place-items: center; padding: 56px 24px 72px; background: #F8F7F4; }
.login__col { width: min(384px, 100%); }
.login__mark { width: 30px; height: 30px; display: block; }
.login__title { font-size: 24px; font-weight: 400; letter-spacing: -.01em; margin: 26px 0 24px; }
.login__form { display: grid; }
.float { position: relative; margin-bottom: 9px; }
.float label { position: absolute; left: 13px; top: 11px; font-size: 12px; color: var(--muted); pointer-events: none; }
.float input { width: 100%; height: 62px; padding: 25px 13px 7px; border: 1px solid #D3D0C9; border-radius: 3px; background: #F8F7F4; font-size: 15px; }
.float input:focus { outline: none; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.float--pw input { padding-right: 48px; }
.float__eye { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; display: grid; place-items: center; border: 0; background: none; color: var(--ink-2); cursor: pointer; border-radius: 4px; }
.float__eye svg { width: 17px; height: 17px; }
.float__eye[aria-pressed="true"] { color: var(--brand); }
.login__msg { font-size: 13px; color: var(--danger); margin: 4px 0 2px; }
.login__msg.is-fatal { color: #6B4A10; }
.login__submit { justify-self: start; margin-top: 12px; height: 40px; padding: 0 16px; border: 0; border-radius: 3px; background: #1F1E1B; color: #fff; font-size: 15px; font-weight: 500; cursor: pointer; }
.login__submit:hover { background: #000; }
.login__submit:disabled { opacity: .5; cursor: not-allowed; }
.login__link { display: block; margin-top: 18px; padding: 0; border: 0; background: none; font-size: 13px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.login__note { margin-top: 26px; font-size: 12px; color: var(--faint); max-width: 340px; }
.login__foot { position: absolute; left: 32px; bottom: 22px; font-size: 12px; color: var(--faint); }

/* ---------------- Shell ---------------- */
.shell { display: grid; grid-template-columns: 208px minmax(0, 1fr); min-height: 100vh; }
.shell.is-steps { grid-template-columns: 248px minmax(0, 1fr); }
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--bg); border-right: 1px solid var(--line); min-width: 0; }
.rail__brand { display: flex; align-items: center; justify-content: space-between; padding: 16px 12px 11px 20px; }
.rail__brand img { height: 16px; width: auto; display: block; }
.nav { list-style: none; margin: 0; padding: 0 11px 0 6px; display: grid; gap: 4px; }
.nav__item { display: flex; align-items: center; gap: 15px; width: 100%; height: 31.5px; padding: 0 14px; border: 0; border-radius: 6px; background: none; color: var(--ink-2); font-size: 12.5px; text-align: left; cursor: pointer; }
.nav__item svg { width: 16px; height: 16px; color: #3F3E3A; }
.nav__item:hover { background: var(--hover); }
.nav__item[aria-current="page"] { background: var(--sel); color: var(--ink); }
.nav__item[aria-current="page"] svg { color: var(--ink); }
.rail__rule { height: 1px; background: var(--line); margin: 9px 4px 0 0; }
.rail__fill { flex: 1; }
.rail__demo { padding: 0 20px 12px; font-size: 11.5px; line-height: 1.45; color: var(--faint); }
.rail__demo button { padding: 0; border: 0; background: none; color: var(--muted); font-size: 11.5px; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.org { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 13px 14px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; cursor: pointer; }
.org:hover { background: var(--hover); }
.org__badge { width: 28px; height: 28px; border-radius: 5px; display: grid; place-items: center; background: var(--brand-tint); color: #1A1A55; font-size: 11.5px; font-weight: 500; flex: none; }
.org__name { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail .rail__close { display: none; }

.col { min-width: 0; display: flex; flex-direction: column; }
.mtop { display: none; }
.main { padding: 6px 34px 56px 43px; min-width: 0; }
.main:focus { outline: none; }

/* Page header: compact title left, restrained dark action right */
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; min-height: 35px; }
.head h1 { margin-top: 8px; font-size: 21.5px; font-weight: 600; letter-spacing: -.015em; line-height: 1.2; }
.head h1:focus { outline: none; }
.head__actions { display: flex; gap: 8px; align-items: center; }

/* Buttons */
.btn-dark { display: inline-flex; align-items: center; gap: 9px; height: 35px; padding: 0 14px; border: 1px solid #141412; border-radius: 6px; background: var(--dark); color: #fff; font-size: 12.5px; font-weight: 500; white-space: nowrap; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.07); }
.btn-dark:hover { background: #000; }
.btn-dark:disabled { opacity: .45; cursor: not-allowed; }
.btn-dark svg { width: 13px; height: 13px; }
.btn { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border: 1px solid var(--line-pill); border-radius: 6px; background: #fff; color: var(--ink); font-size: 12px; white-space: nowrap; cursor: pointer; }
.btn:hover { background: var(--hover); }
.btn svg { width: 14px; height: 14px; }
.btn[aria-disabled="true"], .btn:disabled { opacity: .5; cursor: not-allowed; }
.link { padding: 0; border: 0; background: none; color: var(--brand); font-size: 12.5px; cursor: pointer; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.link--quiet { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #C9C6BF; }
.icon-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 6px; background: none; color: #45443F; cursor: pointer; }
.icon-btn:hover { background: var(--hover); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:disabled { opacity: .3; cursor: default; }

/* Tabs */
.tabs { display: flex; gap: 6px; margin-top: 28px; border-bottom: 1px solid var(--line-tab); overflow-x: auto; scrollbar-width: none; }
.tab { position: relative; height: 34px; padding: 0 8px; border: 0; background: none; color: var(--ink-2); font-size: 12.5px; white-space: nowrap; cursor: pointer; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); font-weight: 500; }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--ink); }
.tab .count { color: var(--faint); font-weight: 400; margin-left: 5px; }

/* Search + filter pills */
.search { position: relative; width: 310px; margin-top: 21px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: #6E6C67; pointer-events: none; }
.search input { width: 100%; height: 35px; padding: 0 12px 0 35px; border: 1px solid var(--line-input); border-radius: 6px; background: #fff; font-size: 12.5px; }
.search input::placeholder { color: #7A7873; }
.search input:focus, .input:focus, .combo input:focus { outline: none; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 11px; min-height: 32px; }
.pill { height: 32px; padding: 0 30px 0 14px; border: 1px solid var(--line-pill); border-radius: 16px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%2345443F' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 11px center / 11px no-repeat; appearance: none; -webkit-appearance: none; font-size: 11.5px; color: var(--ink); cursor: pointer; }
.pill:hover { background-color: var(--hover); }
.pill.is-on { border-color: var(--ink-2); }
.filters__spacer { flex: 1; }
.selbar { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--ink-2); }

/* Table card */
.card { margin-top: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 1px 2px rgba(31,30,26,.04), 0 2px 8px rgba(31,30,26,.03); overflow: hidden; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { height: 31px; padding: 0 22px; text-align: left; font-size: 11.5px; font-weight: 400; color: var(--head); border-bottom: 1px solid var(--line-row); white-space: nowrap; }
.tbl td { height: var(--row-h); padding: 6px 22px; border-top: 1px solid var(--line-row); vertical-align: middle; }
.tbl tbody tr:first-child td { border-top: 0; }
.tbl .r { text-align: right; }
.tbl .chk { width: 1%; padding-right: 0; }
.tbl tr.is-row { cursor: pointer; }
.tbl tr.is-row:hover td { background: #FCFBF9; }
.tbl tr.is-done .t1 { color: var(--faint); text-decoration: line-through; }
.t1 { font-size: 12.5px; color: var(--ink); line-height: 1.35; }
.t2 { font-size: 11.5px; color: var(--muted); line-height: 1.35; margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.t2 svg { width: 12px; height: 12px; color: var(--muted); }
.row-link { padding: 0; border: 0; background: none; text-align: left; font-size: 12.5px; color: var(--ink); cursor: pointer; }
.row-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 47px; padding: 0 22px; border-top: 1px solid var(--line-row); font-size: 11.5px; color: var(--muted); }
.empty { padding: 28px 22px !important; text-align: center; color: var(--muted); }
.by { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; }
.by img { width: 14px; height: 14px; }
.by__av { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: #E8E6E1; color: var(--ink-2); font-size: 10px; font-weight: 600; }
.cb { width: 15px; height: 15px; margin: 0; accent-color: var(--dark); cursor: pointer; vertical-align: middle; }

/* Status: dot + word, no filled pills */
.st { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; white-space: nowrap; }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st span { color: var(--ink); }
.st-enrolled { color: var(--ok); }
.st-invited { color: var(--info); }
.st-not_invited { color: var(--warn); }
.st-waived { color: var(--idle); }
.tag { display: inline-block; padding: 1px 7px; border-radius: 5px; background: #EFEEF9; color: #1A1A70; font-size: 11.5px; font-weight: 500; vertical-align: 1px; }

/* Overview facts line (plain text, no cards) */
.facts { display: flex; flex-wrap: wrap; margin-top: 20px; row-gap: 14px; }
.fact { padding: 0 30px; border-left: 1px solid var(--line); min-width: 0; }
.fact:first-child { padding-left: 0; border-left: 0; }
.fact__label { font-size: 11.5px; color: var(--muted); }
.fact__value { font-size: 14px; font-weight: 500; margin-top: 2px; }
.fact__value small { font-size: 11.5px; font-weight: 400; color: var(--muted); }
.meter { display: flex; width: 150px; height: 3px; margin-top: 7px; border-radius: 2px; overflow: hidden; background: #E9E7E2; }
.meter span { display: block; height: 100%; }
.meter .m-ok { background: var(--ok); }
.meter .m-idle { background: var(--idle); }

/* ---------------- Workspace card (report builder, allowances, settings) ---------------- */
.ws { margin-top: 30px; background: var(--paper); border: 1px solid #E3E1DC; border-radius: 13px; padding: 22px; }
.ws--tabbed { margin-top: 21px; }
.flabel { display: block; font-size: 11.5px; font-weight: 600; color: var(--ink); margin-bottom: 9px; }
.fhint { font-size: 11.5px; color: var(--muted); }
.input { height: 35px; width: 100%; padding: 0 11px; border: 1px solid var(--line-input); border-radius: 6px; background: #fff; font-size: 12.5px; }
textarea.input { height: auto; min-height: 72px; padding: 8px 11px; resize: vertical; }
.actions { display: flex; align-items: center; gap: 28px; margin-top: 37px; flex-wrap: wrap; }
.actions .note { font-size: 11.5px; color: var(--faint); margin-left: -8px; }
.err { font-size: 12.5px; color: var(--danger); margin-top: 8px; }

/* Builder step rail */
.rail--steps { background: var(--rail-steps); border-right: 0; }
.back { display: flex; align-items: center; gap: 8px; height: 69px; padding: 0 20px 0 28px; border: 0; border-bottom: 1px solid #E2DFD8; background: none; font-size: 12.5px; color: var(--ink); text-align: left; cursor: pointer; width: 100%; }
.back svg { width: 15px; height: 15px; }
.back:hover { background: rgba(0,0,0,.02); }
.steps { position: relative; list-style: none; margin: 13px 0 0; padding: 0 12px 0 13px; }
.steps li { display: flex; align-items: center; gap: 9px; height: 29px; font-size: 11px; color: var(--ink-2); }
.steps li::before { content: ""; width: 7px; height: 7px; margin-left: 2px; border-radius: 50%; background: var(--ink); flex: none; position: relative; z-index: 1; }
.steps li.is-todo::before { width: 9px; height: 9px; margin-left: 1px; background: var(--rail-steps); border: 1.5px dashed #C9873A; }
.steps li.is-done::before { background: var(--ok); }
.steps li.is-current { color: var(--ink); font-weight: 600; }
.bhead h1 { font-size: 18.5px; font-weight: 600; letter-spacing: -.01em; }
.main--builder { padding: 22px 26px 56px 36px; }
.combo { position: relative; width: 408px; max-width: 100%; }
.combo svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: #6E6C67; pointer-events: none; }
.combo input { width: 100%; height: 35px; padding: 0 12px 0 35px; border: 1px solid var(--line-input); border-radius: 6px; background: #fff; font-size: 12.5px; }
.combo__list { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; max-height: 248px; overflow: auto; background: #fff; border: 1px solid var(--line-pill); border-radius: 8px; box-shadow: 0 8px 24px rgba(31,30,26,.12); }
.combo__opt { display: flex; justify-content: space-between; gap: 12px; padding: 7px 9px; border-radius: 5px; font-size: 12.5px; cursor: pointer; }
.combo__opt small { color: var(--faint); font-size: 12px; }
.combo__opt[aria-selected="true"], .combo__opt:hover { background: var(--hover); }
.prev { display: flex; align-items: baseline; gap: 14px; margin-top: 19px; flex-wrap: wrap; }
.prev h2 { font-size: 12.5px; font-weight: 700; }
.prev .fhint { font-size: 11px; }
.prev .count { margin-left: auto; font-size: 11px; color: var(--muted); }
.pt-wrap { margin-top: 10px; border: 1px solid var(--line-grid); border-radius: 6px; overflow-x: auto; }
.pt { border-collapse: collapse; min-width: 100%; }
.pt th { height: 43px; min-width: 160px; padding: 0 6px 0 10px; border-left: 1px solid var(--line-grid); border-bottom: 1px solid var(--line-grid); background: #fff; text-align: left; font-size: 11px; font-weight: 600; white-space: nowrap; }
.pt td { height: 31px; padding: 0 8px; border-left: 1px solid var(--line-grid); border-top: 1px solid var(--line-row); font-size: 11px; color: var(--ink-2); white-space: nowrap; }
.pt th:first-child, .pt td:first-child { border-left: 0; }
.pt tbody tr:first-child td { border-top: 0; }
.pt .r { text-align: right; }
.colhead { display: flex; align-items: center; gap: 4px; }
.colhead[draggable="true"] { cursor: grab; }
.colhead.is-over { box-shadow: inset 2px 0 0 var(--brand); }
.colhead__grip { display: grid; place-items: center; width: 14px; color: #2C2B27; }
.colhead__grip svg { width: 13px; height: 13px; }
.colhead__name { flex: 1; padding: 0 6px 0 4px; }
.colhead .icon-btn { width: 24px; height: 24px; color: #57554F; }
.colhead .icon-btn svg { width: 14px; height: 14px; }
.btn-next { height: 35px; padding: 0 16px; font-weight: 600; }
.radio-col { display: grid; gap: 10px; }
.radio-col label { display: flex; align-items: flex-start; gap: 10px; font-size: 12.5px; cursor: pointer; }
.radio-col input { margin: 2px 0 0; accent-color: var(--dark); }
.radio-col .is-off { color: var(--faint); cursor: not-allowed; }
.fgrid { display: grid; gap: 22px; max-width: 520px; }

/* Allowances */
.allow { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 40px; }
.choices { display: grid; gap: 10px; }
.choice { position: relative; display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 14px; border: 1px solid var(--line-pill); border-radius: 8px; background: #fff; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice__dot { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #8F8C86; flex: none; }
.choice:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 .5px var(--ink); }
.choice:has(input:checked) .choice__dot { border: 5px solid var(--dark); }
.choice:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.choice__name { font-size: 13px; }
.choice__amt { margin-left: auto; font-size: 12px; color: var(--muted); }
.explain { margin-top: 12px; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; min-height: 40px; }
.rule { height: 1px; background: var(--line-row); margin: 20px 0; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-input); border-radius: 6px; background: #fff; overflow: hidden; }
.stepper button { width: 34px; height: 33px; border: 0; background: none; font-size: 16px; color: var(--ink-2); cursor: pointer; }
.stepper button:hover { background: var(--hover); }
.stepper label { display: flex; align-items: center; border-left: 1px solid var(--line-pill); border-right: 1px solid var(--line-pill); padding-left: 10px; color: var(--muted); }
.stepper input { width: 70px; height: 33px; border: 0; padding: 0 6px; font-size: 12.5px; background: transparent; }
.stepper input:focus { outline: none; }
.stepper:focus-within { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.inline-fields { display: flex; gap: 28px; flex-wrap: wrap; }
.cost { margin-top: 18px; }
.cost__row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line-row); font-size: 12.5px; }
.cost__row:first-child { border-top: 0; padding-top: 0; }
.cost__row b { font-weight: 600; font-size: 14px; }
.cost__row small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.chg-up { color: var(--warn); }
.chg-down { color: var(--ok); }
.dirty { font-size: 11.5px; color: var(--warn); }

/* Settings rows */
.frow { display: grid; grid-template-columns: 240px minmax(0, 380px); gap: 24px; align-items: center; padding: 15px 0; border-top: 1px solid var(--line-row); }
.frow:first-child { border-top: 0; padding-top: 0; }
.frow:last-child { padding-bottom: 0; }
.frow__l { font-size: 12.5px; font-weight: 500; }
.frow__l small { display: block; font-weight: 400; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.switch { position: relative; display: inline-block; vertical-align: middle; width: 34px; height: 20px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; z-index: 1; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #D3D0C9; transition: background .15s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + span { background: var(--dark); }
.switch input:checked + span::after { transform: translateX(14px); }
.switch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.limits { margin: 0; padding-left: 18px; display: grid; gap: 7px; font-size: 12.5px; color: var(--ink-2); }

/* ---------------- Menus (popovers) ---------------- */
.menu { position: fixed; z-index: 70; min-width: 180px; padding: 5px; background: #fff; border: 1px solid var(--line-pill); border-radius: 8px; box-shadow: 0 10px 30px rgba(31,30,26,.14), 0 1px 2px rgba(31,30,26,.06); }
.menu__item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 5px; background: none; font-size: 12.5px; color: var(--ink); text-align: left; cursor: pointer; white-space: nowrap; }
.menu__item:hover, .menu__item:focus { background: var(--hover); outline: none; }
.menu__item[aria-disabled="true"] { color: var(--faint); cursor: default; background: none; }
.menu__item svg { width: 14px; height: 14px; color: var(--muted); }
.menu__head { padding: 8px 10px 6px; font-size: 11.5px; color: var(--muted); }
.menu__head strong { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink); }
.menu__sep { height: 1px; margin: 5px 2px; background: var(--line-row); }

/* ---------------- Drawer + dialog ---------------- */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(31,30,26,.22); animation: fade .15s ease-out; }
.drawer { position: fixed; z-index: 61; top: 0; right: 0; bottom: 0; width: min(420px, 100%); display: flex; flex-direction: column; background: #fff; border-left: 1px solid var(--line); box-shadow: -12px 0 40px rgba(31,30,26,.10); animation: slide .18s ease-out; }
.drawer__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 16px 16px 22px; border-bottom: 1px solid var(--line-row); }
.drawer__head h2 { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.drawer__head h2:focus { outline: none; }
.drawer__sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.drawer__body { flex: 1; overflow: auto; padding: 18px 22px 24px; display: grid; gap: 22px; align-content: start; }
.drawer__foot { padding: 12px 22px; border-top: 1px solid var(--line-row); font-size: 12px; color: var(--faint); }
.kv { margin: 0; }
.kv div { display: grid; grid-template-columns: 136px 1fr; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line-row); font-size: 12.5px; align-items: center; }
.kv div:first-child { border-top: 0; padding-top: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.kv select.input { height: 30px; width: auto; padding: 0 8px; }
.sect__t { font-size: 11.5px; font-weight: 600; margin-bottom: 8px; }
.callout { padding: 10px 12px; border-radius: 6px; background: #F6F5F1; font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 12.5px; }
.hist li { display: flex; justify-content: space-between; gap: 12px; }
.hist time { color: var(--faint); font-size: 11.5px; white-space: nowrap; }
.doc { padding: 18px 20px; border: 1px solid var(--line); border-radius: 6px; background: #FDFCFA; font-size: 12.5px; line-height: 1.6; }
.doc h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.doc p + p { margin-top: 10px; }
.dialog { position: fixed; z-index: 61; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100% - 24px)); max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-radius: 12px; box-shadow: 0 20px 60px rgba(31,30,26,.2); animation: fade .15s ease-out; }
.dialog .drawer__body { padding-top: 16px; }

/* Toasts */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: grid; gap: 8px; width: min(340px, calc(100% - 24px)); pointer-events: none; }
.toast { padding: 10px 14px; border-radius: 8px; background: var(--dark); color: #fff; font-size: 12.5px; box-shadow: 0 8px 24px rgba(0,0,0,.18); animation: rise .18s ease-out; }
.toast small { display: block; color: #CBC8C0; font-size: 11.5px; margin-top: 1px; }

@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(20px); opacity: 0; } }
@keyframes rise { from { transform: translateY(6px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------------- Responsive ---------------- */
@media (max-width: 1080px) {
  .allow { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 820px) {
  .shell, .shell.is-steps { grid-template-columns: 1fr; align-content: start; }
  .shell.is-steps { grid-template-rows: auto 1fr; }
  .rail { position: fixed; z-index: 62; top: 0; left: 0; bottom: 0; width: 260px; height: 100vh; transform: translateX(-100%); transition: transform .2s ease-out; box-shadow: 0 0 40px rgba(31,30,26,.18); }
  .shell.nav-open .rail { transform: none; }
  .shell.nav-open .col::before { content: ""; position: fixed; inset: 0; z-index: 61; background: rgba(31,30,26,.22); }
  .rail__close { display: inline-grid; }
  .rail--steps { position: static; height: auto; width: auto; transform: none; box-shadow: none; padding-bottom: 12px; border-bottom: 1px solid #E2DFD8; }
  .rail--steps .back { height: 52px; padding-left: 16px; }
  .rail--steps .steps { display: flex; gap: 18px; margin-top: 10px; padding-left: 14px; }
  .rail--steps .steps::before { display: none; }
  .mtop { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 10px; position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
  .mtop img { height: 15px; width: auto; }
  .mtop .tag { margin-left: auto; margin-right: 4px; }
  .is-steps .mtop { display: none; }
  .main { padding: 16px 16px 48px; }
  .main--builder { padding: 18px 16px 48px; }
  .head h1 { font-size: 21px; }
  .tabs { margin-top: 18px; }
  .search { width: 100%; margin-top: 16px; }
  .tbl .opt { display: none; }
  .tbl th, .tbl td { padding-left: 14px; padding-right: 14px; }
  .card__foot { padding: 0 14px; }
  .facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 0; }
  .fact { padding: 0 0 0 14px; }
  .fact:nth-child(odd) { padding-left: 0; border-left: 0; }
  .ws { padding: 16px; margin-top: 18px; }
  .frow { grid-template-columns: 1fr; gap: 8px; }
  .actions { margin-top: 24px; gap: 20px; }
  .login__foot { left: 24px; }
  .hide-sm { display: none; }
}

/* Utilities */
.mt { margin-top: 10px; }
.mb { margin-bottom: 10px; }
.mt0 { margin-top: 4px !important; }
.fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.fieldset legend { padding: 0; }
p.note.mt { margin-top: 14px; font-size: 11.5px; }
.c-name { width: 37%; }
.c-by { width: 15%; }
.c-act { width: 1%; }
.tbl td.r { white-space: nowrap; }
.pill { field-sizing: content; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 30px; cursor: pointer; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%2345443F' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 10px center / 11px no-repeat; }
.kv select.input { min-width: 130px; }
