/*
 * styles.css — Zumrasha Inspect.
 *
 * Tokens and metrics follow the approved design handoff. Depth is expressed
 * with surface tints and 1px borders only: there are no shadows anywhere.
 * The layout targets a 402 x 874pt phone; on wider screens the app is centred
 * in a phone-width column rather than stretched, because every screen is a
 * single vertical list designed for a thumb.
 */

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02AF, U+0304-0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-latin-ext-500-normal.woff2') format('woff2');
  unicode-range: U+0100-02AF, U+0304-0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-latin-600-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-latin-ext-600-normal.woff2') format('woff2');
  unicode-range: U+0100-02AF, U+0304-0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #0d0d0f;
  --surface: #15151a;
  --raised: #1b1b24;
  --selected: #1f1f2b;
  --disabled: #1f1f24;
  --back: #1b1b1e;
  --viewfinder: #111116;

  --ink: #e9e9ee;
  --ink-2: rgba(233, 233, 238, .5);
  --ink-3: rgba(233, 233, 238, .45);
  --ink-4: rgba(233, 233, 238, .4);
  --ink-5: rgba(233, 233, 238, .35);

  --accent: #c6c6e8;
  --on-accent: #1b1b28;

  --ok: #6fbf8f;
  --ok-bg: #121c17;
  --ok-bg-2: #14251c;
  --bad: #e8635f;
  --bad-bg: #1d1214;
  --bad-bg-2: #251717;
  --neutral: #8a8a95;
  --neutral-bg: #17171a;
  --warn: #f0d8ab;
  --warn-bg: #2e2617;

  --border: rgba(255, 255, 255, .09);
  --border-strong: rgba(255, 255, 255, .16);
  --border-input: rgba(255, 255, 255, .2);
  --border-active: rgba(198, 198, 232, .45);
  --border-active-2: rgba(198, 198, 232, .5);
  --hairline: rgba(255, 255, 255, .07);

  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #08080a;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

button, input, textarea, select {
  font-family: inherit;
  color: inherit;
}

/* The app column. On a phone it is the whole viewport. */
#app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 440px;
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
  position: relative;
}

.mono { font-family: var(--mono); letter-spacing: .04em; }

/* ------------------------------------------------------------------ *
 * Top bar
 * ------------------------------------------------------------------ */

.topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(14px + var(--safe-top)) 12px 10px;
  background: var(--bg);
  border-bottom: 1px solid var(--hairline);
}

.topbar .titles { flex: 1 1 auto; min-width: 0; }

.topbar h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: .02em;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar .crumb {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.icon-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--back);
  border: 0;
  cursor: pointer;
}

.icon-btn.small { width: 38px; height: 38px; }
.icon-btn svg { width: 20px; height: 20px; }

.lang-chip {
  flex: 0 0 auto;
  min-width: 46px;
  height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  cursor: pointer;
}

/* ------------------------------------------------------------------ *
 * Body and footer
 * ------------------------------------------------------------------ */

.screen {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 20px;
}

.screen::-webkit-scrollbar { display: none; }

.footer {
  flex: 0 0 auto;
  padding: 11px 14px calc(30px + var(--safe-bottom));
  background: var(--bg);
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-primary {
  width: 100%;
  min-height: 58px;
  border-radius: 12px;
  border: 0;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary[disabled] {
  background: var(--disabled);
  color: var(--ink-5);
  cursor: default;
}

.btn-secondary {
  width: 100%;
  min-height: 52px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .18);
  color: var(--ink);
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-secondary.done { border-color: rgba(111, 191, 143, .5); color: var(--ok); }

.gate {
  background: var(--warn-bg);
  color: var(--warn);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.35;
}

/* ------------------------------------------------------------------ *
 * Shared blocks
 * ------------------------------------------------------------------ */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}

.row-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  min-height: 82px;
  color: inherit;
  cursor: pointer;
}

.row-card.selected { border-color: var(--border-active); }
.row-card .grow { flex: 1 1 auto; min-width: 0; }

