/* Share Portal – one layout, two sets of colour tokens (design.md). No colour is
   hard-coded below the token blocks. The system preference applies until
   the user picks a theme; the choice is rendered as data-theme on <html>. */

@font-face { font-family: "Lexend"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(../fonts/lexend-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Lexend"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(../fonts/lexend-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "DM Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/dmmono-400-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "DM Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/dmmono-400-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "DM Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/dmmono-500-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "DM Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/dmmono-500-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- tokens: light ---------- */
:root, :root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f5f3; --surface: #ffffff; --surface-2: #f8f9f8; --ink: #0c374d; --muted: #4f6470;
  --line: #d9dedb; --line-soft: #e8ecea; --input-line: #b9c4c2; --input-bg: #ffffff;
  --btn2-bg: #ffffff; --btn2-hover: #f4f5f3;
  --acc: #006164; --acc-hover: #004b4e; --on-acc: #ffffff; --link: #006164; --link-hover: #004b4e;
  --yel: #f0eb2d; --yel-ink: #0c374d; --lilac-bg: #e6c8e1; --lilac-ink: #0c374d;
  --panel-bg: #e6c8e1; --panel-line: rgba(12, 55, 77, 0.2); --sel-bg: #f4e8f1; --icon-bg: #d9e9e9;
  --mint-bg: #d9e9e9; --mint-ink: #006164; --gray-bg: #e7ebe9; --gray-ink: #3f5560;
  --warn-bg: #fdf0d5; --warn-ink: #7a4b00; --danger-bg: #fbe9e9; --danger-ink: #a12a2a; --danger-hover: #fbeeee;
  --track: #e3e8e6; --header-bg: #006164; --header-fg: #ffffff; --header-muted: #d3e2e2;
  --header-div: rgba(255, 255, 255, 0.35); --header-chip: rgba(255, 255, 255, 0.14);
  --overlay: rgba(29, 29, 27, 0.45); --shadow: rgba(0, 0, 0, 0.2);
}
/* ---------- tokens: dark (system preference, unless light was chosen) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b1922; --surface: #122b3d; --surface-2: #17344a; --ink: #e6eef2; --muted: #9db0ba;
    --line: #26475b; --line-soft: #1c3a4d; --input-line: #35576b; --input-bg: #0e2130;
    --btn2-bg: #17344a; --btn2-hover: #1e4058;
    --acc: #5fc2c0; --acc-hover: #7ad0ce; --on-acc: #0b1922; --link: #6fcfcc; --link-hover: #8fdcda;
    --yel: #f0eb2d; --yel-ink: #0c374d; --lilac-bg: #3b3044; --lilac-ink: #ecd3e6;
    --panel-bg: #2e2838; --panel-line: rgba(230, 200, 225, 0.25); --sel-bg: #1f3347; --icon-bg: #163d42;
    --mint-bg: #163d42; --mint-ink: #7fd3d1; --gray-bg: #22394a; --gray-ink: #c3d0d7;
    --warn-bg: #3b2f12; --warn-ink: #f3d27e; --danger-bg: #46211f; --danger-ink: #f3a29f; --danger-hover: #3a1e1d;
    --track: #26475b; --header-bg: #073a3d; --header-fg: #ffffff; --header-muted: #a8cbcb;
    --header-div: rgba(255, 255, 255, 0.3); --header-chip: rgba(255, 255, 255, 0.14);
    --overlay: rgba(0, 0, 0, 0.6); --shadow: rgba(0, 0, 0, 0.5);
  }
}
/* ---------- tokens: dark (chosen in the account menu) ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1922; --surface: #122b3d; --surface-2: #17344a; --ink: #e6eef2; --muted: #9db0ba;
  --line: #26475b; --line-soft: #1c3a4d; --input-line: #35576b; --input-bg: #0e2130;
  --btn2-bg: #17344a; --btn2-hover: #1e4058;
  --acc: #5fc2c0; --acc-hover: #7ad0ce; --on-acc: #0b1922; --link: #6fcfcc; --link-hover: #8fdcda;
  --yel: #f0eb2d; --yel-ink: #0c374d; --lilac-bg: #3b3044; --lilac-ink: #ecd3e6;
  --panel-bg: #2e2838; --panel-line: rgba(230, 200, 225, 0.25); --sel-bg: #1f3347; --icon-bg: #163d42;
  --mint-bg: #163d42; --mint-ink: #7fd3d1; --gray-bg: #22394a; --gray-ink: #c3d0d7;
  --warn-bg: #3b2f12; --warn-ink: #f3d27e; --danger-bg: #46211f; --danger-ink: #f3a29f; --danger-hover: #3a1e1d;
  --track: #26475b; --header-bg: #073a3d; --header-fg: #ffffff; --header-muted: #a8cbcb;
  --header-div: rgba(255, 255, 255, 0.3); --header-chip: rgba(255, 255, 255, 0.14);
  --overlay: rgba(0, 0, 0, 0.6); --shadow: rgba(0, 0, 0, 0.5);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Lexend", system-ui, sans-serif; background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased; font-size: 15px; line-height: 1.45; min-height: 100vh; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
h1, h2, h3, p, dl, dd, ul, ol, fieldset { margin: 0; }
fieldset { border: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
h1 { font-weight: 400; }
ul, ol { padding: 0; list-style: none; }
.mono { font-family: "DM Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.nr { font-family: "DM Mono", ui-monospace, monospace; font-size: 15px; font-variant-numeric: tabular-nums; }
.nr.strong { font-weight: 500; }
.small-mono { font-family: "DM Mono", ui-monospace, monospace; font-size: 13px; }
.break { word-break: break-all; }
.muted { color: var(--muted); }
.help { font-size: 13px; color: var(--muted); }
.help-14 { font-size: 14px; color: var(--muted); }
.ink { color: var(--ink); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.w-500 { font-weight: 500; }
.w-600 { font-weight: 600; }
.warn-text { color: var(--warn-ink); }
.danger-text { color: var(--danger-ink); }
.ok-text { color: var(--mint-ink); }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; background: var(--surface); padding: 8px 12px; border-radius: 6px; }

/* ---------- icons ---------- */
.icon { flex-shrink: 0; stroke: currentColor; fill: none; }
.icon-muted { color: var(--muted); }
.icon-acc { color: var(--acc); }

/* ---------- stacks ---------- */
.stack { display: flex; flex-direction: column; }
.gap-2 { gap: 2px; } .gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; }
.gap-12 { gap: 12px; } .gap-14 { gap: 14px; } .gap-16 { gap: 16px; } .gap-18 { gap: 18px; } .gap-20 { gap: 20px; }
.gap-22 { gap: 22px; } .gap-24 { gap: 24px; } .gap-28 { gap: 28px; }
.row { display: flex; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.start { align-items: flex-start; }
.row.end { align-items: flex-end; }
.row.between { justify-content: space-between; }
.row.justify-end { justify-content: flex-end; }
.push { margin-left: auto; }
.grow { flex-grow: 1; min-width: 0; }
.self-start { align-self: flex-start; }
.mt-2 { margin-top: 2px; } .mt-3 { margin-top: 3px; } .mt-4 { margin-top: 4px; } .mt-6 { margin-top: 6px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 6px; font: inherit; font-weight: 500; font-size: 15px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn-primary { background: var(--acc); color: var(--on-acc); border: 1px solid var(--acc); }
.btn-primary:hover { background: var(--acc-hover); border-color: var(--acc-hover); color: var(--on-acc); }
.btn-secondary { background: var(--btn2-bg); color: var(--ink); border: 1px solid var(--input-line); }
.btn-secondary:hover { background: var(--btn2-hover); color: var(--ink); }
.btn-danger { background: var(--btn2-bg); color: var(--danger-ink); border: 1px solid var(--input-line); }
.btn-danger:hover { background: var(--danger-hover); color: var(--danger-ink); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 14px; }
.btn-xs { height: 28px; padding: 0 8px; font-size: 13px; gap: 6px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: default; pointer-events: none; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--link); cursor: pointer; text-decoration: underline; }
.linkbtn:hover { color: var(--link-hover); }
form.inline { display: inline; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.input { height: 40px; padding: 0 12px; border: 1px solid var(--input-line); border-radius: 6px; background: var(--input-bg);
  font: inherit; font-size: 15px; color: var(--ink); width: 100%; }
.input:focus { outline: 2px solid var(--acc); outline-offset: 1px; }
.input[aria-invalid="true"] { border-color: var(--danger-ink); }
textarea.input { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; }
.input.mono { font-family: "DM Mono", ui-monospace, monospace; }
.input-sm { height: 38px; }
.label { font-size: 14px; font-weight: 500; color: var(--ink); }
.label-sm { font-size: 13px; font-weight: 500; }
.field-error { font-size: 13px; color: var(--danger-ink); }
.select { position: relative; }
.select select { appearance: none; padding-right: 36px; }
.select .icon { position: absolute; right: 12px; top: 12px; pointer-events: none; color: var(--muted); }
.select.sm .icon { top: 11px; }
.search { position: relative; }
.search .icon { position: absolute; left: 12px; top: 12px; color: var(--muted); }
.search .input { padding-left: 36px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--acc); flex-shrink: 0; }
.check.center { align-items: center; }
.check.center input { margin: 0; }
.w-150 { width: 150px; } .w-170 { width: 170px; } .w-200 { width: 200px; } .w-220 { width: 220px; } .w-240 { width: 240px; }
.w-280 { width: 280px; } .w-300 { width: 300px; } .w-320 { width: 320px; }
.form-foot { display: flex; align-items: center; gap: 14px; padding-top: 6px; border-top: 1px solid var(--line); }
/* grid, not flex: elements a password manager injects must not move the boxes */
.code-boxes { display: grid; grid-template-columns: repeat(6, auto); column-gap: 8px; justify-content: space-between; }
.code-boxes .input { width: 52px; height: 56px; text-align: center; font-size: 24px; padding: 0; }
.code-single { font-size: 22px; letter-spacing: 0.3em; text-align: center; height: 56px; }

/* ---------- cards, panels, notices ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.card.clip { overflow: hidden; }
.pad-16 { padding: 16px 20px; } .pad-20 { padding: 20px; } .pad-24 { padding: 24px; } .pad-28 { padding: 28px; } .pad-32 { padding: 32px; }
.panel { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 8px; font-size: 14px; }
.notice .icon { margin-top: 1px; }
.notice-warn { background: var(--warn-bg); color: var(--warn-ink); }
.notice-danger { background: var(--danger-bg); color: var(--danger-ink); }
.notice-danger a { color: var(--danger-ink); }
.notice-ok { background: var(--mint-bg); color: var(--mint-ink); }
.notice-info { background: var(--panel-bg); color: var(--lilac-ink); border: 1px solid var(--panel-line); }
.notice.sm { padding: 10px 12px; font-size: 13px; align-items: center; }
.icon-circle { display: inline-flex; width: 40px; height: 40px; border-radius: 50%; align-items: center; justify-content: center; }
.icon-circle.warn { background: var(--warn-bg); color: var(--warn-ink); }
.icon-circle.ok { background: var(--mint-bg); color: var(--mint-ink); }
.file-box { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; display: flex; align-items: center; gap: 14px; background: var(--surface-2); }
.file-icon { display: inline-flex; width: 40px; height: 40px; border-radius: 8px; background: var(--icon-bg); color: var(--acc); align-items: center; justify-content: center; flex-shrink: 0; }
.file-drop { border: 1px dashed var(--input-line); border-radius: 8px; padding: 22px 16px; display: flex; align-items: center; gap: 14px; background: var(--surface-2); cursor: pointer; }
.file-drop:hover, .file-drop.over { border-color: var(--acc); }
.file-drop input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.b-amber { background: var(--warn-bg); color: var(--warn-ink); }
.b-yellow { background: var(--yel); color: var(--yel-ink); }
.b-lilac { background: var(--lilac-bg); color: var(--lilac-ink); }
.b-mint { background: var(--mint-bg); color: var(--mint-ink); }
.b-gray { background: var(--gray-bg); color: var(--gray-ink); }
.b-red { background: var(--danger-bg); color: var(--danger-ink); }

/* ---------- tables ---------- */
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); font-size: 14px; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.num, .tbl th.num { text-align: right; }
.tbl td.actions { text-align: right; }
.tbl td.actions form { display: inline; }
.tbl tr.detail td { background: var(--surface-2); padding: 14px 14px 16px 34px; }
.tbl .expander { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: none; }
.tbl .expander .icon { color: var(--muted); transition: transform .15s; }
.tbl .expander[aria-expanded="true"] .icon { transform: rotate(180deg); }
.tbl-fixed { table-layout: fixed; }
.tbl-fixed td { overflow-wrap: anywhere; }
col.c-110 { width: 110px; } col.c-150 { width: 150px; } col.c-174 { width: 174px; } col.c-214 { width: 214px; } col.c-224 { width: 224px; }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); row-gap: 8px; column-gap: 12px; font-size: 14px; }
.kv dt { color: var(--muted); margin: 0; }
.kv dd { margin: 0; min-width: 0; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* ---------- top bar ---------- */
.topbar { height: 60px; background: var(--header-bg); color: var(--header-fg); display: flex; align-items: center;
  padding: 0 32px; gap: 44px; flex-shrink: 0; }
.wordmark { display: inline-flex; align-items: center; text-decoration: none; flex-shrink: 0; color: var(--ink); }
.wordmark svg { display: block; flex-shrink: 0; }
.wordmark .logo { fill: var(--acc); }
.wordmark .divider { width: 1px; background: var(--line); flex-shrink: 0; }
.wordmark .name { font-weight: 400; line-height: 1; white-space: nowrap; }
.wordmark.sm { gap: 12px; color: var(--header-fg); }
.wordmark.sm svg { width: 71px; height: 22px; }
.wordmark.sm .logo { fill: var(--yel); }
.wordmark.sm .divider { height: 22px; background: var(--header-div); }
.wordmark.sm .name { font-size: 18px; }
.wordmark.lg { gap: 20px; }
.wordmark.lg svg { width: 115px; height: 36px; }
.wordmark.lg .divider { height: 36px; }
.wordmark.lg .name { font-size: 30px; }
.nav { display: flex; align-items: center; flex-grow: 1; height: 60px; min-width: 0; overflow-x: auto; }
.nav a { display: inline-flex; align-items: center; height: 60px; padding: 0 4px; margin-right: 28px; text-decoration: none;
  color: var(--header-muted); font-weight: 400; border-bottom: 3px solid transparent; border-top: 3px solid transparent; white-space: nowrap; }
.nav a.on { color: var(--header-fg); font-weight: 500; border-bottom-color: var(--yel); }
.nav a:hover { color: var(--header-fg); }
.nav .count { display: inline-flex; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--yel); color: var(--yel-ink); font-size: 12px; font-weight: 600; align-items: center; justify-content: center; }
.userbox { display: flex; align-items: center; gap: 14px; font-size: 14px; flex-shrink: 0; }
.userbox .me { display: inline-flex; align-items: center; gap: 8px; color: var(--header-fg); text-decoration: none; }
.userbox .me .icon { color: var(--header-muted); }
.userbox .me:hover .who { text-decoration: underline; }
.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--header-chip); color: var(--header-fg); font-size: 13px; white-space: nowrap; }
.userbox .linkbtn { color: var(--header-muted); text-decoration: none; }
.userbox .linkbtn:hover { color: var(--header-fg); }

