/* IMhr app surface: design system (stage). Own copy; no shared include with any other surface. System font stack only. */
:root {
  --ground: #F2F4F8; --surface: #FFFFFF; --ink: #162033; --ink-2: #3B4658; --muted: #5B667A;
  --border: #E1E6EE; --border-strong: #D5DCE7; --row-soft: #EEF1F6;
  --navy: #0F2342; --navy-text: #C9D3E6; --navy-label: #8EA0BF; --navy-active: rgba(255, 255, 255, 0.12); --navy-card: rgba(255, 255, 255, 0.07);
  --primary: #1B5FD6; --primary-hover: #164FB4;
  --info-bg: #E6EFFD; --info-ink: #1747A6; --ok-bg: #E3F5EE; --ok-ink: #0B7A5A; --warn-bg: #FEF3C7; --warn-ink: #92400E;
  --danger: #B42318; --danger-bg: #FDECEA; --danger-border: #E5B4AE;
  --selected: #EEF4FE; --soft: #F7F9FC; --dash: #9FB3D6; --amber: #F5C451;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --focus: rgba(27, 95, 214, 0.35);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--ground); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; overflow-wrap: anywhere; }
h2 { font-size: 16px; font-weight: 600; line-height: 1.3; }
h3 { font-size: 14px; font-weight: 600; }
a { color: var(--primary); }
a:hover { color: var(--primary-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ic { display: block; flex: 0 0 auto; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; padding: 12px 16px; background: var(--surface); color: var(--ink); border-radius: 10px; border: 1px solid var(--border-strong); }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; }

/* ---- controls ---- */
label { display: block; font-weight: 500; font-size: 13px; color: var(--ink); margin: 0 0 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="date"], input[type="search"], select, textarea {
  display: block; width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 14px;
}
textarea { padding: 10px 12px; min-height: 120px; resize: vertical; }
input[readonly] { background: var(--soft); }
input:disabled, select:disabled, textarea:disabled { background: var(--soft); color: var(--muted); }
input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; margin: 0; flex: 0 0 auto; accent-color: var(--primary); }
.check { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding: 10px 0; font-weight: 400; font-size: 14px; margin: 0; }
.check input { margin-top: 1px; }
.check-help { margin: -4px 0 6px 34px; color: var(--muted); font-size: 13px; }
.btn, button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px; border: 1px solid var(--primary);
  border-radius: 10px; background: var(--primary); color: #FFFFFF; font: inherit; font-weight: 500; font-size: 14px; line-height: 1.2; text-decoration: none; cursor: pointer; }
.btn:hover, button:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #FFFFFF; }
.btn-secondary, button.btn-secondary { background: var(--surface); border-color: var(--border-strong); color: var(--ink); }
.btn-secondary:hover, button.btn-secondary:hover { background: var(--soft); border-color: var(--border-strong); color: var(--ink); }
.btn-danger-outline, button.btn-danger-outline { background: var(--surface); border-color: var(--danger-border); color: var(--danger); }
.btn-danger-outline:hover, button.btn-danger-outline:hover { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger); }
button[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: default; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }
button.text-link { background: none; border: 0; padding: 0 4px; color: var(--primary); }
button.text-link:hover { background: none; color: var(--primary-hover); }
form.inline { display: inline-block; margin: 0; }
.fld { min-width: 0; margin: 0 0 16px; }
.hint { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.field-error { margin: 0 0 6px; color: var(--danger); font-size: 13px; }
.req { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 6px; }
fieldset { margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; margin: 0 0 6px; font-weight: 500; font-size: 13px; }
.radio-row { display: flex; gap: 12px; align-items: center; min-height: 44px; padding: 0 12px; margin: 0 0 8px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); font-weight: 400; font-size: 14px; }

