/* ==========================================================================
   Exicom technical support — interface styles
   Self-contained: no framework, no web fonts, no CDN.
   Sections: tokens · base · header · layout · components · forms ·
             complaint flow · tickets · ticket detail · utilities · responsive
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;

  --bg: #f2f5f3;
  --surface: #ffffff;
  --surface-2: #f7f9f8;
  --surface-3: #edf1ef;
  --line: #e0e6e3;
  --line-strong: #bfc9c5;
  --ink: #121c18;
  --muted: #53635d;
  --faint: #7a8883;

  --primary: #0a6b4e;
  --primary-hover: #085a41;
  --primary-soft: #e2f3ec;
  --on-primary: #ffffff;

  --header: #0d1a16;
  --header-line: #1c2d27;
  --header-ink: #eaf1ee;
  --header-muted: #9db1a9;

  --danger: #a3281c;
  --danger-soft: #fdebe8;
  --danger-line: #f1c4be;
  --warn: #8a4b00;
  --warn-soft: #fff3d6;
  --warn-line: #f0d9a0;
  --ok: #0a6b4e;
  --ok-soft: #e2f3ec;
  --ok-line: #bfe2d3;
  --info: #1c4f8c;
  --info-soft: #e7f0fb;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(18, 28, 24, 0.06);
  --shadow: 0 1px 2px rgba(18, 28, 24, 0.05), 0 8px 24px rgba(18, 28, 24, 0.06);
  --ring: 0 0 0 3px rgba(10, 107, 78, 0.28);

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1311;
    --surface: #131d19;
    --surface-2: #17231e;
    --surface-3: #1d2b25;
    --line: #25352e;
    --line-strong: #3a4f46;
    --ink: #e8efec;
    --muted: #a0b2aa;
    --faint: #7d8f87;

    --primary: #3ccb9b;
    --primary-hover: #5ad8ae;
    --primary-soft: #14352a;
    --on-primary: #04130d;

    --header: #091210;
    --header-line: #16251f;

    --danger: #ff9a8d;
    --danger-soft: #3a1c18;
    --danger-line: #6a2e27;
    --warn: #f3c46b;
    --warn-soft: #3a2c10;
    --warn-line: #66511f;
    --ok: #5ad8ae;
    --ok-soft: #14352a;
    --ok-line: #24604b;
    --info: #8db8f0;
    --info-soft: #172a42;

    --shadow-sm: none;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    --ring: 0 0 0 3px rgba(60, 203, 155, 0.35);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; }

h1 { font-size: 1.75rem; line-height: 1.2; font-weight: 700; letter-spacing: -0.015em; }
h2 { font-size: 1.05rem; line-height: 1.3; font-weight: 650; }
h3 { font-size: 0.95rem; font-weight: 650; }

a { color: var(--primary); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

img, svg { max-width: 100%; }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

.icon { flex: none; width: 1.25em; height: 1.25em; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -999px; top: 0; z-index: 50;
  background: var(--surface); color: var(--ink);
  padding: 0.7rem 1rem; border-radius: 0 0 var(--radius-sm) 0; font-weight: 600;
}
.skip:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  background: var(--header);
  color: var(--header-ink);
  border-bottom: 1px solid var(--header-line);
  position: sticky; top: 0; z-index: 30;
}

.header-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 64px;
}

.brand {
  display: inline-flex; align-items: center; gap: 0.7rem;
  color: #fff; text-decoration: none; min-height: 44px;
  font-weight: 700; font-size: 1.1rem; letter-spacing: -0.005em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(145deg, #12a579, #0a6b4e);
  color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.brand-mark .icon { width: 20px; height: 20px; fill: currentColor; stroke-width: 1.4; }
.brand-name span { color: var(--header-muted); font-weight: 500; margin-left: 0.3rem; }

.header-actions { display: flex; align-items: center; gap: 0.35rem; }

.header-link {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px;
  padding: 0.35rem 0.85rem; border-radius: var(--radius-sm);
  color: var(--header-ink); text-decoration: none; font-weight: 550; font-size: 0.95rem;
}
.header-link:hover { background: rgba(255, 255, 255, 0.08); text-decoration: none; }
.header-link.is-current { background: rgba(255, 255, 255, 0.12); }
.header-link:focus-visible, .btn-ghost:focus-visible, .brand:focus-visible { outline-color: #7fe0bd; }

.user-chip {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.25rem 0.75rem 0.25rem 0.3rem; margin-left: 0.4rem;
  border-radius: 999px; background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.avatar {
  display: grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: 50%;
  background: #1f8a68; color: #fff; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.user-name { font-size: 0.85rem; font-weight: 600; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-role { font-size: 0.72rem; color: var(--header-muted); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 0.45rem; min-height: 44px;
  padding: 0.35rem 0.8rem; background: transparent; color: var(--header-ink);
  border: 1px solid rgba(255, 255, 255, 0.22); border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.92rem;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

/* ---------- Layout ---------- */
.app-wrap { width: min(1120px, calc(100% - 3rem)); margin-inline: auto; }
.page { flex: 1 0 auto; padding: 2rem 0 3.5rem; }

