/* بوابة فريق هاي كود — الهوية مأخوذة من hicodee.com */
:root {
  --bg: #f2f5fa;
  --surface: #ffffff;
  --surface-2: #f6f8fc;
  --ink: #0b1626;
  --ink-2: #3b4a5e;
  --ink-3: #6b7a90;
  --line: #e3e9f2;
  --line-2: #cfd8e5;
  --brand: #030d1c;
  --brand-2: #015fed;
  --brand-3: #e6f2ff;
  --accent: #00c0fa;
  --grad: linear-gradient(134.87deg, #00c0fa -50.99%, #015fed 151.84%);
  --danger: #c0262d;
  --danger-bg: #fdecec;
  --warn: #b45309;
  --warn-bg: #fff4e5;
  --ok: #138a52;
  --ok-bg: #e5f6ee;
  --info: #015fed;
  --info-bg: #e8f1ff;
  --s1: #c0262d; --s2: #e46f0a; --s3: #b88a00; --s4: #138a52; --s5: #015fed;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(3, 13, 28, .05), 0 6px 20px rgba(3, 13, 28, .05);
  --font: "Readex Pro", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.6; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
.boot { display: grid; place-items: center; min-height: 100vh; color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; display: inline-block; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.hidden { display: none !important; }

/* ---------- layout */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--brand); color: #c9d6e8; padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 20px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 12px; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: rgba(0,192,250,.14); display: grid; place-items: center; }
.brand-title { font-weight: 700; color: #fff; font-size: 15px; line-height: 1.3; }
.brand-sub { font-size: 12px; color: #8aa0bd; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; color: #b9c8dc; font-weight: 500; }
.nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.nav a.active { background: rgba(0,192,250,.13); color: #fff; box-shadow: inset -3px 0 0 var(--accent); }
.nav svg { width: 18px; height: 18px; flex: none; opacity: .9; }
.nav-sep { font-size: 11px; color: #5f7896; padding: 14px 12px 4px; letter-spacing: .02em; }
.side-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.08); padding: 14px 8px 0; font-size: 13px; }
.side-foot .who { color: #fff; font-weight: 600; }
.side-foot button { background: none; border: 0; color: #8aa0bd; padding: 0; cursor: pointer; margin-top: 6px; }
.side-foot button:hover { color: #fff; }
.shell > div { min-width: 0; }
.main { padding: 28px 32px 80px; min-width: 0; }
.topbar { display: none; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.page-head .sub { color: var(--ink-3); margin-top: 2px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- primitives */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }
.card h2, .section-title { font-size: 16px; margin: 0 0 12px; font-weight: 700; }
.grid { display: grid; gap: 14px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 18px; }
.kpi { padding: 16px 18px; }
.kpi .label { color: var(--ink-3); font-size: 13px; }
.kpi .value { font-size: 28px; font-weight: 700; line-height: 1.2; margin-top: 4px; }
.kpi .hint { font-size: 12px; color: var(--ink-3); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line-2); background: var(--surface); padding: 8px 14px; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--surface-2); border-color: #b8c4d6; text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 4px 14px rgba(1,95,237,.25); }
.btn-primary:hover { filter: brightness(1.06); background: var(--grad); }
.btn-dark { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-dark:hover { background: #0a1626; }
.btn-danger { color: var(--danger); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { padding: 5px 10px; font-size: 13px; border-radius: 7px; }
.btn svg { width: 16px; height: 16px; }

.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .help { font-size: 12px; color: var(--ink-3); }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--line-2); background: #fff; border-radius: 8px; padding: 8px 11px; outline: none; transition: border-color .12s, box-shadow .12s; }
textarea.input { resize: vertical; min-height: 64px; line-height: 1.55; }
.input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(1,95,237,.15); }
.input:disabled, .input[readonly] { background: var(--surface-2); color: var(--ink-2); }
.input.ltr { direction: ltr; text-align: left; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #edf1f7; color: var(--ink-2); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.plain::before { display: none; }
.b-new { background: #eef1f6; color: #6b7a90; }
.b-draft { background: var(--warn-bg); color: var(--warn); }
.b-submitted { background: var(--info-bg); color: var(--info); }
.b-approved { background: var(--ok-bg); color: var(--ok); }
.b-danger { background: var(--danger-bg); color: var(--danger); }
.mode-chip { font-size: 12px; padding: 2px 9px; border-radius: 6px; background: var(--brand-3); color: var(--brand-2); font-weight: 600; white-space: nowrap; }

.lvl { font-weight: 700; }
.lvl-1 { color: var(--s1); } .lvl-2 { color: var(--s2); } .lvl-3 { color: var(--s3); } .lvl-4 { color: var(--s4); } .lvl-5 { color: var(--s5); }

/* ---------- tables */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: right; font-size: 12px; color: var(--ink-3); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.t td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr:hover td { background: #f7faff; }
.t .c { text-align: center; }
.person { display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-3); color: var(--brand-2); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.person .n { font-weight: 600; }
.person .r { font-size: 12px; color: var(--ink-3); }
.bar { height: 8px; background: #e9eef6; border-radius: 99px; overflow: hidden; min-width: 70px; }
.bar > span { display: block; height: 100%; border-radius: 99px; background: var(--brand-2); }
.pct-cell { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.pct-cell .num { min-width: 52px; font-weight: 700; }

/* ---------- period picker */
.period { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 3px; }
.period select { border: 0; background: transparent; padding: 5px 6px; font-weight: 600; outline: none; cursor: pointer; }
.period .arrow { border: 0; background: transparent; width: 30px; height: 30px; border-radius: 7px; cursor: pointer; display: grid; place-items: center; color: var(--ink-2); }
.period .arrow:hover { background: var(--surface-2); }

/* ---------- evaluation page */
.eval-head { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: start; margin-bottom: 16px; }
.eval-person { display: flex; gap: 14px; align-items: center; }
.eval-person .avatar { width: 48px; height: 48px; font-size: 17px; }
.eval-person h1 { margin: 0; font-size: 22px; }
.eval-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 4px; color: var(--ink-3); font-size: 13px; }
.result-strip { display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); margin-bottom: 18px; overflow: hidden; }
.result-strip > div { padding: 14px 18px; border-inline-start: 1px solid var(--line); }
.result-strip > div:first-child { border-inline-start: 0; background: var(--brand); color: #fff; }
.result-strip .label { font-size: 12px; color: var(--ink-3); }
.result-strip > div:first-child .label { color: #8aa0bd; }
.result-strip .value { font-size: 22px; font-weight: 700; line-height: 1.3; }
.result-strip > div:first-child .value { font-size: 30px; color: var(--accent); }
.notice { padding: 12px 16px; border-radius: 10px; margin-bottom: 14px; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.notice.info { background: var(--info-bg); color: #164a85; }
.notice.warn { background: var(--warn-bg); color: #8a3a06; }
.notice.ok { background: var(--ok-bg); color: #175c38; }
.notice.danger { background: var(--danger-bg); color: #8f1c13; }
.notice strong { font-weight: 700; }

.crit { margin-bottom: 14px; }
.crit-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 20px 12px; }
.crit-code { font-size: 12px; font-weight: 700; color: var(--brand-2); background: var(--brand-3); padding: 2px 8px; border-radius: 6px; direction: ltr; white-space: nowrap; margin-top: 2px; }
.crit-title { flex: 1; min-width: 0; }
.crit-title h3 { margin: 0; font-size: 16px; font-weight: 700; }
.crit-title .what { color: var(--ink-2); font-size: 13.5px; margin-top: 4px; }
.weight { font-size: 13px; font-weight: 700; color: var(--ink-2); background: #eef2f8; border-radius: 7px; padding: 3px 9px; white-space: nowrap; }
.crit-guide { margin: 0 20px 6px; }
.crit-guide summary { cursor: pointer; font-size: 13px; color: var(--brand-2); font-weight: 600; list-style: none; display: inline-flex; gap: 6px; align-items: center; }
.crit-guide summary::-webkit-details-marker { display: none; }
.crit-guide summary::before { content: "＋"; font-size: 12px; }
.crit-guide[open] summary::before { content: "－"; }
.guide-grid { display: grid; gap: 6px; margin-top: 10px; }
.guide-row { display: grid; grid-template-columns: 34px 1fr; gap: 10px; font-size: 13px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); }
.guide-row .s { font-weight: 700; width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: #fff; }
.guide-extra { font-size: 13px; color: var(--ink-2); margin-top: 8px; display: grid; gap: 4px; }
.crit-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.pane { padding: 14px 20px 16px; border-inline-start: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.pane:first-child { border-inline-start: 0; }
.pane-title { font-size: 12px; font-weight: 700; color: var(--ink-3); letter-spacing: .02em; display: flex; align-items: center; gap: 8px; }
.pane-title .tag { font-size: 11px; background: #eef2f8; padding: 1px 7px; border-radius: 5px; color: var(--ink-2); }
.pane.final { background: linear-gradient(180deg, #f8fbff, #fff); }
.scores { display: flex; gap: 6px; }
.score-btn { flex: 1; min-width: 0; border: 1.5px solid var(--line-2); background: #fff; border-radius: 9px; padding: 6px 0 5px; cursor: pointer; display: flex; flex-direction: column; align-items: center; line-height: 1.2; transition: transform .08s, background .12s; }
.score-btn b { font-size: 17px; }
.score-btn span { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; padding: 0 3px; }
.score-btn:hover:not(:disabled) { transform: translateY(-1px); }
.score-btn:disabled { cursor: default; }
.score-btn.on { color: #fff; border-color: transparent; }
.score-btn.on span { color: rgba(255,255,255,.85); }
.score-btn[data-s="1"].on { background: var(--s1); } .score-btn[data-s="2"].on { background: var(--s2); }
.score-btn[data-s="3"].on { background: var(--s3); } .score-btn[data-s="4"].on { background: var(--s4); }
.score-btn[data-s="5"].on { background: var(--s5); }
.scores.readonly .score-btn:not(.on) { opacity: .45; }
.level-desc { font-size: 13px; color: var(--ink-2); background: var(--surface-2); border-radius: 8px; padding: 8px 10px; border-inline-start: 3px solid var(--line-2); }
.level-desc:empty { display: none; }
.level-desc[data-s="1"] { border-color: var(--s1); } .level-desc[data-s="2"] { border-color: var(--s2); }
.level-desc[data-s="3"] { border-color: var(--s3); } .level-desc[data-s="4"] { border-color: var(--s4); } .level-desc[data-s="5"] { border-color: var(--s5); }
.ro-text { font-size: 14px; white-space: pre-wrap; color: var(--ink); }
.ro-text:empty::before { content: "—"; color: var(--ink-3); }
.mini-label { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.action-grid .full { grid-column: 1 / -1; }
.progress-input { display: flex; align-items: center; gap: 10px; }
.progress-input input[type=range] { flex: 1; accent-color: var(--brand-2); }
.gap-chip { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 6px; }

.savebar { position: fixed; bottom: 0; inset-inline: 248px 0; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); border-top: 1px solid var(--line); padding: 12px 32px; display: flex; align-items: center; gap: 12px; z-index: 20; }
.savebar .state { color: var(--ink-3); font-size: 13px; margin-inline-end: auto; }
.savebar .state.dirty { color: var(--warn); font-weight: 600; }

/* ---------- employee home */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; margin-bottom: 18px; }
.hero-main { background: var(--brand); color: #c9d6e8; border-radius: var(--radius); padding: 22px 24px; position: relative; overflow: hidden; }
.hero-main h2 { color: #fff; margin: 0 0 4px; font-size: 20px; }
.hero-main .big { font-size: 44px; font-weight: 700; color: var(--accent); line-height: 1.1; margin-top: 14px; }
.hero-main .btn { margin-top: 16px; }
.months-chart { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-items: end; height: 150px; padding-top: 8px; }
.mcol { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.mcol .b { width: 100%; max-width: 30px; background: var(--brand-2); border-radius: 5px 5px 2px 2px; min-height: 3px; }
.mcol .b.nodata { background: #e6ebf3; height: 3px; }
.mcol .v { font-size: 10.5px; color: var(--ink-2); font-weight: 600; }
.mcol .m { font-size: 10.5px; color: var(--ink-3); }

/* ---------- heat */
.heat { font-weight: 700; text-align: center; border-radius: 6px; padding: 4px 2px; font-size: 13px; }

/* ---------- tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tab { border: 0; background: none; padding: 10px 14px; cursor: pointer; font-weight: 600; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 8px; align-items: center; }
.tab.on { color: var(--ink); border-color: var(--brand-2); }
.tab .wsum { font-size: 11px; padding: 1px 6px; border-radius: 5px; }

/* ---------- login */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login-art { background: var(--brand); color: #c9d6e8; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art h1 { color: #fff; font-size: 34px; line-height: 1.35; margin: 0 0 14px; font-weight: 700; max-width: 440px; }
.login-art p { max-width: 420px; color: #8aa0bd; margin: 0; }
.login-art .scale-demo { display: flex; gap: 8px; margin-top: 32px; }
.login-art .scale-demo div { flex: 1; max-width: 70px; border-radius: 10px; padding: 10px 0; text-align: center; color: #fff; font-weight: 700; font-size: 20px; }
.login-art .scale-demo small { display: block; font-size: 10px; font-weight: 500; opacity: .85; }
.login-art .foot { font-size: 12px; color: #5f7896; }
.login-form { display: grid; place-items: center; padding: 40px 24px; }
.login-box { width: 100%; max-width: 380px; }
.login-box h2 { font-size: 24px; margin: 0 0 6px; }
.login-box .sub { color: var(--ink-3); margin-bottom: 26px; }
.login-box .field { margin-bottom: 14px; }
.login-box .input { padding: 11px 13px; }
.login-box .btn { width: 100%; padding: 11px; margin-top: 8px; }
.form-error { color: var(--danger); background: var(--danger-bg); padding: 9px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 12px; }

/* ---------- modal & toast */
.modal-back { position: fixed; inset: 0; background: rgba(3, 13, 28, .5); display: grid; place-items: center; z-index: 50; padding: 20px; animation: fade .12s; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 640px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.modal.wide { max-width: 860px; }
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-start; }
.x { border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--ink-3); line-height: 1; }
.secret { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 18px; background: var(--surface-2); border: 1px dashed var(--line-2); padding: 10px 14px; border-radius: 8px; direction: ltr; text-align: center; letter-spacing: .04em; user-select: all; }
#toast-root { position: fixed; bottom: 22px; left: 22px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: var(--brand); color: #fff; padding: 11px 16px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.18); font-size: 14px; animation: rise .18s; max-width: 360px; }
.toast.err { background: var(--danger); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.empty { padding: 40px 20px; text-align: center; color: var(--ink-3); }

/* ---------- responsive */
@media (max-width: 980px) {
  html, body { overflow-x: hidden; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { visibility: hidden; }
  .shell.nav-open .sidebar { visibility: visible; box-shadow: -10px 0 40px rgba(0,0,0,.25); }
  .savebar { flex-wrap: wrap; gap: 8px; }
  .savebar .state { width: 100%; }
  .eval-head .head-actions { justify-content: flex-start; }
  .page-head h1 { font-size: 20px; }
  .sidebar { position: fixed; inset-block: 0; right: 0; width: 260px; z-index: 40; transform: translateX(100%); transition: transform .2s; }
  .shell.nav-open .sidebar { transform: none; }
  .topbar { display: flex; align-items: center; gap: 10px; background: var(--brand); color: #fff; padding: 10px 16px; position: sticky; top: 0; z-index: 30; }
  .topbar button { background: none; border: 0; color: #fff; font-size: 22px; cursor: pointer; }
  .main { padding: 18px 14px 90px; }
  .savebar { inset-inline: 0; padding: 10px 14px; }
  .result-strip { grid-template-columns: 1fr 1fr; }
  .result-strip > div:first-child { grid-column: 1 / -1; }
  .eval-head, .hero, .login-wrap { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .form-grid, .action-grid { grid-template-columns: 1fr; }
}

/* ---------- print: clean one-employee card */
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; font-size: 12px; }
  .sidebar, .topbar, .appbar, .bottom-nav, .sheet, .savebar, .no-print, .crit-guide, #toast-root { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
  .result-strip > div:first-child { background: #fff !important; color: var(--ink) !important; border: 2px solid var(--brand); }
  .result-strip > div:first-child .value { color: var(--brand) !important; }
  .input { border: 0; padding: 0; background: none !important; resize: none; }
  .score-btn:not(.on) { display: none; }
  .scores { justify-content: flex-start; }
  .score-btn { flex: 0 0 auto; padding: 4px 12px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-only { display: block !important; }
  .result-strip { grid-template-columns: 1.3fr repeat(4, 1fr) !important; }
  .result-strip > div:first-child { grid-column: auto !important; }
  .crit-body { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important; }
  .eval-head { grid-template-columns: 1fr !important; }
  .input::placeholder { color: transparent; }
  select.input { appearance: none; }
  input[type=range], input[type=date]:placeholder-shown { display: none; }
  .notice { display: none; }
}
.print-only { display: none; }

/* notes, hints, guide, pickers */
.note-chip{display:inline-flex;align-items:center;gap:2px;font-size:12px;font-weight:700;padding:1px 8px;border-radius:999px;margin-inline-end:4px;white-space:nowrap}
.note-chip.pos{background:var(--ok-bg);color:var(--ok)}.note-chip.neg{background:var(--danger-bg);color:var(--danger)}
.crit-head .note-chip{margin-top:3px}
.note-list{display:grid;gap:8px}
.note-item{border:1px solid var(--line);border-inline-start:4px solid var(--line-2);border-radius:9px;padding:9px 12px;background:var(--surface-2)}
.note-item.positive{border-inline-start-color:var(--ok)}.note-item.negative{border-inline-start-color:var(--danger)}
.note-meta{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.note-text{margin-top:4px;white-space:pre-wrap;font-size:14px}
.note-type{padding:10px 12px;cursor:pointer;display:block}.note-type input{accent-color:var(--brand-2)}
.note-type.neg:has(input:checked){border-color:var(--danger);background:var(--danger-bg)}.note-type.pos:has(input:checked){border-color:var(--ok);background:var(--ok-bg)}
.score-hint{font-size:12.5px;color:var(--warn);font-weight:600;line-height:1.5}.score-hint:empty{display:none}
.hint-row{display:flex;align-items:flex-start;gap:8px;justify-content:space-between}.hint-row .score-hint{flex:1}
.note-btn{flex:none;font-size:12px;padding:4px 9px}.note-btn svg{width:14px;height:14px}
.guide-s{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:7px;color:#fff;font-weight:700}
.seg{display:flex;gap:6px;flex-wrap:wrap}.seg label{display:flex;align-items:center;gap:6px;border:1px solid var(--line-2);border-radius:9px;padding:7px 12px;cursor:pointer;font-weight:600;font-size:14px}
.seg label:has(input:checked){border-color:var(--brand-2);background:var(--brand-3);color:var(--brand-2)}.seg input{accent-color:var(--brand-2)}
.pick-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:6px;max-height:240px;overflow:auto;padding:2px}
.pick{display:flex;gap:8px;align-items:flex-start;border:1px solid var(--line);border-radius:8px;padding:7px 10px;cursor:pointer;line-height:1.35}
.pick:has(input:checked){border-color:var(--brand-2);background:var(--brand-3)}.pick input{margin-top:3px;accent-color:var(--brand-2)}

/* staging environment banner */
.env-bar{position:sticky;top:0;z-index:1000;background:#b45309;color:#fff;text-align:center;font-weight:600;font-size:13px;padding:6px 12px;letter-spacing:.2px}


/* ================= HiCode portal theme ================= */
.sidebar { background: radial-gradient(120% 60% at 100% 0%, rgba(0,192,250,.12), transparent 60%), linear-gradient(180deg, #030d1c, #071528 70%, #030d1c); border-inline-start: 1px solid rgba(0,192,250,.12); overflow-y: auto; }
.brand { gap: 12px; padding: 4px 6px 18px; }
.brand-title { font-size: 15px; }
.hc-logo { display: inline-flex; align-items: center; justify-content: center; background: #fff; border-radius: 10px; padding: 6px 9px; flex: none; box-shadow: 0 4px 16px rgba(0,192,250,.18); }
.hc-logo img { height: 26px; width: auto; display: block; }
.hc-logo b { color: #015fed; font-size: 15px; }
.hc-logo.sm { padding: 4px 6px; border-radius: 8px; } .hc-logo.sm img { height: 18px; }
.hc-logo.lg { padding: 10px 14px; border-radius: 14px; } .hc-logo.lg img { height: 44px; }
.nav a { border-radius: 10px; }
.nav a:hover { background: rgba(0,192,250,.08); }
.nav a.active { background: linear-gradient(90deg, rgba(0,192,250,.06), rgba(0,192,250,.18)); color: #fff; box-shadow: inset -3px 0 0 var(--accent); }
.nav a.active svg { color: var(--accent); opacity: 1; }
.nav-sep { color: #5f7896; font-weight: 600; }
.side-foot { color: #b9c8dc; }
.side-foot .avatar { background: var(--grad); color: #fff; }
.topbar { background: #030d1c; }
.avatar { background: var(--brand-3); color: var(--brand-2); }
.crumb { font-size: 12px; font-weight: 600; color: var(--brand-2); letter-spacing: .02em; margin-bottom: 2px; }
.card h2 { color: var(--ink); }
.kpi .value { color: var(--ink); }
.tab.on { border-color: var(--accent); color: var(--brand-2); }
a.tab { text-decoration: none; }
.mode-chip { background: var(--brand-3); color: var(--brand-2); }
.crit-code { background: var(--brand-3); color: var(--brand-2); }
.result-strip > div:first-child, .hero-main { background: radial-gradient(120% 120% at 100% 0%, rgba(0,192,250,.25), transparent 55%), #030d1c; }
.result-strip > div:first-child .value, .hero-main .big { color: var(--accent); }
.toast { background: #030d1c; border: 1px solid rgba(0,192,250,.3); }
.login-art { background: radial-gradient(90% 70% at 100% 0%, rgba(0,192,250,.28), transparent 60%), radial-gradient(70% 60% at 0% 100%, rgba(1,95,237,.25), transparent 60%), #030d1c; }
.login-art h1 { font-size: 38px; }
.mod-demo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 34px; max-width: 460px; }
.mod-demo div { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(0,192,250,.18); color: #e6eefa; font-weight: 600; font-size: 14px; }
.mod-demo svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.env-bar { background: linear-gradient(90deg, #b45309, #e46f0a); }

/* overview */
.welcome { margin-bottom: 18px; }
.welcome h1 { margin: 0; font-size: 26px; }
.welcome .sub { color: var(--ink-3); }
.mod-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); margin-bottom: 18px; }
.mod-card { display: flex; gap: 14px; padding: 18px; color: inherit; transition: transform .12s, box-shadow .12s, border-color .12s; }
.mod-card:hover { text-decoration: none; transform: translateY(-2px); border-color: rgba(0,192,250,.5); box-shadow: 0 10px 30px rgba(1,95,237,.12); }
.mod-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--grad); color: #fff; display: grid; place-items: center; flex: none; }
.mod-ic svg { width: 22px; height: 22px; }
.mod-body { flex: 1; min-width: 0; }
.mod-title { font-weight: 700; margin-bottom: 8px; }
.mod-stats { display: flex; gap: 16px; flex-wrap: wrap; }
.mod-stats > div { display: flex; flex-direction: column; gap: 2px; }
.mod-stats b { font-size: 22px; line-height: 1.1; }
.mod-stats span { font-size: 12px; color: var(--ink-3); }
.hbar { display: grid; grid-template-columns: 150px 1fr 30px; gap: 10px; align-items: center; margin-bottom: 8px; }
.renew-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border-inline-start: 4px solid var(--warn); margin-bottom: 8px; }
.renew-row.overdue { border-color: var(--danger); background: var(--danger-bg); }

/* shared module bits */
.proj-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 2px 10px 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--pc) 12%, white); color: color-mix(in srgb, var(--pc) 75%, #0b1626); white-space: nowrap; }
.proj-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--pc); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filters .input { width: auto; min-width: 150px; background: #fff; }
.filters .search { position: relative; flex: 1; min-width: 220px; display: flex; }
.filters .search svg { position: absolute; inset-inline-start: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-3); }
.filters .search .input { width: 100%; padding-inline-start: 34px; }
.pr { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 6px; white-space: nowrap; }
.pr-high { background: var(--danger-bg); color: var(--danger); } .pr-mid { background: var(--warn-bg); color: var(--warn); } .pr-low { background: #eef1f6; color: var(--ink-3); }
.qtable td { vertical-align: top; }
.qtable tr.done .qtext { color: var(--ink-2); }
.qtext { font-weight: 600; line-height: 1.55; }
.txt-danger { color: var(--danger); font-weight: 600; } .txt-warn { color: var(--warn); font-weight: 600; }
tr.row-overdue td { background: #fff7f7; } tr.row-soon td { background: #fffaf2; }

/* links */
.link-group { margin-bottom: 22px; }
.lg-title { font-size: 15px; margin: 0 0 10px; display: flex; gap: 8px; align-items: center; }
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.link-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; transition: border-color .12s, box-shadow .12s; }
.link-card:hover { border-color: rgba(0,192,250,.5); box-shadow: 0 8px 24px rgba(1,95,237,.1); }
.link-card.pinned { border-color: rgba(0,192,250,.45); }
.lc-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.lc-cat { font-size: 11.5px; font-weight: 600; color: var(--brand-2); background: var(--brand-3); padding: 1px 8px; border-radius: 6px; }
.env { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 6px; direction: ltr; }
.env-production { background: var(--ok-bg); color: var(--ok); } .env-staging { background: var(--warn-bg); color: var(--warn); } .env-development { background: #eef1f6; color: var(--ink-3); } .env-lock { background: #f2ecff; color: #6d28d9; }
.lc-title { font-weight: 700; font-size: 15px; color: var(--ink); display: inline-flex; gap: 6px; align-items: center; }
.lc-title svg { width: 14px; height: 14px; color: var(--ink-3); }
.lc-title:hover { color: var(--brand-2); }
.lc-host { font-size: 12px; color: var(--ink-3); direction: ltr; text-align: right; }
.lc-notes { font-size: 13px; color: var(--ink-2); }
.lc-actions { display: flex; gap: 4px; margin-top: auto; padding-top: 4px; }

/* settings + levels */
.set-tabs { position: sticky; top: 0; background: var(--bg); z-index: 5; }
.settings-body .page-head h1 { font-size: 19px; }
.brand-preview { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 12px; background: #030d1c; color: #c9d6e8; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; margin: 0 4px 0 8px; }
.t.bands th.basis { color: var(--brand-2); background: var(--brand-3); }
.bands-edit .input { max-width: 140px; }
.dist { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; align-items: end; }
.dist-col { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dist-bar { width: 100%; max-width: 60px; height: 90px; background: #eef2f8; border-radius: 8px; display: flex; align-items: flex-end; overflow: hidden; }
.dist-bar span { display: block; width: 100%; border-radius: 8px 8px 0 0; min-height: 2px; }
.dist-col b { font-size: 18px; } .dist-col span { font-size: 12px; color: var(--ink-3); }
@media (max-width: 980px) { .hbar { grid-template-columns: 110px 1fr 26px; } .mod-demo { grid-template-columns: 1fr; } }
.t .num, .t td.num { white-space: nowrap; }
.mod-stats { gap: 14px; }
.brand-sub { white-space: nowrap; font-size: 11.5px; }
.avatar { letter-spacing: 0; }

/* ===== v3: collapsible module navigation ===== */
.sidebar { overflow: hidden; }
.nav { flex: 1; overflow-y: auto; margin: 0 -6px; padding: 0 6px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.nav-group { margin-top: 4px; }
.ng-head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 0; border-radius: 9px; background: none; color: #dbe6f5; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; text-align: start; }
.ng-head:hover { background: rgba(255,255,255,.06); color: #fff; }
.ng-head svg { width: 18px; height: 18px; flex: none; }
.ng-head > span:not(.ng-chev) { flex: 1; }
.nav-group.has-active > .ng-head { color: #fff; }
.nav-group.has-active > .ng-head > svg:first-child { color: var(--accent); }
.ng-chev { display: grid; place-items: center; transition: transform .18s; opacity: .7; }
.ng-chev svg { width: 15px; height: 15px; }
.nav-group.open .ng-chev { transform: rotate(-90deg); }
.ng-items { display: none; margin: 2px 0 6px; padding-inline-start: 14px; border-inline-start: 1px solid rgba(255,255,255,.08); margin-inline-start: 20px; }
.nav-group.open .ng-items { display: block; }
.ng-items a { padding: 7px 10px; font-size: 13.5px; }
.ng-items a span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ng-items svg { width: 16px; height: 16px; }
.nav-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; margin: 0 4px; }
.nav-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: rgba(0,192,250,.18); color: #bfefff; font-size: 11.5px; font-weight: 700; display: inline-grid; place-items: center; }
.nav-badge.warn { background: rgba(245,158,11,.22); color: #ffd79a; }

/* chips row (projects / locations) */
.chip-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.chip-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; font-size: 13.5px; }
.chip-tabs a:hover { border-color: var(--line-2); text-decoration: none; }
.chip-tabs a b { font-size: 12px; background: var(--surface-2); border-radius: 999px; padding: 0 7px; color: var(--ink-3); }
.chip-tabs a.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip-tabs a.on b { background: rgba(255,255,255,.16); color: #fff; }
.chip-tabs a.warn:not(.on) { border-color: #f3c98b; color: var(--warn); }
.chip-tabs .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pc, var(--brand-2)); }

/* status summary */
.q-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; padding: 12px 14px; margin-bottom: 14px; }
.seg-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--surface-2); border-radius: 11px; padding: 4px; }
.seg-tabs button { border: 0; background: none; padding: 7px 13px; border-radius: 8px; font: inherit; font-weight: 600; font-size: 13.5px; color: var(--ink-2); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.seg-tabs button b { font-size: 12px; color: var(--ink-3); }
.seg-tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(3,13,28,.12); }
.seg-tabs button.warn.on b { color: var(--warn); }
.seg-tabs button.ok.on b { color: var(--ok); }
.q-progress { flex: 1; min-width: 240px; display: grid; gap: 6px; }
.view-toggle { display: inline-flex; border: 1px solid var(--line-2); border-radius: 9px; overflow: hidden; background: #fff; }
.view-toggle button { border: 0; background: none; padding: 7px 11px; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-3); cursor: pointer; display: inline-flex; gap: 5px; align-items: center; }
.view-toggle button + button { border-inline-start: 1px solid var(--line); }
.view-toggle button.on { background: var(--brand-3); color: var(--brand-2); }
.view-toggle svg { width: 15px; height: 15px; }
.txt-danger { color: var(--danger); }
.txt-warn { color: var(--warn); }

/* collapsible groups (questions, assets) */
.q-group { margin-bottom: 12px; overflow: hidden; }
.q-group > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--surface-2); user-select: none; flex-wrap: wrap; }
.q-group > summary::-webkit-details-marker { display: none; }
.q-group > summary:hover { background: #eef3fa; }
.q-group .chev { display: grid; place-items: center; transition: transform .18s; color: var(--ink-3); }
.q-group .chev svg { width: 16px; height: 16px; }
.q-group[open] .chev { transform: rotate(-90deg); }
.q-group .g-count { margin-inline-start: auto; font-size: 12.5px; color: var(--ink-3); }
.q-group[open] > summary { border-bottom: 1px solid var(--line); }
.q-list { display: flex; flex-direction: column; }
.q-item { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); align-items: start; }
.q-item:last-child { border-bottom: 0; }
.q-item.hot { box-shadow: inset -3px 0 0 var(--danger); }
.q-item.done { background: #fbfdfc; }
.q-item.done .q-text { color: var(--ink-2); }
.q-num { width: 28px; height: 28px; border-radius: 50%; background: var(--brand-3); color: var(--brand-2); font-weight: 700; font-size: 12.5px; display: grid; place-items: center; }
.q-item.done .q-num { background: var(--ok-bg); color: var(--ok); }
.q-text { font-weight: 600; line-height: 1.7; }
.q-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink-2); margin-top: 6px; align-items: center; }
.q-opts { font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.q-decision { font-size: 13.5px; margin-top: 8px; background: var(--ok-bg); color: #175c38; border-radius: 8px; padding: 8px 11px; }
.q-side { display: flex; flex-direction: column; gap: 6px; align-items: stretch; min-width: 130px; }
.st-quick { padding: 5px 8px; font-size: 13px; font-weight: 600; }
details.more > summary { cursor: pointer; color: var(--brand-2); font-weight: 600; font-size: 13.5px; }
.bulk-preview { background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 10px; padding: 10px 12px; max-height: 260px; overflow: auto; }
.bulk-preview ol { margin: 0; padding-inline-start: 22px; display: grid; gap: 4px; font-size: 13.5px; }
.tag { font-size: 11.5px; background: #eef2f8; padding: 1px 8px; border-radius: 6px; color: var(--ink-2); white-space: nowrap; }

/* assets */
.loc-chip { display: inline-block; font-size: 12.5px; background: var(--brand-3); color: var(--brand-2); border-radius: 6px; padding: 1px 8px; font-weight: 600; }
.loc-chip.none { background: var(--warn-bg); color: var(--warn); }
.atable td { vertical-align: top; }
.moves { margin: 0; padding-inline-start: 18px; display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); }

/* permissions matrix + org tree */
.pmatrix td { vertical-align: top; }
.pmatrix select.input { min-width: 118px; font-size: 13px; padding: 6px 8px; }
.pmatrix select.override { background: var(--brand-3); border-color: #9cc4ff; color: var(--brand-2); font-weight: 600; }
.save-row { display: flex; gap: 12px; align-items: center; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: rgba(255,255,255,.96); }
.save-row [data-dirty] { color: var(--warn); font-weight: 600; }
.org, .org ul { list-style: none; margin: 0; padding-inline-start: 22px; }
.org { padding-inline-start: 0; }
.org li { position: relative; padding: 5px 0 5px 0; }
.org ul li::before { content: ""; position: absolute; inset-inline-start: -14px; top: 0; bottom: 50%; border-inline-start: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); width: 10px; border-end-start-radius: 6px; }
.org-n { font-weight: 700; }
@media (max-width: 760px) {
  .q-item { grid-template-columns: 28px 1fr; }
  .q-side { grid-column: 1 / -1; flex-direction: row; min-width: 0; }
  .q-summary { padding: 10px; }
}
.atable td.money-c { white-space: nowrap; }
.save-row { position: static; }
/* .num is inline-block for inline numbers; on table cells it must stay a cell (it broke row layout) */
td.num, th.num { display: table-cell; }
td.num:not(.c) { text-align: right; }
td.num.c { text-align: center; }
.person.compact .n { white-space: nowrap; }
.reports-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.reports-pick label { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 12px; cursor: pointer; font-size: 13.5px; background: #fff; }
.reports-pick label.on { background: var(--brand-3); border-color: #9cc4ff; color: var(--brand-2); font-weight: 600; }
.reports-pick input { accent-color: var(--brand-2); }
.reports-pick em { font-style: normal; font-size: 11.5px; color: var(--ink-3); }
/* expenses + attachments */
.etable td { vertical-align: top; }
.etable td.money-c, .pivot td.money-c { white-space: nowrap; }
.att-chip { border: 1px solid var(--line-2); background: #fff; border-radius: 999px; padding: 2px 10px; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--brand-2); }
.att-chip.empty { color: var(--ink-3); border-style: dashed; }
.att-chip:hover { background: var(--brand-3); }
.pivot .pv-year td { background: var(--surface-2); }
.pivot .pv-total td { border-top: 2px solid var(--line-2); }
.files-box { display: grid; gap: 10px; }
.files-list { display: grid; gap: 8px; }
.file-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fff; }
.file-item.pending { border-style: dashed; background: var(--surface-2); }
.file-item img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; display: block; border: 1px solid var(--line); }
.file-ic { width: 54px; height: 54px; display: grid; place-items: center; font-size: 26px; background: var(--surface-2); border-radius: 8px; }
.file-meta { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.file-drop { display: flex; align-items: center; gap: 10px; border: 2px dashed var(--line-2); border-radius: 12px; padding: 14px 16px; cursor: pointer; color: var(--ink-2); font-size: 13.5px; background: var(--surface-2); }
.file-drop svg { width: 20px; height: 20px; color: var(--brand-2); flex: none; }
.file-drop:hover, .file-drop.over { border-color: var(--brand-2); background: var(--brand-3); }
.cam-btn { justify-self: start; cursor: pointer; }
.hbar > b { white-space: nowrap; }
/* horizontal bar rows: label | bar | value — value never overflows the card */
.hbar { grid-template-columns: minmax(96px, 36%) minmax(50px, 1fr) auto; gap: 12px; }
.hbar > span:first-child, .hb-l { overflow: hidden; text-overflow: ellipsis; }
.hbar > b { white-space: nowrap; font-size: 13px; }
.card { min-width: 0; }
.ltr-text { direction: ltr; unicode-bidi: plaintext; text-align: right; overflow-wrap: anywhere; }
.form-sec { font-weight: 700; color: var(--brand-2); font-size: 13.5px; border-bottom: 1px solid var(--line); padding-bottom: 4px; margin-top: 6px; }
.cmp { display: flex; align-items: center; gap: 8px; }
.cmp .bar { flex: 1; }
.hrtable td { vertical-align: top; }
.hbars { display: grid; grid-template-columns: minmax(96px, 38%) minmax(50px, 1fr) max-content; gap: 9px 12px; align-items: center; }
.hbars .hbar { display: contents; }
.hbars .hbar > b { text-align: left; }

/* ===== responsive ===== */
@media (max-width: 980px) {
  .savebar { inset-inline: 0; padding: 10px 16px; }
  .page-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .page-head .head-actions { flex-wrap: wrap; }
  .grid[style*="minmax(360px"], .grid[style*="minmax(340px"] { grid-template-columns: 1fr !important; }
}
@media (max-width: 640px) {
  .main { padding: 16px 12px 90px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi .value { font-size: 19px !important; overflow-wrap: anywhere; }
  .kpi { padding: 12px; }
  .chip-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .chip-tabs a { flex: none; }
  .filters { gap: 8px; }
  .filters > * { flex: 1 1 140px; }
  .filters .search { flex-basis: 100%; }
  .view-toggle { flex: 1 1 100%; }
  .view-toggle button { flex: 1; justify-content: center; }
  .q-group > summary { padding: 10px 12px; }
  .q-group .g-count { margin-inline-start: 0; width: 100%; }
  .modal { margin: 0; width: 100% !important; max-width: 100% !important; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .modal-back { padding: 0 !important; align-items: stretch; }
  .form-grid { grid-template-columns: 1fr !important; }
  .seg-tabs { width: 100%; }
  .seg-tabs button { flex: 1 1 auto; justify-content: center; }
  /* tables → stacked cards */
  .table-wrap { overflow: visible; }
  table.t.auto-stack, table.t.auto-stack tbody { display: block; width: 100%; }
  table.t.auto-stack thead { display: none; }
  table.t.auto-stack tr { display: block; border-bottom: 1px solid var(--line); padding: 10px 12px; }
  table.t.auto-stack tr:last-child { border-bottom: 0; }
  table.t.auto-stack td { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border: 0; padding: 5px 0; text-align: start; min-width: 0 !important; width: auto !important; }
  table.t.auto-stack td[data-label]:not([data-label=""])::before { content: attr(data-label); flex: none; max-width: 42%; font-size: 12px; font-weight: 600; color: var(--ink-3); }
  table.t.auto-stack td > * { max-width: 100%; }
  table.t.auto-stack td:first-child { font-weight: 600; }
  table.t.auto-stack td[data-label=""] { justify-content: flex-end; }
  table.t.auto-stack td .bar, table.t.auto-stack td .pct-cell, table.t.auto-stack td .cmp { flex: 1; max-width: 60%; }
  table.t.auto-stack td.c { text-align: start; }
  .pmatrix select.input { min-width: 0; width: 60%; }
  .hbars { grid-template-columns: minmax(80px, 40%) minmax(40px, 1fr) max-content; }
}
@media (max-width: 640px) {
  table.t.auto-stack td[data-empty] { display: none; }
  .table-wrap:has(> table.no-stack) { overflow-x: auto; }
}

@media (max-width: 860px) {
  /* tables → stacked cards */
  .table-wrap { overflow: visible; }
  table.t.auto-stack, table.t.auto-stack tbody { display: block; width: 100%; }
  table.t.auto-stack thead { display: none; }
  table.t.auto-stack tr { display: block; border-bottom: 1px solid var(--line); padding: 10px 12px; }
  table.t.auto-stack tr:last-child { border-bottom: 0; }
  table.t.auto-stack td { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border: 0; padding: 5px 0; text-align: start; min-width: 0 !important; width: auto !important; }
  table.t.auto-stack td[data-label]:not([data-label=""])::before { content: attr(data-label); flex: none; max-width: 42%; font-size: 12px; font-weight: 600; color: var(--ink-3); }
  table.t.auto-stack td > * { max-width: 100%; }
  table.t.auto-stack td:first-child { font-weight: 600; }
  table.t.auto-stack td[data-label=""] { justify-content: flex-end; }
  table.t.auto-stack td .bar, table.t.auto-stack td .pct-cell, table.t.auto-stack td .cmp { flex: 1; max-width: 60%; }
  table.t.auto-stack td.c { text-align: start; }
  table.t.auto-stack td[data-empty] { display: none; }
  table.t.auto-stack tr { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; }
  table.t.auto-stack td:first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  table.t.auto-stack tr { display: block; }
}
/* wide tables: one value per column, horizontal scroll on desktop with the actions column pinned */
@media (min-width: 861px) {
  .t.wide th { white-space: nowrap; }
  .t.wide td { padding: 10px 10px; }
  .t.wide tr > :last-child { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 8px 0 10px -8px rgba(3,13,28,.18) inset; }
  .t.wide thead tr > :last-child { background: var(--surface-2); }
  .t.wide tr.row-soon > :last-child, .t.wide tr.row-overdue > :last-child { background: inherit; }
}
@media (min-width: 861px) {
  .t.wide td { min-width: 96px; }
  .t.wide td:first-child, .t.wide td:first-child strong { white-space: nowrap; }
  .t.wide td.small { min-width: 120px; }
  .t.wide td.money-c, .t.wide td .num { white-space: nowrap; }
  .t.wide tr > :last-child { min-width: 0; }
}
@media (min-width: 861px) {
  .t.wide .ltr-text { white-space: nowrap; overflow-wrap: normal; }
  .t.wide td.small { min-width: 150px; }
}

/* ===== home ===== */
.home-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.home-hero h1 { margin: 2px 0 4px; font-size: 26px; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; }
.quick .btn svg { width: 16px; height: 16px; color: var(--brand-2); }
.home-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 18px; }
.hk { display: flex; gap: 12px; padding: 14px 16px; color: inherit; transition: transform .12s, box-shadow .12s; }
.hk:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(3,13,28,.08); }
.hk-ic { width: 40px; height: 40px; border-radius: 11px; background: var(--grad); color: #fff; display: grid; place-items: center; flex: none; }
.hk-ic svg { width: 20px; height: 20px; }
.hk-body { min-width: 0; }
.hk .label { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.hk .value { font-size: 21px; font-weight: 800; margin: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hk .hint { font-size: 12px; color: var(--ink-3); }
.kpi-badge .badge { font-size: 13px; }
.txt-ok { color: var(--ok); }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.home-col { display: grid; gap: 16px; min-width: 0; }
.home-col.side { position: sticky; top: 16px; }
.home-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.home-panel { overflow: hidden; }
.home-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.home-panel > header h2 { margin: 0; font-size: 15.5px; display: flex; align-items: center; gap: 8px; }
.home-panel > header h2 svg { width: 18px; height: 18px; color: var(--brand-2); }
.home-panel-body { display: flex; flex-direction: column; }
.att-list { display: grid; gap: 8px; padding: 12px; }
.att { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--ink); font-weight: 600; font-size: 14px; background: var(--surface-2); border-inline-start: 4px solid var(--line-2); }
.att:hover { text-decoration: none; filter: brightness(.98); }
.att span { flex: 1; }
.att svg { width: 18px; height: 18px; flex: none; }
.att svg:last-child { width: 14px; height: 14px; opacity: .5; }
.att-danger { background: var(--danger-bg, #fdecec); border-color: var(--danger); } .att-danger svg:first-child { color: var(--danger); }
.att-warn { background: var(--warn-bg); border-color: var(--warn); } .att-warn svg:first-child { color: var(--warn); }
.att-info { background: var(--brand-3); border-color: var(--brand-2); } .att-info svg:first-child { color: var(--brand-2); }
.att-ok { background: var(--ok-bg); border-color: var(--ok); color: #175c38; }
.mini-row { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; padding: 11px 16px; border-bottom: 1px solid var(--line); color: inherit; }
.mini-row:last-child { border-bottom: 0; }
.mini-row:hover { background: var(--surface-2); text-decoration: none; }
.mini-main { min-width: 0; flex: 1; }
.mini-title { font-weight: 600; font-size: 14px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini-dec { font-size: 13px; color: #175c38; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; text-align: left; }
.feed-list { max-height: 720px; overflow-y: auto; }
.feed-item { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); color: inherit; font-size: 13.5px; }
.feed-item:hover { background: var(--surface-2); text-decoration: none; }
.feed-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--brand-3); color: var(--brand-2); }
.feed-ic svg { width: 16px; height: 16px; }
.feed-ic.m-expenses { background: #fff3e6; color: #c26a00; } .feed-ic.m-subs { background: #f0ebff; color: #6b46c1; }
.feed-ic.m-assets { background: #e8f7ef; color: #1f8a4c; } .feed-ic.m-hr { background: #fdecef; color: #c2185b; }
.feed-ic.m-evals { background: #fff8db; color: #a07800; } .feed-ic.m-settings { background: #eef1f5; color: #4b5b70; }
.feed-body { min-width: 0; line-height: 1.6; overflow-wrap: anywhere; }
/* governance */
.finding { padding: 10px 12px; border-radius: 10px; margin-bottom: 8px; border-inline-start: 4px solid var(--line-2); background: var(--surface-2); font-weight: 600; font-size: 14px; }
.finding.f-warn { border-color: var(--warn); background: var(--warn-bg); } .finding.f-info { border-color: var(--brand-2); background: var(--brand-3); } .finding.f-ok { border-color: var(--ok); background: var(--ok-bg); }
.acc { display: inline-block; min-width: 54px; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.acc-none { color: var(--ink-3); } .acc-view { background: var(--brand-3); color: var(--brand-2); } .acc-edit { background: var(--ok-bg); color: #1f8a4c; }
.chg { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; } .chg:last-child { border-bottom: 0; }
@media (max-width: 1180px) { .home-grid { grid-template-columns: 1fr; } .home-col.side { position: static; } }
@media (max-width: 640px) { .home-kpis { grid-template-columns: 1fr 1fr; gap: 10px; } .hk { padding: 12px; flex-direction: column; gap: 8px; } .hk .value { font-size: 18px; } .home-panels { grid-template-columns: 1fr; } .home-hero h1 { font-size: 22px; } }

/* ===== app bar (header) ===== */
.content { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none !important; }
.appbar { position: sticky; top: 0; z-index: 35; display: flex; align-items: center; gap: 12px; padding: 10px 32px; background: rgba(244,247,251,.86); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.ab-btn { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 40px; min-width: 40px; justify-content: center; padding: 0 10px; border-radius: 11px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); cursor: pointer; font: inherit; font-weight: 600; font-size: 14px; }
.ab-btn:hover { border-color: var(--brand-2); color: var(--brand-2); }
.ab-btn svg { width: 19px; height: 19px; }
.ab-add { background: var(--grad); color: #fff; border: 0; padding: 0 14px; }
.ab-add:hover { color: #fff; filter: brightness(1.05); }
.ab-menu, .ab-logo { display: none; }
.ab-logo .hc-logo { height: 34px; }
.gsearch { position: relative; flex: 1; max-width: 560px; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; background: #fff; border: 1px solid var(--line-2); border-radius: 12px; }
.gsearch:focus-within { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(1,95,237,.12); }
.gsearch > svg { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
.gsearch input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 14.5px; color: var(--ink); }
.gsearch input::-webkit-search-cancel-button { display: none; }
.gsearch kbd { font: 600 11px/1 var(--font, inherit); color: var(--ink-3); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 6px; padding: 4px 6px; direction: ltr; }
.gs-results { display: none; position: absolute; top: calc(100% + 6px); inset-inline: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px rgba(3,13,28,.16); max-height: min(70vh, 520px); overflow-y: auto; padding: 6px; z-index: 50; }
.gs-results.open { display: block; }
.gs-group + .gs-group { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.gs-h { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--ink-3); padding: 8px 10px 4px; }
.gs-h svg { width: 14px; height: 14px; }
.gs-item { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 9px; color: var(--ink); }
.gs-item:hover, .gs-item.on { background: var(--brand-3); text-decoration: none; }
.gs-t { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-s { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-empty { padding: 18px; text-align: center; color: var(--ink-3); font-size: 14px; }
.ab-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.ab-user { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 6px 0 12px; border: 1px solid var(--line-2); background: #fff; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 600; color: var(--ink); }
.ab-user .avatar { width: 30px; height: 30px; font-size: 12px; }
.nbadge { position: absolute; top: -5px; inset-inline-end: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; }
.nbadge[hidden] { display: none; }
.pop-wrap { position: relative; }
.pop { display: none; position: absolute; top: calc(100% + 8px); inset-inline-end: 0; width: 260px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px rgba(3,13,28,.16); padding: 6px; z-index: 60; }
.pop.open { display: block; animation: rise .14s ease-out; }
.pop-wide { width: 360px; }
.pop-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; padding: 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.pop-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; background: none; border-radius: 9px; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; text-align: start; }
.pop-item:hover { background: var(--surface-2); text-decoration: none; }
.pop-item svg { width: 17px; height: 17px; color: var(--brand-2); }
.link-btn { border: 0; background: none; color: var(--brand-2); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.notif-list { display: grid; gap: 6px; max-height: 60vh; overflow-y: auto; padding: 4px; }
.notif { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 10px; background: var(--surface-2); color: var(--ink); font-size: 13.5px; font-weight: 600; line-height: 1.55; border-inline-start: 3px solid var(--line-2); }
.notif:hover { text-decoration: none; filter: brightness(.98); }
.notif svg { width: 17px; height: 17px; flex: none; margin-top: 2px; }
.notif.n-danger { border-color: var(--danger); } .notif.n-danger svg { color: var(--danger); }
.notif.n-warn { border-color: var(--warn); } .notif.n-warn svg { color: var(--warn); }
.notif.n-info { border-color: var(--brand-2); } .notif.n-info svg { color: var(--brand-2); }
.side-close, .side-scrim { display: none; }
/* bottom nav + sheets (phones) */
.bottom-nav { display: none; }
.sheet { display: none; }
@media (max-width: 980px) {
  .appbar { padding: 8px 12px; gap: 8px; }
  .ab-menu, .ab-logo { display: inline-flex; }
  .gsearch kbd, .ab-name { display: none; }
  .ab-user { padding: 0 4px; }
  .side-close { display: grid; place-items: center; margin-inline-start: auto; width: 32px; height: 32px; border-radius: 9px; border: 0; background: rgba(255,255,255,.08); color: #fff; font-size: 22px; cursor: pointer; }
  .shell.nav-open .side-scrim { display: block; position: fixed; inset: 0; background: rgba(3,13,28,.45); z-index: 39; }
}
@media (max-width: 760px) {
  .ab-logo, .ab-add, .ab-actions .pop-wrap:has([data-pop="notif"]) { display: none; }
  .ab-menu { display: none; }
  .gsearch { height: 40px; max-width: none; }
  .main { padding-bottom: 96px !important; }
  .bottom-nav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; inset-inline: 0; bottom: 0; z-index: 45; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .bottom-nav > * { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border: 0; background: none; color: var(--ink-3); font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; border-radius: 10px; }
  .bottom-nav > * svg { width: 22px; height: 22px; }
  .bottom-nav > .on { color: var(--brand-2); }
  .bottom-nav .nbadge { top: 0; inset-inline-end: calc(50% - 22px); }
  .bottom-nav button[data-sheet="add"] svg { background: var(--grad); color: #fff; border-radius: 10px; padding: 4px; width: 30px; height: 30px; margin-top: -4px; }
  .savebar { bottom: calc(64px + env(safe-area-inset-bottom)) !important; }
  .sheet { display: block; position: fixed; inset: 0; z-index: 70; pointer-events: none; }
  .sheet-scrim { position: absolute; inset: 0; background: rgba(3,13,28,.45); opacity: 0; transition: opacity .2s; }
  .sheet-body { position: absolute; inset-inline: 0; bottom: 0; background: #fff; border-radius: 20px 20px 0 0; padding: 8px 14px calc(18px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .22s ease-out; max-height: 80vh; overflow-y: auto; }
  .sheet.open { pointer-events: auto; } .sheet.open .sheet-scrim { opacity: 1; } .sheet.open .sheet-body { transform: none; }
  .sheet-grip { width: 42px; height: 5px; border-radius: 9px; background: var(--line-2); margin: 4px auto 10px; }
  .sheet-h { font-weight: 800; font-size: 16px; margin-bottom: 12px; }
  .sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .sheet-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink); cursor: pointer; text-align: center; }
  .sheet-tile svg { width: 26px; height: 26px; color: var(--brand-2); }
  .home-hero .quick { display: none; }
  #toast-root { bottom: calc(80px + env(safe-area-inset-bottom)) !important; }
}
/* ===== charts ===== */
.home-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; margin-bottom: 16px; }
.chart-card.wide { grid-column: 1 / -1; }
.chart-pad { padding: 12px 16px 16px; }
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.c-grid { stroke: var(--line); stroke-width: 1; }
.c-base { stroke: var(--line-2); stroke-width: 1; }
.c-axis { font-size: 11px; fill: var(--ink-3); font-family: inherit; }
.c-hit { fill: transparent; }
.c-bar.hov .c-hit { fill: rgba(1,95,237,.06); }
.c-bar.hov .c-mark { filter: brightness(1.12); }
.chart-tip { position: absolute; top: 4px; transform: translateX(-50%); background: #0b1626; color: #fff; font-size: 12px; line-height: 1.6; padding: 7px 10px; border-radius: 9px; pointer-events: none; white-space: nowrap; box-shadow: 0 8px 20px rgba(3,13,28,.25); z-index: 5; }
.seg-track { display: flex; gap: 2px; height: 14px; border-radius: 99px; overflow: hidden; background: var(--surface-2); }
.seg-track span { display: block; height: 100%; }
.seg-track span:first-child { border-radius: 99px 0 0 99px; }
.seg-rest { background: #e3e8ef !important; }
.seg-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.seg-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 6px; vertical-align: -1px; }
.donut-row { display: flex; gap: 18px; align-items: center; }
.big-num { display: flex; flex-direction: column; align-items: center; min-width: 86px; }
.big-num b { font-size: 28px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.big-num span { font-size: 12px; color: var(--ink-3); font-weight: 600; }
@media (max-width: 640px) { .home-charts { grid-template-columns: 1fr; } .donut-row { flex-direction: column; align-items: stretch; gap: 10px; } .big-num { flex-direction: row; gap: 8px; align-items: baseline; } }

/* ---- two-factor authentication */
.otp-input{font-size:1.5rem;letter-spacing:.35em;text-align:center;font-variant-numeric:tabular-nums}
.mfa-box{max-width:520px}
.mfa-steps{padding-inline-start:20px;margin:16px 0;display:grid;gap:16px}
.mfa-steps li{line-height:1.7}
.mfa-qr{display:flex;gap:16px;align-items:center;flex-wrap:wrap;margin-top:10px}
.mfa-qr .qr{border:1px solid var(--line,#e3e8ef);border-radius:10px;padding:6px;background:#fff;max-width:100%;height:auto}
.mfa-key{display:grid;gap:6px;min-width:0}
.mfa-key code{direction:ltr;display:block;background:var(--soft,#f3f6fa);padding:8px 10px;border-radius:8px;font-size:.85rem;word-break:break-all}
.mfa-row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.mfa-row .otp-input{max-width:200px}
.mfa-done{display:grid;gap:12px}
.backup-codes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;direction:ltr}
.backup-codes span{background:var(--soft,#f3f6fa);border:1px dashed var(--line,#cfd8e3);border-radius:8px;padding:8px;text-align:center;font-weight:600;letter-spacing:.06em}
@media (max-width:640px){.mfa-qr{justify-content:center}.mfa-qr .qr{width:180px}.mfa-row .otp-input{max-width:none;flex:1}}
.login-box .mfa-row .btn,.login-box .mfa-done .btn{width:auto}.login-box .mfa-done [data-fin]{width:100%}
