:root {
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-soft: #eef4f3;
  --text: #1f2933;
  --muted: #5f6f7a;
  --line: #d9e1e5;
  --primary: #0f5f59;
  --primary-strong: #0a4844;
  --navy: #17324d;
  --gold: #c99b2e;
  --danger: #b42318;
  --warning: #a15c07;
  --success: #18794e;
  --radius: 8px;
  --shadow: 0 16px 40px rgba(23, 50, 77, .08);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 460px);
}

.login-identity {
  position: relative;
  display: flex;
  align-items: center;
  padding: 48px clamp(28px, 6vw, 84px);
  color: var(--navy);
  background: #fff;
  overflow: hidden;
}

.login-identity::before {
  content: "";
  position: absolute;
  top: clamp(18px, 4vw, 52px);
  right: clamp(8px, 3vw, 40px);
  width: min(70vw, 980px);
  height: min(34vw, 360px);
  background: url("assets/servitaxi-tenesur.svg") right top / contain no-repeat;
  opacity: .24;
  pointer-events: none;
}

.login-identity::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 12px;
  background: linear-gradient(90deg, var(--gold), #ffffff, var(--primary));
}

.identity-copy {
  position: relative;
  z-index: 1;
  max-width: 690px;
}

.login-logos {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.identity-copy img {
  width: 112px;
  height: 126px;
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(23, 50, 77, .14));
}

.identity-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.identity-copy p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.login-panel {
  display: flex;
  align-items: center;
  padding: 32px;
  background: var(--surface);
}

.login-panel-inner {
  width: 100%;
}

.auth-box {
  width: 100%;
}

.auth-box h2,
.auth-box p {
  margin-top: 0;
}

.auth-box p {
  color: var(--muted);
  line-height: 1.55;
}

.demo-access {
  margin-top: 20px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted);
}

.remember-login {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 12px 0 8px;
  color: var(--navy);
  font-weight: 650;
}

.remember-login input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.login-hint {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: .88rem;
}

.legal-footer {
  width: 100%;
  padding: 24px clamp(18px, 3vw, 34px);
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  text-align: center;
}

.legal-footer nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px 20px;
  flex-wrap: wrap;
}

.legal-footer a {
  color: var(--navy);
  font-weight: 650;
  text-decoration: none;
}

.legal-footer a:hover,
.legal-footer a:focus-visible {
  color: var(--primary);
  text-decoration: underline;
}

.legal-footer small {
  display: block;
  margin-top: 10px;
}

.legal-footer.compact {
  margin-top: 24px;
  padding: 18px 0 0;
  background: transparent;
}

.login-panel .legal-footer.compact {
  margin-top: 26px;
}

.privacy-first-layer {
  width: min(760px, 100%);
  margin: 18px auto 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  background: #f7faf9;
  color: var(--text);
  text-align: left;
}

.privacy-first-layer > strong {
  display: block;
  margin-bottom: 9px;
  color: var(--navy);
}

.privacy-first-layer dl {
  display: grid;
  gap: 7px;
  margin: 0 0 10px;
}

.privacy-first-layer dl div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
}

.privacy-first-layer dt {
  color: var(--navy);
  font-weight: 700;
}

.privacy-first-layer dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.privacy-first-layer > a {
  color: var(--primary-strong);
  font-weight: 700;
}

.privacy-first-layer.compact {
  padding: 12px 14px;
  font-size: .82rem;
}

.privacy-first-layer.compact dl {
  gap: 5px;
  margin-bottom: 7px;
}

.legal-acknowledgement {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--navy);
  font-weight: 650;
  line-height: 1.4;
}

.legal-acknowledgement input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  flex: 0 0 auto;
  accent-color: var(--primary);
}

.evidence-privacy-note {
  margin-top: 8px;
  padding: 9px 11px;
  border-left: 3px solid var(--gold);
  background: #fffaf0;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.45;
}

.legal-page-shell {
  min-height: 100vh;
  padding: 28px 18px;
  background: var(--bg);
}

.legal-document {
  width: min(1040px, 100%);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.legal-document-header {
  padding: 36px clamp(22px, 5vw, 62px) 24px;
  text-align: center;
}

.legal-brand {
  display: inline-block;
}

.legal-brand img {
  width: 190px;
  height: 82px;
  object-fit: contain;
}

.legal-eyebrow {
  margin: 14px 0 6px;
  color: var(--primary);
  font-size: .8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.legal-document-header h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: 0;
}

.legal-document-header > p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
}