.app-foot {
  display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; justify-content: space-between;
  padding: 1.25rem 0 2rem; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 0.875rem;
}

.sheet { max-width: 34rem; margin-inline: auto; }
.sheet-wide { max-width: 40rem; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.card-pad { padding: 1.75rem; }
.card + .card { margin-top: 1rem; }

.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--line);
}
.card-head h2 { display: flex; align-items: center; gap: 0.55rem; }
.card-head .icon { color: var(--muted); }
.card-body { padding: 1.25rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--primary);
}

.lead { color: var(--muted); font-size: 1.05rem; margin-top: 0.6rem; }
.title-block { margin-bottom: 1.5rem; }
.title-block .lead { max-width: 38rem; }

/* ---------- Alerts ---------- */
.alert {
  display: flex; gap: 0.75rem; align-items: flex-start;
  padding: 0.85rem 1rem; margin: 0 0 1.25rem;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  font-size: 0.97rem;
}
.alert .icon { margin-top: 0.12rem; }
.alert-body { flex: 1; min-width: 0; }
.alert-title { font-weight: 650; }
.alert-danger { background: var(--danger-soft); border-color: var(--danger-line); color: var(--danger); }
.alert-success { background: var(--ok-soft); border-color: var(--ok-line); color: var(--ok); }
.alert-info { background: var(--info-soft); border-color: transparent; color: var(--info); }
.alert-close {
  flex: none; display: grid; place-items: center; width: 32px; height: 32px; margin: -0.3rem -0.4rem -0.3rem 0;
  background: transparent; border: 0; border-radius: 6px; color: inherit; opacity: 0.7;
}
.alert-close:hover { opacity: 1; background: rgba(0, 0, 0, 0.06); }
.alert:focus-visible { outline-color: currentColor; }

