/*! AMT-AP-04 | © 2026 Amal Althobaiti | AMALTAX */
:root {
  --bg: #F5EFE6; --surface: #FFFDF9; --surface-2: #EFE6D9; --inset: #F8F3EC;
  --ink: #2F2922; --muted: #776B5E; --line: #E3D8C8; --line-2: #D3C5B1;
  --brand: #A35C2E; --brand-ink: #FFFFFF; --brand-soft: #F3E3D6;
  --ok: #2E7D4F; --ok-soft: #E2F0E6; --warn: #9A5B00; --warn-soft: #FBEBCF; --bad: #B3261E; --bad-soft: #F9E1DE;
  --info: #2F5F8A; --info-soft: #E1EBF4;
  --r: 14px; --r-sm: 10px; --shadow: 0 1px 2px rgba(47, 41, 34, .06), 0 4px 16px rgba(47, 41, 34, .05);
  --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, "Geeza Pro", sans-serif;
  --tabbar-h: 64px; --side-w: 248px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171310; --surface: #201B17; --surface-2: #2A231E; --inset: #1B1714;
    --ink: #F1EADF; --muted: #B3A695; --line: #362E27; --line-2: #4A3F35;
    --brand: #D58A5A; --brand-ink: #1B140F; --brand-soft: #3A281C;
    --ok: #74C995; --ok-soft: #1C3125; --warn: #E7B45F; --warn-soft: #3A2C14; --bad: #F08A80; --bad-soft: #3B201D;
    --info: #8DB8E0; --info-soft: #1D2B38; --shadow: none; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.65 var(--font); min-height: 100dvh; -webkit-tap-highlight-color: transparent; }
body.modal-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.3; margin: 0; }
small { font-size: 12.5px; }
.boot { display: grid; place-items: center; min-height: 100dvh; font-size: 22px; font-weight: 700; color: var(--brand); }
.ic { flex: none; display: block; }
.flip { transform: scaleX(-1); }
.muted { color: var(--muted); } .small { font-size: 13px; }
.t-warn { color: var(--warn); } .t-bad { color: var(--bad); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cur { color: var(--muted); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

.app { min-height: 100dvh; display: grid; grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
.sidebar { display: none; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px; background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar .brand { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.topbar .brand img { border-radius: 8px; }
.chip-role { font-size: 12.5px; padding: 4px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-weight: 600; }
main { padding: 0 16px calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 24px); min-width: 0; }
.tabbar { position: fixed; inset-inline: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px 4px calc(env(safe-area-inset-bottom) + 6px); background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; color: var(--muted); padding: 4px 0; min-height: 48px; }
.tabbar a[aria-current="page"] { color: var(--brand); font-weight: 600; }
.ti { position: relative; }
.ti em, .sidebar em { font-style: normal; font-size: 11px; font-weight: 700; min-inline-size: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--brand); color: var(--brand-ink); display: inline-grid; place-items: center; }
.ti em { position: absolute; top: -6px; inset-inline-end: -12px; }

@media (min-width: 900px) {
  .app { grid-template-columns: var(--side-w) 1fr; grid-template-rows: 1fr; }
  .topbar, .tabbar { display: none; }
  .sidebar { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100dvh; padding: 20px 14px;
    background: var(--surface); border-inline-end: 1px solid var(--line); }
  .sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
  .sidebar .brand img { border-radius: 10px; }
  .sidebar .brand b { display: block; font-size: 17px; } .sidebar .brand small { color: var(--muted); }
  .sidebar nav { display: flex; flex-direction: column; gap: 2px; }
  .sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--r-sm); color: var(--muted); font-weight: 500; }
  .sidebar nav a:hover { background: var(--surface-2); color: var(--ink); }
  .sidebar nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
  .sidebar nav a span { flex: 1; }
  .sidebar .who { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--r-sm); border: 1px solid var(--line); }
  .sidebar .who b { display: block; font-size: 14px; } .sidebar .who small { color: var(--muted); }
  .sidebar .demo { margin: 8px 4px 0; font-size: 12px; color: var(--muted); text-align: center; }
  main { padding: 0 32px 48px; }
}

.page { max-width: 1120px; margin: 0 auto; padding-top: 20px; display: flex; flex-direction: column; gap: 16px; }
.page-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-h h1 { font-size: 24px; }
.page-h .sub { margin: 4px 0 0; color: var(--muted); max-width: 680px; }
.eyebrow { margin: 0 0 2px; color: var(--muted); font-size: 13px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 14px; margin-bottom: -6px; }
@media (min-width: 900px) { .page { padding-top: 32px; gap: 20px; } .page-h h1 { font-size: 28px; } }

