/* Panavisión Guías — hoja de estilos única, sin frameworks ni compilación.
   Dos públicos: la oficina, con tablas en un ordenador, y el guía, que abre
   su hoja de ruta en el móvil en mitad del viaje. */

:root {
  --primary: #0043ae;          /* el azul de la web */
  --primary-dark: #003380;
  --primary-soft: #e8effb;
  --celeste: #59b4e9;
  --sol: #ffda00;              /* el sol del logo */
  --sol-soft: #fff8cc;

  --ink: #002d6b;              /* azul marino: la barra lateral */
  --ink-2: #0a3a7e;

  --bg: #f1f4f9;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --border: #e0e6ef;
  --border-strong: #c7d1df;

  --text: #18233a;
  --muted: #5b687c;
  --faint: #95a1b2;

  --green: #15803d;
  --green-soft: #e8f7ee;
  --amber: #b45309;
  --amber-soft: #fdf3e3;
  --red: #dc2626;
  --red-soft: #fdecec;
  --blue-soft: #eaf1fe;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(16, 32, 64, .07);
  --shadow: 0 4px 14px rgba(16, 32, 64, .10);

  --sidebar-w: 232px;
  --font: "Open Sans", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;

  --seguro-arriba: env(safe-area-inset-top, 0px);
  --seguro-abajo: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: var(--font); font-size: 14.5px; line-height: 1.5;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
a, button, label, .btn { -webkit-tap-highlight-color: transparent; }

h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 23px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { margin: 0 0 1em; }

.ico { width: 17px; height: 17px; flex: 0 0 17px; vertical-align: -3px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.tiny { font-size: 11.5px; }
.small { font-size: 12.5px; }
.strong { font-weight: 700; }
.mono { font-family: var(--mono); }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.rojo { color: var(--red); }
.verde { color: var(--green); }
.ambar { color: var(--amber); }
.mt0 { margin-top: 0; } .mt1 { margin-top: 8px; } .mt2 { margin-top: 16px; } .mt3 { margin-top: 26px; }
.mb0 { margin-bottom: 0; } .mb1 { margin-bottom: 8px; } .mb2 { margin-bottom: 16px; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-top { align-items: flex-start; }
.hidden { display: none !important; }
.dos-columnas { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.principal-lateral { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.dos-columnas > *, .principal-lateral > * { min-width: 0; }

/* ------------------------------------------------------------------ armazón */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: var(--ink); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: block; padding: 16px 14px 6px; }
.brand:hover { text-decoration: none; }
.logo-marca { display: block; background: #fff; border-radius: 10px; padding: 8px 10px; line-height: 0; }
.logo-marca img { display: block; width: 100%; height: auto; max-height: 52px; object-fit: contain; }
.brand .producto {
  display: block; margin-top: 8px; text-align: center;
  font-size: 10.5px; color: #b9c8e6; letter-spacing: .16em; text-transform: uppercase; font-weight: 700;
}
.brand .producto b { color: var(--sol); font-weight: 800; }

.nav { padding: 8px 8px 10px; flex: 1; }
.nav-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: .1em;
  color: #8ea3c9; font-weight: 700; padding: 14px 10px 5px;
}
.nav a {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  color: #d6e0f2; font-size: 14px; font-weight: 600; margin-bottom: 1px;
}
.nav a:hover { background: var(--ink-2); color: #fff; text-decoration: none; }
.nav a.active { background: var(--primary); color: #fff; box-shadow: inset 3px 0 0 var(--sol); }
.nav a .ico { opacity: .8; }
.nav a .count {
  margin-left: auto; font-size: 11px; font-weight: 800; color: var(--ink);
  background: var(--sol); border-radius: 20px; padding: 0 7px; min-width: 18px; text-align: center;
}
.nav a.destacado { background: rgba(255, 218, 0, .12); color: #fff; }
.nav a.destacado .ico { color: var(--sol); opacity: 1; }

.sidebar-foot { border-top: 1px solid #1c4486; padding: 10px; }
.usuario { display: flex; align-items: center; gap: 9px; padding: 7px 8px; color: #d6e0f2; }
.usuario .nombre { display: block; font-size: 13px; font-weight: 700; color: #fff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usuario .rol { display: block; font-size: 11px; color: #8ea3c9; }
.avatar {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%;
  background: var(--primary); color: #fff; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700;
}
.avatar.sol { background: var(--sol); color: var(--ink); }
.salir {
  width: 100%; margin-top: 8px; background: var(--ink-2); color: #d6e0f2;
  border: 1px solid #1c4486; border-radius: var(--radius-sm);
  padding: 6px; font-size: 12.5px; font-family: inherit; cursor: pointer;
}
.salir:hover { color: #fff; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 56px; background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px; padding: 0 22px;
  position: sticky; top: 0; z-index: 40;
}
.topbar .titulo { font-weight: 700; font-size: 15.5px; }
.topbar .migas { color: var(--faint); font-size: 13px; }
.topbar .migas a { color: var(--muted); }
.topbar .spacer { flex: 1; }
.topbar .acciones { display: flex; align-items: center; gap: 8px; }
.menu-movil { display: none; }
.acciones-movil { display: none; flex-wrap: wrap; gap: 8px; padding: 10px 14px;
  background: var(--surface); border-bottom: 1px solid var(--border); }

.content { padding: 20px 22px 60px; width: 100%; }
.page-head { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head .sub { color: var(--muted); font-size: 13.5px; margin: 2px 0 0; }

/* ------------------------------------------------------------------ botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 13px; font-size: 14px; font-weight: 600; font-family: inherit;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); cursor: pointer;
  transition: background .12s, border-color .12s; white-space: nowrap; line-height: 1.4;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-sol { background: var(--sol); border-color: #e9c600; color: var(--ink); }
.btn-sol:hover { background: #ffe233; color: var(--ink); }
.btn-ok { background: var(--green); border-color: var(--green); color: #fff; }
.btn-ok:hover { background: #126b33; color: #fff; }
.btn-wa { background: #1fa855; border-color: #1fa855; color: #fff; }
.btn-wa:hover { background: #178a45; color: #fff; }
.btn-danger { color: var(--red); border-color: #f0c9c9; }
.btn-danger:hover { background: var(--red-soft); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 4px 9px; font-size: 12.5px; }
.btn-lg { padding: 11px 20px; font-size: 15.5px; font-weight: 700; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.botonera { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
form.en-linea { display: inline-block; margin: 0; }

/* -------------------------------------------------------------- formularios */
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 3px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel],
input[type=date], input[type=time], input[type=search], input[type=file], select, textarea {
  width: 100%; padding: 7px 10px; font-size: 14px; font-family: inherit; color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
textarea { min-height: 80px; resize: vertical; }
.campo { margin-bottom: 12px; }
.campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.campos-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.check { display: flex; align-items: center; gap: 7px; font-weight: 500; color: var(--text); font-size: 13.5px; }
.check input { width: auto; }
.casillas { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.ayuda { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ------------------------------------------------------------------ tarjetas */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card + .card { margin-top: 16px; }
.card-head { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-head h3 { margin: 0; }
.card-body { padding: 14px 16px; }
.card-body.sin-relleno { padding: 0; }
.card-foot { padding: 11px 16px; border-top: 1px solid var(--border); background: var(--surface-2); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.alert { padding: 10px 13px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 10px; border: 1px solid; }
.alert-success { background: var(--green-soft); border-color: #bfe6cd; color: #14532d; }
.alert-error   { background: var(--red-soft); border-color: #f3c9c9; color: #7f1d1d; }
.alert-warning { background: var(--amber-soft); border-color: #f0dcb4; color: #78350f; }
.alert-info    { background: var(--blue-soft); border-color: #c9dcfb; color: #1e3a8a; }
.flashes { padding: 12px 22px 0; }

.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px;
  border-radius: 20px; font-size: 11.5px; font-weight: 700; white-space: nowrap;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
}
.chip .ico { width: 13px; height: 13px; flex-basis: 13px; }
.chip-ok { background: var(--green-soft); border-color: #bfe6cd; color: #14532d; }
.chip-aviso { background: var(--amber-soft); border-color: #f0dcb4; color: #78350f; }
.chip-mal { background: var(--red-soft); border-color: #f3c9c9; color: #7f1d1d; }
.chip-info { background: var(--blue-soft); border-color: #c9dcfb; color: #1e3a8a; }
.chip-sol { background: var(--sol-soft); border-color: #f2df6b; color: #5c4a00; }
.chip-ruta { background: var(--primary); border-color: var(--primary); color: #fff; }
.etq-salud { background: #fdecec; border-color: #f3c9c9; color: #7f1d1d; }
.etq-habitacion { background: var(--blue-soft); border-color: #c9dcfb; color: #1e3a8a; }
.etq-comida { background: var(--green-soft); border-color: #bfe6cd; color: #14532d; }
.etq-traslado { background: var(--sol-soft); border-color: #f2df6b; color: #5c4a00; }
.etq-celebracion { background: #f3ecfd; border-color: #ddd0f7; color: #4c1d95; }

/* Revisión y avisos */
.revision { list-style: none; margin: 0; padding: 0; }
.revision li { display: flex; gap: 9px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.revision li:last-child { border-bottom: none; }
.revision .punto { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; margin-top: 6px; background: var(--faint); }
.revision li.error .punto { background: var(--red); }
.revision li.aviso .punto { background: var(--amber); }
.revision li.info .punto { background: var(--celeste); }
.revision li a { margin-left: auto; white-space: nowrap; font-size: 12.5px; font-weight: 600; }
.todo-bien { display: flex; gap: 8px; align-items: center; color: var(--green); font-weight: 600; font-size: 13.5px; }

/* --------------------------------------------------------------- indicadores */
.cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.cifra { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 13px 15px; display: block; color: inherit; }
a.cifra:hover { text-decoration: none; border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.cifra .que { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.cifra .cuanto { font-size: 26px; font-weight: 750; letter-spacing: -.02em; margin-top: 3px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.cifra .pie { font-size: 12px; color: var(--muted); margin-top: 3px; }
.cifra.destacada { background: var(--ink); border-color: var(--ink); }
.cifra.destacada .que { color: #a9bbdd; }
.cifra.destacada .cuanto { color: #fff; }
.cifra.destacada .pie { color: #a9bbdd; }
.cifra.mal .cuanto { color: var(--red); }
.cifra.sol { border-color: #f2df6b; background: var(--sol-soft); }

/* ------------------------------------------------------------------- tablas */
.tabla-wrap { overflow-x: auto; }
table.tabla { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tabla th, table.tabla td { padding: 7px 9px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.tabla thead th {
  background: var(--surface-2); font-size: 11px; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted); font-weight: 700; white-space: nowrap;
  position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--border-strong);
}
table.tabla tbody tr:hover { background: var(--primary-soft); }
table.tabla td.num, table.tabla th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.tabla tr.grupo td { background: var(--surface-2); font-weight: 700; font-size: 12px; color: var(--muted); }
table.tabla tfoot td { font-weight: 700; background: var(--surface-2); border-top: 2px solid var(--border-strong); }
table.tabla tr.apagada td { opacity: .5; }
table.tabla.compacta th, table.tabla.compacta td { padding: 5px 8px; font-size: 13px; }
table.tabla td.codigo { font-family: var(--mono); font-weight: 700; white-space: nowrap; }
.tabla input[type=text], .tabla input[type=tel], .tabla input[type=number], .tabla input[type=date], .tabla select {
  padding: 3px 6px; font-size: 13px; border-color: transparent; background: transparent; border-radius: 4px;
}
.tabla input:hover, .tabla select:hover { border-color: var(--border-strong); background: var(--surface); }
.tabla input:focus, .tabla select:focus { background: var(--surface); }
.fila-sucia { background: #fffdf0 !important; }

.filtros {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 10px 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 12px;
}
.filtros select, .filtros input { width: auto; min-width: 140px; }
.filtros .sep { width: 1px; height: 24px; background: var(--border); }

.pestanas { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; }
.pestanas a {
  padding: 6px 13px; border-radius: 20px; font-size: 13px; font-weight: 700;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
  display: inline-flex; gap: 6px; align-items: center;
}
.pestanas a:hover { text-decoration: none; border-color: var(--border-strong); }
.pestanas a.activa { background: var(--ink); border-color: var(--ink); color: #fff; }
.pestanas a .n { font-size: 11px; background: var(--surface-2); color: var(--muted); border-radius: 10px; padding: 0 6px; }
.pestanas a.activa .n { background: var(--primary); color: #fff; }

.lista-simple { list-style: none; margin: 0; padding: 0; }
.lista-simple li { padding: 9px 0; border-bottom: 1px solid var(--border); display: flex; gap: 10px; align-items: center; }
.lista-simple li:last-child { border-bottom: none; }
.vacio { text-align: center; padding: 38px 20px; color: var(--muted); }
.vacio .grande { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 6px; }

.ficha { display: grid; grid-template-columns: auto 1fr; gap: 5px 18px; margin: 0; font-size: 13.5px; }
.ficha dt { color: var(--muted); }
.ficha dd { margin: 0; font-weight: 600; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 20px; border-left: 2px solid var(--border); font-size: 13.5px; }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--primary); border: 2px solid var(--surface);
}
.timeline li.envio::before { background: var(--sol); }
.timeline .cabecera { font-size: 12px; color: var(--muted); }

/* ------------------------------------------------------------- la salida */
.cabecera-salida { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.codigo-grande {
  background: var(--ink); color: #fff; border-radius: 10px; padding: 8px 12px; text-align: center; line-height: 1.1;
  min-width: 78px;
}
.codigo-grande b { display: block; font-size: 24px; letter-spacing: .02em; }
.codigo-grande span { font-size: 11px; color: var(--sol); font-weight: 700; letter-spacing: .06em; }
.guia-tarjeta { display: flex; gap: 12px; align-items: center; }
.guia-tarjeta .avatar { width: 44px; height: 44px; flex-basis: 44px; font-size: 15px; }
.candidato { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); }
.candidato:last-child { border-bottom: none; }
.candidato .razones { font-size: 12px; color: var(--muted); }
.candidato.ocupado { opacity: .55; }
.puntos { font-size: 11px; font-weight: 800; color: var(--primary); background: var(--primary-soft); border-radius: 12px; padding: 1px 7px; }
.reserva-bloque { border-top: 2px solid var(--border); }
.reserva-bloque:first-child { border-top: none; }
.reserva-cab { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 12px; background: var(--surface-2); font-size: 13px; }
.reserva-cab .loc { font-family: var(--mono); font-weight: 700; }
.observacion { font-size: 12.5px; padding: 6px 12px; background: var(--sol-soft); border-top: 1px solid #f2df6b; }

.dia { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.dia:last-child { border-bottom: none; }
.dia .cuando { text-align: center; background: var(--primary-soft); border-radius: 8px; padding: 6px 4px; align-self: start; }
.dia .cuando b { display: block; font-size: 22px; line-height: 1; color: var(--primary); }
.dia .cuando span { font-size: 11px; color: var(--muted); text-transform: uppercase; font-weight: 700; }
.dia .titulo { font-weight: 700; }
.dia .linea { display: flex; gap: 7px; align-items: flex-start; font-size: 13.5px; margin-top: 4px; }
.dia .linea .ico { color: var(--muted); margin-top: 2px; }
.dia.hoy .cuando { background: var(--sol); }
.dia.hoy .cuando b { color: var(--ink); }

.tipo-servicio { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: 12.5px; }
.tipo-hotel { color: #1e3a8a; } .tipo-almuerzo, .tipo-cena { color: #14532d; } .tipo-opcional { color: #8a5a00; }
.tipo-visita { color: #4c1d95; } .tipo-traslado { color: #334155; }
details.editar > summary { list-style: none; cursor: pointer; }
details.editar > summary::-webkit-details-marker { display: none; }
details.editar[open] { background: var(--surface-2); }
.editor { padding: 12px 14px; border-top: 1px dashed var(--border-strong); }

/* --------------------------------------------------------------- cuadrante */
.cuadrante { overflow-x: auto; }
.cuadrante .fila { display: grid; grid-template-columns: 190px repeat(var(--n), minmax(26px, 1fr)); align-items: stretch; min-width: calc(190px + var(--n) * 26px); }
.cuadrante .fila + .fila { border-top: 1px solid var(--border); }
.cuadrante .nombre { grid-column: 1; grid-row: 1; padding: 6px 10px; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--surface); position: sticky; left: 0; z-index: 2; }
.cuadrante .nombre small { color: var(--faint); font-weight: 600; }
.cuadrante .dia-col { grid-row: 1; border-left: 1px solid var(--border); min-height: 34px; }
.cuadrante .dia-col.finde { background: #f4f6fa; }
.cuadrante .dia-col.hoy { background: var(--sol-soft); }
.cuadrante .cab .dia-col { font-size: 11px; text-align: center; color: var(--muted); padding: 3px 0; font-weight: 700; min-height: 0; }
.cuadrante .cab .dia-col b { display: block; font-size: 13px; color: var(--text); }
.cuadrante .barra {
  grid-row: 1; margin: 5px 1px; border-radius: 6px; padding: 2px 6px; font-size: 11.5px; font-weight: 800;
  color: #fff; background: var(--primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; z-index: 1;
  display: flex; align-items: center;
}
.cuadrante .barra:hover { text-decoration: none; filter: brightness(1.1); }
.cuadrante .barra.propuesto { background: repeating-linear-gradient(135deg, var(--celeste) 0 8px, #4aa3d8 8px 16px); }
.cuadrante .barra.confirmado { background: var(--primary); }
.cuadrante .barra.choque { background: var(--red); }
.cuadrante .barra.ausencia { background: repeating-linear-gradient(135deg, #c7d1df 0 6px, #dbe2ec 6px 12px); color: var(--muted); font-weight: 600; }
.cuadrante .barra.sin-guia { background: var(--sol); color: var(--ink); border: 1px dashed #c9a800; }
.cuadrante .sin-guia-fila .nombre { color: #8a6d00; }
.leyenda { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.leyenda i { display: inline-block; width: 18px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ---------------------------------------------------------------- importar */
.zona-subir {
  border: 2px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2);
  padding: 34px 20px; text-align: center; cursor: pointer; transition: border-color .12s, background .12s;
}
.zona-subir.encima { border-color: var(--primary); background: var(--primary-soft); }
.zona-subir .ico { width: 34px; height: 34px; color: var(--primary); }
.zona-subir input { display: none; }
.zona-subir .ficheros { margin-top: 10px; font-size: 13px; color: var(--text); }
.doc-leido { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); }
.doc-leido:last-child { border-bottom: none; }
.doc-leido .pdf { flex: 0 0 34px; height: 40px; border-radius: 4px; background: #e5484d; color: #fff;
  font-size: 9.5px; font-weight: 800; display: grid; place-items: center; }
.doc-leido.desconocido .pdf { background: var(--faint); }

/* ------------------------------------------------------------------ entrada */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: linear-gradient(160deg, var(--primary) 0%, var(--ink) 70%); }
.login-card { width: 100%; max-width: 400px; background: var(--surface); border-radius: 14px;
  padding: 28px 28px; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.login-card .logo-marca { padding: 0 20px 6px; }
.login-card .logo-marca img { max-height: 70px; }
.login-card .sub { text-align: center; color: var(--muted); font-size: 13px; margin: 6px 0 20px; font-weight: 600; letter-spacing: .04em; }

/* ---------------------------------------------------------- papel (documentos) */
.papel { background: #fff; color: #111; max-width: 900px; margin: 0 auto 22px; border: 1px solid var(--border);
  box-shadow: var(--shadow); padding: 26px 30px; font-size: 12.5px; }
.papel h2 { font-size: 17px; margin: 0; letter-spacing: .02em; text-transform: uppercase; }
.papel .membrete { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px;
  border-bottom: 3px solid var(--primary); padding-bottom: 10px; margin-bottom: 12px; }
.papel .membrete img { height: 44px; width: auto; }
.papel .membrete .datos { text-align: right; font-size: 11.5px; color: #333; }
.papel .franja { display: flex; gap: 22px; flex-wrap: wrap; font-size: 12px; background: #f2f5fb; padding: 6px 10px; margin-bottom: 12px; }
.papel table { width: 100%; border-collapse: collapse; }
.papel th, .papel td { border-bottom: 1px solid #ddd; padding: 4px 6px; text-align: left; vertical-align: top; }
.papel th { font-size: 10.5px; text-transform: uppercase; color: #555; border-bottom: 1.5px solid #999; }
.papel td.c { text-align: center; } .papel td.n { text-align: right; }
.papel .subtitulo { font-weight: 800; font-size: 13px; margin: 14px 0 6px; color: var(--ink); }
.papel .obs { font-size: 11.5px; color: #7a4a00; }
.papel .pie-papel { margin-top: 14px; font-size: 10.5px; color: #666; border-top: 1px solid #ddd; padding-top: 6px; }
.bono { border: 1.5px solid #333; padding: 12px 14px; margin-bottom: 14px; page-break-inside: avoid; }
.bono .cab { display: flex; justify-content: space-between; gap: 14px; }
.bono .num { font-family: var(--mono); font-size: 14px; font-weight: 700; }
.bono .marca-bono { font-size: 20px; font-weight: 800; letter-spacing: .2em; color: var(--primary); }
.bono .pie-bono { font-size: 10px; color: #444; border-top: 1px solid #ccc; margin-top: 10px; padding-top: 6px; }

/* --------------------------------------------------------------- hoja del guía */
.hoja-body { background: var(--bg); }
.hoja-top { background: var(--ink); color: #fff; padding: calc(14px + var(--seguro-arriba)) 16px 16px; }
.hoja-top .dentro { max-width: 760px; margin: 0 auto; }
.hoja-top .marca { display: flex; align-items: center; gap: 10px; }
.hoja-top .marca img { height: 34px; width: 34px; border-radius: 50%; background: #fff; }
.hoja-top .marca span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #a9bbdd; font-weight: 700; }
.hoja-top h1 { font-size: 20px; margin: 10px 0 2px; }
.hoja-top .datos { font-size: 13px; color: #c9d6ee; }
.hoja { max-width: 760px; margin: 0 auto; padding: 14px 14px calc(84px + var(--seguro-abajo)); }
.hoja .card { margin-bottom: 12px; }
.hoja .card + .card { margin-top: 0; }
.barra-inferior { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: var(--surface);
  border-top: 1px solid var(--border); padding-bottom: var(--seguro-abajo); box-shadow: 0 -2px 12px rgba(16,32,64,.08); }
.barra-inferior .pestanas-movil { display: flex; max-width: 760px; margin: 0 auto; }
.barra-inferior a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 9px 4px 7px; min-height: 56px; color: var(--muted); font-size: 10.5px; font-weight: 700; text-decoration: none; }
.barra-inferior a .ico { width: 21px; height: 21px; flex: 0 0 21px; }
.barra-inferior a.activa { color: var(--primary); }
.pax-fila { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-top: 1px solid var(--border); }
.pax-fila .grow b { display: block; font-size: 13.5px; }
.llamar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green); flex: 0 0 38px; }
.llamar.wa { background: #e3f6ea; color: #1fa855; }
.llamar:hover { text-decoration: none; }

/* ------------------------------------------------------------------ impresión */
@media print {
  .sidebar, .topbar, .acciones-movil, .flashes, .no-print, .filtros, .pestanas { display: none !important; }
  .app { display: block; }
  .content { padding: 0; }
  body { background: #fff; }
  .papel { border: none; box-shadow: none; padding: 0; max-width: none; margin: 0; }
  .papel + .papel, .salto { page-break-before: always; }
  .card { border: none; box-shadow: none; }
  a { color: #000; text-decoration: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ------------------------------------------------------------------- móvil */
@media (max-width: 1000px) {
  .principal-lateral, .dos-columnas { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: -100%; z-index: 60; transition: left .2s; padding-top: var(--seguro-arriba); }
  .sidebar.abierta { left: 0; }
  .menu-movil { display: block; background: none; border: none; cursor: pointer; padding: 6px; }
  .menu-movil span { display: block; width: 20px; height: 2px; background: var(--text); margin: 4px 0; }
  .topbar { padding: var(--seguro-arriba) 12px 0; gap: 8px; height: calc(56px + var(--seguro-arriba)); }
  .topbar .migas { display: none; }
  .topbar .titulo { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar .acciones { display: none; }
  .acciones-movil { display: flex; }
  .acciones-movil:empty { display: none; }
  .content { padding: 14px; }
  .page-head > .grow { flex: 1 0 100%; }
  .filtros { padding: 10px; }
  .filtros select, .filtros input { min-width: 0; flex: 1 1 150px; }
  .filtros .sep { display: none; }
  .velo { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 55; }
  .velo.visible { display: block; }
  input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel],
  input[type=date], input[type=time], input[type=search], select, textarea { font-size: 16px; padding: 10px 12px; }
  .btn { min-height: 40px; }
  .btn-sm { min-height: 34px; }
  .papel { padding: 14px; }
  .dia { grid-template-columns: 64px 1fr; }
}