.error-list { list-style: none; display: grid; gap: 0.25rem; }
.error-list a { color: inherit; font-weight: 550; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 46px; padding: 0.55rem 1.2rem;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  font-weight: 650; text-decoration: none; line-height: 1.2;
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.05s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-hover); color: var(--on-primary); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--surface-3); color: var(--ink); }
.btn-sm { min-height: 38px; padding: 0.35rem 0.8rem; font-size: 0.9rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-busy { opacity: 0.65; pointer-events: none; }
.btn .spinner { display: none; }
.btn.is-busy .spinner { display: inline-block; }
.btn.is-busy .btn-label-idle { display: none; }

.spinner {
  width: 1em; height: 1em; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.link-btn {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.25rem 0.1rem;
  background: none; border: 0; color: var(--primary); font-weight: 600; text-decoration: underline;
  text-underline-offset: 0.18em;
}

.icon-btn {
  display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px;
  background: transparent; border: 1px solid transparent; border-radius: 8px; color: var(--muted);
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.icon-btn.is-done { color: var(--ok); }

.actions { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 0.75rem; margin-top: 1.75rem; }

/* ---------- Forms ---------- */
.field { margin: 0 0 1.35rem; position: relative; }
.field:last-child { margin-bottom: 0; }

.form-label {
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem;
  margin: 0 0 0.4rem; font-weight: 650; font-size: 0.95rem;
}
.opt { font-weight: 500; font-size: 0.8rem; color: var(--muted); }
.req { color: var(--danger); margin-left: 0.15rem; }

.form-control, .form-select {
  display: block; width: 100%; min-height: 48px; padding: 0.6rem 0.85rem;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  line-height: 1.4; transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control::placeholder { color: var(--faint); }
.form-control:hover, .form-select:hover { border-color: var(--faint); }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: var(--ring); outline: none; }
textarea.form-control { min-height: 10rem; resize: vertical; }
.form-select {
  appearance: none; padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2353635d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.8rem center; background-size: 1.1rem;
}
.form-control[readonly] { background: var(--surface-3); color: var(--muted); cursor: not-allowed; }

.field.has-error .form-control, .field.has-error .form-select { border-color: var(--danger); }
.field.has-error .form-control:focus { box-shadow: 0 0 0 3px rgba(163, 40, 28, 0.22); }
.field-error {
  display: none; align-items: center; gap: 0.4rem; margin-top: 0.4rem;
  color: var(--danger); font-size: 0.9rem; font-weight: 550;
}
.field-error .icon { width: 1.05em; height: 1.05em; }
.field.has-error .field-error { display: flex; }

.hint { margin-top: 0.4rem; color: var(--muted); font-size: 0.9rem; }
.hint a { font-weight: 550; }
.counter { margin-top: 0.4rem; text-align: right; color: var(--muted); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.counter.is-near { color: var(--warn); }

.input-affix { position: relative; }
.input-affix .form-control { padding-right: 3rem; }
.input-affix .icon-btn { position: absolute; right: 6px; top: 6px; }

.readonly-lock { position: relative; }
.readonly-lock .form-control { padding-left: 2.6rem; }
.readonly-lock .icon { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }

.form-foot { margin-top: 1.25rem; text-align: center; color: var(--muted); font-size: 0.93rem; }

/* Choice cards (priority) */
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.65rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice-body {
  display: flex; flex-direction: column; gap: 0.15rem; height: 100%;
  padding: 0.8rem 0.95rem 0.8rem 2.6rem; position: relative;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}
.choice-body::before {
  content: ""; position: absolute; left: 0.9rem; top: 1rem; width: 1.15rem; height: 1.15rem;
  border: 2px solid var(--line-strong); border-radius: 50%; background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
.choice:hover .choice-body { border-color: var(--faint); }
.choice input:checked + .choice-body { border-color: var(--primary); background: var(--primary-soft); }
.choice input:checked + .choice-body::before { border-color: var(--primary); background: var(--primary); box-shadow: inset 0 0 0 3px var(--primary-soft); }
.choice input:focus-visible + .choice-body { box-shadow: var(--ring); }
.choice-title { font-weight: 650; display: flex; align-items: center; gap: 0.5rem; }
.choice-desc { font-size: 0.86rem; color: var(--muted); line-height: 1.35; }
.dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }
.dot-high { color: var(--danger); }
.dot-normal { color: var(--info); }
.dot-low { color: var(--faint); }
.dot-none { color: var(--line-strong); }

/* File dropzone */
.dropzone {
  position: relative; display: block;
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface-2); transition: border-color 0.15s, background-color 0.15s;
}
.dropzone .dz-ui { display: none; }
.js .dropzone { padding: 1.1rem 1rem; }
.js .dropzone .dz-ui { display: flex; align-items: center; gap: 0.85rem; }
.js .dropzone input[type="file"] {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; padding: 0; min-height: 0;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--primary); background: var(--primary-soft); }
.dropzone:focus-within { border-color: var(--primary); box-shadow: var(--ring); }
.dz-icon { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--primary); }
.dz-text { min-width: 0; }
.dz-title { display: block; font-weight: 600; font-size: 0.96rem; }
.dz-title u { color: var(--primary); text-decoration-thickness: 1px; }
.dz-sub { display: block; font-size: 0.84rem; color: var(--muted); }

.file-chips { list-style: none; display: grid; gap: 0.4rem; margin-top: 0.6rem; }
.file-chips:empty { display: none; }
.file-chip {
  display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0.4rem 0.4rem 0.7rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 0.92rem;
}
.file-chip .icon { color: var(--muted); }
.file-chip-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip-size { color: var(--muted); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.file-chip.is-bad { border-color: var(--danger-line); background: var(--danger-soft); color: var(--danger); }
.file-chip.is-bad .icon, .file-chip.is-bad .file-chip-size { color: inherit; }
.file-chip-note { font-size: 0.8rem; font-weight: 600; }

fieldset.field { border: 0; padding: 0; margin: 0 0 1.35rem; min-width: 0; }
fieldset.field > legend { padding: 0; width: 100%; }

.section-split { margin: 1.75rem 0 1.35rem; padding-top: 1.35rem; border-top: 1px solid var(--line); }
.section-split h2 { margin-bottom: 0.25rem; }
.section-split p { color: var(--muted); font-size: 0.93rem; }

/* ---------- Customer start (email) ---------- */
.start { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 3.5rem; align-items: start; padding-top: 1rem; }
.start h1 { font-size: 2.35rem; letter-spacing: -0.025em; }
.start .lead { font-size: 1.12rem; margin-top: 1rem; max-width: 32rem; }

.how { list-style: none; margin-top: 2.25rem; display: grid; gap: 1.1rem; counter-reset: how; }
.how li { display: grid; grid-template-columns: 2.4rem 1fr; gap: 0.9rem; align-items: start; counter-increment: how; }
.how li::before {
  content: counter(how); display: grid; place-items: center; width: 2.4rem; height: 2.4rem;
  border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 700;
}
.how strong { display: block; }
.how span { color: var(--muted); font-size: 0.95rem; }

.ready-note {
  margin-top: 2rem; padding: 1rem 1.15rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); font-size: 0.93rem; color: var(--muted);
}
.ready-note strong { color: var(--ink); display: block; margin-bottom: 0.25rem; }

.start-card { padding: 1.75rem; box-shadow: var(--shadow); }
.start-card h2 { font-size: 1.25rem; margin-bottom: 0.35rem; }
.start-card > p { color: var(--muted); margin-bottom: 1.5rem; font-size: 0.97rem; }

/* ---------- Support code ---------- */
.code-card {
  margin: 0 0 1.6rem; padding: 1.1rem 1.15rem 1rem; text-align: center;
  background: var(--primary-soft); border: 1px solid var(--ok-line); border-radius: var(--radius);
}
.code-for { font-size: 0.9rem; color: var(--muted); overflow-wrap: anywhere; }
.code-value {
  margin: 0.4rem 0 0.2rem; font-family: var(--mono); font-size: 2.5rem; font-weight: 700;
  letter-spacing: 0.22em; padding-left: 0.22em; line-height: 1.15; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.code-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.4rem 0.9rem; margin-top: 0.4rem; }
.code-expiry { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.88rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.code-expiry.is-low { color: var(--warn); font-weight: 600; }
.code-input {
  text-align: center; font-family: var(--mono); font-size: 1.6rem; font-weight: 600;
  letter-spacing: 0.4em; padding-left: 0.4em; min-height: 58px; font-variant-numeric: tabular-nums;
}
.code-input::placeholder { letter-spacing: 0.4em; }

/* ---------- Complaint flow ---------- */
.stepper { list-style: none; display: flex; margin: 0 0 1.75rem; }
.stepper li { flex: 1 1 0; position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.45rem; text-align: center; min-width: 0; color: var(--muted); font-size: 0.86rem; }
.stepper li::before {
  content: ""; position: absolute; top: 15px; right: 50%; width: 100%; height: 2px; background: var(--line-strong); z-index: 0;
}
.stepper li:first-child::before { display: none; }
.stepper li.is-done::before, .stepper li.is-current::before { background: var(--primary); }
.step-index {
  position: relative; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line-strong); font-weight: 700; font-size: 0.85rem;
}
.step-index .icon { width: 16px; height: 16px; stroke-width: 2.6; }
.stepper .is-done { color: var(--primary); }
.stepper .is-done .step-index { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.stepper .is-current { color: var(--ink); font-weight: 650; }
.stepper .is-current .step-index { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.step-count { display: none; }

.flow-head { margin-bottom: 1.5rem; }
.flow-head .eyebrow { margin-bottom: 0.35rem; }
.flow-head h1 { font-size: 1.6rem; }
.flow-head .lead { font-size: 1rem; margin-top: 0.4rem; }

/* Sent */
.done-card { text-align: center; padding: 2.5rem 1.75rem 2rem; }
.done-badge {
  display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 1.25rem;
  border-radius: 50%; background: var(--ok-soft); color: var(--ok);
}
.done-badge .icon { width: 32px; height: 32px; stroke-width: 2.2; }
.ticket-no {
  display: inline-flex; align-items: center; gap: 0.5rem; margin: 1.25rem 0 0.25rem; padding: 0.55rem 0.55rem 0.55rem 1.2rem;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: var(--mono); font-size: 1.5rem; font-weight: 700; letter-spacing: 0.04em;
}
.next-list { list-style: none; text-align: left; margin: 2rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--line); display: grid; gap: 1rem; }
.next-list li { display: grid; grid-template-columns: 1.6rem 1fr; gap: 0.75rem; color: var(--muted); font-size: 0.95rem; }
.next-list .icon { color: var(--primary); margin-top: 0.1rem; }
.next-list strong { color: var(--ink); display: block; }

.notice-card { text-align: center; padding: 2.5rem 1.75rem 2rem; }
.notice-icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 1.1rem; border-radius: 50%; background: var(--surface-3); color: var(--muted); }
.notice-icon.is-warn { background: var(--warn-soft); color: var(--warn); }
.notice-icon .icon { width: 28px; height: 28px; }
.notice-card .lead { margin-bottom: 1.5rem; }
.notice-card .actions { justify-content: center; flex-direction: row; margin-top: 1.5rem; }

/* Auth */
.auth-head { text-align: center; margin-bottom: 1.5rem; }
.auth-head .brand-mark { margin: 0 auto 1rem; width: 48px; height: 48px; border-radius: 14px; }
.auth-head .brand-mark .icon { width: 26px; height: 26px; }
.auth-head .lead { font-size: 0.98rem; }
.pw-rules { list-style: none; display: grid; gap: 0.3rem; margin-top: 0.6rem; font-size: 0.88rem; color: var(--muted); }
.pw-rules li { display: flex; align-items: center; gap: 0.45rem; }
.pw-rules .icon { width: 1em; height: 1em; opacity: 0.35; }
.pw-rules li.is-met { color: var(--ok); }
.pw-rules li.is-met .icon { opacity: 1; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.15rem 0.6rem 0.15rem 0.5rem;
  border-radius: 999px; font-size: 0.8rem; font-weight: 650; line-height: 1.5; white-space: nowrap;
  background: var(--surface-3); color: var(--muted);
}
.badge .dot { width: 0.5rem; height: 0.5rem; }
.badge-open { background: var(--warn-soft); color: var(--warn); }
.badge-assigned { background: var(--ok-soft); color: var(--ok); }
.badge-pending { background: var(--info-soft); color: var(--info); }
.badge-closed { background: var(--surface-3); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.badge-high { background: var(--danger-soft); color: var(--danger); }
.badge-normal { background: var(--info-soft); color: var(--info); }
.badge-low, .badge-none { background: var(--surface-3); color: var(--muted); }
.badge-high .dot, .badge-normal .dot, .badge-low .dot, .badge-none .dot,
.badge-open .dot, .badge-assigned .dot, .badge-pending .dot, .badge-closed .dot { color: currentColor; }

/* ---------- Ticket list ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-head .lead { margin-top: 0.35rem; font-size: 1rem; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.85rem; margin-bottom: 1.25rem; }
.stats.stats-3 { grid-template-columns: repeat(3, 1fr); }
.stats.stats-5 { grid-template-columns: repeat(5, 1fr); }
.stat {
  display: flex; align-items: center; gap: 0.9rem; padding: 1rem 1.1rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.stat-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--surface-3); color: var(--muted); }
.stat-icon.is-warn { background: var(--warn-soft); color: var(--warn); }
.stat-icon.is-ok { background: var(--ok-soft); color: var(--ok); }
.stat-icon.is-danger { background: var(--danger-soft); color: var(--danger); }
.stat-num { display: block; font-size: 1.6rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat-label { font-size: 0.84rem; color: var(--muted); }

.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem;
  padding: 0.85rem 1rem; border-bottom: 1px solid var(--line);
}
.search { position: relative; flex: 1 1 15rem; min-width: 0; }
.search .icon { position: absolute; left: 0.8rem; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search .form-control { min-height: 42px; padding-left: 2.5rem; }

.segmented { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-3); border-radius: 10px; }
.segmented button {
  min-height: 36px; padding: 0.3rem 0.85rem; border: 0; border-radius: 8px; background: transparent;
  color: var(--muted); font-weight: 600; font-size: 0.9rem; white-space: nowrap;
}
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.toolbar .form-select { width: auto; min-height: 42px; padding-top: 0.4rem; padding-bottom: 0.4rem; }

.table-card { overflow: hidden; }
.table-wrap { overflow-x: auto; }

.ticket-table { width: 100%; border-collapse: collapse; }
.ticket-table th, .ticket-table td { text-align: left; vertical-align: middle; padding: 0.9rem 1rem; border-bottom: 1px solid var(--line); }
.ticket-table th {
  padding-top: 0.65rem; padding-bottom: 0.65rem; background: var(--surface-2);
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.ticket-table tbody tr:last-child td { border-bottom: 0; }
.ticket-table tbody tr[data-href] { cursor: pointer; }
.ticket-table tbody tr:hover { background: var(--surface-2); }
.ticket-table tbody tr[hidden] { display: none; }

.t-no { font-family: var(--mono); font-weight: 650; font-size: 0.9rem; white-space: nowrap; }
.t-no a { color: var(--ink); text-decoration: none; }
.t-no a:hover { color: var(--primary); text-decoration: underline; }
.t-subject { font-weight: 600; color: var(--ink); text-decoration: none; display: block; overflow-wrap: anywhere; }
.t-subject:hover { color: var(--primary); text-decoration: underline; }
.t-sub { color: var(--muted); font-size: 0.86rem; overflow-wrap: anywhere; }
.t-status { display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem; }
.t-assignee { color: var(--muted); font-size: 0.84rem; }
.t-date { white-space: nowrap; font-size: 0.92rem; }
.t-wait { display: block; font-size: 0.8rem; color: var(--warn); font-weight: 600; }

.result-count { padding: 0.65rem 1rem; color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--line); background: var(--surface-2); }

.empty-state { text-align: center; padding: 3.5rem 1.5rem; }
.empty-state .notice-icon { margin-bottom: 1rem; }
.empty-state p { color: var(--muted); max-width: 26rem; margin: 0.35rem auto 0; }
.no-match { display: none; }
.no-match.is-shown { display: block; }

/* ---------- Ticket detail ---------- */
.crumb { display: inline-flex; align-items: center; gap: 0.4rem; margin-bottom: 0.85rem; font-weight: 600; font-size: 0.93rem; text-decoration: none; min-height: 32px; }
.crumb:hover { text-decoration: underline; }

.ticket-head { margin-bottom: 1.5rem; }
.ticket-head-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.9rem; }
.ticket-head h1 { font-family: var(--mono); font-size: 1.5rem; letter-spacing: 0; }
.ticket-subject { margin-top: 0.5rem; font-size: 1.2rem; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.ticket-meta { margin-top: 0.4rem; color: var(--muted); font-size: 0.92rem; }
.head-actions { margin-left: auto; display: flex; gap: 0.5rem; }

.detail { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: 1.25rem; align-items: start; }
.detail-main > .card + .card, .detail-side > .card + .card { margin-top: 1.25rem; }
.detail-side { position: sticky; top: 84px; }

.prose { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1.5rem; }
.fact dt { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.15rem; }
.fact dd { display: flex; align-items: center; gap: 0.3rem; overflow-wrap: anywhere; min-height: 1.5rem; }
.fact dd .val { min-width: 0; }
.fact dd .mono { font-family: var(--mono); font-size: 0.95rem; }
.fact-wide { grid-column: 1 / -1; }
.fact .icon-btn { width: 30px; height: 30px; margin-block: -4px; }
.fact .icon-btn .icon { width: 16px; height: 16px; }
.na { color: var(--faint); }

.person { display: flex; align-items: center; gap: 0.8rem; }
.person .avatar { width: 40px; height: 40px; font-size: 0.9rem; background: var(--primary); color: var(--on-primary); }
.person .avatar.is-empty { background: var(--surface-3); color: var(--muted); }
.person-name { font-weight: 650; overflow-wrap: anywhere; }
.person-sub { color: var(--muted); font-size: 0.88rem; overflow-wrap: anywhere; }

.contact-list { list-style: none; display: grid; gap: 0.7rem; margin-top: 1rem; }
.contact-list li { display: flex; align-items: flex-start; gap: 0.65rem; font-size: 0.95rem; overflow-wrap: anywhere; }
.contact-list .icon { color: var(--muted); margin-top: 0.15rem; }

.file-list { list-style: none; }
.file-list li { display: flex; align-items: center; gap: 0.85rem; padding: 0.8rem 1.25rem; border-top: 1px solid var(--line); }
.file-list li:first-child { border-top: 0; }
.file-ico { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--surface-3); color: var(--muted); }
.file-info { flex: 1; min-width: 0; }
.file-name { display: block; font-weight: 600; overflow-wrap: anywhere; line-height: 1.35; }
.file-kind { font-size: 0.84rem; color: var(--muted); }
.card-empty { padding: 1.25rem; color: var(--muted); display: flex; gap: 0.6rem; align-items: center; }

.timeline { list-style: none; position: relative; display: grid; gap: 1.1rem; }
.timeline li { position: relative; padding-left: 1.7rem; }
.timeline li::before {
  content: ""; position: absolute; left: 0.2rem; top: 0.38rem; width: 0.7rem; height: 0.7rem;
  border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft);
}
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: calc(0.2rem + 0.3rem); top: 1.2rem; bottom: -1.2rem; width: 2px; background: var(--line); }
.timeline li.is-pending::before { background: var(--surface); box-shadow: inset 0 0 0 2px var(--line-strong); }
.timeline strong { display: block; font-size: 0.95rem; }
.timeline span { color: var(--muted); font-size: 0.86rem; }

