@font-face {
  font-family: "Public Sans";
  src: url("./fonts/PublicSans-SemiBold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("./fonts/PublicSans-Bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
:root {
  color-scheme: light;
  --bg: #edf3f2;
  --surface: #ffffff;
  --surface-soft: #f4f8f7;
  --line: #d5dfdd;
  --line-strong: #91a6a1;
  --text: #123a35;
  --ink: #123a35;
  --muted: #536861;
  --muted-strong: #344f47;
  --brand: #123a35;
  --brand-deep: #123a35;
  --accent: #12695d;
  --accent-strong: #0b5147;
  --safety: #b8d8ce;
  --safety-strong: #b8d8ce;
  --safety-soft: #eff7f3;
  --ok-bg: #e8f6ef;
  --ok-text: #17623d;
  --warn-bg: #fff3d8;
  --warn-text: #76530f;
  --danger-bg: #fde8e4;
  --danger-text: #8c2b22;
  --shadow: none;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  color: var(--brand);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.05;
  margin-bottom: 7px;
}

.topbar .muted {
  color: var(--brand);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.35;
}

h2 {
  color: var(--brand);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 0;
}

h3 {
  color: var(--brand);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.25;
  margin-bottom: 4px;
}

strong {
  font-weight: 700;
}

.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 0;
}

.sectionIntro {
  align-items: center;
  background: transparent;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin: 28px 0 14px;
  padding-top: 18px;
}

.sectionIntro.compact {
  margin-top: 12px;
}

.sectionIntro h2 {
  font-size: 24px;
}

.opsSteps {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: min(620px, 100%);
}

.opsSteps span {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 8px 4px;
  text-align: center;
}

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

.two {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.panel {
  min-width: 0;
  padding: 16px;
}

.panelHead,
.itemMain {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.panelHead {
  border-bottom: 1px solid var(--line);
  margin: -1px -1px 14px;
  padding: 0 0 12px;
}

.panelHead h2 {
  color: var(--brand-deep);
}

.count {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--accent);
  border-radius: 25px;
  color: var(--brand);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  height: 24px;
  justify-content: center;
  min-width: 26px;
  padding: 0 8px;
}

.list {
  display: grid;
  gap: 8px;
}

.item {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 10px;
}

.item:hover {
  border-color: var(--line-strong);
}

.item p {
  font-size: 12px;
  line-height: 1.38;
  margin-bottom: 7px;
}

.item p:last-child {
  margin-bottom: 0;
}

details.item {
  padding: 0;
}

details.item summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  list-style-position: inside;
  padding: 10px;
}

details.item[open] summary {
  border-bottom: 1px solid var(--line);
}

details.item form {
  padding: 10px;
}

.pill {
  border-radius: 25px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  padding: 6px 8px;
  text-transform: uppercase;
  white-space: nowrap;
}

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

.warning {
  background: var(--warn-bg);
  color: var(--warn-text);
}

.danger {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.amber {
  background: #fef3c7;
  color: #92400e;
}

.subList {
  padding: 8px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.live {
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 1px solid #99a9b5;
  border-radius: 4px;
  color: var(--muted-strong);
  padding: 7px 8px;
}

.live.vigente {
  border-left-color: #2d8a5f;
}

.live.divergente,
.live.no_evaluable {
  border-left-color: #bc6c25;
}

.note {
  background: var(--safety-soft);
  border: 1px solid #f0dfb9;
  border-left: 1px solid var(--safety);
  border-radius: 4px;
  padding: 8px;
}

label {
  color: var(--muted-strong);
  display: grid;
  font-size: 0.875rem;
  font-weight: 600;
  gap: 6px;
  text-transform: none;
}

input,
select {
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  color: var(--text);
  min-height: 34px;
  padding: 7px 9px;
  width: 100%;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(36, 79, 196, 0.16);
  outline: 0;
}

input[readonly] {
  background: #eef3f6;
  color: var(--muted-strong);
}

label:has(input[type="checkbox"]) {
  align-items: center;
  display: flex;
  gap: 8px;
  min-height: 34px;
  text-transform: none;
}

input[type="checkbox"] {
  height: 16px;
  min-height: 0;
  width: 16px;
}

.formPanel {
  display: grid;
  gap: 10px;
}

.formGrid {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.button,
.smallButton,
.linkButton {
  align-items: center;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
}

.button {
  background: var(--accent);
  border: 2px solid #ffffff;
  border-radius: 25px;
  color: #ffffff;
  font-weight: 400;
  min-height: 40px;
  padding: 8px 18px;
  text-decoration: none;
}

.button:hover {
  background: var(--accent-strong);
}

.longActionButton:disabled,
body[data-long-action-pending="true"] .longActionButton {
  cursor: wait;
  opacity: 0.62;
  pointer-events: none;
}

.button.secondary {
  background: #ffffff;
  border: 2px solid var(--brand);
  color: var(--brand);
}

.smallButton {
  background: #ffffff;
  border: 1px solid var(--brand);
  border-radius: 25px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  min-height: 32px;
  padding: 6px 12px;
}

.smallButton:hover {
  background: var(--brand);
  color: #ffffff;
}

.linkButton {
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 0 0;
}

.table {
  display: block;
  overflow-x: auto;
}

.row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: 72px minmax(160px, 1fr) 72px 140px 86px;
  min-width: 560px;
  padding: 8px 0;
}

.row:last-child {
  border-bottom: 0;
}

/* Listas acotadas y filas de incidencia compactas (Intervención). */
.scrollList {
  max-height: 340px;
  overflow-y: auto;
}
.row.incRow {
  grid-template-columns: 1fr auto;
  min-width: 520px;
}
.incLink {
  display: grid;
  grid-template-columns:
    58px minmax(90px, 1fr) 72px minmax(110px, 1.2fr)
    minmax(70px, 1fr);
  gap: 8px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}
.incLink:hover {
  color: var(--brand);
}
.incLink strong,
.incLink span {
  font-size: 12px;
}
.incLink .ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ruleTags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}
.ruleTag {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  color: var(--muted-strong);
  white-space: nowrap;
}
.ruleTag strong {
  color: var(--brand-deep);
}

/* Filas de lavado/cambio de producto (Cuadrante). */
.row.washRow {
  grid-template-columns:
    64px minmax(70px, auto) 120px minmax(80px, 1fr) minmax(110px, 1fr)
    auto;
  min-width: 560px;
}
.washRow .pill:not(.danger) {
  background: var(--surface-soft);
  color: var(--muted-strong);
}

/* Orden de carga por origen/día (Cuadrante). */
.loadOrderOrigin {
  margin: 14px 0 4px;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-strong);
}

/* Filas clicables de pendientes y editor de carga. */
.pendRow {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 7px 6px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
.pendRow:last-child {
  border-bottom: 0;
}
.pendRow:hover {
  background: var(--surface-soft);
}
.pendRow strong,
.pendRow span {
  font-size: 12px;
}
.checkLabel {
  flex-direction: row;
  align-items: center;
  gap: 6px;
}
.dangerForm {
  margin-top: 10px;
}
.button.ghost.danger {
  color: var(--accent-strong);
  border-color: var(--line-strong);
}
.button.ghost.danger:hover {
  color: #a52a2a;
  border-color: #a52a2a;
}

.row strong {
  font-size: 12px;
}

.row span {
  color: var(--muted-strong);
  font-size: 12px;
}

.demandRow {
  grid-template-columns: minmax(220px, 1.2fr) 170px 110px 140px 86px 86px;
  min-width: 880px;
}

.compactRow {
  grid-template-columns: 90px minmax(180px, 1fr) 110px 120px;
  min-width: 520px;
}

.baseArea {
  border-top: 0;
  margin-top: 26px;
  padding-top: 0;
}

.baseArea > summary {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  cursor: pointer;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  list-style-position: inside;
  margin-bottom: 14px;
  padding: 12px 14px;
}

.baseArea > summary span {
  color: var(--brand);
  font-size: 18px;
  font-weight: 400;
}

.baseArea > summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.baseGrid {
  margin-top: 0;
}

.baseBlockTitle {
  align-items: center;
  display: flex;
  gap: 10px;
  margin: 22px 0 12px;
}

.baseBlockTitle span {
  background: var(--safety);
  border: 0;
  border-radius: 0;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 6px 10px;
  text-transform: uppercase;
}

.baseBlockTitle h3 {
  font-size: 15px;
  margin: 0;
}

@media (max-width: 1180px) {
  .two {
    grid-template-columns: 1fr;
  }

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

  .sectionIntro {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 18px, 1680px);
    padding-top: 8px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    padding-top: 18px;
  }

  .topnav {
    justify-content: flex-start;
  }

  .metrics,
  .formGrid {
    grid-template-columns: 1fr;
  }

  .panelHead,
  .itemMain {
    align-items: flex-start;
    flex-direction: column;
  }

  .opsSteps {
    grid-template-columns: 1fr 1fr;
  }

  .baseArea > summary {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ===== Rediseño operación: pestañas, matriz, tablero (R25) ===== */
.topnav .tab {
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  color: var(--muted-strong);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}
.topnav .tab.active {
  background: var(--brand);
  color: #fff;
}
.toggle {
  display: inline-flex;
  gap: 0.25rem;
  background: var(--surface-soft);
  padding: 0.25rem;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.toggle .tab {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted-strong);
  font-weight: 600;
  font-size: 0.85rem;
}
.toggle .tab.active {
  background: var(--brand);
  color: #fff;
}
.headActions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* Barra de acciones de la semana: botones alineados, mismo tamaño, en orden de flujo. */
.opsBar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}
.opsInline {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin: 0;
}
.opsInline > label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.opsInline input[type="file"] {
  font: inherit;
  max-width: 210px;
  padding: 6px 0;
}
.opsInline input[type="text"],
.opsInline input:not([type]),
.opsInline select {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: #fff;
}
.opsBar .button {
  min-width: 150px;
  justify-content: center;
  white-space: nowrap;
}
.button.ghost {
  background: #fff;
  border: 2px solid var(--line);
  color: var(--muted-strong);
}
.button.ghost:hover {
  background: #fff;
  border-color: var(--brand);
  color: var(--brand);
}
.orchestrationForm {
  display: flex;
  gap: 0.5rem;
  align-items: end;
}
.orchestrationForm label {
  min-width: 150px;
}
.metrics.compact div {
  padding: 0.5rem 0.75rem;
}

.matrixWrap {
  overflow-x: auto;
}
.matrix {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.85rem;
}
.matrix th,
.matrix td {
  border: 1px solid var(--line);
  padding: 0.35rem 0.4rem;
  text-align: center;
  vertical-align: top;
  min-width: 5.5rem;
}
.matrix thead th {
  background: var(--brand);
  color: #fff;
  font-weight: 600;
}
.matrixRowHead {
  text-align: left;
  background: var(--surface-soft);
  color: var(--brand-deep);
  font-weight: 600;
  white-space: nowrap;
  position: sticky;
  left: 0;
}
.cell {
  background: var(--surface);
}
.cellForm {
  margin: 0;
}
.cellQty {
  width: 3.2rem;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.15rem;
  font-weight: 700;
  color: var(--brand-deep);
}
.cellMeta {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.15rem;
}
.cellActions {
  display: flex;
  gap: 0.2rem;
  justify-content: center;
  margin-top: 0.2rem;
}
.chipButton {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--brand);
  border-radius: 6px;
  width: 1.5rem;
  height: 1.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}
.chipButton:hover {
  background: var(--brand);
  color: #fff;
}

.cov-completa {
  background: var(--ok-bg);
  color: var(--ok-text);
}
.cov-pendiente {
  background: var(--warn-bg);
  color: var(--warn-text);
}
.cov-hueco {
  background: var(--danger-bg);
  color: var(--danger-text);
}
.cov-vacia {
  background: var(--surface-soft);
  color: var(--muted);
}

.board td.libre {
  background: var(--surface-soft);
}
.board td.ocupada {
  background: var(--ok-bg);
}
.chip {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  margin: 0.1rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
}
.chip.ok {
  background: var(--ok-bg);
  color: var(--ok-text);
  border: 1px solid var(--ok-text);
}
.chip.warning {
  background: var(--warn-bg);
  color: var(--warn-text);
  border: 1px solid var(--warn-text);
}
.chip.danger {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid var(--danger-text);
}
.legend {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.5rem;
}
.legend span {
  margin-right: 0.2rem;
}
.legend .cov-completa,
.legend .cov-pendiente,
.legend .cov-hueco,
.legend .cov-vacia {
  padding: 0 0.3rem;
  border-radius: 3px;
}

.cellEdit {
  display: inline-flex;
  gap: 0.2rem;
  align-items: center;
  justify-content: center;
}

/* ===== Vista por conductor (cuadrante individual) R26b ===== */
.matrixRowHead a {
  color: var(--brand);
  text-decoration: none;
}
.matrixRowHead a:hover {
  text-decoration: underline;
}
.small {
  font-size: 0.78rem;
}
.driverWeek {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.5rem;
}
.dayCol {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.4rem;
  background: var(--surface-soft);
  min-width: 0;
}
.dayCol h3 {
  margin: 0 0 0.4rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--brand-deep);
  border-bottom: 2px solid var(--safety);
  padding-bottom: 0.2rem;
}
.dayCol .item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.4rem;
  margin-bottom: 0.4rem;
}
.timeline {
  list-style: none;
  margin: 0.3rem 0 0;
  padding: 0;
  font-size: 0.72rem;
}
.tl {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.3rem;
  padding: 0.12rem 0;
  border-bottom: 1px dotted var(--line);
}
.tlTime {
  color: var(--muted-strong);
  font-variant-numeric: tabular-nums;
}
.tlKind {
  color: var(--brand-deep);
}
.tlMin {
  color: var(--muted);
  text-align: right;
}
.tl-daily_rest .tlKind {
  color: var(--accent-strong);
  font-weight: 700;
}
.tl-daily_rest {
  background: var(--ok-bg);
}
.tl-load .tlKind,
.tl-unload .tlKind {
  font-weight: 600;
}
.tl-pause .tlKind,
.tl-return_pause .tlKind {
  color: var(--warn-text);
}