/* ---- chips ---- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; line-height: 1.4; white-space: nowrap; background: var(--row-soft); color: var(--ink-2); }
.chip-info { background: var(--info-bg); color: var(--info-ink); }
.chip-ok { background: var(--ok-bg); color: var(--ok-ink); }
.chip-warn { background: var(--warn-bg); color: var(--warn-ink); }
.chip-danger { background: var(--danger-bg); color: var(--danger); }
a.chip { text-decoration: none; min-height: 44px; padding: 0 14px; }
a.chip:hover { text-decoration: underline; }

/* ---- banners ---- */
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 8px; border: 1px solid transparent; font-size: 14px; }
.banner .ic { margin-top: 1px; }
.banner-info { background: var(--info-bg); color: var(--info-ink); border-color: #C5D8F8; }
.banner-ok { background: var(--ok-bg); color: var(--ok-ink); border-color: #BCE5D6; }
.banner-warn { background: var(--warn-bg); color: var(--warn-ink); border-color: #F3DB8F; }
.banner-danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.banner a { display: inline-block; padding: 12px 2px; margin: -12px 0; color: inherit; font-weight: 500; }
.banner ul { margin: 0; padding-left: 18px; }

/* ---- cards, grids ---- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.card + .card { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.card-sub { color: var(--muted); font-size: 13px; }
.stack { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.cols { display: flex; gap: 22px; align-items: flex-start; }
.cols > .col-main { flex: 2 1 0; min-width: 0; }
.cols > .col-side { flex: 1 1 0; min-width: 0; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.field-grid .span-2 { grid-column: 1 / -1; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; }
.kpi-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 500; }
.kpi-value { margin-top: 6px; font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi-note { margin-top: 4px; color: var(--muted); font-size: 13px; }

/* ---- facts ---- */
.facts { display: block; }
.facts .row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--row-soft); }
.facts .row:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); flex: 0 0 auto; }
.facts dd { margin: 0; font-weight: 500; text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; min-width: 0; }
.facts dd.block { text-align: left; font-weight: 400; white-space: pre-wrap; }
.facts.stacked .row { flex-direction: column; gap: 2px; }
.facts.stacked dd { text-align: left; }

/* ---- tables ---- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; min-width: 640px; border-collapse: collapse; }
table.data th { padding: 12px; text-align: left; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data td { padding: 14px 12px; border-bottom: 1px solid var(--row-soft); vertical-align: middle; overflow-wrap: anywhere; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tr.selected td { background: var(--selected); }
.cell-title { font-weight: 600; }
.cell-sub { color: var(--muted); font-size: 13px; }
.actions-cell { white-space: nowrap; }
.actions-cell .text-link { margin-right: 8px; }
.card .table-wrap { margin: 0 -20px; }
.card-flush { padding: 0; overflow: hidden; }
.card-flush .card-head { padding: 18px 20px 0; }
.card-flush .table-wrap { margin: 0; }
.pager { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--row-soft); }
.pager .grow { flex: 1 1 auto; color: var(--muted); font-size: 13px; }
.pager .btn { min-height: 44px; border-radius: 999px; }
.filters { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--row-soft); }
.filters .count { color: var(--muted); font-size: 13px; margin-right: auto; }
.search-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search-form input[type="text"] { width: 280px; max-width: 100%; }

/* ---- empty states ---- */
.empty { text-align: center; padding: 40px 20px; }
.empty .icon-circle { margin: 0 auto 14px; }
.empty p { color: var(--muted); max-width: 420px; margin: 6px auto 16px; }
.empty h2 { margin-top: 0; }
.icon-circle { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 999px; background: var(--info-bg); color: var(--info-ink); }
.icon-circle.ok { background: var(--ok-bg); color: var(--ok-ink); }
.icon-circle.warn { background: var(--warn-bg); color: var(--warn-ink); }

