/* Visitor Management System — mobile-first stylesheet */

:root {
  --ink: #13222e;
  --ink-soft: #4a5b68;
  --ink-faint: #7b8a95;
  --brand: #0b4f6c;
  --brand-strong: #083b51;
  --brand-tint: #e6f0f4;
  --accent: #d99a1e;
  --paper: #ffffff;
  --bg: #e9eef1;
  --line: #d3dce2;
  --line-strong: #9fb0bb;
  --danger: #b42318;
  --danger-tint: #fdeceb;
  --ok: #1f7a4d;
  --ok-tint: #e5f4ec;
  --warn: #9a5b00;
  --warn-tint: #fff4dd;

  --radius: 8px;
  --radius-sm: 5px;
  --field-h: 48px;
  --font: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(180deg, var(--brand) 0, var(--brand) 180px, transparent 180px),
    repeating-linear-gradient(135deg, rgba(11, 79, 108, .035) 0 2px, transparent 2px 14px);
  background-repeat: no-repeat, repeat;
}

a { color: var(--brand); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.req { color: var(--danger); font-weight: 600; }
.optional { color: var(--ink-faint); font-weight: 400; font-size: .85em; }
.ms { display: block; color: var(--ink-faint); font-size: .8rem; font-weight: 400; font-style: italic; }

/* ---------- Sheet ---------- */

.sheet {
  max-width: 880px;
  margin: 0 auto;
  background: var(--paper);
  min-height: 100vh;
}

.sheet--narrow { max-width: 620px; }

@media (min-width: 720px) {
  .sheet {
    margin: 32px auto 48px;
    min-height: 0;
    border-radius: var(--radius);
    box-shadow: 0 12px 32px -18px rgba(8, 59, 81, .45);
    overflow: hidden;
  }
}

.sheet__intro { padding: 20px 20px 4px; color: var(--ink-soft); font-size: .95rem; }
.sheet__intro p { margin: 0 0 6px; }

.sheet__footer {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px 24px;
  border-top: 1px solid var(--line);
  font-size: .75rem;
  color: var(--ink-faint);
}

@media (min-width: 720px) {
  .sheet__intro { padding: 28px 36px 4px; }
  .sheet__footer { flex-direction: row; justify-content: space-between; padding: 16px 36px; }
}

/* ---------- ISO document control block ---------- */

.doc-control {
  display: grid;
  grid-template-columns: 1fr;
  border-bottom: 2px solid var(--ink);
}

.doc-control__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}

.doc-control__logo {
  flex: 0 0 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  letter-spacing: .04em;
  border-radius: var(--radius-sm);
  border-bottom: 3px solid var(--accent);
}

.doc-control__company { margin: 0; font-weight: 700; font-size: .95rem; line-height: 1.25; }
.doc-control__reg { margin: 0; font-size: .75rem; color: var(--ink-faint); }

.doc-control__title { padding: 16px 20px 12px; }
.doc-control__title h1 { margin: 0; font-size: 1.35rem; line-height: 1.2; letter-spacing: -.01em; }
.doc-control__title p { margin: 2px 0 0; color: var(--ink-soft); font-style: italic; font-size: .9rem; }

.doc-control__meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  border-top: 1px solid var(--line);
}

.doc-control__meta > div { padding: 8px 10px; border-right: 1px solid var(--line); }
.doc-control__meta > div:last-child { border-right: 0; }
.doc-control__meta dt { font-size: .65rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); }
.doc-control__meta dd { margin: 0; font-size: .82rem; font-weight: 600; font-variant-numeric: tabular-nums; }

@media (min-width: 720px) {
  .doc-control { grid-template-columns: 1.1fr 1.4fr 1fr; }
  .doc-control > * { border-right: 1px solid var(--line); }
  .doc-control > *:last-child { border-right: 0; }
  .doc-control__brand { border-bottom: 0; padding: 18px 20px; }
  .doc-control__title { display: flex; flex-direction: column; justify-content: center; text-align: center; padding: 18px 16px; }
  .doc-control__meta { grid-template-columns: 1fr; border-top: 0; }
  .doc-control__meta > div {
    display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
    padding: 5px 14px; border-right: 0; border-bottom: 1px solid var(--line);
  }
  .doc-control__meta > div:last-child { border-bottom: 0; }
}

