/* Agenda de Camiones · Táctica OOH */
:root {
  --coral: #ED6F4C;
  --coral-hondo: #C9482A;
  --coral-pastel: #FCE7DF;
  --coral-suave: #F9D1C5;
  --carbon: #20201F;
  --tinta: #1D1B19;
  --cuerpo: #5B5652;
  --apagado: #8A837D;
  --tarjeta: #F6F4F2;
  --linea: #E7E1DB;
  --linea-fuerte: #D6CFC8;
  --fondo: #FBFAF9;
  --blanco: #FFFFFF;
  --rojo: #C8372D;
  --rojo-suave: #FBE9E7;
  --verde: #2F7D4F;
  --verde-suave: #E6F2EA;
  --ambar: #B7791F;
  --ambar-suave: #FDF3E1;
  --radio: 12px;
  --sombra: 0 1px 2px rgba(32, 32, 31, .06), 0 4px 16px rgba(32, 32, 31, .06);
  --sombra-alta: 0 12px 40px rgba(32, 32, 31, .18);
  --col: 46px;
  --rotulo: 148px;
  --fuente: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --titulo: 'Poppins', 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--fuente); color: var(--tinta); background: var(--fondo); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--coral-hondo); }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }
.oculto { display: none !important; }
.num { font-variant-numeric: tabular-nums; }

/* ───── cabecera ───── */
.top { position: sticky; top: 0; z-index: 30; background: var(--blanco); border-bottom: 1px solid var(--linea); }
.top-in { display: flex; align-items: center; gap: 18px; padding: 10px 20px; max-width: 1600px; margin: 0 auto; }
.marca { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; flex-shrink: 0; }
.marca img { height: 26px; display: block; }
.marca span { font-family: var(--titulo); font-weight: 600; font-size: 15px; padding-left: 12px; border-left: 1px solid var(--linea); white-space: nowrap; }
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nav button { border: 0; background: none; padding: 8px 12px; border-radius: 999px; font-weight: 500; color: var(--cuerpo); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.nav button:hover { background: var(--tarjeta); color: var(--tinta); }
.nav button.on { background: var(--carbon); color: var(--blanco); }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--coral); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.nav button.on .badge { background: var(--coral); }
.yo { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--coral-pastel); color: var(--coral-hondo); font-weight: 700; font-size: 12px; display: grid; place-items: center; }
.yo .nombre { font-weight: 500; font-size: 13px; }
.yo .rol { font-size: 11px; color: var(--apagado); }
.lnk { border: 0; background: none; color: var(--apagado); font-size: 12px; text-decoration: underline; padding: 4px; }

main { max-width: 1600px; margin: 0 auto; padding: 18px 20px 120px; }

