/* Diseño: contenido centrado con ancho máximo, recuadros blancos con bordes suaves,
   grillas de columnas parejas. Letra Plus Jakarta Sans (licencia libre OFL), servida por la app. */
@font-face {
  font-family: 'Jakarta';
  src: url('/fonts/jakarta.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}
:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #0f1a2e;
  --muted: #5f6b80;
  --soft: #f6f8fc;
  --border: #e4e8f0;
  --border-strong: #cdd5e2;
  --primary: #1f6feb;
  --primary-dark: #1450b5;
  --primary-soft: #eaf2ff;
  --accent: #ff7a3d;
  --accent-soft: #fff0e7;
  --danger: #d1373a;
  --danger-soft: #fdecec;
  --ok: #12965c;
  --ok-soft: #e3f7ec;
  --warn: #b57c00;
  --warn-soft: #fff6e0;
  --sidebar: #0c1830;
  --sidebar-text: #aebbd2;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 26, 46, 0.04), 0 2px 8px rgba(15, 26, 46, 0.04);
  --shadow-lift: 0 2px 4px rgba(15, 26, 46, 0.05), 0 10px 24px rgba(15, 26, 46, 0.08);
  --content: 1320px;
  font-family: 'Jakarta', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
.hidden { display: none !important; }
h1, h2, h3 { margin: 0 0 12px; font-weight: 650; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: 24px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
a { color: var(--primary); }
.muted { color: var(--muted); }
.error { color: var(--danger); min-height: 1em; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
small { font-size: 12px; }

/* ---------- Estructura ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 232px; background: var(--sidebar); color: var(--sidebar-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; flex-shrink: 0; }
.brand { font-weight: 700; font-size: 17px; color: #fff; padding: 20px 20px 16px; letter-spacing: -0.01em; }
.branch-pick { display: block; padding: 0 20px 12px; font-size: 12px; }
.branch-pick span { display: block; margin-bottom: 4px; opacity: 0.75; }
.branch-pick select { width: 100%; min-height: 40px; padding: 6px 8px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.08); color: #fff; font: inherit; font-size: 14px; }
.branch-pick option { color: #1c2128; }
.sidebar nav { display: flex; flex-direction: column; padding: 4px 12px; gap: 2px; overflow-y: auto; flex: 1; }
.sidebar nav a { color: var(--sidebar-text); text-decoration: none; padding: 9px 12px; border-radius: 8px; font-weight: 500; }
.sidebar nav a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.sidebar nav a.active { background: var(--primary); color: #fff; }
.user-box { padding: 14px 20px 18px; border-top: 1px solid rgba(255, 255, 255, 0.08); display: flex; flex-direction: column; gap: 6px; }
.user-name { color: #fff; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.user-box .btn.link { color: #9fb3d1; font-size: 13px; }
.user-box .btn.link:hover { color: #fff; }
.lang-switch { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.lang-switch .btn.link.active { font-weight: 700; text-decoration: none; cursor: default; }
.login-card .lang-switch { justify-content: center; }
.user-box .lang-switch { color: #9fb3d1; }
.user-box .lang-switch .btn.link.active { color: #fff; }

/* El contenido queda centrado y no se estira más allá de un ancho cómodo. */
.view { flex: 1; min-width: 0; width: 100%; max-width: var(--content); margin: 0 auto; padding: 28px 32px 48px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- Recuadros y grillas ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.card > h2:first-child { display: flex; align-items: center; gap: 8px; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack > * + * { margin-top: 16px; }
.notice { border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; border: 1px solid var(--border); background: var(--card); }
.notice.warn { background: var(--warn-soft); border-color: #f3dd9b; }
.notice.error { background: var(--danger-soft); border-color: #f0c4c5; }

/* Panel: indicadores en filas parejas de 4 */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi .l { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.kpi .v { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .v small { font-size: 16px; color: var(--muted); font-weight: 600; }
.kpi .s { color: var(--muted); font-size: 12px; }
.meter { height: 6px; background: #edf1f7; border-radius: 99px; overflow: hidden; margin-top: 6px; }
.meter i { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.dash { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dash .wide { grid-column: 1 / -1; }
.card.alert { border-color: #f2c2c3; }
.card.alert h2 { color: var(--danger); }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; background: #edf1f7; color: var(--muted); font-size: 12px; font-weight: 700; }
.card.alert .count { background: var(--danger-soft); color: var(--danger); }
.empty { color: var(--muted); margin: 0; padding: 14px 0 4px; }
.daylist { display: flex; flex-direction: column; }
.dayrow { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 10px 8px; border-top: 1px solid var(--border); border-radius: 8px; }
.daylist .dayrow:first-child { border-top: none; }
.dayrow.click { cursor: pointer; }
.dayrow.click:hover { background: var(--soft); }
.dayrow small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dayrow .when b { font-size: 16px; font-variant-numeric: tabular-nums; }
.dayrow .who { min-width: 0; }
.dayrow .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dayrow .what { text-align: right; }
.dayrow.docs { grid-template-columns: 120px repeat(2, minmax(0, 1fr)); }
.plate { display: inline-block; font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; font-size: 12.5px; letter-spacing: 0.04em; padding: 2px 8px; border: 1.5px solid var(--text); border-radius: 5px; background: #fff; }

/* Detalle de la reserva: dos columnas que se apilan sin huecos */
.detail { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.detail .col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
dl.info { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 8px 16px; margin: 0; }
dl.info dt { color: var(--muted); }
dl.info dd { margin: 0; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.timeline li { position: relative; }
.timeline li::before { content: ''; position: absolute; left: -20px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--primary); }
.timeline .t-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.timeline .t-head small { color: var(--muted); }
.timeline .t-detail { color: var(--muted); font-size: 12.5px; margin-top: 2px; overflow-wrap: anywhere; }

/* ---------- Formularios ---------- */
label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
input, select, textarea { font: inherit; font-weight: 400; color: var(--text); padding: 8px 11px; min-height: 38px; border: 1px solid var(--border-strong); border-radius: 8px; background: #fff; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 3px solid #cfe0ff; outline-offset: 0; border-color: var(--primary); }
textarea { min-height: 84px; resize: vertical; }
textarea.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; min-height: 220px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 14px; font-weight: 400; }
.check input { width: auto; min-height: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; padding: 14px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.toolbar label { flex: 1 1 150px; }
.toolbar input, .toolbar select { width: 100%; min-width: 0; }
.toolbar > .btn, .toolbar > input { flex: 0 0 auto; width: auto; }
.toolbar > input#crud-q { flex: 1 1 260px; }

.btn { font: inherit; font-weight: 600; border: 1px solid var(--border-strong); background: #fff; color: var(--text); padding: 0 14px; min-height: 36px; border-radius: 8px; cursor: pointer; white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background 0.12s, border-color 0.12s; }
.btn:hover { border-color: #b9c3d3; background: var(--soft); }
.btn:focus-visible { outline: 3px solid #cfe0ff; outline-offset: 1px; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn.danger { color: var(--danger); border-color: #f0c4c5; }
.btn.danger:hover { background: var(--danger-soft); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.ok:hover { filter: brightness(0.95); }
.btn.small { padding: 0 10px; min-height: 28px; font-size: 12.5px; }
.btn.link { border: none; background: none; padding: 0; min-height: 0; color: var(--primary); font-weight: 500; }
.btn.link:hover { background: none; text-decoration: underline; }
.btn:disabled { opacity: 0.5; cursor: default; }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card .table-wrap { box-shadow: none; }
.table-wrap > .card { border: none; box-shadow: none; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
th { font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; background: var(--soft); white-space: nowrap; }
td { font-variant-numeric: tabular-nums; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--soft); }
.card table th, .card table td { padding: 9px 10px; }
table.mini th, table.mini td { padding: 8px 8px; }
table.mini th { background: transparent; }

/* ---------- Etiquetas de estado ---------- */
.badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 650; background: #eef1f6; color: #4a5468; white-space: nowrap; vertical-align: middle; }
.b-pendiente { background: #fff1cc; color: #8a5a00; }
.b-confirmada { background: #dceaff; color: #1450b5; }
.b-en_curso { background: #d9f4e6; color: #0f6e43; }
.b-finalizada { background: #eceff3; color: #555f72; }
.b-cancelada, .b-no_show, .b-error { background: #fde2e2; color: #a12427; }
.b-disponible, .b-procesada { background: #d9f4e6; color: #0f6e43; }
.b-alquilado { background: #dceaff; color: #1450b5; }
.b-mantenimiento, .b-duplicada { background: #fff1cc; color: #8a5a00; }
.b-fuera_servicio { background: #fde2e2; color: #a12427; }
.b-cotizador { background: #efe4ff; color: #6131b5; }
h1 .badge { font-size: 12.5px; }

/* ---------- Nueva reserva: categorías ---------- */
.cat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.cat-card { border: 1.5px solid var(--border); border-radius: var(--radius); padding: 14px 16px; cursor: pointer; background: #fff; display: flex; flex-direction: column; gap: 4px; transition: border-color 0.12s, box-shadow 0.12s; }
.cat-card:hover { border-color: #9cbcf5; }
.cat-card.selected { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px #d6e5ff; }
.cat-card.none { opacity: 0.55; cursor: not-allowed; }
.cat-name { font-weight: 600; display: flex; gap: 8px; align-items: flex-start; }
.cat-code { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 22px; padding: 0 6px; border-radius: 6px; background: var(--primary-soft); color: var(--primary-dark); font-size: 12px; font-weight: 700; }
.cat-card .price { font-size: 20px; font-weight: 700; margin-top: auto; padding-top: 6px; font-variant-numeric: tabular-nums; }
.breakdown { width: 100%; }
.breakdown td { padding: 6px 0; border: none; }
.breakdown td.right { white-space: nowrap; padding-left: 12px; }
.breakdown tr.total td { font-weight: 700; font-size: 17px; border-top: 1px solid var(--border); padding-top: 10px; }

/* ---------- Fotos ---------- */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.thumb { aspect-ratio: 1; max-width: 100%; padding: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--soft); cursor: pointer; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--muted); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb:hover { border-color: var(--primary); }

/* ---------- Planning ---------- */
.planning { overflow-x: auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.pl-row { display: grid; grid-template-columns: 190px 1fr; border-bottom: 1px solid var(--border); min-width: 900px; }
.pl-row:last-child { border-bottom: none; }
.pl-row.head { position: sticky; top: 0; background: var(--soft); z-index: 2; }
.pl-row.group { background: #eef2f8; font-weight: 650; font-size: 12px; }
.pl-label { padding: 8px 12px; border-right: 1px solid var(--border); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-label small { color: var(--muted); }
.pl-track { position: relative; height: 36px; background-image: linear-gradient(to right, var(--border) 1px, transparent 1px); }
.pl-days { display: grid; }
.pl-days div { font-size: 11px; text-align: center; padding: 7px 0; border-left: 1px solid var(--border); color: var(--muted); }
.pl-days div.today { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.pl-days div.weekend { background: #f1f4f8; }
.pl-bar { position: absolute; top: 6px; height: 24px; border-radius: 6px; font-size: 11px; font-weight: 600; color: #fff; padding: 4px 7px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); }
.pl-bar.pl-move { cursor: grab; }
.pl-bar.pl-moving { cursor: grabbing; z-index: 5; opacity: 0.85; box-shadow: 0 6px 18px rgba(15, 26, 46, 0.35); }
.pl-bar.pendiente { background: #d99a00; }
.pl-bar.confirmada { background: #1f6feb; }
.pl-bar.en_curso { background: #17915a; }
.pl-bar.finalizada { background: #8b94a6; }
/* Arrastrar para crear: el gesto horizontal es nuestro, el vertical sigue desplazando la página */
.pl-track.pl-drag { cursor: crosshair; touch-action: pan-x pan-y; user-select: none; -webkit-user-select: none; }
.pl-sel { position: absolute; top: 5px; height: 26px; border-radius: 6px; background: rgba(31, 111, 235, 0.18); border: 2px dashed var(--primary); color: var(--primary-dark); font-size: 11px; font-weight: 600; padding: 4px 6px; white-space: nowrap; overflow: visible; pointer-events: none; z-index: 1; }
.pl-sel.bad { background: rgba(209, 55, 58, 0.15); border-color: var(--danger); color: var(--danger); }
/* En el celular: la patente queda fija a la izquierda al deslizar y entran más días en pantalla. */
@media (max-width: 800px) {
  .pl-row { grid-template-columns: 92px 1fr; min-width: 720px; }
  .pl-label { position: sticky; left: 0; z-index: 3; background: var(--card); padding: 8px; }
  .pl-row.head .pl-label { background: var(--soft); }
  .pl-row.group .pl-label { background: #eef2f8; overflow: visible; }
  .pl-label small { display: none; }
  .pl-label small.error { display: inline; }
  .pl-track { height: 44px; }
  .pl-bar, .pl-sel { top: 6px; height: 32px; line-height: 22px; }
}
.pl-bar.mant { background: repeating-linear-gradient(45deg, #d1373a, #d1373a 6px, #e25b5d 6px, #e25b5d 12px); cursor: default; }
.legend { display: flex; gap: 8px 16px; font-size: 12px; color: var(--muted); align-items: center; flex-wrap: wrap; }
.legend span::before { content: ''; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -2px; background: var(--c); }

/* Aviso de programa desactualizado */
.stale-bar { position: fixed; top: 12px; left: 248px; right: 16px; z-index: 45; background: #fff; border: 2px solid var(--danger); border-radius: var(--radius); padding: 12px 16px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15); }

/* ---------- Ventanas, avisos e ingreso ---------- */
.modal { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 40px; overflow-y: auto; z-index: 50; }
.modal-box { width: 100%; max-width: 720px; box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25); padding: 22px 24px 24px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-head .btn.link { color: var(--muted); font-size: 18px; }
.toast { position: fixed; bottom: 20px; right: 20px; background: #182131; color: #fff; padding: 12px 16px; border-radius: 10px; z-index: 60; max-width: 420px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); }
.toast.err { background: var(--danger); }
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; background: radial-gradient(1200px 600px at 50% -10%, #e4edfb, var(--bg)); }
.login-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; padding: 28px; box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08); }
.login-card h1 { margin: 0; }
.copy { display: flex; gap: 6px; }
.copy input { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
pre { background: #0f172a; color: #dbe4f3; padding: 12px; border-radius: 8px; overflow-x: auto; font-size: 12px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; flex-wrap: wrap; }
.tabs button { border: none; background: none; padding: 10px 14px; font: inherit; font-weight: 500; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 650; }

/* ---------- Pantallas medianas ---------- */
@media (max-width: 1100px) {
  .view { padding: 24px 20px 40px; }
  .detail { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash, .grid.cols-2, .grid.cols-3 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Celular: menú en una fila deslizable arriba ---------- */
@media (max-width: 800px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: sticky; top: 0; z-index: 30; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .brand { padding: 12px 16px; font-size: 16px; flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .user-box { border-top: none; padding: 8px 16px; flex-direction: row; align-items: center; gap: 12px; }
  .user-name { display: none; }
  .branch-pick { order: 2; flex: 0 0 100%; display: flex; align-items: center; gap: 10px; padding: 0 16px 10px; }
  .branch-pick span { margin: 0; }
  .branch-pick.hidden { display: none; }
  .sidebar nav { order: 3; flex: 0 0 100%; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; padding: 0 12px 10px; gap: 4px; scrollbar-width: none; }
  .sidebar nav::-webkit-scrollbar { display: none; }
  .sidebar nav a { white-space: nowrap; padding: 7px 12px; background: rgba(255, 255, 255, 0.06); }
  .view { padding: 16px 16px 40px; }
  h1 { font-size: 21px; }
  .card { padding: 16px; }
  .kpi { padding: 14px; }
  .kpi .v { font-size: 22px; white-space: normal; overflow-wrap: anywhere; }
  dl.info { grid-template-columns: 104px minmax(0, 1fr); }
  .dayrow { grid-template-columns: 52px minmax(0, 1fr) auto auto; gap: 10px; }
  .stale-bar { left: 16px; }
  .page-head .actions { width: 100%; }
}

/* Contrato imprimible */
@media print {
  .sidebar, .no-print, .toast, .modal { display: none !important; }
  .view { padding: 0; max-width: none; }
  .card { border: none; box-shadow: none; }
  body { background: #fff; }
}
.thumbs > .muted { grid-column: 1 / -1; }
.table-scroll { overflow-x: auto; max-width: 100%; }
@media (max-width: 800px) { table.mini th, table.mini td { padding: 7px 6px; font-size: 13px; } }
/* Barra de búsqueda dentro de un recuadro: sin doble borde */
.card .toolbar { padding: 0; border: none; box-shadow: none; background: none; }

/* Importar datos */
.import-intro p:first-child { margin-top: 0; }
.import-intro details { margin: 8px 0 12px; }
.import-intro summary, .card details summary { cursor: pointer; color: var(--primary); font-weight: 600; }
.import-intro ul { margin: 8px 0 0; padding-left: 20px; line-height: 1.55; }
.import-kinds { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.imp-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 6px 0 14px; }
.imp-count { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; background: var(--soft); }
.imp-count b { font-size: 22px; }
.imp-count span { font-size: 12.5px; color: var(--muted); }
.imp-count.ok b { color: #0f6e43; }
.imp-count.info b { color: #1450b5; }
.imp-count.warn b { color: #8a5a00; }
.imp-count.bad b { color: #a12427; }

/* Simplificación: opciones plegadas y menú "Más acciones" */
details.more-opts { margin-top: 14px; }
details.more-opts > summary, details.menu > summary { cursor: pointer; list-style: none; }
details.more-opts > summary { color: var(--primary); font-weight: 600; font-size: 14px; }
details.more-opts > summary::before { content: '▸ '; }
details.more-opts[open] > summary::before { content: '▾ '; }
details.more-opts > summary::-webkit-details-marker, details.menu > summary::-webkit-details-marker { display: none; }
details.menu { position: relative; display: inline-block; }
details.menu > summary::after { content: ' ▾'; font-size: 11px; }
.menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; background: var(--card); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.14); padding: 6px; min-width: 230px; display: flex; flex-direction: column; }
.menu-list button { font: inherit; text-align: left; background: none; border: 0; border-radius: 6px; padding: 9px 12px; cursor: pointer; color: var(--text); }
.menu-list button:hover { background: var(--soft); }
.menu-list button.danger { color: var(--danger); }
.subnav { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 auto 18px; max-width: 1320px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.subnav a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; padding: 7px 12px; border-radius: 8px; }
.subnav a:hover { background: var(--soft); color: var(--text); }
.subnav a.active { background: var(--primary-soft, #e8f0ff); color: var(--primary); }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: #7c8aa5; padding: 14px 12px 4px; font-weight: 700; }
.calm { display: flex; align-items: center; gap: 10px; color: var(--muted); }
@media (max-width: 800px) { .nav-label { display: none; } .subnav { overflow-x: auto; flex-wrap: nowrap; } .subnav a { white-space: nowrap; } }
@media print { .subnav { display: none; } }
details.filters { flex: 0 0 100%; margin-top: 4px; }
details.filters .toolbar { margin-top: 10px; border: 0; padding: 0; box-shadow: none; background: none; }

/* Primeros pasos (empresa nueva) */
.card.setup { margin-bottom: 16px; border-color: #c9dcff; }
.steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.steps li { font-size: 14px; }
.steps li.done { color: var(--muted); text-decoration: line-through; }
.steps a { font-weight: 600; }

/* Asistente web */
pre.snippet { color: var(--text); background: var(--soft); border: 1px solid var(--border); border-radius: 8px; padding: 12px; overflow-x: auto; font-size: 13px; white-space: pre-wrap; word-break: break-all; }
.login-brand { display: flex; align-items: center; gap: 12px; }
.login-brand h1 { margin: 0; line-height: 1.1; }
.login-brand p { margin: 2px 0 0; font-size: 13px; }

/* ---------- Floty simple: menú de 4 secciones, botón Nueva reserva, Hoy, reserva rápida y Más ---------- */
.sidebar nav a { display: flex; align-items: center; gap: 10px; }
.sidebar nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.fab { position: fixed; right: 24px; bottom: 24px; z-index: 40; min-height: 56px; padding: 0 22px; border-radius: 999px; background: var(--text); color: #fff; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; text-decoration: none; box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25); }
.fab svg { flex-shrink: 0; width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; }
.fab:hover { background: #2b3850; }
@media (max-width: 800px) {
  .sidebar nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 0 0 env(safe-area-inset-bottom); gap: 0; background: #fff; border-top: 1px solid var(--border); overflow: visible; }
  .sidebar nav a { flex-direction: column; justify-content: center; gap: 3px; min-height: 64px; padding: 6px 2px; background: none; color: var(--muted); font-size: 12.5px; border-radius: 0; }
  .sidebar nav a:hover { background: none; color: var(--text); }
  .sidebar nav a.active { background: none; color: var(--primary); font-weight: 700; }
  .sidebar nav svg { width: 24px; height: 24px; }
  .view { padding-bottom: 160px; }
  .fab { right: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(148px + env(safe-area-inset-bottom)); }
}

.hoy-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.hoy-head .date { color: var(--muted); font-size: 14px; }
.hoy-head h1 { margin: 0; font-size: 26px; }
.hoy-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.hoy-counts a { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; text-decoration: none; color: var(--text); display: flex; flex-direction: column; }
.hoy-counts b { font-size: 26px; line-height: 1.2; }
.hoy-counts span { font-size: 13px; color: var(--muted); }
.hoy-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
@media (max-width: 900px) { .hoy-cols { grid-template-columns: minmax(0, 1fr); } }
.hoy-col h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.hoy-col h2 svg { width: 20px; height: 20px; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.trip { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 12px; margin-bottom: 10px; }
.trip-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; cursor: pointer; }
.trip-top b { font-size: 17px; }
.trip-top small { display: block; color: var(--muted); font-size: 14px; }
.pill { font-size: 13px; font-weight: 700; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.pill.debe { background: #fef3c7; color: #92400e; }
.pill.ok { background: #dcfce7; color: #166534; }
.trip-actions { display: flex; gap: 8px; }
.trip-actions .btn { flex: 1; min-height: 46px; font-size: 16px; font-weight: 700; border-radius: 12px; }
.trip-actions .btn.back { color: #9a3412; border: 1.5px solid #c2410c; }
.trip-actions .btn.wa { flex: 0 0 auto; padding: 0 14px; gap: 6px; color: #15803d; font-size: 14px; }
@media (max-width: 420px) { .trip-actions .btn.wa span { display: none; } .trip-actions .btn.wa { padding: 0 12px; } }
.trip-actions .btn.wa svg { flex-shrink: 0; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hoy-empty { color: var(--muted); background: var(--card); border: 1px dashed var(--border-strong); border-radius: 16px; padding: 18px; margin: 0 0 10px; }
.hoy-next { color: var(--muted); margin: 6px 0 18px; font-size: 14px; }

.qr { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.qr h2 { font-size: 15px; margin: 0 0 8px; }
.qr-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.qr-field { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); }
.qr-field input, .qr-field select { border: none; padding: 0; font: inherit; font-size: 16px; font-weight: 600; color: var(--text); background: transparent; min-height: 28px; width: 100%; }
.qr-field:focus-within { border-color: var(--primary); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.chip { min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--border-strong); background: #fff; font: inherit; font-size: 14px; cursor: pointer; color: var(--text); }
.chip.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; }
.cars { display: flex; flex-direction: column; gap: 8px; }
.car { min-height: 60px; border-radius: 14px; border: 1.5px solid var(--border); background: #fff; padding: 8px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font: inherit; text-align: left; cursor: pointer; color: var(--text); }
.car.on { border: 2px solid var(--primary); background: var(--primary-soft); }
.car b { font-size: 16px; }
.car small { display: block; color: var(--muted); font-size: 13px; }
.car .price { font-weight: 700; font-size: 16px; white-space: nowrap; }
.car .price small { display: inline; }
.qr-total { position: sticky; bottom: 0; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06); }
.qr-total .sum { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.qr-total .sum b { font-size: 26px; }
.btn.big { min-height: 54px; font-size: 17px; font-weight: 700; border-radius: 14px; }
.btn.big svg { flex-shrink: 0; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 800px) { .qr-total { bottom: calc(72px + env(safe-area-inset-bottom)); } }

.mas-group { margin: 18px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.mas { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.mas a { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; text-decoration: none; color: var(--text); display: flex; flex-direction: column; gap: 2px; min-height: 64px; }
.mas a:hover { border-color: var(--border-strong); }
.mas a b { font-size: 15px; }
.mas a span { color: var(--muted); font-size: 13px; }

/* Páginas públicas: link de reservas (/reservar) y hoja "Cómo funciona" (/como-funciona). */
.pub { max-width: 640px; margin: 0 auto; padding: 20px 16px 32px; display: flex; flex-direction: column; gap: 18px; }
.pub .lang-switch { justify-content: center; }
.pub-head h1 { margin: 0 0 4px; font-size: 26px; }
.pub-head p { margin: 0; color: var(--muted); font-size: 15px; }
.pub .qr { width: 100%; }
.pub .qr-total { bottom: 8px; }
.pub .qr-total small { text-align: center; }
.pub .car .price small { display: block; text-align: right; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pub-faq details { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; }
.pub-faq summary { cursor: pointer; font-weight: 600; font-size: 15px; }
.pub-faq p { margin: 8px 0 0; color: var(--muted); }
.pub-done { display: flex; flex-direction: column; gap: 10px; text-align: center; padding: 28px 20px; }
.pub-done h1 { margin: 0; font-size: 22px; }
.pub-done p { margin: 0; }
.pub-ok { width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; background: #dcfce7; color: #166534; font-size: 30px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.sheet { max-width: 720px; width: 100%; margin: 0 auto; padding: 28px; }
.sheet h2 { margin: 22px 0 8px; font-size: 18px; }
.sheet p, .sheet li { font-size: 15px; }
.sheet ul { padding-left: 20px; margin: 0; }
.sheet-list { padding-left: 22px; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.sheet-list b { display: block; }
.sheet-list span { color: var(--muted); }
.sheet .actions { margin-top: 22px; }
@media print { .pub { max-width: none; padding: 0; } .pub .lang-switch { display: none; } .sheet { padding: 0; } }

/* Guía de la primera vez. */
.tour { position: fixed; inset: auto 0 0 0; z-index: 90; display: flex; justify-content: center; padding: 16px; pointer-events: none; }
.tour-card { pointer-events: auto; width: 100%; max-width: 420px; box-shadow: 0 12px 32px rgba(15, 23, 42, 0.22); }
.tour-card p { margin: 0 0 14px; font-size: 15px; }
.tour-dots { display: flex; gap: 6px; margin-bottom: 10px; }
.tour-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.tour-dots i.on { background: var(--primary); }
.tour-hi { outline: 3px solid #f59e0b !important; outline-offset: 3px; border-radius: 12px; position: relative; z-index: 89; }
@media (max-width: 800px) { .tour { bottom: calc(72px + env(safe-area-inset-bottom)); } }
@media (min-width: 801px) { .tour { inset: auto 24px 24px auto; justify-content: flex-end; } }

/* Pedidos para confirmar: en la compu, de a varios por fila para que "Salen hoy" quede a la vista. */
.hoy-pending { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; margin-bottom: 18px; }
.hoy-pending .trip { margin-bottom: 0; }
@media (max-width: 800px) { .hoy-pending { grid-template-columns: minmax(0, 1fr); } }

/* ============================================================
   Personalidad: marca en el menú, botones con relieve e íconos,
   tarjetas que se levantan al pasar, colores por tipo de movimiento.
   ============================================================ */
h1 { font-weight: 800; letter-spacing: -0.025em; }
h2 { font-weight: 700; }
::selection { background: #cfe0ff; }

/* Menú: degradé nocturno con una línea de ruta que baja por el costado. */
.sidebar { background: radial-gradient(420px 300px at 0 0, rgba(47, 124, 246, 0.22), transparent 70%), linear-gradient(180deg, #0f1f3d, var(--sidebar)); }
.sidebar::after { content: ''; position: absolute; left: 22px; bottom: 0; width: 2px; height: 120px; background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.12) 0 10px, transparent 10px 20px); pointer-events: none; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 20px 18px 18px; min-width: 0; }
.brand img { flex-shrink: 0; border-radius: 10px; box-shadow: 0 4px 12px rgba(31, 111, 235, 0.45); }
.brand span { display: flex; flex-direction: column; min-width: 0; }
.brand b { color: #fff; font-size: 16px; font-weight: 800; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand small { color: #7f93b5; font-size: 11.5px; font-weight: 600; }
.sidebar nav a { position: relative; padding: 10px 12px; border-radius: 10px; transition: background 0.15s, color 0.15s; }
.sidebar nav a.active { background: linear-gradient(90deg, rgba(47, 124, 246, 0.95), rgba(31, 111, 235, 0.75)); box-shadow: 0 6px 16px rgba(31, 111, 235, 0.35); }
.user-box { position: relative; z-index: 1; }

/* Botones: relieve suave, se hunden al tocarlos. */
.btn { border-radius: 10px; transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.08s; }
.btn:active:not(:disabled) { transform: translateY(1px) scale(0.99); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.btn.primary { background: linear-gradient(180deg, #3381f8, var(--primary)); border-color: #1a64d8; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 2px 6px rgba(31, 111, 235, 0.28); }
.btn.primary:hover { background: linear-gradient(180deg, #2a76ef, var(--primary-dark)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 4px 12px rgba(31, 111, 235, 0.32); }
.btn.ok { background: linear-gradient(180deg, #19a866, var(--ok)); box-shadow: 0 2px 6px rgba(18, 150, 92, 0.25); }
.btn:not(.primary):not(.ok):not(.link):hover { box-shadow: 0 2px 6px rgba(15, 26, 46, 0.06); }
.btn.link { border-radius: 4px; }
input, select, textarea { border-radius: 10px; transition: border-color 0.15s, box-shadow 0.15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.14); }
input:hover:not(:focus), select:hover:not(:focus), textarea:hover:not(:focus) { border-color: #b8c3d4; }

/* Estados con un puntito de color. */
.badge { gap: 6px; padding: 3px 10px 3px 8px; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.8; }
th { background: transparent; color: #7a869b; font-size: 11px; }
.table-wrap { border-radius: var(--radius); }
tr.click td { transition: background 0.12s; }
.plate { border-radius: 6px; background: linear-gradient(180deg, #fff, #f3f5f9); box-shadow: 0 1px 0 rgba(15, 26, 46, 0.08); }

/* Tarjetas */
.kpi, .mas a, .hoy-counts a, .cat-card, .car { transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; }
@media (hover: hover) {
  .mas a:hover, .hoy-counts a:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: #c9d8f3; }
  .car:hover:not(.on) { border-color: #9cbcf5; }
}

/* Hoy: saludo con la fecha y una ruta dibujada de fondo. */
.hoy-head { position: relative; overflow: hidden; background: linear-gradient(120deg, #ffffff 30%, #eaf2ff); border: 1px solid #dfe8f7; border-radius: 18px; padding: 20px 22px; box-shadow: var(--shadow); }
.hoy-head > div { position: relative; z-index: 1; }
.hoy-head .date::first-letter { text-transform: uppercase; }
.hoy-head .date { font-weight: 600; color: var(--primary-dark); font-size: 13px; letter-spacing: 0.01em; }
.hoy-head h1 { font-size: 28px; }
.hoy-head .hello { color: var(--muted); margin: 4px 0 0; font-size: 14px; }
.hoy-art { position: absolute; right: 0; bottom: 0; width: 260px; height: 100%; pointer-events: none; }
.hoy-art path { fill: none; stroke: #c6d8f7; stroke-width: 3; stroke-dasharray: 10 10; stroke-linecap: round; }
.hoy-art .car-ic { fill: var(--primary); }
.hoy-art .pin { fill: var(--accent); }
@media (max-width: 640px) { .hoy-art { width: 150px; opacity: 0.6; } .hoy-head h1 { font-size: 24px; } }

.hoy-counts a { position: relative; gap: 2px; padding: 14px 16px; border-radius: 16px; box-shadow: var(--shadow); }
.hoy-counts b { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.hoy-counts .ic { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.hoy-counts .ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ic.free { background: var(--ok-soft); color: var(--ok); }
.ic.out { background: var(--primary-soft); color: var(--primary); }
.ic.shop { background: var(--accent-soft); color: #d4581c; }
@media (max-width: 480px) { .hoy-counts .ic { display: none; } .hoy-counts a { padding: 12px; } .hoy-counts b { font-size: 24px; } }

.trip { position: relative; border-radius: 18px; padding: 14px 14px 14px 18px; box-shadow: var(--shadow); overflow: hidden; }
.trip::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--k, var(--border-strong)); }
.trip.out { --k: var(--primary); }
.trip.back { --k: #ea6a2a; }
.trip.pend { --k: #f2b01e; }
.trip-who { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.avatar { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; color: #fff; background: linear-gradient(135deg, hsl(var(--h, 215) 75% 60%), hsl(var(--h, 215) 65% 44%)); }
.trip-top:hover b { color: var(--primary-dark); }
.trip-actions .btn { border-radius: 12px; }
.trip-actions .btn.back { background: #fff7f2; }
.trip-actions .btn.back:hover { background: #ffeadd; }
.trip-actions .btn.wa { background: #effaf3; border-color: #bfe8cf; }
.trip-actions .btn.wa:hover { background: #def5e7; }
.pill { font-variant-numeric: tabular-nums; background: #eef1f6; color: #3c4658; }
.hoy-empty { display: flex; align-items: center; gap: 12px; background: rgba(255, 255, 255, 0.6); }
.hoy-empty svg { flex-shrink: 0; width: 34px; height: 34px; padding: 7px; border-radius: 50%; background: var(--soft); fill: none; stroke: #9aa6ba; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Botón flotante: oscuro, con el más en azul. */
.fab { background: linear-gradient(135deg, #1b2b4b, #0f1a2e); box-shadow: 0 10px 24px rgba(15, 26, 46, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.12); transition: transform 0.15s, box-shadow 0.15s; }
.fab svg { width: 24px; height: 24px; padding: 3px; border-radius: 50%; background: var(--primary); }
.fab:hover { background: linear-gradient(135deg, #22365e, #15223c); transform: translateY(-2px); box-shadow: 0 14px 28px rgba(15, 26, 46, 0.34); }
@media (min-width: 801px) { .view { padding-bottom: 110px; } }

/* Más: cada opción con su ícono. */
.mas-group { font-weight: 700; font-size: 11.5px; color: #7a869b; letter-spacing: 0.08em; }
.mas { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.mas a { flex-direction: row; align-items: center; gap: 14px; border-radius: 16px; box-shadow: var(--shadow); }
.mas a > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mas .ic { flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--primary); }
.mas .ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mas .ic.warm { background: var(--accent-soft); color: #d4581c; }
.mas .ic.green { background: var(--ok-soft); color: var(--ok); }
.mas .ic.gray { background: #eef1f6; color: #4a5468; }
.mas a.out b { color: var(--danger); }

/* Reserva rápida */
.chip { transition: border-color 0.15s, background 0.15s; }
.chip:hover:not(.on) { border-color: #9cbcf5; }
.car { border-radius: 16px; }
.car.on { box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.12); }
.qr-field { transition: border-color 0.15s, box-shadow 0.15s; }
.qr-field:focus-within { box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.12); }
.qr-field input:focus, .qr-field select:focus { box-shadow: none; }
.qr-total { border-radius: 18px; box-shadow: 0 -6px 24px rgba(15, 26, 46, 0.08); }

/* Pestañas de arriba como botones redondeados. */
.subnav { border-bottom: none; padding: 4px; background: #e9edf5; border-radius: 12px; width: fit-content; max-width: 100%; gap: 2px; margin-left: 0; }
.subnav a { border-radius: 9px; padding: 7px 14px; }
.subnav a.active { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(15, 26, 46, 0.1); }

/* Calendario */
.pl-bar { border-radius: 8px; box-shadow: 0 2px 6px rgba(15, 26, 46, 0.18); }
.pl-bar.pendiente { background: linear-gradient(180deg, #f0b11a, #d99a00); }
.pl-bar.confirmada { background: linear-gradient(180deg, #3381f8, #1f6feb); }
.pl-bar.en_curso { background: linear-gradient(180deg, #19a866, #12965c); }
.pl-bar:hover { filter: brightness(1.06); }

/* Ingreso: fondo con la marca. */
.login { background: radial-gradient(700px 420px at 15% 0%, rgba(47, 124, 246, 0.25), transparent 70%), radial-gradient(600px 400px at 100% 100%, rgba(255, 122, 61, 0.16), transparent 70%), #f4f6fb; }
.login-card { border-radius: 20px; box-shadow: 0 20px 50px rgba(15, 26, 46, 0.12); }
.login-brand img { border-radius: 12px; box-shadow: 0 6px 16px rgba(31, 111, 235, 0.4); }
.modal { backdrop-filter: blur(3px); }
.modal-box { border-radius: 20px; }
.toast { border-radius: 14px; }

/* Cada pantalla entra con un movimiento corto. */
/* Solo movimiento, sin transparencia: si el navegador pausa la animación, la pantalla igual se ve. */
@keyframes rise { from { transform: translateY(6px); } to { transform: none; } }
#view.enter { animation: rise 0.22s ease-out; }
@media (prefers-reduced-motion: reduce) {
  #view.enter { animation: none; }
  .btn, .fab, .mas a, .hoy-counts a { transition: none; }
}

/* Celular: arriba solo la marca y el idioma; la cuenta pasa a "Más". */
@media (max-width: 800px) {
  .sidebar::after { display: none; }
  .brand { padding: 10px 16px; }
  .brand img { width: 30px; height: 30px; }
  .brand small { display: none; }
  .user-actions { display: none; }
  .user-box { padding: 8px 14px; }
  .sidebar nav { box-shadow: 0 -4px 20px rgba(15, 26, 46, 0.06); }
  .sidebar nav a.active { background: none; box-shadow: none; }
  .sidebar nav a.active svg { background: var(--primary-soft); border-radius: 999px; padding: 3px 14px; margin: -3px 0; box-sizing: content-box; }
  .subnav { width: auto; }
  .hoy-head { padding: 16px; }
}
@media print { .hoy-art, .fab { display: none; } }

/* ============================================================
   Panel de Floty (dueño): administrativo, sin las pantallas del rent a car.
   Mismos colores y formas que flotyapp.com.ar (guía visual de la página web).
   ============================================================ */
body.owner #nav, body.owner #fab, body.owner #subnav, body.owner #floty-panel { display: none !important; }
body.owner .sidebar { background: linear-gradient(160deg, #0b1626, #102445 60%, #0f2a55); }
body.owner .sidebar::before { content: 'Administración'; display: block; margin: 4px 18px 0; padding: 6px 10px; border-radius: 999px; background: rgba(159, 211, 255, 0.12); color: #9fd3ff; font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; width: fit-content; }
body.owner .brand { order: -1; }
body.owner .sidebar::after { display: none; }
body.owner .user-box { margin-top: auto; }
.btn.pill { border-radius: 999px; min-height: 42px; padding: 0 18px; }
.btn.pill.big { min-height: 50px; padding: 0 24px; font-size: 15px; }
.btn.icon { min-height: 32px; width: 32px; padding: 0; border-radius: 10px; color: var(--muted); }
.btn:focus-visible { outline: 3px solid #9fd3ff; outline-offset: 2px; }

.own-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.own-head h1 { margin: 0 0 4px; font-size: 30px; letter-spacing: -0.02em; }
.own-head p { margin: 0; max-width: 560px; }

.own-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.own-tile { background: var(--card); border: 1px solid #e4e8ef; border-radius: 18px; padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 1px 2px rgba(11, 22, 38, 0.05), 0 8px 24px rgba(11, 22, 38, 0.06); position: relative; min-width: 0; }
.own-tile b { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin-top: 8px; }
.own-tile > span:last-child { color: var(--muted); font-size: 13px; }
.own-tile .ic { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.own-tile .ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.own-warn { background: #fff; border: 1px solid #e4e8ef; border-radius: 18px; padding: 16px 20px; margin-bottom: 18px; }
.own-warn h2 { font-size: 15px; margin: 0 0 8px; }
.own-warn ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.own-warn li { padding: 10px 12px 10px 36px; border-radius: 12px; position: relative; font-size: 14px; }
.own-warn li::before { content: ''; position: absolute; left: 14px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.own-warn li.bad { background: #fdeceb; color: #9b2d28; }
.own-warn li.warn { background: #fff3df; color: #7a4e00; }
.own-warn li.info { background: #eaf2ff; color: #1450b5; }
.own-warn.calm-ok { background: #e3f6ec; border-color: #c4ebd5; }
.own-warn.calm-ok p { margin: 0; color: #0f6e43; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.own-warn.calm-ok svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.agencies { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.agency { background: #fff; border: 1px solid #e4e8ef; border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 1px 2px rgba(11, 22, 38, 0.05), 0 8px 24px rgba(11, 22, 38, 0.06); min-width: 0; }
.agency-top { display: flex; align-items: center; gap: 12px; }
.agency-ic { flex-shrink: 0; width: 46px; height: 46px; border-radius: 14px; background: #eaf2ff; color: #1f6feb; display: flex; align-items: center; justify-content: center; }
.agency-ic img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; background: #fff; }
.agency-ic.big { width: 64px; height: 64px; }
.agency-logo-edit { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.brand img { object-fit: cover; background: #fff; }
.agency-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.agency-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.agency-name b { font-size: 17px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agency-name small { color: var(--muted); font-size: 12.5px; }
.st { flex-shrink: 0; font-size: 12.5px; font-weight: 700; padding: 5px 11px; border-radius: 999px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.st::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st.ok { background: #e3f6ec; color: #16a35f; }
.st.bad { background: #fdeceb; color: #c2453f; }
.st.wait { background: #eef1f6; color: #5b6678; }
.st.wait::before { animation: pulse 1s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: 0.25; } }
.agency-addr { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #f6f8fb; border-radius: 12px; padding: 8px 8px 8px 12px; min-width: 0; }
.agency-addr a { font-weight: 700; text-decoration: none; overflow-wrap: anywhere; flex: 1; min-width: 0; }
.agency-addr a:hover { text-decoration: underline; }
.agency-addr .btn.icon { margin-left: auto; background: #fff; }
.tag { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #eaf2ff; color: #1450b5; }
.agency-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 0; }
.agency-facts dt { color: var(--muted); font-size: 12px; font-weight: 600; }
.agency-facts dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.agency-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.agency-actions .btn { flex: 1 1 auto; }
.own-empty { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 36px 20px; border-radius: 18px; }
.own-empty h2 { margin: 6px 0 0; }
.own-empty p { max-width: 440px; margin: 0; }
.own-help { margin-top: 22px; background: #fff; border: 1px solid #e4e8ef; border-radius: 18px; padding: 14px 20px; }
.own-help summary { cursor: pointer; font-weight: 700; color: #1f6feb; }
.own-help p { color: var(--muted); margin: 10px 0 0; }

@media (max-width: 1000px) { .own-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 800px) {
  body.owner .sidebar::before { display: none; }
  body.owner .user-actions { display: flex; }
  body.owner .user-box { flex-wrap: wrap; }
  body.owner .view { padding-bottom: 40px; }
  .own-head h1 { font-size: 24px; }
  .own-head .btn { width: 100%; }
  .agencies { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) { .own-tile { padding: 12px 14px; } .own-tile b { font-size: 21px; } }
@media (prefers-reduced-motion: reduce) { .st.wait::before { animation: none; } }

/* Panel de Floty, retoques: barra arriba (una sola pantalla), menú de cuenta y números que avisan. */
.acct-btn { display: none; }
.acct-menu { display: contents; }
body.owner .shell { flex-direction: column; }
body.owner .sidebar { width: 100%; height: auto; position: sticky; top: 0; z-index: 30; flex-direction: row; align-items: center; padding: 0 16px; }
body.owner .brand { padding: 12px 4px; }
body.owner .sidebar::before { margin: 0 0 0 4px; }
body.owner .user-box { margin: 0 0 0 auto; border-top: none; padding: 8px 0; position: relative; flex-direction: row; }
body.owner .acct-btn { display: flex; width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(159, 211, 255, 0.5); background: linear-gradient(135deg, #3381f8, #1450b5); color: #fff; font: inherit; font-weight: 800; font-size: 16px; align-items: center; justify-content: center; cursor: pointer; }
body.owner .acct-btn:focus-visible { outline: 3px solid #9fd3ff; outline-offset: 2px; }
body.owner .acct-menu { display: none; position: absolute; right: 0; top: calc(100% + 2px); z-index: 60; background: #fff; color: var(--text); border: 1px solid #e4e8ef; border-radius: 16px; box-shadow: 0 12px 32px rgba(11, 22, 38, 0.18); padding: 14px 16px; min-width: 230px; flex-direction: column; gap: 12px; }
body.owner .user-box.open .acct-menu { display: flex; }
body.owner .acct-menu .user-name { display: block; color: var(--text); }
body.owner .acct-menu .user-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
body.owner .acct-menu .btn.link { color: var(--primary); font-size: 14px; }
body.owner .acct-menu .lang-switch { color: var(--muted); border-top: 1px solid #e4e8ef; padding-top: 10px; }
body.owner .acct-menu .lang-switch .btn.link.active { color: var(--text); }

.own-tile .ic { background: #eaf2ff; color: #1f6feb; }
.own-tile.good { border-color: #c4ebd5; }
.own-tile.good b { color: #16a35f; }
.own-tile.good .ic { background: #e3f6ec; color: #16a35f; }
.own-tile.warn { border-color: #f1dcb0; }
.own-tile.warn b { color: #a66a00; }
.own-tile.warn .ic { background: #fff3df; color: #a66a00; }
.own-tile.bad { border-color: #f3c9c6; }
.own-tile.bad b { color: #c2453f; }
.own-tile.bad .ic { background: #fdecec; color: #c2453f; }

.agency-facts dt { color: #5b6678; }
.agency-actions { margin-top: 2px; padding-top: 14px; border-top: 1px solid #eef1f6; }

/* Panel de Floty: vencimientos, abonos y ficha de cada agencia. */
.own-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1000px) { .own-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.st.warn { background: #fff3df; color: #a66a00; }
.st.info { background: #eaf2ff; color: #1450b5; }
.btn.pill.small { min-height: 34px; padding: 0 14px; font-size: 13px; }
.own-dues { background: #fff; border: 1px solid #e4e8ef; border-radius: 18px; padding: 18px 20px; margin-bottom: 22px; box-shadow: 0 1px 2px rgba(11, 22, 38, 0.05), 0 8px 24px rgba(11, 22, 38, 0.06); }
.own-sec-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.own-sec-head h2, .own-sec-title { font-size: 18px; font-weight: 800; margin: 0; }
.own-sec-title { margin: 4px 0 12px; }
.own-dues > p { margin: 6px 0 12px; font-size: 13.5px; }
.dues { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.due { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid #eef1f6; }
.due:first-child { border-top: none; }
.due .st { justify-content: center; }
.due-what { min-width: 0; display: flex; flex-direction: column; }
.due-what small { color: #5b6678; font-size: 12.5px; overflow-wrap: anywhere; }
.due-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.agency-facts .wide { grid-column: 1 / -1; }
.agency-notes { margin: 0; padding: 10px 12px; border-radius: 12px; background: #fffaf0; border: 1px solid #f6e7c4; color: #5c4510; font-size: 13.5px; white-space: pre-line; }
.agency-charge { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; }
.agency-charge .muted { font-size: 13px; flex: 1; min-width: 120px; }
.pay-history { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
@media (max-width: 640px) {
  .due { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .due .st { justify-self: start; }
  .due-actions { justify-content: flex-start; }
}

/* Tarjeta de agencia: "Ficha y abono" como botón principal; las otras dos en una fila. Aviso con "Deshacer". */
.agency-actions { display: grid; gap: 8px; }
.agency-actions-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.agency-actions-2 .btn { padding: 0 10px; }
.toast { display: flex; align-items: center; gap: 14px; }
.toast-undo { font: inherit; font-weight: 800; color: #9fd3ff; background: none; border: 0; padding: 4px 2px; cursor: pointer; text-decoration: underline; }
.toast-undo:focus-visible { outline: 3px solid #9fd3ff; outline-offset: 2px; border-radius: 4px; }

/* Confirmación antes de una acción (reemplaza el cartelito del navegador). Va encima de cualquier ventana. */
.confirm-modal { z-index: 70; align-items: center; padding: 16px; }
.confirm-box { max-width: 440px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 24px 22px; }
.confirm-box h2 { margin: 6px 0 0; font-size: 19px; }
.confirm-box p { margin: 0; color: var(--muted); }
.confirm-ic { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #eaf2ff; color: var(--primary); }
.confirm-ic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.confirm-box.danger .confirm-ic { background: #fdecec; color: #c2453f; }
.confirm-warn { font-weight: 700; color: #c2453f !important; font-size: 13.5px; }
.confirm-box .actions { margin-top: 14px; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.confirm-box .actions .btn { min-height: 44px; border-radius: 999px; }
.btn.danger-solid { background: linear-gradient(180deg, #d4524c, #c2453f); border-color: #b23c36; color: #fff; box-shadow: 0 2px 6px rgba(194, 69, 63, 0.3); }
.btn.danger-solid:hover { background: #a93a35; }

/* Filtros por estado con pastillas (Reservas y Autos). */
.status-chips { flex: 0 0 100%; margin-top: 2px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.chip.on { background: #e6efff; border-color: #c5d8fb; color: #1450b5; }
.chip-n { font-size: 12px; font-weight: 700; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: #eef1f6; color: #5b6678; text-align: center; }
.chip.on .chip-n { background: #fff; color: #1450b5; }

/* Autos: tarjetas con jerarquía (qué auto es → patente y estado → datos → acciones). */
.fleet-bar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.fleet-bar input { max-width: 420px; }
.fleet { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.vcard { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); position: relative; overflow: hidden; min-width: 0; }
.vcard::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--k, var(--border-strong)); }
.vcard.st-disponible { --k: #16a35f; }
.vcard.st-alquilado { --k: var(--primary); }
.vcard.st-mantenimiento { --k: #e0a100; }
.vcard.st-fuera_servicio { --k: #c2453f; }
.vcard-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.vcard-name { display: flex; flex-direction: column; min-width: 0; }
.vcard-name b { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vcard-name small { color: var(--muted); font-size: 12.5px; }
.vcard-id { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.vcard-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 10px 0 0; border-top: 1px solid #eef1f6; }
.vcard-facts dt { color: #5b6678; font-size: 11.5px; font-weight: 600; }
.vcard-facts dd { margin: 2px 0 0; font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.doc-bad { color: #c2453f; }
.doc-warn, .doc-info { color: #a66a00; }
.vcard-actions { display: flex; gap: 8px; align-items: center; }
.vcard-actions .btn.icon { margin-left: auto; }
.btn.icon.danger { color: #c2453f; border-color: #f0c4c5; }
.btn.icon.danger:hover { background: #fdecec; }
.btn.icon svg { width: 17px; height: 17px; }
.btn.pill.small.warm { background: #fff3df; border-color: #f1dcb0; color: #7a4e00; }
.vcard-actions { flex-wrap: wrap; }

/* Entrega en hotel: en la reserva rápida, en la reserva y en la página del cliente. */
.chip svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.qr-hotel { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.qr-hotel > .muted { margin: 0; font-size: 13px; }
.qr-hotel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.qr-hotel-grid .full { grid-column: 1 / -1; }
.sign-pad { display: block; width: 100%; height: 170px; border: 1px dashed var(--border, #bbb); border-radius: 10px; background: #fff; touch-action: none; cursor: crosshair; }
.sign-terms { max-height: 45vh; overflow: auto; font-size: 13px; line-height: 1.45; border: 1px solid var(--border, #ddd); border-radius: 10px; padding: 10px 12px; }
.sign-image { display: block; max-width: 260px; height: auto; background: #fff; border-radius: 8px; }
.pub-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pub-photos img { width: 100%; height: auto; border-radius: 10px; display: block; }
.send-step { border: 1px solid var(--border, #ddd); border-radius: 12px; padding: 12px; }
.hotel-card h2 { display: flex; align-items: center; gap: 8px; }
.hotel-card h2 svg { width: 20px; height: 20px; fill: none; stroke: var(--primary); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hotel-card.missing { border-color: #f1dcb0; background: #fffdf7; }
.hotel-warn { margin: 0; padding: 10px 12px; border-radius: 12px; background: #fff3df; color: #7a4e00; font-size: 14px; }
@media (max-width: 480px) { .qr-hotel-grid { grid-template-columns: minmax(0, 1fr); } }
.hotel-fee { margin: 0; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: #eaf2ff; color: #1450b5; font-size: 14px; }
.hotel-fee svg { flex-shrink: 0; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Estadísticas */
.stats-range { margin: 8px 0 14px; font-size: 13px; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-tile { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); min-width: 0; }
.stat-tile b { font-size: clamp(17px, 1.6vw, 21px); font-weight: 800; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.stat-tile span { color: var(--muted); font-size: 12.5px; }
.stat-tile.good b { color: #16a35f; }
.stat-tile.warn b { color: #a66a00; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.stats-grid .card h2 { font-size: 16px; }
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.bar-label { min-width: 0; display: flex; flex-direction: column; }
.bar-label b { font-size: 13.5px; overflow-wrap: anywhere; }
.bar-label small { color: var(--muted); font-size: 12px; }
.bar { height: 10px; border-radius: 999px; background: #eef1f6; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #3381f8, #1f6feb); }
.bar-value { font-variant-numeric: tabular-nums; min-width: 24px; text-align: right; }
.stats-list { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.occ { font-weight: 700; padding: 2px 8px; border-radius: 999px; font-size: 12px; }
.occ.hi { background: #e3f6ec; color: #16a35f; }
.occ.mid { background: #eaf2ff; color: #1450b5; }
.occ.lo { background: #eef1f6; color: #5b6678; }
.tab-intro { margin: -8px 0 14px; }
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: minmax(0, 1fr); }
  .bar-row { grid-template-columns: minmax(0, 1fr) auto; }
  .bar-row .bar { grid-column: 1 / -1; grid-row: 2; }
}
.ins-note { display: block; margin: 6px 4px 0; color: #5b6678; font-size: 12.5px; }

/* Tarjeta del auto: qué le toca después (sale, vuelve) y qué se le hace en el taller. */
.vcard-next { display: grid; gap: 4px; margin: 8px 0 2px; padding: 8px 10px; border-radius: 10px; background: var(--bg); font-size: 13px; }
.vcard-next p { display: flex; align-items: center; gap: 8px; margin: 0; }
.vcard-next svg { width: 15px; height: 15px; flex: none; color: var(--muted); }
.vcard-next.soon { background: var(--accent-soft); }
.vcard-next.soon svg { color: var(--accent); }

/* Pedido para confirmar: lo que falta, y la ventana de confirmación con sus datos. */
.pend-alerts { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; color: #92400e; font-size: 12.5px; font-weight: 600; }
.pend-alerts svg { width: 14px; height: 14px; flex: none; }
.confirm-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 0 0 12px; }
.confirm-facts dt { font-size: 12px; color: var(--muted); }
.confirm-facts dd { margin: 2px 0 0; font-weight: 600; }
.confirm-facts .wide { grid-column: 1 / -1; }
.notes-box { white-space: pre-wrap; font-weight: 500 !important; background: var(--warn-soft); border-radius: 8px; padding: 8px 10px; }
.warn-text { color: #b45309; }

/* Estadísticas: lo que pierde plata en rojo, subtítulos de cada grupo y la tabla que se ordena. */
.stat-tile.bad b, .neg-text { color: #c62828; }
.stats-sub { font-size: 14px; color: var(--muted); font-weight: 700; margin: 4px 0 8px; text-transform: uppercase; letter-spacing: .04em; }
.bar-row.neg .bar i { background: #e57373; }
.bar-row.neg .bar-value { color: #c62828; }
.th-sort { all: unset; cursor: pointer; font: inherit; font-weight: 700; }
.th-sort:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
th[aria-sort="ascending"] .th-sort::after { content: ' ▲'; font-size: 10px; }
th[aria-sort="descending"] .th-sort::after { content: ' ▼'; font-size: 10px; }

/* Calendario: la reserva recién creada se ve resaltada un momento. */
.pl-bar.just-made { outline: 3px solid var(--accent); outline-offset: 1px; animation: just-made 1.2s ease-in-out 3; z-index: 3; }
@keyframes just-made { 50% { transform: scaleY(1.15); } }

/* Formularios: obligatorios marcados y cada error debajo de su campo. */
.req { color: #c62828; font-weight: 700; }
.req-note { margin: -4px 0 8px; font-size: 12.5px; }
.field-error { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; color: #c62828; font-size: 13px; font-weight: 600; }
/* Aviso en recuadro, a todo el ancho del formulario (p. ej. licencia vencida al entregar). */
.field-error.box { grid-column: 1 / -1; margin: 0; padding: 10px 12px; background: var(--danger-soft); border: 1px solid #f0c4c5; border-radius: 10px; }
.field-warn { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; color: #92400e; background: var(--warn-soft); border-radius: 8px; padding: 6px 10px; font-size: 13px; font-weight: 600; }
.field-warn svg { width: 15px; height: 15px; flex: none; }
input[aria-invalid="true"] { border-color: #c62828 !important; box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.12); }

/* Celular: el resumen de la reserva queda fijo abajo solo con un auto elegido, y el botón "Nueva reserva"
   es un círculo (con su nombre para lectores de pantalla) para no tapar el contenido. */
@media (max-width: 800px) {
  .qr-total:not(.ready) { position: static; box-shadow: none; }
  .qr-total:not(.ready) .btn.link { display: none; }
  .fab { width: 58px; min-height: 58px; padding: 0; justify-content: center; }
  .fab span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .fab svg { width: 28px; height: 28px; }
  .view { padding-bottom: 170px; }
}

/* Pedido para confirmar: tres botones (Confirmar, Ver detalle, WhatsApp); si no entran, bajan de renglón. */
.trip.pend .trip-actions { flex-wrap: wrap; }
.trip.pend .trip-actions .btn { flex: 1 1 auto; }
.doc-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.doc-slot { display: flex; flex-direction: column; gap: 6px; }
.doc-slot b { min-height: 2.9em; } /* los títulos de uno y dos renglones dejan las fotos alineadas */
.doc-slot .thumb { width: 100%; aspect-ratio: 1.58; }
.doc-slot .thumb.empty { cursor: default; border-style: dashed; }

/* Cotizador público */
.quoter-head { text-align: center; padding: 8px 0 2px; }
.quoter { gap: 14px; }
.quoter-step { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); }
.quoter-step h2 { display: flex; align-items: center; gap: 10px; font-size: 16px; margin: 0 0 12px; }
.quoter-step h2 > span { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-dark); font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.quoter-step h2 small { font-weight: 400; font-size: 13px; }
.quoter-step .qr-field { background: var(--soft, #f6f8fb); border-color: transparent; }
.quoter-step .qr-field:focus-within { border-color: var(--primary); background: #fff; }
.quoter .car { padding: 12px 14px; transition: border-color 0.12s, background 0.12s, box-shadow 0.12s; }
.quoter .car:hover { border-color: var(--border-strong); }
.quoter .car.on, .quoter .car.on:hover { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.quoter .car-info { min-width: 0; }
.quoter .car .price { text-align: right; font-size: 18px; }
.quoter .car .price small { display: block; font-weight: 400; font-size: 12px; white-space: normal; }
.quoter .car-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.quoter .car-tags i { font-style: normal; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.tag-demand { background: #fff4e5; color: #9a5b00; }
.tag-promo { background: #e6f6ec; color: #17693a; }
.price-before { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.tag-few { background: #fdecec; color: #a12626; }
.cars.loading { opacity: 0.55; pointer-events: none; transition: opacity 0.12s; }
.car-skeleton { height: 72px; border-radius: 14px; background: var(--soft, #f1f4f8); }
.quoter-extras { display: flex; flex-direction: column; gap: 6px; }
.quoter-extra { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; font-weight: 500; }
.quoter-extra input { width: 18px; height: 18px; min-height: 0; margin: 0; }
.quoter-extra small { color: var(--muted); white-space: nowrap; }
.quoter-extra:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
@media (max-width: 520px) { .quoter .qr-dates { grid-template-columns: minmax(0, 1fr); } }
.quoter .qr-total { flex-flow: row wrap; align-items: center; gap: 6px 12px; padding: 10px 14px; }
.quoter .qr-total .sum { flex: 1 1 110px; flex-direction: column; align-items: flex-start; gap: 0; min-width: 0; }
.quoter .qr-total .sum b { font-size: 22px; }
.quoter .qr-total .btn { flex: 1 1 170px; min-height: 46px; font-size: 16px; }
.quoter .qr-total small { flex-basis: 100%; font-size: 12px; }
.demand-rows { display: flex; flex-direction: column; gap: 8px; }
.demand-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; color: var(--text); text-decoration: none; }
.demand-row:hover { border-color: var(--primary); }
.demand-row small { display: block; color: var(--muted); }
.demand-price { text-align: right; white-space: nowrap; }
.demand-price b { font-size: 18px; }
.demand-price small.up { color: #9a5b00; font-weight: 700; }