.code-chip {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: .04em;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .18);
  flex: 0 0 auto;
}

.row-card.selected .code-chip { color: var(--accent); border-color: var(--border-active); }

.name { font-size: 18px; line-height: 1.2; }
.sub { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.chev { color: var(--ink-3); flex: 0 0 auto; }

.section-head {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .7);
}

.group-title {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-4);
}

.hint { font-size: 11.5px; color: var(--ink-3); }

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(233, 233, 238, .35);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.divider::before, .divider::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  background: var(--hairline);
}

/* ------------------------------------------------------------------ *
 * Login
 * ------------------------------------------------------------------ */

.login {
  padding: 52px 22px 26px;
  gap: 20px;
}

.lang-row { display: flex; justify-content: flex-end; gap: 6px; }

.lang-pick {
  min-width: 42px;
  min-height: 32px;
  border-radius: 9px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .14);
  color: rgba(233, 233, 238, .6);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  cursor: pointer;
}

.lang-pick.on {
  background: var(--selected);
  color: var(--ink);
  border-color: rgba(198, 198, 232, .5);
}

.logo-wrap { text-align: center; padding: 10px 0 6px; }
.logo-wrap img { width: 140px; height: auto; }

.field { position: relative; }

.field > label {
  position: absolute;
  top: -8px;
  left: 13px;
  padding: 0 6px;
  background: var(--bg);
  font-size: 11.5px;
  color: rgba(233, 233, 238, .55);
  pointer-events: none;
}

.field input, .field textarea {
  width: 100%;
  min-height: 56px;
  border-radius: 12px;
  border: 1px solid var(--border-input);
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  padding: 16px;
}

.field textarea { min-height: 80px; resize: vertical; line-height: 1.4; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--border-active-2); }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-5); }

.field.warn > label { color: var(--warn); }
.field.warn textarea, .field.warn input { border-color: rgba(240, 216, 171, .45); }

.check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: 15px;
  cursor: pointer;
}

.tick {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 2px solid rgba(255, 255, 255, .28);
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tick.on { background: var(--ok); border-color: var(--ok); }
.tick svg { display: none; }
.tick.on svg { display: block; }

/* ------------------------------------------------------------------ *
 * QR
 * ------------------------------------------------------------------ */

.qr-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 72px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--raised);
  border: 1px solid rgba(198, 198, 232, .4);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.qr-tile {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--bg);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.qr-tile svg { width: 22px; height: 22px; }

.viewfinder {
  position: relative;
  height: 270px;
  border-radius: 16px;
  background: var(--viewfinder);
  border: 1px solid rgba(255, 255, 255, .08);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.viewfinder video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.frame {
  position: relative;
  width: 186px;
  height: 186px;
  border-radius: 14px;
  border: 2px solid rgba(198, 198, 232, .55);
  overflow: hidden;
}

.frame.found { border-color: var(--ok); }

.beam {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 150px;
  height: 2px;
  margin-left: -75px;
  background: var(--accent);
  animation: zscan 1.5s ease-in-out infinite alternate;
}

.frame.found .beam { display: none; }

@keyframes zscan {
  from { transform: translateY(-92px); }
  to { transform: translateY(92px); }
}

.vf-status {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  text-align: center;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-2);
}

.rise { animation: zrise .2s ease-out; }

@keyframes zrise {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.result {
  background: var(--surface);
  border: 1px solid rgba(111, 191, 143, .35);
  border-radius: 12px;
  padding: 15px;
}

.result-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.result-head .tag {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-2);
}

.kv {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--hairline);
}

.kv:first-of-type { border-top: 0; }
.kv .k { width: 104px; flex: 0 0 auto; font-size: 12px; color: var(--ink-3); }
.kv .v { font-size: 14px; }

/* ------------------------------------------------------------------ *
 * Grids and pickers
 * ------------------------------------------------------------------ */

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.cell {
  min-height: 56px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: inherit;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: .04em;
  cursor: pointer;
}