@media (max-width: 900px) {
  .driverWeek {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media print {
  .topbar,
  .metrics,
  .sectionIntro .toggle,
  .headActions,
  .eyebrow {
    display: none !important;
  }
  .shell {
    padding: 0;
  }
  .printable {
    border: 0;
    box-shadow: none;
  }
  a[href]:after {
    content: "";
  }
  /* Hoja del conductor: una columna a lo ancho (7 columnas en A4 apilan el texto). Cada día y cada carga
     no se parten entre páginas. */
  .driverWeek {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
  .printable .dayCol {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .printable .item {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .printable .timeline {
    font-size: 0.9rem;
  }
  .printable .tl {
    padding: 0.15rem 0;
  }
  /* Output del conductor: solo hitos operativos (carga, descarga, retorno). Se ocultan la conducción,
     las pausas y el descanso (detalle útil en pantalla, ruido en la hoja del conductor) y el estado. */
  .printable .timeline .tl-drive,
  .printable .timeline .tl-pause,
  .printable .timeline .tl-return_pause,
  .printable .timeline .tl-daily_rest {
    display: none !important;
  }
  .printable .itemMain .pill {
    display: none !important;
  }
}

/* ===== Pantalla de carga durante acciones largas (orquestar) R45 ===== */
/* Aviso de carga NO bloqueante: banner superior. No cubre la página (pointer-events:none) para no
   atrapar al usuario si una acción larga deja el flag pegado: puede seguir navegando/cambiando de semana. */
.loadingOverlay {
  display: none;
  position: fixed;
  top: 12px;
  left: 0;
  right: 0;
  z-index: 9999;
  justify-content: center;
  pointer-events: none;
}
body[data-long-action-pending="true"] .loadingOverlay {
  display: flex;
}
.loadingCard {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 1px solid var(--brand);
  border-radius: 8px;
  padding: 12px 18px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}
.loadingCard p {
  margin: 0;
  text-align: left;
}
.loadingTitle {
  color: var(--brand);
  font-size: 14px;
  font-weight: 700;
}
.spinner {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: 3px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Navegador de semanas */
.weekNav {
  align-items: center;
}
.weekNavMain {
  display: flex;
  align-items: center;
  gap: 14px;
}
.weekNavCurrent {
  text-align: center;
  min-width: 120px;
}
.weekNavCurrent h2 {
  margin: 0;
}
.weekNavMain .tab {
  font-size: 18px;
  line-height: 1;
  padding: 6px 12px;
}
.weekNavJump {
  display: flex;
  align-items: end;
  gap: 8px;
}
.weekNavJump label {
  display: flex;
  flex-direction: column;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  gap: 4px;
}
.weekNavJump input {
  font: inherit;
  padding: 6px 8px;
  border: 1px solid var(--line);
}
@media print {
  .weekNav {
    display: none !important;
  }
}

/* Panel de métricas derivadas */
.metricsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin: 0 0 18px;
}
.metricCard {
  background: var(--surface);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.metricValue {
  color: var(--brand);
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
}
.metricLabel {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.metricList {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.metricList li {
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.metricList.inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}
.metricList.inline li {
  border-bottom: 0;
  padding: 2px 0;
}

/* Estado operativo de recursos */
.resourceStatusGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.resourceStatusGrid h3 {
  margin: 0 0 8px;
  color: var(--brand-deep);
  font-size: 15px;
}
.statusList {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}
.statusItem {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 9px 10px;
}
.statusItem strong {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  color: var(--ink);
}
.statusBadges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.statusBadge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.statusBadge.ok {
  background: var(--ok-bg);
  color: var(--ok-text);
  border-color: var(--ok-text);
}
.statusBadge.warning {
  background: var(--warn-bg);
  color: var(--warn-text);
  border-color: var(--warn-text);
}
.statusBadge.danger {
  background: var(--danger-bg);
  color: var(--danger-text);
  border-color: var(--danger-text);
}
@media (max-width: 1100px) {
  .resourceStatusGrid {
    grid-template-columns: 1fr;
  }
}

.loadedReturnFields {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}
.formGrid:has(input[name="retornoConCarga"]:checked) .loadedReturnFields {
  display: grid;
}
@media (max-width: 800px) {
  .loadedReturnFields {
    grid-template-columns: 1fr;
  }
}

/* Account surfaces inherit the current application palette; full redesign is F07. */
.authPage {
  min-height: 100dvh;
  padding: 0 24px 48px;
}
.authHeader {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.authBrand {
  font-size: 1.25rem;
  font-weight: 650;
  text-decoration: none;
}
.authMain {
  width: min(100%, 28rem);
  margin: 64px auto 0;
}
.authMain h1 {
  margin: 0 0 12px;
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-transform: none;
}
.authDescription {
  overflow-wrap: anywhere;
  margin: 0 0 32px;
  color: var(--muted-strong);
  font-size: 1rem;
  line-height: 1.5;
}
.authForm {
  display: grid;
  gap: 24px;
}
.authField {
  display: grid;
  gap: 8px;
}
.authField label,
.businessChoices legend {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  text-transform: none;
}
.authField input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  caret-color: var(--accent);
}
.passwordInput {
  display: flex;
  position: relative;
  align-items: center;
}
.passwordInput input {
  padding-right: 80px;
}
.passwordToggle {
  position: absolute;
  right: 6px;
  padding: 9px 8px;
  color: var(--accent-strong);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 0.875rem;
}
.authPrimary {
  min-height: 46px;
  width: 100%;
}
.authForm .button:disabled {
  cursor: wait;
  opacity: 0.65;
}
.authLink {
  width: fit-content;
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 0.9375rem;
}
.authLink:hover,
.passwordToggle:hover {
  color: var(--ink);
}
.authHint {
  display: block;
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.5;
  font-size: 0.875rem;
}
.authError {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--danger-bg);
  color: var(--danger-text);
  font-size: 0.9375rem;
  line-height: 1.5;
}
.authPage :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.authPage ::selection {
  background: var(--safety);
  color: var(--ink);
}
.authFooter {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.authSelection {
  overflow-wrap: anywhere;
}
.invitationCancel {
  margin-top: 16px;
}
.businessChoices {
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}
.businessChoices legend {
  margin-bottom: 12px;
}
.businessChoice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.businessChoice input {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
.businessChoice strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1rem;
  font-weight: 600;
}
@media (max-width: 520px) {
  .authPage {
    padding-inline: 20px;
  }
  .authHeader {
    padding-block: 22px;
  }
  .authMain {
    margin-top: 40px;
  }
  .authMain h1 {
    font-size: 1.75rem;
  }
}

.businessChoice > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.authField select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
}
.accountList {
  list-style: none;
  margin: 0;
  padding: 0;
}
.accountList li {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.accountList li strong {
  display: block;
  margin-bottom: 4px;
}
.teamName {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 600;
  text-transform: none;
}
.teamMemberForm {
  margin-top: 24px;
}
.teamNote {
  margin-top: 16px;
}
.teamList li {
  padding-block: 24px;
}
.accountList li form {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.accountList input {
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  padding: 8px 10px;
  background: var(--surface);
}
.teamEditor {
  margin-top: 16px;
}
.teamEditor summary {
  width: fit-content;
  cursor: pointer;
  color: var(--accent-strong);
  text-underline-offset: 3px;
}
.teamEditor summary:hover {
  text-decoration: underline;
}

/* F04: readable inherited operational views with long scoped resource names. */
.shell .grid > * {
  min-width: 0;
}
.shell .row > * {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.shell .pill {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  justify-self: start;
}
.shell .metricLabel {
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  .shell .toggle {
    flex-wrap: wrap;
    max-width: 100%;
    border-radius: 16px;
  }
  .shell .row {
    display: flex;
    flex-wrap: wrap;
    min-width: 0;
    gap: 8px 12px;
  }
  .shell .row > strong {
    flex-basis: 100%;
  }
  .shell .incLink {
    display: flex;
    flex-wrap: wrap;
    min-width: 0;
    gap: 8px 12px;
  }
  .shell .incLink .ellipsis {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .shell .grid.two {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* F04 independent review: preserve the full native summary and daily controls. */
.complianceSummaryContent {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 1em);
  vertical-align: top;
}
.complianceSummaryContent > strong {
  flex-basis: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}
.complianceSummaryContent .pill {
  display: inline-block;
}
@media (max-width: 760px) {
  .shell .matrixRowHead {
    position: static;
    white-space: normal;
    min-width: 8rem;
    max-width: 10rem;
    overflow-wrap: anywhere;
  }
}

/* F05: inline operational feedback; the full visual replacement remains F07. */
.planningStatus {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 16px 0;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.planningStatus > div {
  flex: 1 1 24rem;
  min-width: 0;
}
.planningStatus p {
  margin: 4px 0;
  max-width: 72ch;
  overflow-wrap: anywhere;
}
.planningStatus > [role="alert"] {
  flex-basis: 100%;
}
.planningStatus button {
  min-height: 44px;
}

/* Shared working surfaces */
:root {
  --rail: #123f38;
  --rail-muted: #bad7cf;
  --selection: #c9e7de;
  --radius: 6px;
}
body {
  font-size: 0.9375rem;
  line-height: 1.5;
}
::selection {
  background: var(--selection);
  color: var(--ink);
}
* {
  scrollbar-color: var(--line-strong) var(--surface-soft);
  scrollbar-width: thin;
}
a {
  text-underline-offset: 0.2em;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
input,
select,
textarea {
  caret-color: var(--accent);
  border-radius: var(--radius);
  min-height: 42px;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  box-shadow: none;
}
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
h1,
h2,
h3 {
  font-family: "Public Sans", "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 {
  font-size: 1.875rem;
  line-height: 1.2;
}
h2 {
  font-size: 1.25rem;
  line-height: 1.35;
}
h3 {
  font-size: 1rem;
}
p {
  max-width: 74ch;
}
.appFrame {
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  min-height: 100dvh;
}
.appRail {
  background: var(--rail);
  color: white;
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.appBrand {
  text-decoration: none;
  font-size: 1.4rem;
  letter-spacing: -0.04em;
  padding-inline: 12px;
}
.appBrand strong {
  font-weight: 450;
  color: #c9e7de;
}
.appNavigation > summary {
  display: none;
}
.appNavigation nav {
  display: grid;
  gap: 5px;
}
.appNavigation a,
.railAccount > a {
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 5px;
  display: block;
  font-size: 0.875rem;
}
.appNavigation a:hover,
.railAccount > a:hover {
  background: #22564c;
}
.appNavigation a[aria-current="page"] {
  background: #d9eee7;
  color: #123f38;
  font-weight: 650;
}
.railAccount {
  margin-top: auto;
  border-top: 1px solid #547c70;
  padding-top: 16px;
}
.railAccount .button {
  margin: 8px 0 0 10px;
  color: white;
  border-color: #91b7aa;
  background: transparent;
}
.appWorkspace {
  min-width: 0;
}
.contextBar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 18px 32px;
  background: white;
  border-bottom: 1px solid var(--line);
  font-size: 0.875rem;
}
.contextBar > div {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.contextBar span {
  color: var(--muted);
}
.contextBar a {
  color: var(--accent-strong);
}
.shell {
  width: min(100%, 1600px);
  padding: 24px 32px 60px;
  margin: 0 auto;
}
.workSummary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}
.workSummary strong {
  color: var(--text);
  font-weight: 600;
}
.skipLink {
  position: fixed;
  z-index: 100;
  left: 16px;
  top: -100px;
  background: white;
  padding: 12px;
  color: var(--accent);
}
.skipLink:focus {
  top: 12px;
}
.sectionIntro {
  border: 0;
  margin: 28px 0 20px;
  padding: 0;
}
.sectionIntro h1,
.sectionIntro h2 {
  margin-bottom: 6px;
}
.sectionIntro h2 {
  font-size: 1.625rem;
}
.panel {
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 20px;
}
.panelHead {
  margin: 0 0 18px;
  padding-bottom: 14px;
}
.item {
  border-radius: 6px;
}
.button,
.smallButton {
  border-radius: 6px;
  min-height: 42px;
  font-weight: 600;
  padding: 9px 16px;
  border: 1px solid transparent;
}
.button.secondary,
.smallButton {
  border: 1px solid var(--line-strong);
  background: white;
  color: var(--accent-strong);
}
.button.secondary:hover,
.smallButton:hover {
  background: #e0eee8;
  color: var(--accent-strong);
  border-color: var(--accent);
}
.button.danger {
  background: var(--danger-text);
  color: white;
}
.button.ghost.danger {
  background: white;
  color: var(--danger-text);
  border: 1px solid var(--danger-text);
}
.pill {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: none;
  line-height: 1.3;
  padding: 4px 9px;
}
.weekNav {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 18px;
}
.weekNavMain .tab {
  font-size: 0.875rem;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 9px;
}
.weekNavCurrent h2 {
  font-size: 1.125rem;
}
.weekNavJump label {
  font-size: 0.8125rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted-strong);
}
.headActions,
.actionRow {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}
.dataTableWrap {
  overflow-x: auto;
  max-width: 100%;
}
.dataTable {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}
.dataTable th {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted-strong);
  background: var(--surface-soft);
}
.dataTable th,
.dataTable td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.dataTable td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}
.dataTable tbody tr:hover {
  background: #f4f8f7;
}
.dataTable select {
  min-width: 10rem;
}
.dataTable a {
  color: var(--accent-strong);
  font-weight: 600;
}
.emptyState {
  padding: 28px 0;
  max-width: 62ch;
}
.emptyState h3 {
  font-size: 1.125rem;
}
.flowSteps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  padding: 0;
  list-style: none;
  margin: 0 0 28px;
  color: var(--muted);
}
.flowSteps li {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.flowSteps li[aria-current="step"] {
  color: var(--accent-strong);
  border-color: var(--accent);
  font-weight: 650;
}
.fieldStack {
  display: grid;
  gap: 18px;
}
.fieldStack textarea {
  width: 100%;
  min-height: 160px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  background: white;
  color: var(--text);
}
.fieldStack fieldset {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  min-width: 0;
  border-radius: 6px;
}
.fieldStack legend {
  font-weight: 600;
  padding: 0 6px;
}
.formColumns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.reviewTotals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 14px 0;
  border-block: 1px solid var(--line);
}
.reviewTotals p {
  margin: 0;
}
.reviewDelta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}
.reviewDelta > div {
  min-width: 0;
}
.reviewDelta dt {
  color: var(--muted);
  font-size: 0.8125rem;
}
.reviewDelta dd {
  margin: 0 0 10px;
  overflow-wrap: anywhere;
}
.reviewDelta .changedValue {
  background: #e4f3eb;
  color: #164e3b;
}
.reviewBlock {
  margin-block: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.reviewBlock code {
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}
.notice {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-block: 16px;
}
.notice p:last-child {
  margin-bottom: 0;
}
.authPage {
  background: white;
}
.authHeader {
  border-color: var(--line);
}
.authBrand {
  color: var(--accent-strong);
}
.authMain {
  margin-top: 56px;
}
.authField input,
.authField select {
  border-radius: 6px;
}
.authPage ::selection {
  background: var(--selection);
}
@media (max-width: 1000px) {
  .appFrame {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .appRail {
    padding: 24px 12px;
  }
  .shell {
    padding-inline: 22px;
  }
  .contextBar {
    padding-inline: 22px;
  }
  .dataTable {
    min-width: 660px;
  }
}
@media (max-width: 760px) {
  .appFrame {
    display: block;
  }
  .appRail {
    padding: 16px 18px;
    gap: 14px;
  }
  .appBrand {
    padding: 0;
  }
  .appNavigation > summary {
    display: list-item;
    cursor: pointer;
    padding-block: 6px;
  }
  .appNavigation nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 8px;
  }
  .railAccount {
    display: flex;
    flex-wrap: wrap;
    margin-top: 0;
    padding-top: 8px;
    gap: 4px 12px;
  }
  .railAccount > a {
    padding-inline: 0;
  }
  .railAccount .button {
    margin: 0;
    min-height: 40px;
  }
  .contextBar {
    padding: 14px 18px;
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }
  .shell {
    width: 100%;
    padding: 18px 16px 40px;
  }
  .workSummary {
    gap: 6px 16px;
  }
  .sectionIntro {
    margin-top: 22px;
  }
  .weekNav {
    align-items: stretch;
    padding: 12px;
  }
  .weekNavMain {
    justify-content: space-between;
    gap: 8px;
  }
  .weekNavJump {
    flex-wrap: wrap;
  }
  .weekNavJump label {
    flex: 1;
  }
  .panel {
    padding: 16px;
    border-radius: 12px;
  }
  .formColumns,
  .reviewDelta {
    grid-template-columns: minmax(0, 1fr);
  }
  .formGrid {
    grid-template-columns: minmax(0, 1fr);
  }
  .flowSteps {
    gap: 8px 16px;
    font-size: 0.8125rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  .appRail,
  .contextBar,
  .workSummary,
  .skipLink {
    display: none !important;
  }
  .appFrame {
    display: block;
  }
  .shell {
    padding: 0;
  }
}

label,
fieldset {
  min-width: 0;
}
select {
  max-width: 100%;
}
summary {
  cursor: pointer;
}
.messageBody {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
code {
  overflow-wrap: anywhere;
}

.operationFields {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.sourceComparison {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 760px) {
  .sourceComparison {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Working-surface corrections verified from the first rendered round. */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: none;
}
.grid,
.formGrid {
  align-items: start;
}
.formPanel {
  align-content: start;
}
input,
select,
textarea {
  font-weight: 400;
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--accent);
}
.appRail {
  position: sticky;
  top: 0;
  height: 100dvh;
  align-self: start;
  overflow-y: auto;
  gap: 28px;
}
.navigationContent {
  height: calc(100dvh - 130px);
  display: flex;
  flex-direction: column;
}
.mobileExport,
.mobileOnly,
.dataTable td .mobileOnly {
  display: none;
}
summary.panelHead {
  display: list-item;
  cursor: pointer;
  color: var(--accent-strong);
}
summary.panelHead h2 {
  display: inline;
}
details.panel:not([open]) > summary.panelHead {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}
.opsSteps {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  gap: 8px 16px;
}
.opsSteps span {
  font-size: 0.8125rem;
  padding: 0;
  letter-spacing: 0;
  font-weight: 400;
}
.opsInline label {
  font-size: 0.875rem;
  text-transform: none;
  letter-spacing: 0;
}
.sectionIntro {
  flex-wrap: wrap;
}
.sectionIntro > div:first-child {
  flex: 1 1 25rem;
}
.toggle {
  border-radius: 8px;
  flex-wrap: wrap;
  max-width: 100%;
}
.toggle .tab {
  border-radius: 5px;
  white-space: nowrap;
}
.metrics.compact {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  margin: 18px 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.metrics.compact > div {
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.metrics.compact span {
  font-size: 1rem;
  font-weight: 650;
}
.metrics.compact p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}
.metricsGrid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  border: 0;
  background: transparent;
}
.metricCard {
  padding: 0;
  background: transparent;
}
.metricValue {
  font-size: 1rem;
  font-weight: 650;
}
.metricLabel {
  text-transform: none;
  font-size: 0.8125rem;
  letter-spacing: 0;
  font-weight: 400;
}
.baseLinks {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 8px 18px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 12px 16px;
  margin-bottom: 20px;
  border-radius: 8px;
}
.baseLinks a {
  color: var(--accent-strong);
  font-size: 0.875rem;
}
[id] {
  scroll-margin-top: 100px;
}
.driverWeek {
  grid-template-columns: repeat(7, minmax(14rem, 1fr));
  overflow-x: auto;
  padding-bottom: 8px;
}
.dayCol .itemMain {
  flex-wrap: wrap;
}
.dayCol .pill {
  white-space: nowrap;
  flex: 0 0 auto;
}
.timeline {
  font-size: 0.8125rem;
  line-height: 1.45;
}
.cellQty {
  min-width: 3rem;
  font-size: 0.875rem;
}
.chipButton {
  width: auto;
  height: auto;
  min-height: 32px;
  font-size: 0.75rem;
  padding: 5px 8px;
}
.cellEdit,
.cellActions {
  flex-wrap: wrap;
}
.legend .legendSwatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 4px;
}
.comparisonTable {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}
.comparisonTable caption {
  text-align: left;
  font-weight: 600;
  padding-bottom: 10px;
}
.comparisonTable th,
.comparisonTable td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 10px;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.comparisonTable thead th {
  background: var(--surface-soft);
  font-weight: 600;
}
@media (max-width: 760px) {
  .appRail {
    position: static;
    height: auto;
    padding: 16px 18px;
    gap: 12px;
  }
  .navigationContent {
    height: auto;
  }
  .railAccount {
    margin-top: 12px;
  }
  .mobileExport {
    display: block;
  }
  .contextBar {
    padding: 12px 18px;
  }
  .contextBar > div {
    display: block;
  }
  .contextBar span {
    display: block;
    margin-top: 3px;
  }
  .contextBar > a {
    display: none;
  }
  .sectionIntro > div:first-child {
    flex-basis: auto;
  }
  .sectionIntro {
    gap: 12px;
  }
  .headActions .button {
    font-size: 0.875rem;
    padding-inline: 12px;
  }
  .mobileOnly,
  .dataTable td .mobileOnly {
    display: block;
  }
  .driverWeek {
    grid-template-columns: minmax(0, 1fr);
    overflow-x: visible;
  }
  .baseLinks {
    gap: 6px 12px;
    padding: 10px 12px;
  }
  .comparisonTable {
    font-size: 0.8125rem;
  }
  .comparisonTable th,
  .comparisonTable td {
    padding: 9px 5px;
  }
  .comparisonTable th:first-child {
    width: 21%;
  }
  .comparisonTable th {
    font-size: 0.75rem;
  }
}
@media print {
  .baseLinks {
    display: none;
  }
  .driverWeek {
    display: block;
    overflow: visible;
  }
  .dayCol {
    break-inside: avoid;
    margin-bottom: 12px;
  }
}

/* F08 own portals extend the documented working system. */
.profileForm {
  margin-bottom: 32px;
}
.profileForm .operationFields {
  display: grid;
  gap: 12px;
}
.profileForm .button {
  justify-self: start;
}
.portalMessageForm {
  margin-block: 24px 32px;
}
.portalMessageForm .operationFields {
  display: grid;
  gap: 20px;
}
.portalField {
  display: grid;
  gap: 8px;
}
.portalFieldError {
  margin: 0;
  color: var(--danger-text);
  font-size: 0.875rem;
}
.portalMessageForm textarea {
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
  caret-color: var(--accent);
}
.portalMessageForm .button {
  justify-self: start;
}
.portalFacts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 28px;
  margin: 24px 0;
}
.portalFacts dt {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.portalFacts dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.portalOrders,
.portalMessages {
  list-style: none;
  margin: 0;
  padding: 0;
}
.portalOrders li {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.portalOrders h3 {
  margin-bottom: 6px;
}
.portalOrders p {
  margin-bottom: 6px;
}
.portalMessages li {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.portalMessages p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-block: 8px;
}
.portalReceipt {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.portalId {
  overflow-wrap: anywhere;
  font-size: 0.8125rem;
}
@media (max-width: 760px) {
  .portalFacts {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .portalOrders li {
    flex-direction: column;
  }
}
@media print {
  .portalNoPrint {
    display: none !important;
  }
  .portalFrame.appFrame {
    display: block;
  }
  .portalFrame .shell {
    padding: 0;
  }
  .portalFrame .contextBar {
    border-bottom: 1px solid #777;
  }
  .portalFrame .panel {
    break-inside: avoid;
  }
  .portalFrame .portalFacts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.publicGuide {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 32px;
  background: var(--surface);
  min-height: 100dvh;
}
.publicHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.publicHeader nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
}
.publicIntro {
  max-width: 800px;
  padding: 72px 0 56px;
}
.publicIntro h1 {
  font-size: 2.5rem;
  max-width: 23ch;
  margin-bottom: 20px;
}
.publicIntro p {
  font-size: 1.125rem;
  line-height: 1.6;
  margin-bottom: 26px;
}
.publicSection {
  padding: 34px 0;
  border-top: 1px solid var(--line);
}
.publicSection h2 {
  margin-bottom: 22px;
}
.publicSteps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  padding-left: 20px;
}
.publicSteps li::marker {
  color: var(--accent);
  font-weight: 700;
}
.publicRoles {
  margin: 0;
}
.publicRoles > div {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.publicRoles dt {
  font-weight: 600;
}
.publicRoles dd {
  margin: 0;
  max-width: 70ch;
}
.publicFooter {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
@media (max-width: 760px) {
  .publicGuide {
    padding: 0 20px;
  }
  .publicHeader {
    align-items: start;
    flex-direction: column;
    gap: 16px;
  }
  .publicIntro {
    padding: 42px 0 32px;
  }
  .publicIntro h1 {
    font-size: 2rem;
  }
  .publicSteps {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .publicRoles > div {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}