/* ---------- Footer / misc ---------- */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 1rem); opacity: 0; pointer-events: none;
  z-index: 60; padding: 0.6rem 1rem; border-radius: 999px; background: var(--ink); color: var(--bg);
  font-size: 0.9rem; font-weight: 600; box-shadow: var(--shadow); transition: opacity 0.2s, transform 0.2s;
}
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .start { grid-template-columns: 1fr; gap: 2rem; }
  .start-copy { order: 2; }
  .start-card { order: 1; }
  .start h1 { font-size: 2rem; }
  .detail { grid-template-columns: 1fr; }
  .detail-side { position: static; }
  .stats, .stats.stats-5 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .app-wrap { width: min(1120px, calc(100% - 2rem)); }
  .page { padding: 1.25rem 0 2.5rem; }
  h1 { font-size: 1.5rem; }
  .header-bar { min-height: 58px; }
  .brand-name span { display: none; }
  .user-meta { display: none; }
  .user-chip { padding: 0.25rem; margin-left: 0; }
  .header-link .label, .btn-ghost .label {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }
  .btn-ghost { padding: 0.35rem 0.7rem; }

  .card-pad, .start-card { padding: 1.25rem; }
  .actions { flex-direction: column-reverse; align-items: stretch; }
  .actions .btn { width: 100%; }
  .notice-card .actions { flex-direction: column; }

  /* Stepper becomes a compact bar */
  .stepper { margin-bottom: 1rem; }
  .stepper li { font-size: 0; gap: 0; }
  .stepper li.is-current { font-size: 0; }
  .step-count { display: block; margin-bottom: 1rem; color: var(--muted); font-size: 0.9rem; font-weight: 600; }

  .choice-grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .stats, .stats.stats-5 { grid-template-columns: repeat(2, 1fr); gap: 0.65rem; }
  .stat { padding: 0.8rem; gap: 0.65rem; }
  .stat-icon { width: 34px; height: 34px; }
  .stat-num { font-size: 1.35rem; }
  .code-value { font-size: 2rem; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; padding-inline: 0.4rem; }
  .toolbar .form-select { width: 100%; }
  .head-actions { margin-left: 0; width: 100%; }

  .ticket-table thead { display: none; }
  .ticket-table, .ticket-table tbody { display: block; }
  .ticket-table tr {
    display: grid; grid-template-columns: 1fr auto; gap: 0.15rem 0.75rem; padding: 0.95rem 1rem;
    border-bottom: 1px solid var(--line);
  }
  .ticket-table tbody tr:last-child { border-bottom: 0; }
  .ticket-table td { display: block; padding: 0; border: 0; }
  .ticket-table td.c-no { grid-column: 1; grid-row: 1; }
  .ticket-table td.c-prio { grid-column: 2; grid-row: 1; justify-self: end; }
  .ticket-table td.c-subject { grid-column: 1 / -1; grid-row: 2; margin: 0.2rem 0 0.35rem; }
  .ticket-table td.c-status { grid-column: 1; grid-row: 3; }
  .ticket-table td.c-date { grid-column: 2; grid-row: 3; justify-self: end; text-align: right; align-self: end; }
  .t-status { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.5rem; }
}