.grid2 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .grid2 { grid-template-columns: 1fr 1fr; align-items: start; } }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card.inset { background: var(--inset); box-shadow: none; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.card-h h3 { font-size: 16px; }
.link { color: var(--brand); font-size: 14px; font-weight: 500; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); min-width: 0; width: 100%; text-align: start; }
.card.flush .row { padding: 12px 16px; }
.row:last-child { border-bottom: 0; }
.row.lg { padding-block: 14px; }
a.row:hover, .btn-row:hover { background: var(--inset); }
.btn-row { background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.row-m { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-m b { font-weight: 600; overflow-wrap: anywhere; }
.row-m small { color: var(--muted); }
.row-e { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; text-align: end; }
.row-e small { color: var(--muted); }
.row .ic { color: var(--muted); }
.avatar { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 17px; }
.avatar.sm { width: 32px; height: 32px; border-radius: 10px; font-size: 14px; }
.dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.dot.ai { background: var(--brand); } .dot.human { background: var(--info); }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 28px 16px; color: var(--muted); }
.empty b { color: var(--ink); font-weight: 600; } .empty p { margin: 0; max-width: 420px; }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.tile span { color: var(--muted); font-size: 13.5px; }
.tile b { font-size: 30px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.tile small { color: var(--muted); }
.tile.accent { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.tile.accent span, .tile.accent small { color: color-mix(in srgb, var(--brand-ink) 82%, transparent); }
.tile:hover { border-color: var(--line-2); }

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap;
  background: var(--surface-2); color: var(--muted); }
.badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); } .badge.info { background: var(--info-soft); color: var(--info); }
.badge.accent { background: var(--brand-soft); color: var(--brand); } .badge.dark { background: var(--ink); color: var(--bg); }
.conf { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.conf.ok { color: var(--ok); background: var(--ok-soft); } .conf.warn { color: var(--warn); background: var(--warn-soft); } .conf.bad { color: var(--bad); background: var(--bad-soft); }
.bar { inline-size: 84px; block-size: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; block-size: 100%; background: var(--brand); border-radius: 3px; }

.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--surface-2); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button { flex: none; border: 0; background: none; padding: 6px 12px; border-radius: 9px; cursor: pointer; font-size: 14px; color: var(--muted); white-space: nowrap; }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .1); }
.seg .cnt { font-size: 12px; color: var(--muted); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs a { flex: none; padding: 10px 12px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tabs a[aria-current="page"] { color: var(--brand); border-color: var(--brand); font-weight: 600; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 16px; border-radius: 11px;
  border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 14.5px; white-space: nowrap; }
.btn.sm { min-height: 32px; padding: 4px 12px; font-size: 13.5px; border-radius: 9px; }
.btn.block { width: 100%; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger-ghost { border-color: transparent; background: transparent; color: var(--bad); }
.btn:hover:not(:disabled) { filter: brightness(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btns.col { flex-direction: column; align-items: stretch; flex: none; }
.icon-btn { border: 0; background: none; padding: 6px; border-radius: 8px; cursor: pointer; color: var(--muted); }

.search { display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.search input { flex: 1; min-width: 0; border: 0; background: none; padding: 11px 0; outline: none; }
.search .ic { color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; min-width: 0; }
.field-l { font-size: 13.5px; font-weight: 600; }
.field-h { color: var(--muted); }
input:not([type=checkbox]), select, textarea { width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); min-height: 42px; }
textarea { resize: vertical; }
select.pick { width: auto; max-width: 100%; }
input.inline { width: 160px; }
.f2 { display: grid; grid-template-columns: 1fr; gap: 0 12px; align-items: end; }
@media (min-width: 560px) { .f2 { grid-template-columns: 1fr 1fr; } }
.check { display: flex; align-items: center; gap: 8px; padding: 6px 0; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
fieldset.checks { border: 1px solid var(--line); border-radius: 12px; padding: 4px 12px 8px; margin: 0 0 12px; }
legend { font-size: 13.5px; font-weight: 600; padding: 0 4px; }
.err { color: var(--bad); margin: 0; font-weight: 600; }
.cls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.cls select { width: auto; min-height: 32px; padding: 2px 8px; font-size: 13px; }

.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 16px; margin: 0; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.facts.tight { background: var(--inset); border: 0; }
.facts dt { font-size: 12.5px; color: var(--muted); } .facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.facts dd small { display: block; font-weight: 400; color: var(--muted); }
.note { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--info-soft); color: var(--info); font-size: 14px; display: flex; gap: 8px; align-items: flex-start; }
.note.warn { background: var(--warn-soft); color: var(--warn); } .note.bad { background: var(--bad-soft); color: var(--bad); }
.row-m .note { margin-top: 6px; font-size: 13px; padding: 6px 10px; }
.ticks { margin: 6px 0 0; padding-inline-start: 20px; } .ticks li { margin: 4px 0; }
pre.msg { white-space: pre-wrap; font: inherit; background: var(--inset); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0; }

.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.tbl th { font-size: 12.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.tbl .n { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl.lines { min-width: 560px; }
.tbl .code { color: var(--muted); font-variant-numeric: tabular-nums; margin-inline-end: 4px; }
.tbl .src span { display: block; font-size: 13px; } .tbl .src small { color: var(--muted); }
.tbl tr.sub td { font-weight: 600; background: var(--inset); }
.tbl tr.sum td { font-weight: 700; border-top: 2px solid var(--ink); }
.tbl tr.grand td { font-weight: 700; border-top: 2px solid var(--ink); border-bottom: 3px double var(--ink); }

details.entry { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; }
details.entry > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 40px 64px 1fr auto auto; gap: 10px; align-items: center; padding: 10px 12px; }
details.entry > summary::-webkit-details-marker { display: none; }
details.entry[open] > summary { border-bottom: 1px solid var(--line); }
.entry .no { font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }
.entry .dt { color: var(--muted); font-size: 13px; }
.entry .amt { font-weight: 600; }
.entry-b { padding: 4px 12px 12px; }
@media (max-width: 640px) {
  details.entry > summary { grid-template-columns: 34px 1fr auto; row-gap: 2px; }
  details.entry > summary .dt { grid-column: 2; grid-row: 2; }
  details.entry > summary .badge { grid-column: 3; grid-row: 2; justify-self: end; }
  details.entry > summary .amt { grid-column: 3; grid-row: 1; }
}

.batch { border-color: var(--brand); background: color-mix(in srgb, var(--brand-soft) 55%, var(--surface)); }
.batch-h { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.batch-h p { margin: 2px 0 0; color: var(--muted); max-width: 620px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px dashed var(--brand); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 13.5px; }
.chip.done { border-style: solid; background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }

.row.doc { align-items: flex-start; }

.rules { display: flex; flex-direction: column; gap: 4px; background: var(--inset); box-shadow: none; }
.rules > div { display: flex; align-items: center; gap: 8px; } .rules p { margin: 0; color: var(--muted); }
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.member header, .deleg header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.member header b, .deleg header b { flex: 1; }
.member p { margin: 0; color: var(--muted); font-size: 14px; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.pulse.on { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.deleg { display: flex; flex-direction: column; gap: 10px; }

.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(23, 19, 16, .45); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease; }
.sheet { background: var(--surface); width: 100%; max-height: 92dvh; display: flex; flex-direction: column; border-radius: 20px 20px 0 0;
  padding-bottom: env(safe-area-inset-bottom); animation: up .2s ease; }
.sheet-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 16px 8px; }
.sheet-h h2 { font-size: 18px; }
.sheet-b { padding: 8px 16px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.sheet-b > p { margin: 0; }
.sheet-f { display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--line); }
@media (min-width: 700px) {
  .scrim { align-items: center; padding: 24px; }
  .sheet { width: 560px; border-radius: 18px; max-height: 88dvh; padding-bottom: 0; }
  .sheet.wide { width: 760px; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(24px); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .scrim, .sheet { animation: none; } }

.toasts { position: fixed; z-index: 60; inset-inline: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 500; box-shadow: 0 6px 24px rgba(0, 0, 0, .2); max-width: 480px; }
.toast.bad { background: var(--bad); color: #fff; }
@media (min-width: 900px) { .toasts { bottom: 24px; } }

@media print { .sidebar, .topbar, .tabbar, .btn { display: none !important; } main { padding: 0; } }

.gate { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); }
.gate-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 32px 28px 28px; display: flex; flex-direction: column; gap: 14px; }
.gate-card form { display: flex; flex-direction: column; gap: 12px; }
.gate-card h1 { font-size: 19px; text-align: center; margin-top: 6px; }
.gate-card .field { margin: 0; }
.gate-brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding-bottom: 6px; }
.gate-brand img { border-radius: 16px; margin-bottom: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.gate-brand b { display: block; font-size: 22px; letter-spacing: .01em; } .gate-brand small { color: var(--muted); font-size: 13px; letter-spacing: .04em; }
.steps { margin: 0; padding-inline-start: 20px; } .steps li { margin: 4px 0; }
.qr { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.qr img { background: #fff; border-radius: 12px; padding: 8px; }
.qr code { font-size: 12.5px; overflow-wrap: anywhere; }
.linkish { background: none; border: 0; color: var(--brand); cursor: pointer; font: inherit; font-weight: 600; padding: 0; text-align: start; }
.loading { color: var(--muted); padding: 24px 0; text-align: center; }
.welcome { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 36px 16px; }
.welcome h2 { font-size: 20px; } .welcome p { margin: 0; color: var(--muted); max-width: 460px; }
.f3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0 12px; }
.fname { overflow-wrap: anywhere; direction: ltr; unicode-bidi: plaintext; }

.drop { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 22px 16px; border: 2px dashed var(--line-2); border-radius: 14px; background: var(--inset); color: var(--muted); }
.drop b { color: var(--ink); }
.drop.over { border-color: var(--brand); background: var(--brand-soft); }
.drop.compact { display: inline-flex; padding: 0; border: 0; background: none; }
.drop.compact .up-list { position: absolute; }
.up-list { list-style: none; margin: 8px 0 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 6px; text-align: start; }
.up-list li { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; flex-wrap: wrap; }
.up-list li .fname { flex: 1; min-width: 0; color: var(--ink); }
.up-list li small { color: var(--muted); }
.drop.compact .up-list { position: static; max-width: 260px; }
.row.slot { align-items: flex-start; flex-wrap: wrap; }
.row.slot .row-e { flex-direction: row; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

.frame { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--inset); min-height: 260px; }
.frame.tall { min-height: min(72dvh, 820px); }
.frame iframe { flex: 1; width: 100%; min-height: 420px; border: 0; background: #fff; }
.frame.tall iframe { min-height: min(68dvh, 780px); }
.frame img { max-width: 100%; max-height: min(68dvh, 780px); object-fit: contain; margin: auto; display: block; }
.frame-file { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px; text-align: center; }
.frame-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 12px; border-top: 1px solid var(--line); background: var(--surface); font-size: 13px; }
.frame-bar .fname { color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.split { display: grid; grid-template-columns: 1fr; gap: 16px; }
.split > div { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
@media (min-width: 1000px) { .split { grid-template-columns: 1.1fr 1fr; align-items: start; } .split .frame { position: sticky; top: 0; } }
details.srcdoc > summary { cursor: pointer; color: var(--brand); font-weight: 600; padding: 6px 0; }
@media (min-width: 700px) { .sheet.xwide { width: min(1280px, 96vw); } }

.enroll .steps.big li { font-size: 15.5px; margin: 8px 0; line-height: 1.7; }
.qr.big img { width: 248px; height: 248px; padding: 12px; box-sizing: content-box; }
.manual { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; background: var(--inset); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.manual p { margin: 0; }
.manual code { font-size: 15px; letter-spacing: .04em; overflow-wrap: anywhere; }
input.otp { font-size: 24px; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; }
.pw { position: relative; display: flex; align-items: center; }
.pw input { flex: 1; padding-right: 64px; }
.pw .linkish { position: absolute; right: 12px; font-size: 13.5px; }
.pw input:has(+ .eye) { padding-right: 52px; }
.pw .eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; background: none; color: var(--muted, #6b6259); border-radius: 10px; cursor: pointer; }
.pw .eye:hover, .pw .eye[aria-pressed="true"] { color: var(--brand); }
.pw .eye:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }

.member .row-m b { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.member .email { text-align: start; }
button.row.act { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); font: inherit; color: inherit; text-align: start; cursor: pointer; }
button.row.act:last-child { border-bottom: 0; }
button.row.act:hover { background: var(--inset); }
.note.nag { display: flex; align-items: center; gap: 8px; text-decoration: none; margin-bottom: 14px; }

.reader { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -4px 0 10px; }
.reader + .note, .note + .note { margin-bottom: 8px; }
input.ai { background: var(--info-soft); }
input.ai.low { background: var(--warn-soft); border-color: var(--warn); }

.findings { display: grid; gap: 6px; margin-top: 14px; }
.findings h3 { margin: 0 0 2px; font-size: 14px; font-weight: 600; color: var(--muted); }
.note.ok { background: var(--ok-soft, var(--info-soft)); color: var(--ok, var(--info)); }

@media (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]):not(.otp), select, textarea { font-size: 16px; }
}

.ai-team { margin-top: 16px; }
.ai-team .card-h { padding: 14px 16px 4px; margin: 0; }
.ai-team .row.off { opacity: .62; }

.fu .card-h h3 a { color: inherit; }
.fu-req { padding: 10px 0; border-top: 1px solid var(--line); }
.fu-req:first-of-type { border-top: 0; }
.fu-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fu-h small { color: var(--muted); }
.fu-h .badge { margin-inline-start: auto; }
.fu-items { margin: 6px 0 0; padding-inline-start: 20px; display: grid; gap: 2px; font-size: 14px; }

.tbl.bank { min-width: 760px; }
.tbl.bank td:first-child { width: 28px; }
.tbl.bank tr.done td { color: var(--muted); }
.tbl.bank tr.warn td { background: var(--warn-soft); }
.tbl.bank tr.bad td { background: var(--bad-soft); }
.tbl.bank .err { display: block; font-size: 12.5px; margin-top: 4px; }
.bank-tr { display: flex; flex-direction: column; gap: 6px; min-width: 190px; }
.bank-tr select { padding: 6px 8px; }

.wht { display: flex; flex-direction: column; gap: 12px; }
.wht .card-h { margin-bottom: 0; }
.wht.busy > :not(.card-h) { opacity: .55; transition: opacity .15s; }
.wht-due { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.wht-due b { color: var(--ink); font-weight: 600; }
.wht-sum { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.wht-sum .total dd { color: var(--brand); }
.wht-tbl td small { display: block; color: var(--muted); }
.wht-tbl .cp { font-weight: 600; overflow-wrap: anywhere; }
.wht .findings { margin-top: 0; }
@media (max-width: 480px) { .wht-tbl { font-size: 13.5px; } .wht-tbl th, .wht-tbl td { padding: 8px 6px; } }

.zk .card-h { margin-bottom: 12px; }
.zk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.zk .facts { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.zk-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); margin-top: 16px; }
@media (min-width: 1000px) {
  .zk-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
  .zk-main { grid-column: 1; grid-row: 1; } .zk-side { grid-column: 2; grid-row: 1; }
}
.zk-stmt td small.zk-src { display: block; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.zk-stmt td small.zk-src.codes { display: flex; flex-wrap: wrap; gap: 0 10px; justify-content: flex-start; }
.zk-stmt tr.sub td { font-size: 13.5px; }
.zk-side { gap: 18px; }
.zk-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.zk-h h4, .zk-notes h3 { margin: 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.zk-notes { margin-top: 0; }
.zk-owners .row { padding: 8px 0; }
.zk-owners .zk-pct { font-weight: 600; min-inline-size: 64px; text-align: end; }
.zk-owners .empty { padding: 16px 8px; }
.zk-total { display: flex; justify-content: space-between; padding: 8px 0 0; border-top: 2px solid var(--ink); font-weight: 700; margin-top: 2px; }
.zk-total.t-bad { color: var(--bad); border-top-color: var(--bad); }
.zk .facts dd small { font-weight: 500; }

.case-group .card-h, .case-chances .card-h { justify-content: flex-start; padding: 14px 16px 6px; margin: 0; }
.case-group .card-h .cnt, .case-chances .card-h .cnt { font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 0 8px; }
.case-group.late .card-h h3 { color: var(--bad); }
.case-group.due .card-h h3 { color: var(--warn); }
.case-group.past .row { opacity: .8; }
.case-chances { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.case-chances .row-e { flex-direction: row; align-items: center; gap: 12px; }
.chance-amt { font-weight: 700; white-space: nowrap; }
.case-filter select { min-width: 220px; }
pre.msg.letter { line-height: 1.95; font-size: 14.5px; max-height: min(60dvh, 640px); overflow-y: auto; }
.case-esc { display: grid; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--inset); }
.case-esc h4 { margin: 0; font-size: 14px; }
.case-esc .field, .case-esc p { margin: 0; }
.case-tabs { flex: none; }
.f2.case-top { align-items: start; }
@media (max-width: 559px) {
  .case-chances .row { flex-wrap: wrap; }
  .case-chances .row-e { width: 100%; justify-content: space-between; }
  .case-filter select { width: 100%; }
}

.board { margin-top: 16px; }
.board-team { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 16px 12px; }
@media (min-width: 900px) { .board-team { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.board-emp { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--inset); color: var(--ink); font: inherit; text-align: start; cursor: pointer; min-height: 76px; }
.board-emp b { font-size: 14px; }
.board-emp.on { border-color: var(--brand); background: var(--brand-soft); }
.board-emp .board-n { display: flex; flex-wrap: wrap; gap: 4px; }
.board-emp small { color: var(--muted); font-size: 12.5px; }
.board-list { border-top: 1px solid var(--line); }