.legal-page-nav {
  display: flex;
  justify-content: center;
  gap: 0;
  padding: 0 clamp(16px, 4vw, 48px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.legal-page-nav a {
  padding: 14px 18px;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.legal-page-nav a.active,
.legal-page-nav a:hover {
  color: var(--primary-strong);
  box-shadow: inset 0 -3px 0 var(--primary);
}

.legal-draft-warning {
  margin: 24px clamp(22px, 5vw, 62px) 0;
  padding: 14px 16px;
  border: 1px solid rgba(161, 92, 7, .28);
  border-radius: var(--radius);
  background: #fff8eb;
  color: #7a4505;
  line-height: 1.5;
}

.legal-draft-warning strong {
  display: block;
  margin-bottom: 4px;
}

.legal-document-body {
  padding: 10px clamp(22px, 5vw, 62px) 42px;
}

.legal-document-body > section {
  padding: 25px 0;
  border-bottom: 1px solid var(--line);
}

.legal-document-body > section:last-child {
  border-bottom: 0;
}

.legal-document-body h2 {
  margin: 0 0 13px;
  color: var(--navy);
  font-size: 1.25rem;
  letter-spacing: 0;
}

.legal-document-body h3 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 1rem;
}

.legal-document-body p,
.legal-document-body li {
  color: #374957;
  line-height: 1.7;
}

.legal-document-body p {
  margin: 0 0 12px;
}

.legal-document-body ul {
  margin: 0;
  padding-left: 22px;
}

.legal-document-body a {
  color: var(--primary-strong);
  font-weight: 650;
}

.legal-identities {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.legal-identity {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f9fbfb;
}

.legal-identity > p {
  margin-bottom: 12px;
  font-size: .9rem;
}

.legal-identity dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.legal-identity dl div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px;
}

.legal-identity dt {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
}

.legal-identity dd {
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.legal-missing {
  color: var(--warning);
  font-weight: 700;
}

.legal-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
}

.legal-table th,
.legal-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.5;
}

.legal-table th {
  background: var(--surface-soft);
  color: var(--navy);
}

.legal-table tr:last-child td {
  border-bottom: 0;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 282px minmax(0, 1fr);
  transition: grid-template-columns .2s ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 0 minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-right: 1px solid #161b22;
  background: #05070a;
  transition: opacity .15s ease, visibility .15s ease;
}

.sidebar-collapsed .sidebar {
  visibility: hidden;
  opacity: 0;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 22px;
  border-bottom: 1px solid #1f2933;
}

.brand img {
  width: 64px;
  height: 74px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand strong {
  display: block;
  color: #f8fafc;
  line-height: 1.18;
}

.brand span {
  display: block;
  margin-top: 4px;
  color: #a8b3bd;
  font-size: .83rem;
}

.nav {
  display: grid;
  gap: 4px;
  padding: 16px 12px;
}

.nav button,
.mobile-nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: transparent;
  color: #b7c2cc;
  text-align: left;
}

.nav button.active,
.nav button:hover {
  background: #121923;
  color: #ffffff;
}

.mobile-nav button.active,
.mobile-nav button:hover {
  background: var(--surface-soft);
  color: var(--primary-strong);
}

.nav svg,
.mobile-nav svg,
.btn svg,
.icon-btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.sidebar-footer {
  margin-top: auto;
  padding: 18px;
  border-top: 1px solid #1f2933;
  color: #a8b3bd;
  font-size: .88rem;
}

.sidebar-footer strong {
  color: #ffffff;
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 74px;
  padding: 14px clamp(18px, 3vw, 34px);
  border-bottom: 1px solid var(--line);
  background: rgba(245, 247, 248, .92);
  backdrop-filter: blur(12px);
}

.topbar-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-toggle {
  width: 40px;
  min-width: 40px;
  padding: 0;
}

.page-title h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.45rem, 2vw, 2rem);
  letter-spacing: 0;
}

.page-title p {
  margin: 4px 0 0;
  color: var(--muted);
}

.content {
  padding: 24px clamp(18px, 3vw, 34px) 42px;
}

.mobile-nav {
  display: none;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.toolbar,
.form-actions,
.table-actions,
.row-actions,
.filters,
.inline-fields {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar {
  justify-content: space-between;
  margin-bottom: 18px;
}

.btn,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 9px 14px;
  background: var(--primary);
  color: #fff;
  font-weight: 650;
}

.btn.secondary,
.icon-btn.secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--navy);
}