/* ---------- Alerts ---------- */

.alert {
  margin: 16px 20px 0;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border-left: 4px solid;
  font-size: .92rem;
}
.alert:focus { outline: 2px solid var(--danger); outline-offset: 2px; }
.alert ul { margin: 8px 0 0; padding-left: 18px; }
.alert a { color: inherit; }
.alert--error { background: var(--danger-tint); border-color: var(--danger); color: #7a1a12; }
.alert--success { background: var(--ok-tint); border-color: var(--ok); color: #145235; }
.alert--info { background: var(--brand-tint); border-color: var(--brand); color: var(--brand-strong); }

@media (min-width: 720px) { .alert { margin: 20px 36px 0; } }

/* ---------- Form sections ---------- */

.form-section { padding: 24px 20px 8px; border-bottom: 1px solid var(--line); }

@media (min-width: 720px) { .form-section { padding: 28px 36px 12px; } }

.section-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.section-head__code {
  flex: 0 0 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: .9rem;
}
.section-head h2 { margin: 0; font-size: 1.08rem; line-height: 1.3; }
.section-head p { margin: 0; font-size: .82rem; color: var(--ink-faint); font-style: italic; }

.grid { display: grid; grid-template-columns: 1fr; gap: 0 20px; }
@media (min-width: 640px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .span-2 { grid-column: span 2; }
}

/* ---------- Fields ---------- */

.field { margin: 0 0 18px; min-width: 0; }
fieldset.field { border: 0; padding: 0; }

.field > label,
.field legend,
.sig-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: .9rem;
  padding: 0;
}

input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="date"], input[type="password"], input[type="search"], select, textarea {
  width: 100%;
  min-height: var(--field-h);
  padding: 11px 14px;
  font: inherit;
  font-size: 16px; /* prevents iOS zoom on focus */
  color: var(--ink);
  background: #fbfcfd;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
  -webkit-appearance: none;
  appearance: none;
}

select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234a5b68' stroke-width='1.8' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

textarea { min-height: 76px; resize: vertical; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(11, 79, 108, .18);
}

input[readonly] { background: var(--brand-tint); color: var(--ink-soft); }

.is-invalid input, .is-invalid select, .is-invalid textarea,
[aria-invalid="true"] { border-color: var(--danger); }

.field__error { margin: 6px 0 0; color: var(--danger); font-size: .84rem; font-weight: 500; }
.field__hint { margin: 6px 0 0; color: var(--ink-faint); font-size: .8rem; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Choices & declarations ---------- */

.choice-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 520px) { .choice-grid { grid-template-columns: 1fr 1fr; } }

.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: .92rem;
  cursor: pointer;
}
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }

input[type="checkbox"] {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--brand);
  cursor: pointer;
}

.declarations { display: grid; gap: 4px; margin-bottom: 14px; }

.declare {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  margin-bottom: 8px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  line-height: 1.5;
  cursor: pointer;
}
.declare input { margin-top: 1px; }
.declare em { display: block; margin-top: 4px; color: var(--ink-faint); font-size: .82rem; }
.declare:has(input:checked) { border-color: var(--ok); background: var(--ok-tint); }
.declare.is-invalid { border-color: var(--danger); background: var(--danger-tint); }

.notice {
  margin-bottom: 14px;
  padding: 12px 14px;
  background: #f5f8fa;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: .86rem;
  color: var(--ink-soft);
}
.notice summary { font-weight: 600; color: var(--ink); cursor: pointer; min-height: 28px; }
.notice p { margin: 10px 0 0; }

/* ---------- Signature ---------- */

.sig-label { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }

.sig-pad {
  position: relative;
  height: 180px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(transparent calc(100% - 44px), var(--line) calc(100% - 44px), var(--line) calc(100% - 43px), transparent calc(100% - 43px)),
    #fff;
}
.sig-pad.is-invalid { border-color: var(--danger); }
.sig-pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.sig-pad__hint {
  position: absolute;
  left: 0; right: 0; bottom: 14px;
  text-align: center;
  font-size: .82rem;
  color: var(--ink-faint);
  pointer-events: none;
}

.btn-link {
  min-height: 36px;
  padding: 4px 8px;
  border: 0;
  background: none;
  color: var(--brand);
  font: inherit;
  font-weight: 600;
  font-size: .88rem;
  text-decoration: underline;
  cursor: pointer;
}

/* ---------- Office use block ---------- */

.office-use {
  margin: 20px 20px 0;
  border: 1.5px solid var(--ink);
  background: #f3f5f6;
}
.office-use__title {
  margin: 0;
  padding: 6px 12px;
  background: var(--ink);
  color: #fff;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.office-use__title span { font-weight: 400; text-transform: none; letter-spacing: 0; opacity: .8; }
.office-use dl { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.office-use dl > div { padding: 8px 12px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); min-height: 52px; }
.office-use dl > div:nth-child(2n) { border-right: 0; }
@media (max-width: 719px) {
  .office-use dl > div:last-child:nth-child(odd) { grid-column: span 2; border-right: 0; }
}
.office-use dt { font-size: .72rem; color: var(--ink-faint); }
.office-use dd { margin: 2px 0 0; font-weight: 600; font-size: .9rem; }

@media (min-width: 720px) {
  .office-use { margin: 24px 36px 0; }
  .office-use dl { grid-template-columns: repeat(5, 1fr); }
  .office-use dl > div, .office-use dl > div:nth-child(2n) { border-right: 1px solid var(--line); }
  .office-use dl > div:last-child { border-right: 0; }
}

/* ---------- Buttons ---------- */

.form-actions {
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
}
.form-actions__note { margin: 10px 0 0; font-size: .8rem; color: var(--ink-faint); text-align: center; }

@media (min-width: 720px) {
  .form-actions { padding: 24px 36px; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn:focus-visible { outline: 3px solid rgba(11, 79, 108, .35); outline-offset: 2px; }
.btn:disabled { opacity: .65; cursor: progress; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-strong); }
.btn--ghost { background: #fff; color: var(--brand); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--brand); }
.btn--ok { background: var(--ok); color: #fff; }
.btn--danger { background: #fff; color: var(--danger); border-color: #e7b4ae; }
.btn--sm { min-height: 38px; padding: 7px 14px; font-size: .85rem; }
.btn--block { width: 100%; }

@media (min-width: 720px) { .form-actions .btn--block { width: auto; min-width: 260px; } .form-actions__note { text-align: left; } }

/* ---------- Success slip ---------- */

.slip { padding: 28px 20px; text-align: center; }
.slip__status {
  display: inline-block;
  margin: 0 0 18px;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  background: var(--ok-tint);
  color: var(--ok);
  font-weight: 600;
  font-size: .85rem;
}
.slip__label { margin: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); }
.slip__ref {
  margin: 4px 0 16px;
  font-size: clamp(1.9rem, 8vw, 2.6rem);
  font-weight: 700;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  color: var(--brand-strong);
}
.slip__next { max-width: 440px; margin: 0 auto 22px; color: var(--ink-soft); font-size: .93rem; }
.slip__next .ms { margin-top: 6px; }
.slip__details { margin: 0 0 24px; text-align: left; border-top: 1px solid var(--line); }
.slip__details > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.slip__details dt { color: var(--ink-faint); font-size: .85rem; flex: 0 0 auto; }
.slip__details dd { margin: 0; font-weight: 600; text-align: right; font-size: .92rem; }
.slip__actions { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 520px) { .slip__actions { flex-direction: row; justify-content: center; } .slip { padding: 36px; } }

/* ---------- Badges ---------- */

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  font-size: .76rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge--pending { background: var(--warn-tint); color: var(--warn); }
.badge--checked_in { background: var(--ok-tint); color: var(--ok); }
.badge--checked_out { background: #eceff1; color: var(--ink-soft); }
.badge--rejected { background: var(--danger-tint); color: var(--danger); }

/* =========================================================
   Admin
   ========================================================= */

.page-admin { background-image: none; background: var(--bg); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--brand-strong);
  color: #fff;
}
.topbar__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
}
.topbar__brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; margin-right: auto; }
.topbar__brand .doc-control__logo { flex-basis: 34px; height: 34px; font-size: .8rem; }
.topbar__brand small { display: block; font-weight: 400; opacity: .75; font-size: .72rem; }

.nav-toggle {
  min-width: 44px; min-height: 44px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--radius-sm);
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: .85rem;
  cursor: pointer;
}

.topnav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--brand-strong); padding: 8px 16px 16px; }
.topnav.is-open { display: block; }
.topnav a { display: block; padding: 12px 8px; color: #fff; text-decoration: none; border-radius: var(--radius-sm); }
.topnav a[aria-current="page"], .topnav a:hover { background: rgba(255,255,255,.1); }
.topnav__user { padding: 12px 8px 4px; font-size: .8rem; opacity: .75; border-top: 1px solid rgba(255,255,255,.15); margin-top: 6px; }

@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .topnav { display: flex; position: static; align-items: center; gap: 4px; padding: 0; background: none; }
  .topnav a { padding: 8px 12px; font-size: .9rem; }
  .topnav__user { border: 0; margin: 0 0 0 8px; padding: 0 0 0 12px; border-left: 1px solid rgba(255,255,255,.2); }
}

