/* Intranet de Solsur Travel. Letra del sistema (nada de fuentes de terceros), tema claro de oficina. */
:root {
  --fondo: #f4f5f7;
  --papel: #ffffff;
  --tinta: #1d2433;
  --suave: #5d6678;
  --linea: #dfe3ea;
  --marca: #13315c;
  --marca-2: #1f4f8f;
  --sol: #e8891c;
  --ok: #1f7a4d;
  --aviso: #b26a00;
  --mal: #b3261e;
  --radio: 8px;
  font-size: 15px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fondo); color: var(--tinta); }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; line-height: 1.4; }
a { color: var(--marca-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.35rem; margin: 0 0 1rem; }
h2 { font-size: 1.05rem; margin: 1.5rem 0 .6rem; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.suave { color: var(--suave); }
.peq { font-size: .85rem; }
.oculto { display: none !important; }

/* ----- Estructura ----- */
.marco { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.lateral { background: var(--marca); color: #fff; padding: 1rem .75rem; display: flex; flex-direction: column; gap: .2rem; position: sticky; top: 0; height: 100vh; }
.marca { display: flex; align-items: center; gap: .6rem; padding: .25rem .5rem 1.2rem; font-weight: 700; letter-spacing: .02em; }
.marca img { width: 30px; height: 30px; }
.marca small { display: block; font-weight: 400; opacity: .7; font-size: .75rem; }
.lateral a { color: #dce6f5; padding: .55rem .7rem; border-radius: 6px; display: block; }
.lateral a:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.lateral a.activo { background: rgba(255,255,255,.14); color: #fff; box-shadow: inset 3px 0 0 var(--sol); }
.lateral .pie { margin-top: auto; font-size: .85rem; opacity: .85; padding: .5rem .7rem; }
.lateral .pie button { margin-top: .4rem; background: none; border: 1px solid rgba(255,255,255,.3); color: #fff; padding: .3rem .6rem; border-radius: 6px; cursor: pointer; }
.contenido { padding: 1.5rem 2rem 3rem; max-width: 1400px; width: 100%; }
.cabecera { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.cabecera h1 { margin: 0; }
.menu-movil { display: none; }

/* ----- Controles ----- */
button, .boton { font: inherit; border: 1px solid var(--linea); background: var(--papel); color: var(--tinta); padding: .45rem .85rem; border-radius: 6px; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; }
button:hover, .boton:hover { border-color: #b9c1cf; text-decoration: none; }
button.primario, .boton.primario { background: var(--marca); border-color: var(--marca); color: #fff; }
button.primario:hover { background: var(--marca-2); }
button.peligro { color: var(--mal); }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea { font: inherit; border: 1px solid var(--linea); border-radius: 6px; padding: .45rem .6rem; background: #fff; color: var(--tinta); width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid #9ec0ea; border-color: var(--marca-2); }
textarea { min-height: 70px; resize: vertical; }
input[type=checkbox] { width: auto; }
label { display: block; font-size: .8rem; color: var(--suave); margin-bottom: .2rem; }
.campo { margin-bottom: .75rem; }
.rejilla { display: grid; gap: .75rem 1rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.rejilla .ancho { grid-column: 1 / -1; }
.filtros { display: flex; gap: .5rem; flex-wrap: wrap; align-items: end; margin-bottom: 1rem; }
.filtros > * { width: auto; }
.filtros input[type=search] { min-width: 260px; }
.acciones { display: flex; gap: .5rem; flex-wrap: wrap; }
.check { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; color: var(--tinta); margin: 0; }

/* ----- Tarjetas y tablas ----- */
.tarjeta { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 1rem 1.2rem; }
.tarjetas { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); margin-bottom: 1.2rem; }
.cifra .titulo { font-size: .8rem; color: var(--suave); }
.cifra .valor { font-size: 1.6rem; font-weight: 700; margin-top: .2rem; font-variant-numeric: tabular-nums; }
.cifra .nota { font-size: .8rem; color: var(--suave); margin-top: .15rem; }
.tabla-env { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: .55rem .75rem; text-align: left; border-bottom: 1px solid var(--linea); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--suave); background: #fafbfc; font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: none; }
tbody tr.clic { cursor: pointer; }
tbody tr.clic:hover { background: #f6f8fb; }
tfoot td { font-weight: 700; background: #fafbfc; }
.paginacion { display: flex; gap: .5rem; align-items: center; justify-content: flex-end; margin-top: .75rem; }
.vacio { padding: 2rem; text-align: center; color: var(--suave); }

/* Estado: texto sobrio con un punto fijo de color (nada de cápsulas) */
.estado { white-space: nowrap; }
.estado::before { content: ""; display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; margin-right: .4rem; background: var(--suave); vertical-align: middle; }
.estado.ok::before { background: var(--ok); }
.estado.aviso::before { background: var(--sol); }
.estado.mal::before { background: var(--mal); }
.estado.azul::before { background: var(--marca-2); }

.pestanas { display: flex; gap: .2rem; border-bottom: 1px solid var(--linea); margin: 1rem 0; }
.pestanas button { border: none; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: .5rem .9rem; color: var(--suave); }
.pestanas button.activo { color: var(--marca); border-bottom-color: var(--sol); font-weight: 600; }

/* ----- Boleta (copia de la de papel) ----- */
.boleta { background: #fff; border: 1px solid #9aa3b2; border-radius: 4px; padding: 1.4rem 1.6rem; max-width: 900px; }
.boleta .encabezado { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.boleta .encabezado .of { font-size: 1.25rem; font-weight: 700; letter-spacing: .02em; }
.boleta .encabezado .datos { display: grid; grid-template-columns: auto 220px; gap: .4rem .6rem; align-items: center; }
.boleta .encabezado .datos label { margin: 0; font-weight: 700; color: var(--tinta); font-size: .85rem; }
.boleta table { border: 1px solid #555; }
.boleta td { border: 1px solid #555; padding: .3rem .5rem; vertical-align: middle; }
.boleta td.et { width: 150px; font-size: .78rem; font-weight: 600; color: #333; text-transform: uppercase; background: #fbfbfb; }
.boleta td.et2 { width: 120px; font-weight: 700; text-align: center; font-size: .85rem; text-transform: uppercase; }
.boleta td input, .boleta td select, .boleta td textarea { border: none; padding: .35rem .2rem; background: transparent; }
.boleta td input:focus, .boleta td select:focus, .boleta td textarea:focus { outline: 2px solid #9ec0ea; background: #f6faff; }
.boleta .sub { font-size: .75rem; font-weight: 700; text-align: center; text-transform: uppercase; color: #333; }
.boleta .aviso-tarjeta { font-size: .75rem; color: var(--suave); }
.boleta .socio-existente { margin-bottom: 1rem; }

/* ----- Viaje ----- */
.opcion { display: grid; grid-template-columns: 1.2fr 1.2fr 95px 125px; grid-template-areas: "hotel hotel est fin" "loc reg precio coste"; gap: .4rem; align-items: center; padding-bottom: .6rem; margin-bottom: .6rem; border-bottom: 1px dashed var(--linea); }
.o-hotel { grid-area: hotel; } .o-est { grid-area: est; } .o-fin { grid-area: fin; display: flex; justify-content: space-between; align-items: center; gap: .3rem; }
.o-loc { grid-area: loc; } .o-reg { grid-area: reg; } .o-precio { grid-area: precio; } .o-coste { grid-area: coste; }
.presu { white-space: pre-wrap; font-family: ui-monospace, Consolas, monospace; font-size: .85rem; background: #fafbfc; border: 1px solid var(--linea); border-radius: 6px; padding: .8rem 1rem; max-height: 520px; overflow: auto; }
.dos-col { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.2rem; align-items: start; }

/* ----- Factura (para imprimir) ----- */
.factura { background: #fff; border: 1px solid var(--linea); padding: 2.2rem 2.4rem; max-width: 820px; }
.factura .cab { display: flex; justify-content: space-between; gap: 2rem; margin-bottom: 2rem; }
.factura .cab h2 { margin: 0 0 .3rem; font-size: 1.4rem; color: var(--marca); }
.factura table th { background: none; }
.factura .totales { margin-left: auto; width: 280px; margin-top: 1rem; }
.factura .totales td { border: none; padding: .25rem .5rem; }
.factura .totales tr.total td { font-size: 1.15rem; font-weight: 700; border-top: 2px solid var(--tinta); }
.factura .mencion { margin-top: 2rem; font-size: .8rem; color: var(--suave); }
.linea-f { display: grid; grid-template-columns: 1fr 80px 110px 80px 34px; gap: .4rem; margin-bottom: .4rem; }

/* ----- Login ----- */
.login { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, var(--marca) 0%, #0b1f3d 100%); padding: 1rem; }
.login form { background: #fff; padding: 2rem; border-radius: 12px; width: 100%; max-width: 360px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.login .marca { color: var(--marca); padding: 0 0 1.2rem; font-size: 1.15rem; }
.login .marca img { width: 40px; height: 40px; }
.login button { width: 100%; justify-content: center; margin-top: .5rem; padding: .6rem; }
.error { color: var(--mal); font-size: .9rem; min-height: 1.2rem; margin-top: .5rem; }

/* ----- Avisos y modales ----- */
#aviso { position: fixed; right: 1rem; bottom: 1rem; background: var(--tinta); color: #fff; padding: .7rem 1rem; border-radius: 8px; opacity: 0; transform: translateY(10px); transition: .2s; pointer-events: none; z-index: 100; max-width: 420px; }
#aviso.ver { opacity: 1; transform: none; }
#aviso.mal { background: var(--mal); }
.fondo-modal { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: grid; place-items: center; z-index: 50; padding: 1rem; }
.modal { background: #fff; border-radius: 10px; padding: 1.3rem 1.5rem; width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; }
.modal h2 { margin-top: 0; }
.modal .acciones { justify-content: flex-end; margin-top: 1rem; }

@media (max-width: 900px) {
  .marco { grid-template-columns: 1fr; }
  .lateral { position: fixed; inset: 0 auto 0 0; width: 240px; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .lateral.abierto { transform: none; }
  .menu-movil { display: inline-flex; }
  .contenido { padding: 1rem; }
  .dos-col { grid-template-columns: 1fr; }
  .opcion { grid-template-columns: 1fr 1fr; grid-template-areas: "hotel hotel" "est fin" "loc reg" "precio coste"; }
  .boleta { padding: 1rem; }
  .boleta td.et { width: 100px; }
  .filtros input[type=search] { min-width: 0; width: 100%; }
}

@media print {
  .lateral, .cabecera .acciones, .no-imprimir, .menu-movil { display: none !important; }
  .marco { display: block; }
  .contenido { padding: 0; }
  body { background: #fff; }
  .factura, .boleta { border: none; padding: 0; max-width: none; }
}