/* ---- steps ---- */
.steps { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; gap: 0; flex-wrap: wrap; }
.steps li { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 500; }
.steps li + li::before { content: ""; display: block; width: 36px; height: 2px; margin: 0 12px; background: var(--border-strong); }
.steps a { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 10px; min-height: 44px; }
.steps .step-n { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border-strong); color: var(--ink-2); font-size: 13px; font-weight: 600; }
.steps li.step-done { color: var(--ink); }
.steps li.step-done .step-n { background: var(--ok-ink); border-color: var(--ok-ink); color: #FFFFFF; }
.steps li.step-on { color: var(--ink); }
.steps li.step-on .step-n { background: var(--primary); border-color: var(--primary); color: #FFFFFF; }

/* ---- checklist, rows ---- */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--row-soft); }
.checklist li:last-child { border-bottom: 0; }
.tick { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 999px; border: 2px solid var(--border-strong); flex: 0 0 auto; color: #FFFFFF; }
.tick.done { background: var(--ok-ink); border-color: var(--ok-ink); }
.checklist .grow { flex: 1 1 auto; min-width: 0; }
.checklist .done-text { color: var(--muted); }
.q-rows { list-style: none; margin: 0; padding: 0; }
.q-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--row-soft); }
.q-row:last-child { border-bottom: 0; }
.q-icon { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; background: var(--row-soft); color: var(--ink-2); flex: 0 0 auto; }
.q-main { flex: 1 1 auto; min-width: 0; }
.q-title { font-weight: 600; overflow-wrap: anywhere; }
.q-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.q-tools .btn, .q-tools button { padding: 0 14px; }
details.q-edit { margin-top: 8px; }
details.q-edit > summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--primary); font-weight: 500; }
details.q-edit > form { margin-top: 8px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--soft); }
.dashed-panel { margin-top: 16px; padding: 16px; border: 1px dashed var(--dash); border-radius: 10px; background: var(--soft); }
.file-row { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; margin-top: 10px; }
.file-row .q-main { overflow-wrap: anywhere; }
.avatar-lg { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 999px; background: var(--info-bg); color: var(--info-ink); font-weight: 600; font-size: 18px; flex: 0 0 auto; }
.person { display: flex; gap: 14px; align-items: center; margin: 0 0 14px; }
.person h2 { font-size: 18px; }
.linkbox { font-family: var(--mono); font-size: 13px; }
.qr { display: block; width: 160px; height: 160px; padding: 8px; background: #FFFFFF; border: 1px solid var(--border); border-radius: 10px; }
.share-grid { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.share-grid .share-fields { flex: 1 1 260px; min-width: 0; }
.actionbar { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 14px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.actionbar .btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- app shell ---- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar { flex: 0 0 248px; width: 248px; background: var(--navy); color: var(--navy-text); padding: 20px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sb-logo { display: flex; align-items: center; gap: 12px; padding: 0 4px; }
.logo-tile { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; background: var(--primary); color: #FFFFFF; }
.wordmark { font-size: 20px; font-weight: 600; color: #FFFFFF; letter-spacing: -0.01em; }
.sb-company { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 10px; background: var(--navy-card); min-width: 0; }
.co-tile { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; background: var(--amber); color: var(--navy); font-weight: 600; font-size: 13px; flex: 0 0 auto; }
.co-text { min-width: 0; }
.co-name { color: #FFFFFF; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-plan { font-size: 12px; color: var(--navy-label); }
.sb-nav { flex: 1 1 auto; display: flex; flex-direction: column; gap: 18px; }
.nav-label { padding: 0 12px; margin: 0 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--navy-label); font-weight: 500; }
.nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 11px 12px; border-radius: 8px; color: var(--navy-text); font-weight: 500; text-decoration: none; }
a.nav-item:hover { background: var(--navy-card); color: #FFFFFF; }
.nav-on, a.nav-on:hover { background: var(--navy-active); color: #FFFFFF; }
.nav-off { color: var(--navy-label); cursor: default; }
.soon { margin-left: auto; padding: 2px 8px; border-radius: 999px; background: var(--navy-card); font-size: 12px; color: var(--navy-text); }
.sb-foot { padding: 14px 4px 0; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 12px; color: var(--navy-label); }
.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding: 10px 28px; background: var(--surface); border-bottom: 1px solid var(--border); }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); min-width: 0; flex-wrap: wrap; }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.top-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.search { position: relative; }
.search .ic { position: absolute; left: 14px; top: 13px; color: var(--muted); }
.search input { padding-left: 42px; width: 240px; background: var(--soft); }
.icon-btn { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--ink-2); }
.who { display: flex; align-items: center; gap: 10px; }
.avatar { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 999px; background: var(--primary); color: #FFFFFF; font-weight: 600; font-size: 14px; }
.who-name { font-weight: 500; line-height: 1.2; }
.who-role { font-size: 12px; color: var(--muted); }
.signout { margin: 0; }
.signout button { padding: 0 16px; }
.content { padding: 28px; display: flex; flex-direction: column; gap: 22px; width: 100%; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px 20px; flex-wrap: wrap; }
.page-title { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.page-title .title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-sub { color: var(--muted); }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border-strong); color: var(--ink-2); font-weight: 500; text-decoration: none; }
.tab-on { background: var(--primary); border-color: var(--primary); color: #FFFFFF; }
.tab .tab-n { font-variant-numeric: tabular-nums; opacity: 0.85; }
.flash { margin: 0; }

/* ---- auth family: split screen (sign in, sign up, reset, OTP, message pages) ---- */
body.auth { min-height: 100vh; background: #FFFFFF; }
.auth-split { min-height: 100vh; display: flex; flex-wrap: wrap; background: #FFFFFF; }
.auth-aside { flex: 1 1 560px; display: flex; flex-direction: column; gap: 36px; padding: 56px 64px; color: var(--navy-text);
  background: linear-gradient(160deg, #0F2342 0%, #16356B 100%); }
.aside-top { display: flex; align-items: center; gap: 12px; }
.aside-top .logo-tile { width: 36px; height: 36px; border-radius: 8px; }
.aside-top .wordmark { font-size: 24px; font-weight: 600; color: #FFFFFF; }
.stage-chip { padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); color: #FFFFFF; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
.aside-copy { margin-top: 40px; max-width: 520px; }
.aside-copy h2 { font-size: 40px; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; color: #FFFFFF; }
.aside-copy p { margin-top: 16px; font-size: 17px; line-height: 1.5; color: var(--navy-text); }
.aside-points { list-style: none; margin: 0; padding: 0; max-width: 520px; display: flex; flex-direction: column; gap: 16px; }
.aside-points li { display: flex; gap: 14px; align-items: flex-start; }
.pt-check { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 999px; background: var(--ok-ink); color: #FFFFFF; flex: 0 0 auto; }
.aside-points strong { display: block; font-weight: 500; color: #FFFFFF; font-size: 15px; }
.aside-points div > span { display: block; font-size: 13px; color: var(--navy-text); margin-top: 2px; }
.aside-steps { gap: 22px; }
.pt-num { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 999px; background: #FFFFFF; color: var(--navy); font-size: 14px; font-weight: 600; flex: 0 0 auto; }
.aside-card { margin-top: auto; max-width: 520px; display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.14); }
.aside-card-ic { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; background: var(--primary); color: #FFFFFF; flex: 0 0 auto; }
.aside-card-tx { flex: 1 1 auto; min-width: 0; }
.aside-card-tx strong { display: block; font-weight: 600; color: #FFFFFF; }
.aside-card-tx span { display: block; font-size: 13px; color: var(--navy-text); overflow-wrap: anywhere; }
.aside-pill { padding: 3px 10px; border-radius: 999px; background: var(--ok-bg); color: var(--ok-ink); font-size: 12px; font-weight: 500; }
.auth-right { flex: 1 1 520px; display: flex; flex-direction: column; padding: 40px 48px; background: #FFFFFF; min-width: 0; }
.auth-top { text-align: right; font-size: 14px; }
.top-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--primary); font-weight: 600; text-decoration: none; }
.top-note { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 14px; }
.top-link:hover { color: var(--primary-hover); text-decoration: underline; }
.auth-center { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; padding: 24px 0; }
.auth-col { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 24px; }
.auth-col h1 { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.auth-col .lead { margin: -12px 0 0; font-size: 15px; color: var(--muted); }
.auth-col form { display: flex; flex-direction: column; gap: 16px; margin: 0; }
.auth-col form.secondary { margin: -8px 0 0; }
.auth-col .banner { margin: 0; border-radius: 10px; }
.auth-col .banner a { display: inline; padding: 0; margin: 0; }
.auth-col .fld { margin: 0; }
.auth-col label { font-size: 13px; font-weight: 500; color: var(--ink-2); margin: 0 0 6px; }
.auth-col .check { font-size: 13px; color: var(--ink-2); min-height: 44px; padding: 0; margin: 0; }
.auth-col .field-grid { grid-template-columns: 1fr; gap: 16px; }
.auth-col input[type="text"], .auth-col input[type="email"], .auth-col input[type="password"], .auth-col select {
  min-height: 48px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 10px; background: #FFFFFF; font-size: 16px; }
.auth-col input[aria-invalid="true"] { border-color: var(--danger); }
.auth-col input.otp { min-height: 56px; text-align: center; font-family: var(--mono); font-size: 28px; letter-spacing: 0.4em; padding: 0 12px; }
.auth-col button[type="submit"] { width: 100%; min-height: 52px; border-radius: 10px; font-size: 16px; font-weight: 500; }
.auth-col button.btn-secondary { background: #FFFFFF; border-color: var(--border-strong); color: var(--ink); min-height: 48px; }
.auth-col .btn-block { display: flex; width: 100%; min-height: 52px; border-radius: 10px; font-size: 16px; font-weight: 500; }
.auth-col .center { margin: 0; text-align: center; }
.auth-col .icon-circle { margin: 0; }
.auth-col .icon-circle.bad { background: var(--danger-bg); color: var(--danger); }
.auth-col .center-msg { margin: -12px 0 0; font-size: 15px; color: var(--muted); }
.auth-foot { text-align: center; font-size: 12px; color: var(--muted); }
.auth-foot a { color: var(--muted); }
.consent { margin: 4px 0 16px; }

/* ---- settings lists (departments, locations) ---- */
.settings-tabs { margin: 0 0 16px; }
.list-add { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.list-add .fld { flex: 1 1 260px; margin: 0; }
.list-add button { min-height: 48px; }
.list-rows { list-style: none; margin: 0; padding: 0; }
.list-row { display: flex; gap: 12px 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--row-soft); }
.list-row:first-child { border-top: 0; }
.list-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; min-width: 0; flex: 1 1 200px; }
.list-name { font-weight: 500; overflow-wrap: anywhere; }
.list-actions { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; flex: 2 1 320px; justify-content: flex-end; }
.list-rename { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; flex: 1 1 240px; margin: 0; }
.list-rename .fld { flex: 1 1 160px; margin: 0; }
.list-rename label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.list-rename button, .list-toggle button, .list-add button { min-height: 48px; }
.list-toggle { margin: 0; }
.job-form select, .job-form input[type="text"], .job-form input[type="date"], .list-add input[type="text"], .list-rename input[type="text"] { min-height: 48px; }
.job-form button[type="submit"], .job-form .actionbar .btn { min-height: 48px; }

.status-form { margin-top: 14px; }
.status-form select, .status-form button[type="submit"] { min-height: 48px; }
.status-form button { width: 100%; }

/* ---- narrow screens ---- */
@media (max-width: 1099px) {
  .auth-aside { flex-basis: 420px; padding: 40px; }
  .auth-right { flex-basis: 440px; padding: 32px 36px; }
  .aside-copy h2 { font-size: 32px; }
  .cols { flex-direction: column; }
  .cols > .col-main, .cols > .col-side { flex: 1 1 auto; width: 100%; }
}
@media (max-width: 899px) {
  .auth-aside { flex: 0 0 auto; width: 100%; gap: 16px; padding: 20px 20px 24px; }
  .aside-copy { margin-top: 0; }
  .aside-copy h2 { font-size: 22px; line-height: 1.25; }
  .aside-copy p, .aside-points, .aside-card { display: none; }
  .auth-right { flex: 1 1 100%; padding: 24px 20px; }
  .app-shell { display: block; }
  .sidebar { position: static; width: auto; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px; overflow: visible; }
  .sb-company { flex: 1 1 auto; padding: 6px 10px; }
  .co-plan, .nav-label, .sb-foot { display: none; }
  .sb-nav { flex: 1 1 100%; flex-direction: row; gap: 0; overflow-x: auto; }
  .sb-nav > div { display: contents; }
  .nav { flex-direction: row; gap: 8px; padding-bottom: 2px; }
  .nav li { flex: 0 0 auto; }
  .nav-item { border-radius: 999px; white-space: nowrap; background: var(--navy-card); padding: 0 16px; }
  .topbar { padding: 10px 16px; }
  .content { padding: 20px 16px 28px; }
  .search input { width: 100%; }
  .search { flex: 1 1 200px; }
}
@media (max-width: 699px) {
  .field-grid { grid-template-columns: 1fr; }
  .steps li + li::before { width: 16px; margin: 0 6px; }
}
@media (max-width: 599px) {
  .list-actions { justify-content: stretch; }
  .list-rename, .list-toggle, .list-add button { flex: 1 1 100%; }
  .list-rename button, .list-toggle button { width: 100%; }
  .content { padding: 16px; }
  .auth-top { text-align: left; }
  .page-actions, .actionbar .btn-row { width: 100%; }
  .page-actions .btn, .page-actions button, .actionbar .btn-row .btn, .actionbar .btn-row button { flex: 1 1 100%; }
  .actions-row .btn, .actions-row button { width: 100%; }
  .card { padding: 16px; }
  .card .table-wrap { margin: 0 -16px; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, button, .nav-item { transition: background-color 0.12s ease; }
}

/* ---- entry page: single view (Build 15; replaces the Build 14 entry classes) ---- */
.cand-head, .entry-grid { width: 100%; max-width: 1600px; margin-left: auto; margin-right: auto; }
.cand-head { display: flex; flex-direction: column; gap: 18px; padding: 24px; }
.cand-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 440px); gap: 20px 32px; align-items: start; }
.cand-top { display: flex; gap: 18px; align-items: flex-start; min-width: 0; }
.avatar-xl { flex: 0 0 64px; display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 999px; background: var(--info-bg); color: var(--info-ink); font-weight: 600; font-size: 20px; }
.cand-id { min-width: 0; overflow-wrap: anywhere; }
.cand-id h1 { font-size: 28px; margin-bottom: 6px; }
.cand-line { margin-top: 4px; font-size: 15px; display: flex; gap: 6px 8px; flex-wrap: wrap; align-items: center; }
.cand-actions { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.status-inline { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.status-inline .fld { flex: 1 1 160px; min-width: 0; }
.status-inline label { margin-bottom: 4px; }
.status-inline select, .status-inline button { min-height: 48px; }
.status-inline button { flex: 0 0 auto; }
.suggest { margin: 0; }
.cand-links { display: flex; gap: 10px; flex-wrap: wrap; }
.pipe2 { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pipe2-step { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 10px 16px; min-height: 64px; border: 2px solid var(--border-strong); border-radius: 12px; background: var(--surface); color: var(--ink); }
.pipe2-label { font-weight: 600; }
.pipe2-state { font-size: 13px; font-weight: 600; color: var(--muted); }
.pipe2-date { font-size: 13px; color: var(--muted); }
.pipe2-step.is-done { background: var(--primary); border-color: var(--primary); color: #FFFFFF; }
.pipe2-step.is-done .pipe2-state, .pipe2-step.is-done .pipe2-date { color: #FFFFFF; }
.pipe2-step.is-current { border-color: var(--primary); background: var(--selected); }
.pipe2-step.is-current .pipe2-state { color: var(--info-ink); }
.pipe-off .pipe2-step { background: var(--soft); border-color: var(--border); color: var(--muted); }
.pipe-note { margin: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.entry-grid { display: grid; grid-template-columns: minmax(0, 26fr) minmax(0, 46fr) minmax(0, 28fr); gap: 20px; align-items: start; }
.g-left { grid-column: 1; grid-row: 1; }
.g-center { grid-column: 2; grid-row: 1; }
.g-right { grid-column: 3; grid-row: 1; }
.g-left .c-details { order: -1; }
.g-left, .g-center, .g-right { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.g-card, .cand-head { scroll-margin-top: 16px; }
.g-card { min-width: 0; overflow-wrap: anywhere; }
.tl-item { scroll-margin-top: 16px; }
.field-error { margin-top: 6px; color: var(--danger); font-weight: 500; }
.composer { display: flex; flex-direction: column; gap: 14px; margin: 14px 0 6px; }
.composer .btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.composer textarea { min-height: 120px; }
.composer button[type="submit"], .composer input[type="text"] { min-height: 48px; }
.feed { display: block; }
.feed-radio { position: absolute; width: 1px; height: 1px; margin: -1px; opacity: 0; overflow: hidden; }
.feed-filter { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.feed-filter label { display: inline-flex; align-items: center; min-height: 44px; margin: 0; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); font-weight: 500; cursor: pointer; }
#f-all:checked ~ .feed-filter label[for="f-all"], #f-status:checked ~ .feed-filter label[for="f-status"],
#f-notes:checked ~ .feed-filter label[for="f-notes"], #f-emails:checked ~ .feed-filter label[for="f-emails"] { background: var(--primary); border-color: var(--primary); color: #FFFFFF; }
#f-all:focus-visible ~ .feed-filter label[for="f-all"], #f-status:focus-visible ~ .feed-filter label[for="f-status"],
#f-notes:focus-visible ~ .feed-filter label[for="f-notes"], #f-emails:focus-visible ~ .feed-filter label[for="f-emails"] { outline: 3px solid var(--focus); outline-offset: 2px; }
#f-status:checked ~ .tl-days .tl-item:not(.t-status), #f-notes:checked ~ .tl-days .tl-item:not(.t-note), #f-emails:checked ~ .tl-days .tl-item:not(.t-email) { display: none; }
#f-status:checked ~ .tl-days .tl-group:not(:has(.t-status)), #f-notes:checked ~ .tl-days .tl-group:not(:has(.t-note)), #f-emails:checked ~ .tl-days .tl-group:not(:has(.t-email)) { display: none; }
.tl-days, .tl { list-style: none; margin: 0; padding: 0; }
.tl-group + .tl-group { margin-top: 18px; }
.tl-day { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.tl { position: relative; }
.tl::before { content: ""; position: absolute; left: 15px; top: 16px; bottom: 16px; width: 2px; background: var(--border-strong); }
.tl-item { position: relative; display: flex; gap: 14px; padding: 0 0 16px 0; }
.tl-item:last-child { padding-bottom: 0; }
.tl-badge { position: relative; z-index: 1; flex: 0 0 32px; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 999px; background: var(--info-bg); color: var(--info-ink); font-size: 12px; font-weight: 600; border: 2px solid var(--surface); }
.t-system .tl-badge { background: var(--row-soft); color: var(--muted); }
.t-note .tl-badge { background: var(--warn-bg); color: var(--warn-ink); }
.t-email .tl-badge { background: var(--ok-bg); color: var(--ok-ink); }
.tl-body { min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; }
.tl-head { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 13px; }
.tl-title { margin-top: 2px; font-weight: 500; }
.tl-sub { margin-top: 2px; font-size: 13px; }
.tl-text { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 6px; }
.note-actions { display: flex; gap: 16px; flex-wrap: wrap; }
details.msg > summary, details.compose > summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--primary); font-weight: 500; }
details.compose > summary { padding: 0 16px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); margin: 8px 0; }
.tpl-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.tpl-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 500; }
.tpl-link.tpl-on { background: var(--primary); border-color: var(--primary); color: #FFFFFF; }
@media (max-width: 1279px) {
  .entry-grid { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); }
  .g-left, .g-right { display: contents; }
  .g-center { grid-column: 1; grid-row: 1 / span 4; }
  .c-details, .c-notes, .c-email, .c-files { grid-column: 2; grid-row: auto; }
  .c-details, .g-left .c-details { order: 1; } .c-notes { order: 2; } .c-email { order: 3; } .c-files { order: 4; }
}
@media (max-width: 899px) {
  .entry-grid { grid-template-columns: minmax(0, 1fr); }
  .g-center { display: contents; }
  .c-details, .c-notes, .c-email, .c-files, .c-application, .c-activity, .g-left .c-details { grid-column: 1; grid-row: auto; order: 0; }
  .cand-grid { grid-template-columns: minmax(0, 1fr); }
  .cand-head { padding: 18px; }
}
@media (max-width: 599px) {
  .cand-top { flex-direction: column; }
  .cand-id h1 { font-size: 24px; }
  .pipe2 { flex-direction: column; }
  .cand-links .btn { flex: 1 1 100%; }
}
.file-row .text-link { flex: 0 0 auto; overflow-wrap: normal; word-break: normal; }
.file-row .q-main { min-width: 0; flex: 1 1 auto; }

/* ---- status change confirmation (Build 17) ---- */
.confirm-card { width: 100%; max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; overflow-wrap: anywhere; }
.confirm-card h1 { font-size: 24px; }
.confirm-change { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 18px; font-weight: 600; }
.confirm-from { color: var(--muted); }
.confirm-to { color: var(--ink); }
.confirm-form { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.confirm-form .confirm-btn { min-height: 52px; padding: 0 28px; }
.confirm-form .btn { min-height: 48px; }
@media (max-width: 599px) {
  .confirm-form { flex-direction: column; align-items: stretch; }
  .confirm-form .btn, .confirm-form .confirm-btn { width: 100%; }
}

/* ---- status confirmation: note and email sections (Build 18) ---- */
.confirm-card { max-width: 760px; }
.confirm-form { display: flex; flex-direction: column; gap: 20px; align-items: stretch; margin-top: 4px; }
.confirm-sec { display: flex; flex-direction: column; gap: 10px; padding-top: 18px; border-top: 1px solid var(--border); }
.confirm-sec h2 { font-size: 16px; }
.confirm-mail h2 { color: var(--muted); }
.confirm-mail textarea { min-height: 200px; }
.confirm-buttons { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; padding-top: 4px; }
.confirm-buttons .confirm-btn { min-height: 52px; padding: 0 24px; }
.confirm-buttons .confirm-btn-alt { background: var(--surface); color: var(--primary); border-color: var(--primary); }
.confirm-buttons .confirm-btn-alt:hover { background: var(--selected); color: var(--primary-hover); border-color: var(--primary-hover); }
.confirm-buttons .btn { min-height: 48px; }
@media (max-width: 599px) {
  .confirm-buttons { flex-direction: column; align-items: stretch; }
  .confirm-buttons .btn, .confirm-buttons .confirm-btn { width: 100%; }
}

/* ---- brand logo on the auth pages (Build 19) ---- */
.auth-top.has-logo { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; }
.auth-logo { display: block; flex: 0 1 auto; width: 140px; max-width: 45%; height: auto; aspect-ratio: 140 / 32; }
.auth-top.has-logo .top-link, .auth-top.has-logo .top-note { min-width: 0; text-align: right; }