@media (max-width: 380px) {
  .app-wrap { width: calc(100% - 1.5rem); }
  .code-value { font-size: 1.7rem; letter-spacing: 0.16em; }
}

/* ---------- Print (ticket detail) ---------- */
@media print {
  .site-header, .app-foot, .head-actions, .crumb, .assign-card, .icon-btn, .skip, .toast { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border-color: #999; break-inside: avoid; }
  .detail { grid-template-columns: 1fr; }
  .app-wrap { width: 100%; }
}

[hidden] { display: none !important; }
.icon-sm { width: 1em; height: 1em; }

a.step-index { text-decoration: none; color: inherit; }
a.step-index:hover { filter: brightness(1.08); }
.done-card .actions { justify-content: center; flex-direction: row; }
@media (max-width: 720px) { .done-card .actions { flex-direction: column; } }

/* ---------- Resend cooldown ---------- */
.cooldown-note {
  display: flex; align-items: center; gap: 0.5rem; margin: 0 0 1rem; padding: 0.6rem 0.8rem;
  background: var(--info-soft); color: var(--info); border-radius: var(--radius-sm); font-size: 0.93rem;
}
.cooldown-note strong { font-variant-numeric: tabular-nums; }
.resend { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.35rem; margin-top: 1.1rem; color: var(--muted); font-size: 0.93rem; }
.link-btn[disabled] { opacity: 0.6; cursor: not-allowed; text-decoration: none; font-variant-numeric: tabular-nums; }
.expiry-line { margin: 0 0 1.25rem; color: var(--muted); font-size: 0.93rem; }
.expiry-line .code-expiry { display: inline-flex; align-items: center; gap: 0.4rem; }
.expiry-line .code-expiry.is-low { color: var(--danger); }

/* ---------- Upload guidance ---------- */
.upload-help { margin-top: 0.4rem; }
.upload-help .hint { margin-top: 0.4rem; line-height: 1.5; }
.upload-help .hint strong { color: var(--ink); font-weight: 600; }
.help-links, .help-steps { margin: 0.5rem 0 0; padding-left: 1.25rem; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.help-links li, .help-steps li { margin-top: 0.2rem; }
.help-links a { font-weight: 550; }

/* ---------- Required-field marker ---------- */
.req { color: var(--danger); font-weight: 700; margin-left: 0.2em; }
.req-note { margin: 0.35rem 0 0; font-size: 0.88rem; color: var(--muted); }

/* ---------- Service call report: form ---------- */
.report-form .card + .card { margin-top: 1.25rem; }
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.25rem; }
.report-grid .span-2 { grid-column: 1 / -1; }
.report-sub { margin: 1.6rem 0 0.8rem; font-size: 1rem; }
.card-body > .report-sub:first-child, .card-body > .hint + .report-sub { margin-top: 0.4rem; }
.choice-grid-3 { grid-template-columns: repeat(3, 1fr); }
.choice-grid-4 { grid-template-columns: repeat(4, 1fr); }
.outcome-date-label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--muted); margin-bottom: 0.2rem; }
.check { display: inline-flex; align-items: center; gap: 0.65rem; cursor: pointer; font-weight: 550; }
.check input { width: 1.3rem; height: 1.3rem; accent-color: var(--primary); flex: none; cursor: pointer; }
.outcome { margin-bottom: 0.7rem; }
.outcome-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem;
  padding: 0.55rem 0.8rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
}
.outcome-date .form-control { width: 11.5rem; min-height: 2.5rem; padding-top: 0.3rem; padding-bottom: 0.3rem; }
.outcome-date .form-control:disabled { opacity: 0.45; cursor: not-allowed; }
.outcome.has-error .outcome-row { border-color: var(--danger); }
.item-row { display: grid; grid-template-columns: 2.1rem minmax(0, 1.5fr) minmax(0, 1fr); gap: 0 0.9rem; align-items: start; }
.item-letter { padding-top: 0.7rem; color: var(--muted); font-weight: 650; }
.item-row .form-label {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.report-actions { display: flex; justify-content: flex-end; gap: 0.75rem; margin-top: 1.5rem; }
.report-lock-note { text-align: right; margin-top: 0.6rem; }
.report-card-body { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem 1rem; flex-wrap: wrap; }
.report-card-text { margin: 0; color: var(--muted); flex: 1 1 14rem; }

/* ---------- Service call report: sheet (always light, like the paper form) ---------- */
.report-sheet {
  background: #fff; color: #111; border: 1px solid #cfd8d4; border-radius: var(--radius-sm);
  padding: 1.25rem 1.25rem 0.8rem; max-width: 52rem; margin: 0 auto; font-size: 0.95rem; line-height: 1.4;
}
.rs-title { text-align: center; font-size: 1.1rem; text-decoration: underline; margin: 0 0 0.8rem; letter-spacing: 0.03em; color: #111; }
table.rs { width: 100%; border-collapse: collapse; table-layout: fixed; margin: 0; }
table.rs + table.rs { margin-top: -1px; }
.rs th, .rs td { border: 1px solid #222; padding: 0.35rem 0.55rem; text-align: left; vertical-align: top; font-weight: 400; overflow-wrap: anywhere; }
.rs-modes { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1.1rem; }
.rs-mode { display: inline-flex; align-items: center; gap: 0.4rem; }
.cb { display: inline-block; flex: none; width: 1.15rem; height: 1.15rem; border: 1.5px solid #222; position: relative; vertical-align: middle; }
.cb.on::after {
  content: ""; position: absolute; left: 0.3rem; top: 0; width: 0.32rem; height: 0.7rem;
  border: solid #111; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.rs-date u { display: inline-block; min-width: 6.5rem; text-decoration: none; border-bottom: 1px solid #222; padding: 0 0.3rem; }
.rs-line { display: grid; grid-template-columns: minmax(0, 1fr) auto 10.5rem; gap: 0.5rem; align-items: center; padding: 0.2rem 0; }
.rs-line-label { text-decoration: underline; }
.rs-line-other { display: block; }
.rs-other { margin-left: 0.4rem; white-space: pre-wrap; }
.rs-items thead th { text-align: left; }
.rs-letter { color: #555; }
.rs-head { display: block; text-decoration: underline; margin-bottom: 0.35rem; }
.rs-body { white-space: pre-wrap; min-height: 3.5rem; }
.rs-tall .rs-body { min-height: 8rem; }
.rs-sign td { padding: 0.5rem; }
.rs-kv { padding: 0.1rem 0; min-height: 1.5rem; border-bottom: 1px dotted #aaa; overflow-wrap: anywhere; }
.rs-kv span { color: #444; margin-right: 0.35rem; }
.rs-foot { font-size: 0.8rem; color: #555; margin: 0.6rem 0 0; text-align: right; }

@media (max-width: 720px) {
  .report-grid { grid-template-columns: 1fr; }
  .choice-grid-3, .choice-grid-4 { grid-template-columns: 1fr; }
  .outcome-date, .outcome-date .form-control { width: 100%; }
  .item-row { grid-template-columns: 1.9rem minmax(0, 1fr); }
  .item-row > .field:last-child { grid-column: 2; margin-top: -0.6rem; }
  .report-actions { flex-direction: column-reverse; align-items: stretch; }
  .report-lock-note { text-align: left; }
  .report-sheet { padding: 0.75rem; font-size: 0.88rem; overflow-x: auto; }
  table.rs { min-width: 34rem; }
}

@page { size: A4; margin: 10mm; }
@media print {
  .no-print-block, .alert, .report-actions { display: none !important; }
  .report-sheet { border: 0; padding: 0; max-width: none; font-size: 10.5pt; overflow: visible; }
  table.rs { min-width: 0; break-inside: avoid; }
  /* Tighter, so a normal report fits on one A4 sheet like the paper form. */
  .report-sheet { font-size: 10pt; line-height: 1.3; }
  .rs-title { margin-bottom: 0.5rem; font-size: 12pt; }
  .rs th, .rs td { padding: 0.2rem 0.5rem; }
  .rs-line { padding: 0.08rem 0; }
  .rs-body { min-height: 2.4rem; }
  .rs-tall .rs-body { min-height: 5.5rem; }
  .rs-sign td { padding: 0.35rem 0.5rem; }
  .rs-kv { min-height: 1.2rem; }
  .rs-foot { margin-top: 0.35rem; }
}

/* Signed-copy list and closed-call card */
.report-files { margin: 0.5rem 0 0.75rem; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.report-files li { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.55rem 0.85rem; }
.report-files .file-name { font-weight: 550; }
.check-inline { display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; font-size: 0.9rem; }
.report-signed .file-list li { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.file-meta { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.closed-card { border-color: var(--line-strong); }

/* Closure review (support team) */
.review-card { border-color: var(--info); }
.review-card .field + .field { margin-top: 1rem; }
.review-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.review-orig { margin-top: 0.5rem; font-size: 0.88rem; color: var(--muted); }
.review-orig summary { cursor: pointer; }
.review-orig .prose { margin-top: 0.4rem; padding: 0.6rem 0.75rem; background: var(--surface-3); border-radius: var(--radius-sm); color: var(--ink); }
.review-split { margin-top: 1.25rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }

/* Turnaround time */
.tat-line { display: flex; flex-wrap: wrap; gap: 0.15rem 0.6rem; margin: 0.85rem 0 0; font-size: 0.875rem; color: var(--muted); }
.tat-line strong { color: var(--ink); }
.tat-line.is-overdue strong, .tat-flag, .t-late { color: var(--danger); }
.tat-flag { font-weight: 600; }
.t-late { font-weight: 600; }

/* "Closed" greyed out while the site report says the fault was not solved */
.choice.is-disabled, .choice.is-disabled input { cursor: not-allowed; }
.choice.is-disabled .choice-body { opacity: 0.5; background: var(--surface-3); border-color: var(--line); }
.choice.is-disabled:hover .choice-body { border-color: var(--line); }