.container { max-width: 1200px; margin: 0 auto; padding: 20px 16px 48px; }
@media (min-width: 720px) { .container { padding: 28px 24px 64px; } }

.page-title { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.page-title h1 { margin: 0; font-size: 1.4rem; }
.page-title p { margin: 2px 0 0; color: var(--ink-soft); font-size: .9rem; }

.container .alert { margin: 0 0 16px; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
.stat { padding: 14px 16px; background: var(--paper); border-radius: var(--radius); border-top: 3px solid var(--line-strong); }
.stat--in { border-top-color: var(--ok); }
.stat--pending { border-top-color: var(--accent); }
.stat__value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat__label { font-size: .8rem; color: var(--ink-soft); }

.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; margin-bottom: 16px; background: var(--paper); border-radius: var(--radius); }
.filters .field { margin: 0; }
.filters label { font-size: .78rem !important; }
.filters__search { grid-column: span 2; }
.filters__actions { grid-column: span 2; display: flex; gap: 8px; }
.filters__actions .btn { flex: 1; }
@media (min-width: 860px) {
  .filters { grid-template-columns: 170px 190px 1fr auto; align-items: end; }
  .filters__search, .filters__actions { grid-column: auto; }
  .filters__actions .btn { flex: 0 0 auto; }
}

.panel { background: var(--paper); border-radius: var(--radius); overflow: hidden; }
.panel__empty { padding: 48px 20px; text-align: center; color: var(--ink-soft); }
.panel__empty strong { display: block; color: var(--ink); margin-bottom: 4px; }

/* Responsive table: stacked rows on mobile */
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); font-weight: 600; }
.table td .sub { display: block; color: var(--ink-faint); font-size: .8rem; }
.table .ref { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--brand-strong); text-decoration: none; }
.table .row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.table .row-actions form { margin: 0; }