/* ───── botones y campos ───── */
.btn { border: 1px solid var(--linea-fuerte); background: var(--blanco); border-radius: 10px; padding: 8px 14px; font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; transition: background .12s, border-color .12s; white-space: nowrap; }
.btn:hover { background: var(--tarjeta); }
.btn.prim { background: var(--coral); border-color: var(--coral); color: #fff; }
.btn.prim:hover { background: var(--coral-hondo); border-color: var(--coral-hondo); }
.btn.osc { background: var(--carbon); border-color: var(--carbon); color: #fff; }
.btn.osc:hover { background: #000; }
.btn.peligro { color: var(--rojo); border-color: #EBC4BF; }
.btn.peligro:hover { background: var(--rojo-suave); }
.btn.chico { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn.icono { padding: 7px 9px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.seg { display: inline-flex; background: var(--tarjeta); border: 1px solid var(--linea); border-radius: 10px; padding: 2px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; font-weight: 500; font-size: 13px; color: var(--cuerpo); }
.seg button.on { background: var(--blanco); color: var(--tinta); box-shadow: 0 1px 3px rgba(0,0,0,.1); font-weight: 600; }
label.campo { display: block; }
label.campo > span, .rot { display: block; font-size: 12px; font-weight: 600; color: var(--cuerpo); margin-bottom: 5px; }
.inp, select.inp, textarea.inp { width: 100%; border: 1px solid var(--linea-fuerte); background: var(--blanco); border-radius: 10px; padding: 9px 11px; font-size: 14px; }
.inp:focus { outline: none; border-color: var(--coral); box-shadow: 0 0 0 3px var(--coral-pastel); }
textarea.inp { resize: vertical; min-height: 64px; }
.fila { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.ayuda { font-size: 12px; color: var(--apagado); margin-top: 4px; }
.chip { border: 1px solid var(--linea-fuerte); background: var(--blanco); border-radius: 999px; padding: 5px 11px; font-size: 12.5px; font-weight: 500; display: inline-flex; gap: 6px; align-items: center; }
.chip.on { background: var(--carbon); border-color: var(--carbon); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ───── estados ───── */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.confirmada { background: #EDEDEC; color: var(--carbon); }
.pill.bloqueo { background: var(--coral-pastel); color: var(--coral-hondo); }
.pill.consulta { background: var(--ambar-suave); color: var(--ambar); }
.pill.cancelada { background: var(--tarjeta); color: var(--apagado); text-decoration: line-through; }
.pill.vencida { background: var(--rojo-suave); color: var(--rojo); }

/* ───── barra de herramientas ───── */
.barra { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.barra h1 { font-family: var(--titulo); font-size: 22px; font-weight: 600; margin: 0 6px 0 0; text-transform: capitalize; letter-spacing: -.01em; }
.barra .espacio { flex: 1; }
.leyenda { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--cuerpo); align-items: center; }
.leyenda i { display: inline-block; width: 22px; height: 12px; border-radius: 4px; vertical-align: -2px; margin-right: 5px; }
.leyenda .l-conf { background: var(--carbon); }
.leyenda .l-bloq { background: var(--coral); }
.leyenda .l-cons { background: var(--blanco); border: 1.5px dashed var(--ambar); }
.leyenda .l-libre { background: var(--blanco); border: 1px solid var(--linea-fuerte); }
.leyenda .l-cerr { background: repeating-linear-gradient(135deg, var(--tarjeta) 0 4px, var(--linea) 4px 5px); }

/* ───── KPIs ───── */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radio); padding: 12px 14px; }
.kpi h3 { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: var(--cuerpo); text-transform: uppercase; letter-spacing: .06em; display: flex; justify-content: space-between; }
.kpi .grande { font-family: var(--titulo); font-size: 24px; font-weight: 600; line-height: 1; }
.kpi .grande small { font-size: 13px; color: var(--apagado); font-family: var(--fuente); font-weight: 500; margin-left: 4px; }
.barrita { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--tarjeta); margin: 10px 0 6px; }
.barrita .c { background: var(--carbon); }
.barrita .b { background: var(--coral); }
.kpi .det { font-size: 12px; color: var(--cuerpo); display: flex; gap: 12px; flex-wrap: wrap; }
.kpi .det b { color: var(--tinta); }

/* ───── grilla ───── */
.grilla-caja { background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radio); overflow: auto; box-shadow: var(--sombra); max-height: calc(100vh - 150px); position: relative; }
table.grilla { border-collapse: separate; border-spacing: 0; table-layout: fixed; user-select: none; -webkit-user-select: none; }
.grilla th, .grilla td { padding: 0; }
.grilla col.c-rot { width: var(--rotulo); }
.grilla col.c-dia { width: var(--col); }
.grilla thead th { position: sticky; top: 0; z-index: 7; background: var(--blanco); border-bottom: 1px solid var(--linea); font-weight: 500; }
.grilla thead tr.meses th { height: 24px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--apagado); text-align: left; padding-left: 6px; border-bottom: 0; }
.grilla thead tr.meses th.mes-ini { border-left: 1px solid var(--linea-fuerte); color: var(--tinta); font-weight: 600; }
.grilla thead tr.dias th { top: 24px; }
.grilla thead th.esq { left: 0; z-index: 8; text-align: left; padding: 0 12px; }
.dia-h { display: flex; flex-direction: column; align-items: center; padding: 5px 0 6px; font-size: 11px; color: var(--apagado); border: 0; background: none; width: 100%; border-radius: 0; }
.dia-h b { font-size: 15px; color: var(--tinta); font-weight: 600; line-height: 1.2; }
.dia-h:hover { background: var(--tarjeta); }
.dia-h.hoy b { background: var(--coral); color: #fff; border-radius: 50%; width: 26px; height: 26px; display: grid; place-items: center; }
.dia-h.fds { color: var(--coral-hondo); }
.dia-h .extra { font-size: 9px; color: var(--coral-hondo); font-weight: 700; height: 10px; line-height: 10px; }
.grilla tbody th { position: sticky; left: 0; z-index: 6; background: var(--blanco); text-align: left; font-weight: 500; border-right: 1px solid var(--linea); padding: 0 10px 0 12px; }
.grilla tr.grupo th { background: var(--tarjeta); padding: 9px 12px; border-top: 1px solid var(--linea); border-bottom: 1px solid var(--linea); }
.grilla tr.grupo td { background: var(--tarjeta); border-top: 1px solid var(--linea); border-bottom: 1px solid var(--linea); }
.grupo-n { display: flex; align-items: center; gap: 8px; font-family: var(--titulo); font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.grupo-n .pt { width: 9px; height: 9px; border-radius: 3px; background: var(--coral); }
.grupo-n.valla .pt { background: var(--carbon); }
.t-rot { display: flex; flex-direction: column; justify-content: center; height: 48px; }
.t-rot b { font-size: 13px; font-weight: 600; }
.t-rot small { font-size: 11px; color: var(--apagado); }
td.slot { height: 48px; border-bottom: 1px solid var(--linea); position: relative; cursor: pointer; }
td.slot.fds { background: #FDFBFA; }
td.slot.semana { border-left: 1px solid var(--linea-fuerte); }
td.slot.pasado { background: #FAF8F6; }
td.slot.pasado .barra-r.confirmada { background: #8C8986; }
td.slot.pasado .barra-r.bloqueo { background: #EFA48E; }
td.slot.pasado .barra-r.consulta { opacity: .6; }
td.slot.hoy { box-shadow: inset 1px 0 0 var(--coral), inset -1px 0 0 var(--coral); }
td.slot.cerrado { background: repeating-linear-gradient(135deg, var(--tarjeta) 0 5px, #EFEAE5 5px 6px); cursor: default; }
td.slot.libre:hover::after { content: '+'; position: absolute; inset: 6px 3px; border-radius: 8px; background: var(--coral-pastel); color: var(--coral-hondo); display: grid; place-items: center; font-weight: 700; font-size: 16px; }
td.slot.sel::after, td.slot.sel:hover::after { content: ''; position: absolute; z-index: 4; inset: 5px 2px; border-radius: 8px; background: rgba(237, 111, 76, .22); border: 2px solid var(--coral); display: block; }
td.slot.sel.ocupado-sel::after { background: rgba(200, 55, 45, .12); border-color: var(--rojo); border-style: dashed; }
.barra-r { position: absolute; inset: 6px 2px; border-radius: 8px; display: flex; align-items: center; padding: 0 7px; font-size: 11.5px; font-weight: 600; overflow: hidden; white-space: nowrap; z-index: 1; }
.barra-r.jl { left: -1px; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.barra-r.jr { right: -1px; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.barra-r.confirmada { background: var(--carbon); color: #fff; }
.barra-r.bloqueo { background: var(--coral); color: #fff; }
.barra-r.consulta { background: var(--blanco); color: var(--ambar); border: 1.5px dashed var(--ambar); }
.barra-r.consulta.jl { border-left: 0; }
.barra-r.consulta.jr { border-right: 0; }
.barra-r.bloqueo.vencida { background: repeating-linear-gradient(135deg, var(--coral) 0 6px, #D4502C 6px 12px); }
.barra-r.confirmada.vencida { background: var(--carbon); }
.barra-r.consulta.vencida { border-color: var(--rojo); }
.lbl { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); width: calc(var(--run) * var(--col) - 16px); z-index: 3; font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.lbl.confirmada, .lbl.bloqueo { color: #fff; }
.lbl.consulta { color: var(--ambar); }
.lbl.consulta.vencida { color: var(--rojo); }
.espera { position: absolute; top: 2px; right: 2px; z-index: 3; background: var(--ambar); color: #fff; font-size: 9.5px; font-weight: 700; border-radius: 6px; padding: 0 4px; line-height: 14px; }
.grilla tr.grupo td .abrir { display: none; }

/* barra de selección */
.selbar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 40; background: var(--carbon); color: #fff; border-radius: 16px; padding: 10px 10px 10px 18px; display: flex; align-items: center; gap: 14px; box-shadow: var(--sombra-alta); max-width: calc(100vw - 24px); }
.selbar .info { font-size: 13px; line-height: 1.3; }
.selbar .info b { font-size: 14px; }
.selbar .info small { color: #C9C3BD; display: block; }
.selbar .btn { border-color: transparent; }
.selbar .btn.fant { background: transparent; color: #fff; border-color: #55524F; }
.selbar .btn.fant:hover { background: #33312F; }

/* ───── panel lateral (ficha) ───── */
.velo { position: fixed; inset: 0; background: rgba(29, 27, 25, .35); z-index: 50; animation: aparecer .15s ease-out; }
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--blanco); z-index: 51; display: flex; flex-direction: column; box-shadow: var(--sombra-alta); animation: entrar .2s ease-out; }
@keyframes entrar { from { transform: translateX(30px); opacity: 0; } }
@keyframes aparecer { from { opacity: 0; } }
.panel-cab { padding: 16px 20px; border-bottom: 1px solid var(--linea); display: flex; align-items: flex-start; gap: 12px; }
.panel-cab h2 { margin: 0; font-family: var(--titulo); font-size: 19px; font-weight: 600; line-height: 1.25; }
.panel-cab .sub { font-size: 12px; color: var(--apagado); margin-top: 2px; }
.panel-cab .cerrar { margin-left: auto; border: 0; background: var(--tarjeta); width: 34px; height: 34px; border-radius: 50%; font-size: 18px; flex-shrink: 0; }
.panel-cuerpo { flex: 1; overflow-y: auto; padding: 18px 20px 24px; display: flex; flex-direction: column; gap: 18px; }
.panel-pie { padding: 12px 20px; border-top: 1px solid var(--linea); display: flex; gap: 10px; align-items: center; background: var(--blanco); }
.panel-pie .espacio { flex: 1; }
.seccion h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--apagado); font-weight: 600; }
.estados { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.estado-op { border: 1.5px solid var(--linea); border-radius: 12px; padding: 10px; text-align: left; background: var(--blanco); display: flex; flex-direction: column; gap: 4px; }
.estado-op b { font-size: 13px; display: flex; align-items: center; gap: 6px; }
.estado-op small { font-size: 11.5px; color: var(--cuerpo); line-height: 1.35; }
.estado-op .mk { width: 12px; height: 12px; border-radius: 4px; flex-shrink: 0; }
.estado-op.consulta .mk { border: 1.5px dashed var(--ambar); }
.estado-op.bloqueo .mk { background: var(--coral); }
.estado-op.confirmada .mk { background: var(--carbon); }
.estado-op.on { border-color: var(--tinta); background: var(--tarjeta); box-shadow: 0 0 0 1px var(--tinta); }
.lista-dias { border: 1px solid var(--linea); border-radius: 12px; max-height: 300px; overflow-y: auto; }
.ld-fila { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--linea); font-size: 13px; }
.ld-fila:last-child { border-bottom: 0; }
.ld-fila .f { width: 92px; flex-shrink: 0; color: var(--cuerpo); }
.ld-fila .f b { color: var(--tinta); font-weight: 600; }
.ld-fila .ts { display: flex; gap: 6px; flex-wrap: wrap; }
.tchip { border: 1px solid var(--linea-fuerte); background: var(--blanco); border-radius: 8px; padding: 3px 8px; font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.tchip.on { background: var(--coral-pastel); border-color: var(--coral); color: var(--coral-hondo); font-weight: 600; }
.tchip.on::before { content: '✓'; }
.tchip.ocup { border-style: dashed; border-color: var(--rojo); color: var(--rojo); }
.tchip.ocup.on { background: var(--rojo-suave); }
.tchip.ocup.on::before { content: '!'; }
.tchip.cerr { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
.tchip .q { font-size: 10.5px; opacity: .8; }
.resumen-sel { font-size: 13px; color: var(--cuerpo); margin-top: 8px; }
.resumen-sel b { color: var(--tinta); }
.aviso { border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.4; }
.aviso.rojo { background: var(--rojo-suave); color: #8E2A22; }
.aviso.ambar { background: var(--ambar-suave); color: #7A5214; }
.aviso.gris { background: var(--tarjeta); color: var(--cuerpo); }
.aviso.verde { background: var(--verde-suave); color: #1F5A37; }
.aviso b { font-weight: 600; }
.aviso ul { margin: 6px 0 0; padding-left: 18px; }
.aviso .btn { margin-top: 8px; }
.comunas-sel { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cchip { border-radius: 999px; padding: 3px 4px 3px 10px; font-size: 12.5px; display: inline-flex; align-items: center; gap: 4px; background: var(--tarjeta); border: 1px solid var(--linea); }
.cchip.no { background: var(--rojo-suave); border-color: #EBC4BF; color: #8E2A22; }
.cchip.ojo { background: var(--ambar-suave); border-color: #F0DDB5; color: #7A5214; }
.cchip button { border: 0; background: none; width: 20px; height: 20px; border-radius: 50%; line-height: 1; }
.cchip button:hover { background: rgba(0,0,0,.08); }
.notas-com { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.historial { font-size: 12.5px; display: flex; flex-direction: column; gap: 8px; }
.historial .h { display: flex; gap: 10px; }
.historial .h time { color: var(--apagado); width: 98px; flex-shrink: 0; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.check input { width: 16px; height: 16px; accent-color: var(--coral); }

/* ───── lista de reservas ───── */
.filtros { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.filtros .inp { width: auto; }
.filtros .buscar { min-width: 220px; flex: 1; max-width: 360px; }
.tabla-caja { background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radio); overflow: auto; box-shadow: var(--sombra); }
table.tabla { width: 100%; border-collapse: collapse; font-size: 13px; }
.tabla th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--apagado); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--linea); background: var(--blanco); position: sticky; top: 0; white-space: nowrap; }
.tabla td { padding: 10px 12px; border-bottom: 1px solid var(--linea); vertical-align: top; }
.tabla tbody tr { cursor: pointer; }
.tabla tbody tr:hover { background: #FCFAF8; }
.tabla .cod { color: var(--apagado); font-size: 12px; }
.tabla .cli { font-weight: 600; }
.tabla .sec { color: var(--apagado); font-size: 12px; }
.vacio { padding: 40px 20px; text-align: center; color: var(--apagado); }

/* ───── pendientes ───── */
.pend-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 14px; align-items: start; }
.tarjeta { background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radio); box-shadow: var(--sombra); overflow: hidden; }
.tarjeta-cab { padding: 12px 16px; border-bottom: 1px solid var(--linea); display: flex; align-items: center; gap: 10px; }
.tarjeta-cab h3 { margin: 0; font-size: 14px; font-weight: 600; }
.tarjeta-cab .n { margin-left: auto; font-weight: 700; font-size: 13px; color: var(--apagado); }
.tarjeta-cab .ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 14px; }
.ic.rojo { background: var(--rojo-suave); }
.ic.ambar { background: var(--ambar-suave); }
.ic.coral { background: var(--coral-pastel); }
.ic.gris { background: var(--tarjeta); }
.item { padding: 10px 16px; border-bottom: 1px solid var(--linea); display: flex; gap: 10px; align-items: center; }
.item:last-child { border-bottom: 0; }
.item .txt { flex: 1; min-width: 0; cursor: pointer; }
.item .txt b { font-weight: 600; }
.item .txt small { display: block; color: var(--apagado); font-size: 12px; }
.item .acc { display: flex; gap: 6px; flex-shrink: 0; }
.tarjeta .vacio { padding: 18px; font-size: 13px; }

/* ───── ajustes ───── */
.ajustes { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; align-items: start; }
.ajustes .tarjeta-cuerpo { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.turno-ed { display: grid; grid-template-columns: 26px 1fr 1.2fr; gap: 8px; align-items: center; }

/* ───── modal ───── */
.modal { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 40px); overflow: auto; background: var(--blanco); border-radius: 16px; z-index: 51; box-shadow: var(--sombra-alta); animation: aparecer .15s; }
.modal .panel-cuerpo { padding: 18px 20px; }

/* ───── ingreso ───── */
.ingreso { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 500px at 50% -10%, var(--coral-pastel), transparent 70%), var(--fondo); }
.ingreso-caja { width: min(400px, 100%); background: var(--blanco); border: 1px solid var(--linea); border-radius: 20px; padding: 32px 28px; box-shadow: var(--sombra-alta); display: flex; flex-direction: column; gap: 16px; }
.ingreso-caja img { height: 34px; align-self: flex-start; }
.ingreso-caja h1 { font-family: var(--titulo); font-size: 24px; margin: 6px 0 0; font-weight: 600; letter-spacing: -.01em; }
.ingreso-caja p { margin: 0; color: var(--cuerpo); }
.nombres { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nombres button { border: 1px solid var(--linea-fuerte); background: var(--blanco); border-radius: 10px; padding: 10px; text-align: left; font-weight: 500; font-size: 13px; }
.nombres button:hover { border-color: var(--coral); background: var(--coral-pastel); }

/* ───── aviso flotante ───── */
#toast { position: fixed; top: 16px; left: 50%; transform: translate(-50%, -80px); background: var(--carbon); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 500; z-index: 90; transition: transform .25s; box-shadow: var(--sombra-alta); max-width: calc(100vw - 24px); }
#toast.ver { transform: translate(-50%, 0); }
#toast.err { background: var(--rojo); }

/* ───── celular ───── */
@media (max-width: 760px) {
  :root { --col: 44px; --rotulo: 92px; }
  .top-in { padding: 8px 12px; gap: 10px; flex-wrap: wrap; }
  .marca img { height: 22px; }
  .marca span { display: none; }
  .nav { order: 3; width: 100%; }
  .yo .nombre, .yo .rol { display: none; }
  main { padding: 12px 12px 120px; }
  .barra h1 { font-size: 18px; width: 100%; }
  .grilla-caja { max-height: calc(100vh - 130px); }
  .kpis { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin: 0 -12px 12px; padding: 0 12px; scrollbar-width: none; }
  .kpi { min-width: 82%; scroll-snap-align: start; padding: 10px 12px; }
  .kpi .grande { font-size: 20px; }
  .leyenda { gap: 6px 12px; font-size: 11px; }
  .t-rot small { display: none; }
  .grupo-n { font-size: 12px; }
  .panel { width: 100vw; }
  .estados { grid-template-columns: 1fr; }
  .estado-op { flex-direction: row; align-items: center; gap: 10px; }
  .fila { grid-template-columns: 1fr; }
  .selbar { left: 12px; right: 12px; transform: none; bottom: 12px; }
  .selbar .info { flex: 1; min-width: 0; }
  .pend-grid, .ajustes { grid-template-columns: 1fr; }
  .tabla .ocultable { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