/* ---------- page ---------- */
.app { display: flex; flex-direction: column; min-height: 100vh; }
main.page { padding: 28px 32px 40px; display: flex; flex-direction: column; gap: 20px; flex-grow: 1; width: 100%; max-width: 1440px; margin: 0 auto; }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.pagehead h1 { font-size: 26px; font-weight: 400; letter-spacing: -0.01em; }
.filters { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.filters .count { margin-left: auto; }
.filter-card { padding: 16px 20px; display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.form-720 { width: 100%; max-width: 720px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.queue { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 24px; align-items: start; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.grid-2.tight { gap: 6px 16px; }
.border-left { padding-left: 32px; border-left: 1px solid var(--line); }
.section-title { font-size: 16px; font-weight: 600; }
.h2 { font-size: 20px; font-weight: 500; }

/* ---------- auth pages ---------- */
.auth { flex-grow: 1; display: flex; align-items: center; justify-content: center; padding: 40px 16px; min-height: 100vh; }
.auth-inner { width: 100%; display: flex; flex-direction: column; gap: 24px; }
.auth-inner.w-440 { max-width: 440px; } .auth-inner.w-520 { max-width: 520px; } .auth-inner.w-760 { max-width: 760px; }
.auth-brand { display: flex; justify-content: center; }
.auth h1.title { font-size: 21px; font-weight: 500; }
.auth h1.title-lg { font-size: 23px; font-weight: 500; }
.auth h2.sub { font-size: 17px; font-weight: 500; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex-grow: 1; height: 1px; background: var(--line); }
.steps { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.steps .sep { width: 20px; height: 1px; background: var(--line); }
.steps.wide { gap: 28px; }
.steps.wide .sep { width: 32px; }
.step { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.step b { display: inline-flex; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--input-line); align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: var(--muted); background: var(--surface); }
.step.on { color: var(--ink); }
.step.on b { background: var(--acc); border-color: var(--acc); color: var(--on-acc); }
.step.done b { background: var(--mint-bg); border-color: var(--mint-bg); color: var(--mint-ink); }
.qr { width: 200px; height: 200px; border: 1px solid var(--line); border-radius: 8px; background: #ffffff; padding: 8px; flex-shrink: 0; }
.qr img { width: 100%; height: 100%; image-rendering: pixelated; display: block; }
.secret { font-family: "DM Mono", ui-monospace, monospace; font-size: 15px; color: var(--ink); letter-spacing: 0.06em; overflow-wrap: anywhere; }
.rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; font-size: 13px; }
.rules li { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.rules li .dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--muted); flex-shrink: 0; }
.rules li .icon { display: none; }
.rules li.met { color: var(--mint-ink); }
.rules li.met .dot { display: none; }
.rules li.met .icon { display: inline-block; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; padding: 18px 20px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }
.codes li { font-family: "DM Mono", ui-monospace, monospace; font-size: 16px; letter-spacing: 0.04em; }

/* ---------- dialog (step-up only) ---------- */
.overlay { position: fixed; inset: 0; background: var(--overlay); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 20; }
.overlay.static { position: static; background: none; padding: 40px 0; }
dialog.dialog { border: 0; padding: 0; background: transparent; max-width: calc(100vw - 32px); color: var(--ink); }
dialog.dialog::backdrop { background: var(--overlay); }
.dialog-card { width: 460px; max-width: 100%; padding: 28px; display: flex; flex-direction: column; gap: 18px; box-shadow: 0 20px 50px var(--shadow); }
.dialog-title { font-size: 19px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.dialog-title .icon { color: var(--acc); }

/* ---------- uploader ---------- */
.progress { display: flex; flex-direction: column; gap: 6px; min-width: 240px; }
.progress .line { display: flex; justify-content: space-between; font-size: 13px; gap: 12px; }
.bar { height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; }
.bar > span { display: block; height: 6px; background: var(--acc); width: 0; transition: width .2s; }
progress.bar-native { width: 100%; height: 6px; appearance: none; border: 0; border-radius: 3px; background: var(--track); overflow: hidden; }
progress.bar-native::-webkit-progress-bar { background: var(--track); }
progress.bar-native::-webkit-progress-value { background: var(--acc); }
progress.bar-native::-moz-progress-bar { background: var(--acc); }

/* ---------- coordinator queue ---------- */
.qhead { display: flex; justify-content: space-between; align-items: center; }
.qitem { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); text-decoration: none; color: var(--ink); }
.qitem:hover { border-color: var(--acc); color: var(--ink); }
.qitem.sel { background: var(--sel-bg); border-color: var(--acc); }
.qitem .nr { font-size: 16px; font-weight: 600; }
.qitem .org { font-size: 14px; font-weight: 500; }
details.reject > summary { list-style: none; }
details.reject > summary::-webkit-details-marker { display: none; }
details.reject[open] > summary { display: none; }
.actionbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 20px; }

/* ---------- account ---------- */
.choice { display: flex; gap: 10px; flex-wrap: wrap; }
.choice label { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--input-line); border-radius: 6px; cursor: pointer; font-size: 14px; }
.choice input { accent-color: var(--acc); }

/* ---------- mobile ---------- */
/* When the tabs do not fit next to the brand and the user box, they get a
   row of their own instead of disappearing into a horizontal scroll. */
@media (max-width: 1100px) {
  .topbar { height: auto; min-height: 60px; flex-wrap: wrap; row-gap: 0; }
  .nav { order: 3; width: 100%; height: 48px; flex-grow: 0; }
  .nav a { height: 48px; }
  .wordmark.sm, .userbox { min-height: 56px; }
  .userbox { margin-left: auto; }
}
@media (max-width: 900px) {
  .split, .queue, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .border-left { padding-left: 0; border-left: 0; }
}
@media (max-width: 760px) {
  .topbar { padding: 0 16px; gap: 16px; }
  .nav { height: 44px; }
  .nav a { height: 44px; margin-right: 20px; }
  .userbox .who, .userbox .chip { display: none; }
  .wordmark.sm, .userbox { min-height: 52px; }
  main.page { padding: 20px 16px 32px; }
  .pagehead { align-items: stretch; }
  .w-240, .w-280, .w-300, .w-320 { width: 100%; }
  .filters .count { margin-left: 0; width: 100%; }
  .kv { grid-template-columns: minmax(0, 1fr); row-gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .rules, .codes { grid-template-columns: minmax(0, 1fr); }
  /* Tables fall back to cards: one card per row, labels from data-label. */
  .tbl.responsive thead { display: none; }
  .tbl.responsive, .tbl.responsive tbody, .tbl.responsive tr, .tbl.responsive td { display: block; width: 100%; }
  .tbl.responsive tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .tbl.responsive tr:last-child { border-bottom: 0; }
  .tbl.responsive td { padding: 4px 0; border: 0; text-align: left; }
  .tbl.responsive td.num, .tbl.responsive td.actions { text-align: left; }
  .tbl.responsive td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: var(--muted); }
  .tbl.responsive td.actions { padding-top: 10px; }
  .tbl.responsive tr.detail td { padding: 12px 14px; }
  .code-boxes .input { width: 44px; height: 52px; }
}
