/* =====================================================================
   IMPRESIÓN · pensada para el cuadrante en A4 horizontal, en una sola hoja.
   Siempre en colores claros (aunque la web esté en tema oscuro) y con los
   colores de los turnos tal cual, para que se lea igual que en pantalla.
   ===================================================================== */

@page { size: A4 landscape; margin: 7mm 8mm; }

:root, :root[data-tema] {
  --bg: #ffffff; --surface: #ffffff; --surface-2: #f3f4f6;
  --border: #c9ced6; --border-strong: #8f98a5;
  --text: #111418; --text-2: #2d333b; --muted: #59616c;
  --weekend: #eceef2; --festivo: #fbe3e3; --puente: #eee8fb; --today: transparent;
  --ok: #1d7a45; --ok-soft: #dff1e6; --danger: #c62e37; --warn: #9a6200;
  --primary: #2f5db3; --primary-soft: #e3eaf6;
  color-scheme: light;
}
* { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
html, body { background: #fff !important; }
body { font-size: 9pt; }

/* Fuera todo lo que no es el cuadrante */
.sidebar, .topbar, .scrim, #toasts, .no-print, .hint, .back, .palette, .q-legend-top,
.modal-back, .dropdown, .tema-toggle, [data-rowmenu], .page-head .actions { display: none !important; }
.shell, .content, .main { display: block !important; min-height: 0 !important; }
.page { padding: 0 !important; max-width: none !important; gap: 3mm !important; margin: 0 !important; }
.card { box-shadow: none !important; }
.print-only { display: block; }

/* Cabecera compacta */
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6mm; padding: 0 0 1.5mm; border-bottom: 1.2pt solid #111418; }
.page-head h1 { font-size: 15pt !important; letter-spacing: -.01em; }
.page-head p { font-size: 8.5pt; margin: 0 !important; color: var(--text-2); }
.page-head .badge { font-size: 7.5pt; }

/* ---------- Tabla del cuadrante: ancho completo, columnas iguales ---------- */
.q-wrap { border: 0 !important; padding: 0 !important; overflow: visible !important; }
.q-scroll { overflow: visible !important; max-height: none !important; }
.q-table { width: 100% !important; table-layout: fixed; border-collapse: collapse !important; font-size: 7.4pt; }
.q-table th, .q-table td { border: .4pt solid #b9c0c9 !important; position: static !important; }
.q-table .q-name { width: 42mm; min-width: 0 !important; max-width: none !important; padding: 0 1.5mm !important; background: #fff !important; }
.q-table .q-day, .q-table .q-cell { width: auto !important; min-width: 0 !important; }
.q-table .q-tot { width: 10.5mm; min-width: 0 !important; padding: 0 !important; font-size: 7pt; background: #f3f4f6 !important; }
.q-table thead th { height: auto !important; padding: .6mm 0 !important; background: #e9ecf1 !important; color: #111418; }
.q-table thead .we { background: #dfe2e8 !important; }
.q-table thead .fest { background: #f8d4d4 !important; }
.q-table thead .puente { background: #e6dcfa !important; }
.q-day .dn { font-size: 8pt; line-height: 1.1; }
.q-day .dw { font-size: 6pt; line-height: 1; color: #59616c; }
.q-table .esc-row th { height: 3.2mm !important; padding: 0 !important; }
.esc-pill { min-width: 0; height: 2.8mm; padding: 0 .8mm; font-size: 5.5pt; border-radius: .6mm; }

/* Nombres en una línea, puesto debajo en pequeño */
.q-name-in { display: block !important; }
.q-emp { padding: .4mm 0 !important; font-size: 7pt !important; line-height: 1.15 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-emp small { font-size: 5.6pt !important; }

/* Casillas de turno: color lleno, texto blanco y separación fina */
.q-cell { height: 5.1mm !important; padding: 0 !important; font-size: 6.8pt !important; font-weight: 700; cursor: default; }
.q-cell.we { background: #eceef2 !important; }
.q-cell.fest { background: #fbe3e3 !important; }
.q-cell.puente { background: #eee8fb !important; }
.q-cell.filled { background: var(--c) !important; color: #fff !important; box-shadow: inset 0 0 0 .5mm #fff !important; border-radius: 0 !important; }
.q-cell.today:not(.filled), .q-day.today { box-shadow: none !important; }
.q-cell.code-long { font-size: 5.2pt !important; letter-spacing: -.02em; }
.q-cell:hover { outline: none !important; }

/* Pie: horas cubiertas y cobertura */
.q-table tfoot th, .q-table tfoot td { height: 4.2mm !important; font-size: 6.6pt !important; background: #f3f4f6 !important; }
.q-table tfoot tr:first-child th, .q-table tfoot tr:first-child td { border-top: 1pt solid #59616c !important; }
.cob-val { padding: 0 .6mm; border-radius: .6mm; font-size: 6.4pt; min-width: 0; }
.cob-green { background: #dff1e6 !important; color: #1d7a45 !important; }
.cob-yellow { background: #fbe7b0 !important; color: #7a4d00 !important; }
.cob-red { background: #c62e37 !important; color: #fff !important; }

/* ---------- Leyenda compacta en columnas ---------- */
.q-legend { display: flex !important; flex-wrap: nowrap; gap: 4mm !important; padding: 1.5mm 0 0 !important; border: 0 !important; border-top: .6pt solid #c9ced6 !important; border-radius: 0 !important; font-size: 6.6pt !important; break-inside: avoid; }
.q-legend-col { gap: .5mm !important; break-inside: avoid; }
.q-legend-col h4 { font-size: 6.4pt !important; margin: 0 0 .4mm !important; color: #111418 !important; }
.q-legend-col > div { font-size: 6.4pt !important; line-height: 1.25; white-space: nowrap; }
.q-legend .shift-chip { min-width: 6.5mm !important; height: 3mm !important; font-size: 5.6pt !important; padding: 0 .6mm !important; border-radius: .6mm !important; }
/* Los grupos largos (p. ej. las 10 mañanas de VS Exterior) en dos columnas */
.q-legend-col.largo { display: grid !important; grid-template-columns: auto auto; column-gap: 3mm; align-content: start; }
.q-legend-col.largo h4 { grid-column: 1 / -1; }

.print-pie { padding-right: 1.5mm; margin-top: 1.5mm; font-size: 6.5pt; color: #59616c; display: flex; justify-content: space-between; }

/* Todo en una hoja */
.page, .q-wrap, .q-table { break-inside: avoid; }