@media (max-width: 859px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; }
  .table tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .table td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; text-align: right; }
  .table td::before { content: attr(data-label); color: var(--ink-faint); font-size: .8rem; text-align: left; flex: 0 0 auto; }
  .table td.cell-main { display: block; text-align: left; padding-bottom: 8px; }
  .table td.cell-main::before { content: none; }
  .table td.cell-actions { display: block; padding-top: 10px; }
  .table td.cell-actions::before { content: none; }
  .table .row-actions .btn { flex: 1; }
}
@media (min-width: 860px) {
  .table th, .table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
  .table tbody tr:hover { background: #f7fafb; }
}

/* ---------- Record view (ISO form printout) ---------- */

.record { background: var(--paper); border-radius: var(--radius); overflow: hidden; }
.record__body { padding: 0 20px 20px; }
@media (min-width: 720px) { .record__body { padding: 0 32px 28px; } }

.record-section { margin-top: 22px; }
.record-section h2 {
  margin: 0 0 8px;
  padding: 6px 10px;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: var(--brand-tint);
  color: var(--brand-strong);
  border-left: 3px solid var(--brand);
}
.kv { display: grid; grid-template-columns: 1fr; margin: 0; }
@media (min-width: 640px) { .kv { grid-template-columns: 1fr 1fr; column-gap: 24px; } }
.kv > div { display: grid; grid-template-columns: 42% 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px dotted var(--line-strong); font-size: .9rem; }
.kv .wide { grid-column: 1 / -1; grid-template-columns: 21% 1fr; }
@media (max-width: 639px) { .kv .wide { grid-template-columns: 42% 1fr; } }
.kv dt { color: var(--ink-soft); }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }

.sig-box { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 10px; }
@media (min-width: 640px) { .sig-box { grid-template-columns: 1fr 1fr; } }
.sig-box figure { margin: 0; padding: 10px; border: 1px solid var(--line-strong); }
.sig-box img { display: block; width: 100%; max-width: 300px; height: auto; }
.sig-box figcaption { font-size: .78rem; color: var(--ink-soft); border-top: 1px solid var(--ink); margin-top: 6px; padding-top: 4px; }
.sig-box .blank { height: 100px; }

.actions-panel { margin-top: 16px; padding: 16px; background: var(--paper); border-radius: var(--radius); }
.actions-panel h2 { margin: 0 0 12px; font-size: 1rem; }
.actions-panel form { display: grid; gap: 12px; }
@media (min-width: 720px) { .actions-panel form.inline { grid-template-columns: 1fr 1fr auto; align-items: end; } }
.actions-panel .field { margin: 0; }
.check-row { display: flex; align-items: center; gap: 10px; min-height: 48px; font-weight: 500; }

.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    linear-gradient(160deg, var(--brand-strong), var(--brand) 60%, #0e6a8f);
}
.auth__card { width: 100%; max-width: 400px; padding: 28px 24px; background: var(--paper); border-radius: var(--radius); }
.auth__card h1 { margin: 12px 0 2px; font-size: 1.3rem; }
.auth__card > p { margin: 0 0 20px; color: var(--ink-soft); font-size: .9rem; }
.auth__card .alert { margin: 0 0 16px; }

/* ---------- Print ---------- */

@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff !important; font-size: 11pt; }
  .no-print, .topbar, .form-actions, .actions-panel, .page-title .btn { display: none !important; }
  .sheet, .record { margin: 0; box-shadow: none; border-radius: 0; max-width: none; }
  .container { padding: 0; max-width: none; }
  .doc-control { grid-template-columns: 1.1fr 1.4fr 1fr; border: 1.5px solid #000; }
  .doc-control > * { border-right: 1px solid #000; }
  .doc-control > *:last-child { border-right: 0; }
  .doc-control__title { text-align: center; }
  .doc-control__meta { grid-template-columns: 1fr; border-top: 0; }
  .doc-control__meta > div { display: flex; justify-content: space-between; padding: 3px 10px; border-right: 0; border-bottom: 1px solid #000; }
  .doc-control__meta > div:last-child { border-bottom: 0; }
  .kv { grid-template-columns: 1fr 1fr; }
  .sig-box { grid-template-columns: 1fr 1fr; }
  .record-section { break-inside: avoid; }
  .print-footer { display: flex !important; }
}

.print-footer { display: none; justify-content: space-between; margin-top: 18px; padding-top: 6px; border-top: 1px solid #000; font-size: 8pt; }