.btn.danger {
  background: var(--danger);
}

.modal-action-rows {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.modal-action-row {
  display: grid;
  gap: 10px;
}

.modal-print-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.modal-file-actions {
  grid-template-columns: max-content repeat(2, minmax(0, 1fr)) max-content;
}

.modal-action-row .btn {
  min-width: 0;
}

.btn.action-print-reporter,
.icon-btn.action-print-reporter {
  background: #1769aa;
  border-color: #1769aa;
  color: #fff;
}

.btn.action-print-descargo,
.icon-btn.action-print-descargo {
  background: #b55b00;
  border-color: #b55b00;
  color: #fff;
}

.btn.action-print-witness,
.icon-btn.action-print-witness {
  background: #6f42a5;
  border-color: #6f42a5;
  color: #fff;
}

.btn.action-pdf-reporter,
.icon-btn.action-pdf-reporter {
  background: #40546f;
  border-color: #40546f;
  color: #fff;
}

.btn.action-pdf-sanctioned,
.icon-btn.action-pdf-sanctioned {
  background: #24738c;
  border-color: #24738c;
  color: #fff;
}

.icon-btn.action-view-detail {
  background: #1d5d82;
  border-color: #1d5d82;
  color: #fff;
}

.icon-btn.action-edit-record {
  background: #2f6f9f;
  border-color: #2f6f9f;
  color: #fff;
}

.icon-btn.action-pdf-complete {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.icon-btn.action-delete-record {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.icon-btn {
  width: 40px;
  padding: 0;
}

.btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.grid {
  display: grid;
  gap: 16px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.two-col {
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, .7fr);
  align-items: start;
}

.card,
.stat,
.table-panel,
.form-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stat {
  padding: 16px;
}

.stat span {
  color: var(--muted);
  font-size: .9rem;
}

.stat strong {
  display: block;
  margin-top: 8px;
  color: var(--navy);
  font-size: 1.9rem;
  line-height: 1;
}

.stat small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

.card,
.form-panel {
  padding: 18px;
}

.card h2,
.form-panel h2,
.table-panel h2 {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: 1.12rem;
}

.table-panel {
  overflow: hidden;
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.sanctions-table {
  min-width: 1280px;
}

.operator-sanctions-table {
  min-width: 960px;
  table-layout: fixed;
}

.operator-sanctions-table th:first-child,
.operator-sanctions-table td:first-child {
  width: 175px;
  white-space: nowrap;
}

.operator-sanctions-table th:last-child,
.operator-sanctions-table td:last-child {
  width: 220px;
}

.sanctions-witnesses {
  max-width: 180px;
  overflow-wrap: anywhere;
}

.operator-sanctions-table .row-actions {
  flex-wrap: nowrap;
}

.operator-sanctions-table .icon-btn {
  width: 40px;
  min-width: 40px;
  padding-inline: 0;
}

th,
td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 750;
  text-transform: uppercase;
}

td {
  color: var(--text);
}

.table-wrap .row-actions {
  justify-content: center;
}

tr:last-child td {
  border-bottom: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  background: var(--surface-soft);
  color: var(--navy);
  font-size: .8rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge.success {
  background: #e7f5ef;
  color: var(--success);
}

.badge.warning {
  background: #fff4df;
  color: var(--warning);
}

.badge.danger {
  background: #ffe9e6;
  color: var(--danger);
}

.badge.info {
  background: #e8f2ff;
  color: #175cd3;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: var(--navy);
  font-size: .9rem;
  font-weight: 700;
}

.required-mark {
  color: var(--danger);
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 11px;
  background: #fff;
  color: var(--text);
}

.field textarea {
  min-height: 112px;
  resize: vertical;
}

.field-hint {
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.35;
}

.file-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.file-pick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 13px;
  background: #fff;
  color: var(--navy);
  font-weight: 700;
  cursor: pointer;
}

.file-pick:hover {
  border-color: var(--primary);
  color: var(--primary-strong);
}

.file-pick svg {
  width: 18px;
  height: 18px;
}

.file-pick input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.evidence-previews {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.evidence-preview-empty {
  grid-column: 1 / -1;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: .84rem;
  text-align: center;
}

.evidence-preview-item {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 82px;
  padding: 8px 38px 8px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.evidence-preview-media {
  width: 72px;
  height: 64px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.evidence-preview-media img,
.evidence-preview-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.evidence-file-icon svg {
  width: 28px;
  height: 28px;
  color: var(--primary);
}

.evidence-audio {
  display: grid;
  place-items: center;
  width: 100%;
  gap: 3px;
}

.evidence-audio svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

.evidence-audio audio {
  width: 64px;
  height: 24px;
}

.evidence-preview-item.is-audio {
  grid-template-columns: 1fr;
  align-content: center;
}

.evidence-preview-item.is-audio .evidence-preview-media {
  width: 100%;
  height: auto;
  overflow: visible;
  border: 0;
  background: transparent;
}

.evidence-preview-item.is-audio .evidence-audio {
  grid-template-columns: 22px minmax(0, 1fr);
}

.evidence-preview-item.is-audio .evidence-audio audio {
  width: 100%;
  height: 34px;
}

.evidence-preview-copy {
  min-width: 0;
}

.evidence-preview-copy strong,
.evidence-preview-copy small {
  display: block;
}

.evidence-preview-copy strong {
  overflow: hidden;
  color: var(--navy);
  font-size: .84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evidence-preview-copy small {
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: .75rem;
}

.evidence-remove {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid #ffc9c2;
  border-radius: 50%;
  padding: 0;
  background: #fff;
  color: var(--danger);
  cursor: pointer;
}

.evidence-remove:hover {
  background: #fff1ef;
}

.evidence-remove svg {
  width: 15px;
  height: 15px;
}

.taxi-combobox {
  position: relative;
}

.taxi-search-results {
  position: absolute;
  z-index: 30;
  top: calc(100% - 18px);
  left: 0;
  right: 0;
  max-height: min(360px, 52vh);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 14px 32px rgba(16, 32, 51, .16);
}

.taxi-search-option {
  width: 100%;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.taxi-search-option:last-child {
  border-bottom: 0;
}

.taxi-search-option:hover,
.taxi-search-option:focus {
  outline: 0;
  background: var(--surface-soft);
}

.taxi-search-option strong {
  color: var(--primary-strong);
}

.taxi-search-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.taxi-search-option small {
  color: var(--muted);
}

.taxi-search-empty {
  padding: 14px;
  color: var(--muted);
  font-size: .84rem;
  text-align: center;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.choice-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 650;
}

.choice-row input {
  width: auto;
  min-height: 0;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 3px solid rgba(15, 95, 89, .16);
  border-color: var(--primary);
}

.section-title {
  grid-column: 1 / -1;
  margin: 10px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--primary-strong);
  font-weight: 800;
}

.empty {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  max-width: min(420px, calc(100vw - 40px));
  border-radius: var(--radius);
  padding: 13px 16px;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 20px 45px rgba(0,0,0,.18);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(31, 41, 51, .46);
}

.modal {
  width: min(980px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 25px 70px rgba(0,0,0,.25);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 0;
  color: var(--navy);
}

.modal-header p {
  margin: 4px 0 0;
  color: var(--muted);
}

.modal-body {
  padding: 18px;
}

.modal-taxi-editor {
  width: min(760px, 100%);
}

.taxi-modal-actions {
  justify-content: flex-end;
  margin-top: 18px;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.detail-list div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
}

.detail-list .full {
  grid-column: 1 / -1;
}

.detail-list span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: .78rem;
  text-transform: uppercase;
  font-weight: 750;
}

.history {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.history li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.history li:last-child {
  border-bottom: 0;
}

.evidence-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.evidence-list li {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
}

.evidence-list strong,
.evidence-list small {
  display: block;
}

.evidence-list small {
  margin-top: 3px;
  color: var(--muted);
}

.evidence-list-preview {
  width: 82px;
  height: 64px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0;
  background: var(--surface-soft);
  color: var(--primary);
  cursor: pointer;
}

.evidence-list-preview span,
.evidence-list-preview img,
.evidence-list-preview video {
  width: 100%;
  height: 100%;
}

.evidence-list-preview span {
  display: grid;
  place-items: center;
}

.evidence-list-preview img,
.evidence-list-preview video {
  object-fit: cover;
}

.evidence-list-preview svg {
  width: 28px;
  height: 28px;
}

.evidence-list-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qr-grid,
.statement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.qr-card,
.statement-panel,
.public-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
}

.qr-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
}

.qr-box {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  font-size: .78rem;
  text-align: center;
}

.qr-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-card h3,
.statement-panel h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1rem;
}

.qr-card p {
  margin: 7px 0;
  color: var(--muted);
  line-height: 1.45;
}

.qr-card a {
  display: block;
  color: var(--primary);
  font-size: .8rem;
  overflow-wrap: anywhere;
}

.copy-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.copy-link-row .icon-btn {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
}

.statement-panel {
  padding: 14px;
}

.statement-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.public-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 36px 24px;
  background: #f3f6f8;
}

.public-panel {
  width: min(860px, 100%);
  padding: 42px 48px;
  box-shadow: var(--shadow);
  background: #fff;
  text-align: center;
}

.public-panel > img {
  width: min(230px, 64vw);
  height: 96px;
  object-fit: contain;
  display: block;
  margin: 0 auto 26px;
}

.public-panel h1 {
  margin: 0 0 10px;
  color: var(--navy);
  text-align: center;
}

.public-panel p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.55;
  text-align: center;
}

.notice {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.public-panel .notice,
.public-panel .form-grid,
.public-panel .inline-auth {
  width: min(760px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.public-panel .notice {
  text-align: center;
}

.public-panel .form-actions {
  justify-content: center;
}

.public-panel .field {
  text-align: left;
}

.incident-summary > strong {
  display: block;
  margin-bottom: 10px;
}

.incident-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.incident-summary-item {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.incident-summary-item span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
}

.incident-summary-item strong {
  color: var(--navy);
  font-weight: 700;
  line-height: 1.45;
}

.incident-summary-item.full {
  grid-column: 1 / -1;
}

.muted-note {
  background: #fff;
  color: var(--muted);
}

.success-note {
  border-color: rgba(24, 121, 78, .24);
  background: rgba(24, 121, 78, .08);
  color: var(--success);
}

.warning-note {
  border-color: rgba(161, 92, 7, .25);
  background: rgba(161, 92, 7, .08);
  color: var(--warning);
}

.hidden {
  display: none !important;
}

@media (max-width: 1020px) {
  .app-shell,
  .login-shell,
  .two-col {
    grid-template-columns: 1fr;
  }

  .login-identity {
    min-height: 42vh;
  }

  .sidebar {
    display: none;
  }

  .mobile-nav {
    display: flex;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .qr-grid,
  .statement-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-toggle {
    display: none;
  }
}

@media (max-width: 680px) {
  .topbar,
  .toolbar,
  .table-header {
    align-items: stretch;
    flex-direction: column;
  }

  .form-grid,
  .detail-list,
  .stats-grid,
  .incident-summary-grid {
    grid-template-columns: 1fr;
  }

  .modal-print-actions,
  .modal-file-actions {
    grid-template-columns: 1fr;
  }

  .modal-backdrop {
    padding: 10px;
  }

  .content {
    padding-inline: 14px;
  }

  .login-panel {
    padding: 24px 18px 34px;
  }

  .public-shell {
    padding: 18px 12px;
  }

  .public-panel {
    padding: 28px 18px;
  }

  .public-panel .form-actions {
    align-items: center;
  }

  .evidence-previews {
    grid-template-columns: 1fr;
  }

  .evidence-list li {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .evidence-list-preview {
    width: 68px;
    height: 58px;
  }

  .evidence-list-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .taxi-search-results {
    position: fixed;
    z-index: 100;
    top: auto;
    right: 12px;
    bottom: 76px;
    left: 12px;
    max-height: 54vh;
    border-radius: 8px;
  }

  .taxi-search-option {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .taxi-search-option small {
    grid-column: 2;
  }

  .identity-copy img {
    width: 96px;
    height: 96px;
  }

  .qr-card {
    grid-template-columns: 1fr;
  }

  .legal-page-shell {
    padding: 0;
  }

  .legal-document {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .legal-document-header {
    padding: 28px 18px 20px;
  }

  .legal-page-nav {
    justify-content: flex-start;
    padding-inline: 4px;
  }

  .legal-page-nav a {
    padding: 12px 14px;
  }

  .legal-draft-warning {
    margin: 18px 16px 0;
  }

  .legal-document-body {
    padding: 4px 18px 28px;
  }

  .legal-identities {
    grid-template-columns: 1fr;
  }

  .legal-identity dl div,
  .privacy-first-layer dl div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .legal-footer nav {
    gap: 10px 14px;
  }
}