.cell.on { background: var(--selected); border-color: var(--border-active-2); }

.group { display: flex; flex-direction: column; gap: 9px; }
.groups { display: flex; flex-direction: column; gap: 16px; }

.stripe-card {
  position: relative;
  padding-left: 20px;
  min-height: 80px;
  overflow: hidden;
}

.stripe-card .stripe {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.stripe-card .code-chip {
  min-width: 34px;
  text-align: center;
  font-size: 12px;
}

.sys-row {
  min-height: 64px;
  padding: 12px 14px;
  gap: 12px;
}

.sys-row .code {
  width: 32px;
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 15px;
}

.sys-row.selected { background: var(--raised); }
.sys-row.selected .code { color: var(--accent); }

/* ------------------------------------------------------------------ *
 * Daily form
 * ------------------------------------------------------------------ */

.summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, .08);
}

.summary .title { font-size: 13.5px; }
.summary .big { font-family: var(--mono); font-size: 21px; color: var(--accent); margin-left: auto; }

.stage-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.stage-btn {
  min-height: 52px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.stage-btn.on { background: var(--selected); border-color: var(--border-active-2); }
.stage-btn .c { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.stage-btn .n { font-size: 13px; }

.prow { display: flex; flex-direction: column; gap: 11px; }
.prow.active { border-color: rgba(198, 198, 232, .3); }
.prow .head { display: flex; align-items: baseline; gap: 10px; }
.prow .label { font-size: 14.5px; flex: 1 1 auto; }
.prow .val { font-family: var(--mono); font-size: 20px; }
.prow .val.zero { color: var(--ink-5); }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 34px;
  background: transparent;
  margin: 0;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .12);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: -11px;
  border: 0;
}

input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .12);
}

input[type="range"]::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  border: 0;
}

.presets { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }

.preset {
  min-height: 46px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: inherit;
  font-family: var(--mono);
  font-size: 13px;
  cursor: pointer;
}

.preset.on { background: var(--selected); border-color: var(--border-active); color: var(--accent); }

.crew-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--hairline);
}

.crew-row .label { flex: 1 1 auto; font-size: 14px; }
.crew-row .n { width: 30px; text-align: center; font-family: var(--mono); font-size: 18px; }

.step {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: inherit;
  font-size: 20px;
  cursor: pointer;
  flex: 0 0 auto;
}

.step.plus { background: var(--raised); color: var(--accent); border-color: rgba(198, 198, 232, .35); }

/* ------------------------------------------------------------------ *
 * Photos
 * ------------------------------------------------------------------ */

.photo-strip { display: flex; gap: 8px; align-items: flex-start; }

.photo-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1 1 auto;
}

.photo-scroll::-webkit-scrollbar { display: none; }

.cam {
  width: 88px;
  height: 88px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--raised);
  border: 1px solid rgba(198, 198, 232, .35);
  color: var(--accent);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 11.5px;
}

.cam.sm { width: 84px; height: 84px; }
.cam svg { width: 22px; height: 22px; }

.thumb {
  position: relative;
  width: 88px;
  height: 88px;
  flex: 0 0 auto;
  border-radius: 10px;
  overflow: hidden;
  background: #1e1e23;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.thumb .stamp {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(8, 8, 10, .72);
  font-family: var(--mono);
  font-size: 8.5px;
  padding: 2px 4px;
  text-align: left;
}

.thumb .x {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(8, 8, 10, .72);
  color: var(--ink);
  font-size: 12px;
  line-height: 20px;
  text-align: center;
}

/* ------------------------------------------------------------------ *
 * Check runner
 * ------------------------------------------------------------------ */

.check-head { display: flex; align-items: baseline; gap: 8px; }
.check-head .counter { font-family: var(--mono); font-size: 12px; }
.check-head .scope { flex: 1 1 auto; min-width: 0; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.check-head .pct { font-family: var(--mono); font-size: 12px; color: var(--accent); }

.bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }

.question {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  padding: 16px;
  font-size: 19px;
  line-height: 1.35;
  text-wrap: pretty;
}

.answers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.ans {
  min-height: 66px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.ans .g { font-size: 19px; }
.ans .l { font-size: 14px; }

.ans.yes.on { background: var(--ok-bg); border-color: rgba(111, 191, 143, .5); color: var(--ok); }
.ans.no.on { background: var(--bad-bg); border-color: rgba(232, 99, 95, .5); color: var(--bad); }
.ans.na.on { background: var(--neutral-bg); border-color: rgba(138, 138, 149, .5); color: var(--neutral); }

.nav-row { display: flex; gap: 8px; }
.nav-row .btn-secondary { min-width: 92px; min-height: 54px; width: auto; flex: 0 0 auto; }
.nav-row .btn-primary { min-height: 54px; }

/* ------------------------------------------------------------------ *
 * Test record and sign-off
 * ------------------------------------------------------------------ */

.field-group { display: flex; flex-direction: column; gap: 14px; }
.fg-caption { font-size: 11.5px; color: rgba(233, 233, 238, .55); margin-bottom: 6px; }
.fg-field input { min-height: 56px; font-size: 15px; }

.result-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.result-btn {
  min-height: 66px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.result-btn.pass.on { background: var(--ok-bg); border-color: rgba(111, 191, 143, .5); color: var(--ok); }
.result-btn.fail.on { background: var(--bad-bg); border-color: rgba(232, 99, 95, .5); color: var(--bad); }

.doc-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 15px;
}

.doc-strip .no { font-family: var(--mono); font-size: 14px; word-break: break-all; }
.doc-strip .meta { font-size: 12px; color: var(--ink-2); margin-top: 5px; }

.sign-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.sign-row.on { border-color: rgba(111, 191, 143, .35); }
.sign-row .role { font-size: 14px; }
.sign-row .who { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }

.chip {
  margin-left: auto;
  border-radius: 7px;
  padding: 5px 9px;
  font-size: 11.5px;
  background: rgba(255, 255, 255, .07);
  color: var(--ink-2);
  flex: 0 0 auto;
}

.chip.ok { background: var(--ok-bg); color: var(--ok); }

/* ------------------------------------------------------------------ *
 * Export
 * ------------------------------------------------------------------ */

.export { padding: 22px 16px 20px; gap: 16px; }
.success { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }

.success .ring {
  width: 76px;
  height: 76px;
  border-radius: 38px;
  background: var(--ok-bg-2);
  border: 2px solid var(--ok);
  color: var(--ok);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.success .ring svg { width: 36px; height: 36px; }
.success h2 { margin: 0; font-size: 23px; font-weight: 600; }
.success .no { font-family: var(--mono); font-size: 12px; color: var(--ok); word-break: break-all; }
.success p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); max-width: 270px; }

.file-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 14px;
}

.ext {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
}

.ext.xlsx { background: var(--ok-bg-2); color: var(--ok); }
.ext.pdf { background: var(--bad-bg-2); color: var(--bad); }

.file-card .fname { font-size: 13px; word-break: break-all; }
.file-card .fmeta { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-top: 3px; }

.dl {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  border: 0;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex: 0 0 auto;
}

.dl.done { background: transparent; border: 1px solid rgba(111, 191, 143, .5); color: var(--ok); }

/* ------------------------------------------------------------------ *
 * Overlays
 * ------------------------------------------------------------------ */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--safe-bottom));
  transform: translateX(-50%) translateY(8px);
  background: var(--raised);
  border: 1px solid var(--border-strong);
  color: var(--ink);
  border-radius: 10px;
  padding: 11px 15px;
  font-size: 13px;
  max-width: 340px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 40;
}

.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

.busy {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 10, .72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.busy[hidden] { display: none; }

.busy .card { display: flex; align-items: center; gap: 12px; font-size: 14px; }

.spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(198, 198, 232, .25);
  border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .beam, .spinner, .rise { animation: none; }
}
