/* ============================================================
   FunnyPark — estilo editorial (PC y celular)
   Barra lateral azul noche, tarjetas blancas redondeadas, color
   por unidad de negocio y tipografía Poppins.
   ============================================================ */
@font-face { font-family: 'Poppins'; font-weight: 300; font-display: swap; src: url(../fonts/Poppins-300.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 400; font-display: swap; src: url(../fonts/Poppins-400.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 600; font-display: swap; src: url(../fonts/Poppins-600.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 700; font-display: swap; src: url(../fonts/Poppins-700.woff2) format('woff2'); }

:root {
  --navy: #0F2550; --navy-2: #16306A; --navy-3: #1E3B7E;
  --azul: #2563EB; --azul-2: #1D4ED8; --azul-claro: #EAF1FF;
  --amarillo: #FFC727; --amarillo-2: #F5B400;
  --verde: #16A34A; --verde-claro: #E9F8EF;
  --morado: #7C3AED; --morado-claro: #F1EBFE;
  --naranja: #F59E0B; --naranja-claro: #FFF4E2;
  --rosa: #E11D48; --rosa-claro: #FFECEF;
  --celeste: #0EA5E9; --celeste-claro: #E6F6FD;
  --fondo: #F3F6FC; --tarjeta: #FFFFFF; --borde: #E3E9F4; --borde-2: #D3DCEB;
  --texto: #14213D; --texto-2: #4A5875; --tenue: #7C89A3;
  --peligro: #DC2626; --exito: #16A34A;
  --radio: 18px; --radio-chico: 12px;
  --sombra: 0 1px 2px rgba(15, 37, 80, .05), 0 6px 22px rgba(15, 37, 80, .06);
  --sombra-alta: 0 18px 50px rgba(15, 37, 80, .22);
  --lateral: 250px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 14px; color: var(--texto); background: var(--fondo); line-height: 1.45; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 24px; } h2 { font-size: 18px; } h3 { font-size: 15.5px; }
a { color: var(--azul); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
.oculto { display: none !important; }
.tenue { color: var(--tenue); } .peq { font-size: 12.5px; } .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pos-t { color: var(--exito); } .neg-t { color: var(--peligro); }
.fila { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .fila.fin { justify-content: flex-end; } .fila.entre { justify-content: space-between; }
.crece { flex: 1; min-width: 0; }

/* ---------- Íconos ---------- */
.ico { width: 20px; height: 20px; flex: none; vertical-align: middle; }
.ico-c { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; color: #fff; flex: none; }
.ico-c .ico { width: 24px; height: 24px; }
.ico-c.chico { width: 34px; height: 34px; border-radius: 10px; } .ico-c.chico .ico { width: 19px; height: 19px; }
.c-verde { background: var(--verde); } .c-morado { background: var(--morado); } .c-naranja { background: var(--naranja); } .c-rosa { background: var(--rosa); }
.c-azul { background: var(--azul); } .c-celeste { background: var(--celeste); } .c-navy { background: var(--navy); } .c-gris { background: #64748B; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 12px; padding: 10px 16px; font-weight: 600; font-size: 14px; cursor: pointer; background: #fff; color: var(--texto); transition: transform .08s, background .15s, box-shadow .15s; white-space: nowrap; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.prim { background: var(--azul); color: #fff; box-shadow: 0 6px 16px rgba(37, 99, 235, .28); } .btn.prim:hover { background: var(--azul-2); }
.btn.sol { background: var(--amarillo); color: #1B1B1B; box-shadow: 0 6px 16px rgba(245, 180, 0, .35); } .btn.sol:hover { background: var(--amarillo-2); }
.btn.borde { border-color: var(--borde-2); background: #fff; } .btn.borde:hover { background: var(--fondo); }
.btn.vidrio { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .7); backdrop-filter: blur(4px); }
.btn.peligro { background: #fff; color: var(--peligro); border-color: #F5C2C2; } .btn.peligro:hover { background: #FEF2F2; }
.btn.verde { background: var(--verde); color: #fff; }
.btn.chico { padding: 6px 11px; font-size: 13px; border-radius: 10px; }
.btn.bloque { width: 100%; }
.btn.ico-solo { padding: 9px; }
.btn .girando { width: 16px; height: 16px; }
.girando { display: inline-block; width: 22px; height: 22px; border: 3px solid rgba(37, 99, 235, .25); border-top-color: var(--azul); border-radius: 50%; animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

/* ---------- Formularios ---------- */
.campo { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.campo > span { font-size: 12.5px; font-weight: 600; color: var(--texto-2); }
.campo small { color: var(--tenue); font-size: 11.5px; }
.campo input, .campo select, .campo textarea, .entrada { width: 100%; border: 1px solid var(--borde-2); border-radius: 11px; padding: 10px 12px; background: #fff; outline: none; transition: border .15s, box-shadow .15s; }
.campo textarea { min-height: 80px; resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus, .entrada:focus { border-color: var(--azul); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.campo.error input, .campo.error select { border-color: var(--peligro); box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }
.rejilla { display: grid; gap: 14px; } .rejilla.dos { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rejilla.tres { grid-template-columns: repeat(3, minmax(0, 1fr)); } .rejilla.cuatro { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.col-todo { grid-column: 1 / -1; }
.chequeo { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; }
.chequeo input { width: 18px; height: 18px; accent-color: var(--azul); }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.segmento { display: inline-flex; background: #EEF2F9; border-radius: 12px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.segmento button { border: 0; background: transparent; padding: 8px 14px; border-radius: 9px; cursor: pointer; font-weight: 600; color: var(--texto-2); display: inline-flex; align-items: center; gap: 6px; }
.segmento button.activo { background: #fff; color: var(--azul); box-shadow: 0 2px 6px rgba(15, 37, 80, .08); }

/* ---------- Estructura de la app ---------- */
.app { display: grid; grid-template-columns: var(--lateral) minmax(0, 1fr); min-height: 100vh; }
.lateral { position: sticky; top: 0; height: 100vh; background: linear-gradient(180deg, var(--navy) 0%, #0B1D40 100%); color: #DCE6FA; display: flex; flex-direction: column; padding: 18px 14px 14px; overflow-y: auto; scrollbar-width: thin; }
.lateral .marca { text-align: center; padding: 4px 6px 16px; }
.lateral .marca img { width: 150px; height: auto; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .25)); }
.lateral .marca .lema { font-size: 11.5px; line-height: 1.35; color: #AFC0E4; margin-top: 4px; }
.menu { display: flex; flex-direction: column; gap: 2px; }
.menu .grupo { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #8FA3CF; margin: 14px 10px 6px; font-weight: 600; }
.menu a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: #E3EBFC; font-weight: 400; font-size: 14px; position: relative; }
.menu a .ico { width: 21px; height: 21px; color: #C9D6F2; }
.menu a:hover { background: rgba(255, 255, 255, .07); }
.menu a.activo { background: var(--azul); color: #fff; font-weight: 600; box-shadow: 0 8px 18px rgba(37, 99, 235, .45); }
.menu a.activo .ico { color: #fff; }
.menu .insignia { margin-left: auto; background: var(--rosa); color: #fff; font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; letter-spacing: .04em; }
.lateral .animo { margin-top: 18px; background: linear-gradient(160deg, var(--navy-3), var(--navy-2)); border: 1px solid rgba(255, 255, 255, .1); border-radius: 16px; padding: 14px; font-size: 12px; color: #C9D6F2; }
.lateral .animo b { color: #FFD45A; display: flex; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 4px; }
.lateral .usuario-l { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .1); display: flex; align-items: center; gap: 10px; cursor: pointer; border-radius: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, #F59E0B, #E11D48); flex: none; font-size: 15px; }
.usuario-l .n { font-weight: 600; color: #fff; font-size: 13.5px; } .usuario-l .r { font-size: 12px; color: #8FB0FF; }

.principal { min-width: 0; padding: 18px 26px 40px; }
.barra { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.chip-suc { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--borde); border-radius: 12px; padding: 9px 14px; font-weight: 600; cursor: pointer; box-shadow: var(--sombra); }
.chip-suc .ico { width: 18px; height: 18px; color: var(--azul); }
.barra .fecha { margin-left: auto; color: var(--texto-2); font-size: 13px; }
.btn-redondo { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--borde); background: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: var(--sombra); color: var(--texto); }
.btn-redondo .punto { position: absolute; top: -3px; right: -3px; background: var(--rosa); color: #fff; font-size: 10.5px; font-weight: 700; min-width: 19px; height: 19px; border-radius: 999px; display: grid; place-items: center; padding: 0 5px; border: 2px solid #fff; }
.btn-instalar { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-instalar:hover { background: var(--navy-2); }

/* Banner (editorial) */
.banner { position: relative; border-radius: 22px; overflow: hidden; min-height: 190px; display: flex; align-items: center; background: #1F7BE0 url(../img/banner.jpg) center right / cover no-repeat; box-shadow: var(--sombra); margin-bottom: 18px; }
.banner::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20, 96, 214, .92) 0%, rgba(33, 118, 230, .75) 35%, rgba(33, 118, 230, 0) 62%); }
.banner .contenido { position: relative; padding: 26px 32px; color: #fff; max-width: 560px; }
.banner h1 { font-size: 34px; font-weight: 700; text-shadow: 0 2px 10px rgba(0, 0, 0, .15); }
.banner p { margin: 6px 0 16px; font-size: 16px; opacity: .96; }
.banner .fila .btn { padding: 11px 18px; }
.banner.chico { min-height: 120px; } .banner.chico h1 { font-size: 24px; } .banner.chico p { margin-bottom: 0; }

/* Títulos de sección */
.titulo-v { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.titulo-v h1 { font-size: 23px; } .titulo-v .sub { color: var(--tenue); font-size: 13px; margin-top: 2px; }
.titulo-v .acciones { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* Tarjetas */
.tarjeta { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--radio); padding: 18px; box-shadow: var(--sombra); min-width: 0; }
.tarjeta > .cab { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.tarjeta > .cab h3 { font-size: 16px; } .tarjeta > .cab .sub { color: var(--tenue); font-size: 12.5px; }
.tarjeta > .cab .ver { margin-left: auto; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.rejilla-tab { display: grid; gap: 16px; }

/* Indicadores (KPI) */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.kpi { border-radius: var(--radio); padding: 18px; display: flex; gap: 14px; align-items: flex-start; border: 1px solid transparent; min-width: 0; }
.kpi .t { font-size: 14px; } .kpi .v { font-size: 27px; font-weight: 700; line-height: 1.15; margin: 4px 0 4px; letter-spacing: -.02em; }
.kpi .d { font-size: 12.5px; color: var(--texto-2); }
.kpi.verde { background: var(--verde-claro); border-color: #CBEFD8; } .kpi.verde .t { color: #15803D; }
.kpi.morado { background: var(--morado-claro); border-color: #E1D5FC; } .kpi.morado .t { color: #6D28D9; }
.kpi.naranja { background: var(--naranja-claro); border-color: #FBE3B6; } .kpi.naranja .t { color: #C2410C; }
.kpi.rosa { background: var(--rosa-claro); border-color: #FBD0D8; } .kpi.rosa .t { color: #BE123C; }
.kpi .sube { color: var(--exito); font-weight: 600; } .kpi .baja { color: var(--peligro); font-weight: 600; }
.barrita { height: 9px; background: #EEF1F7; border-radius: 999px; overflow: hidden; }
.barrita > i { display: block; height: 100%; border-radius: 999px; background: var(--azul); }
.kpi .barrita { margin-top: 8px; background: rgba(255, 255, 255, .7); }

/* Actividad de atracciones */
.act-fila { display: grid; grid-template-columns: 36px minmax(0, 1fr) 60px minmax(80px, 34%); align-items: center; gap: 10px; padding: 7px 0; }
.act-fila .n { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-fila .c { color: var(--texto-2); font-size: 13px; text-align: right; }
.act-fila .p { font-size: 12px; font-weight: 600; margin-bottom: 3px; }
.aviso-linea { display: flex; gap: 10px; align-items: flex-start; background: #FFF1F2; border: 1px solid #FBD0D8; color: #9F1239; border-radius: 12px; padding: 10px 12px; margin-top: 10px; font-size: 13px; }
.aviso-linea.medio { background: #FFF7E6; border-color: #FBE3B6; color: #92400E; }
.aviso-linea .ico { color: currentColor; }

/* Dona */
.dona-caja { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.dona { position: relative; width: 170px; height: 170px; flex: none; }
.dona .centro { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.dona .centro b { font-size: 21px; } .dona .centro span { font-size: 12px; color: var(--tenue); }
.leyenda { display: grid; gap: 10px; flex: 1; min-width: 170px; }
.leyenda div { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; font-size: 13px; }
.leyenda i { width: 12px; height: 12px; border-radius: 4px; }

/* Accesos rápidos */
.accesos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.acceso-r { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; border: 1px solid var(--borde); border-radius: 14px; padding: 14px 6px; background: #FAFCFF; color: var(--texto); font-size: 12.5px; font-weight: 500; min-height: 92px; transition: transform .12s, box-shadow .12s; }
.acceso-r:hover { transform: translateY(-2px); box-shadow: var(--sombra); background: #fff; }
.acceso-r .ico { width: 28px; height: 28px; }

/* Próximos cumpleaños */
.cumples { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cumple { border-radius: 14px; padding: 14px; display: flex; gap: 12px; align-items: flex-start; }
.cumple:nth-child(3n+1) { background: var(--rosa-claro); } .cumple:nth-child(3n+2) { background: var(--morado-claro); } .cumple:nth-child(3n+3) { background: var(--naranja-claro); }
.cumple b { display: block; } .cumple .peq { color: var(--texto-2); }
.estado { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; margin-top: 6px; }
.estado.confirmada, .estado.pagada, .estado.operativo, .estado.activa, .estado.salio, .estado.realizada { background: #DCF5E4; color: #15803D; }
.estado.provisional, .estado.mantenimiento, .estado.por_cobrar { background: #FFE8B8; color: #9A5B00; }
.estado.cancelada, .estado.anulada, .estado.fuera, .estado.bloqueada { background: #FFE0E5; color: #BE123C; }
.estado.dentro, .estado.abierto { background: var(--azul-claro); color: var(--azul-2); }
.estado.repuesta, .estado.cerrado { background: #EEF1F7; color: var(--texto-2); }
.promo { border-radius: var(--radio); background: linear-gradient(135deg, #1F6FE5, #1557C9); color: #fff; padding: 22px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; min-height: 150px; }
.promo h3 { font-size: 21px; } .promo p { margin: 6px 0 0; opacity: .9; }
.promo::after { content: ''; position: absolute; right: -40px; bottom: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255, 199, 39, .35); }

/* Tablas */
.tabla-caja { overflow-x: auto; border-radius: var(--radio-chico); }
table.tabla { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tabla th { text-align: left; font-weight: 600; color: var(--texto-2); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border-bottom: 1px solid var(--borde); background: #F8FAFE; white-space: nowrap; }
.tabla td { padding: 11px 12px; border-bottom: 1px solid #EEF2F8; vertical-align: middle; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla tr.clic { cursor: pointer; } .tabla tr.clic:hover td { background: #F7FAFF; }
.tabla .der { text-align: right; }
.vacio { text-align: center; color: var(--tenue); padding: 30px 10px; }
.vacio .ico { width: 42px; height: 42px; display: block; margin: 0 auto 8px; color: #B4C1DA; }

/* Pestañas de sección */
.pestanas { display: flex; gap: 6px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.pestanas a, .pestanas button { border: 1px solid var(--borde); background: #fff; color: var(--texto-2); padding: 9px 14px; border-radius: 12px; font-weight: 600; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.pestanas .activo { background: var(--navy); color: #fff; border-color: var(--navy); }

/* Punto de venta */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.pos-cat { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: thin; }
.pos-cat button { flex: none; border: 1px solid var(--borde); background: #fff; border-radius: 14px; padding: 10px 14px; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; color: var(--texto-2); }
.pos-cat button.activo { color: #fff; border-color: transparent; }
.pos-cat button .ico { width: 20px; height: 20px; }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.item-pos { position: relative; text-align: left; border: 1px solid var(--borde); background: #fff; border-radius: 16px; padding: 12px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; min-height: 120px; transition: transform .1s, box-shadow .12s; }
.item-pos:hover { transform: translateY(-2px); box-shadow: var(--sombra); }
.item-pos .n { font-weight: 600; font-size: 13.5px; line-height: 1.25; }
.item-pos .pr { margin-top: auto; font-weight: 700; font-size: 15px; }
.item-pos .st { font-size: 11.5px; color: var(--tenue); }
.item-pos.agotado { opacity: .5; }
.item-pos .lleno { position: absolute; top: 10px; right: 10px; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: #FFE0E5; color: #BE123C; }
.cuenta { position: sticky; top: 16px; display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.cuenta .lineas { overflow-y: auto; flex: 1; margin: 0 -6px; padding: 0 6px; min-height: 80px; }
.linea { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 10px 0; border-bottom: 1px dashed var(--borde); }
.linea .d { font-weight: 500; font-size: 13.5px; } .linea .s { font-size: 12px; color: var(--tenue); }
.linea .acc { display: flex; align-items: center; gap: 6px; }
.cant { display: inline-flex; align-items: center; border: 1px solid var(--borde-2); border-radius: 10px; overflow: hidden; }
.cant button { border: 0; background: #F4F7FC; width: 28px; height: 28px; cursor: pointer; font-weight: 700; }
.cant span { min-width: 30px; text-align: center; font-weight: 600; }
.totales { border-top: 2px solid var(--borde); padding-top: 12px; margin-top: 8px; display: grid; gap: 4px; }
.totales .t { display: flex; justify-content: space-between; } .totales .grande { font-size: 22px; font-weight: 700; }
.formas { display: grid; grid-template-columns: repeat(auto-fill, minmax(115px, 1fr)); gap: 8px; }
.forma { border: 1.5px solid var(--borde-2); background: #fff; border-radius: 12px; padding: 10px 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; text-align: center; }
.forma.activo { border-color: var(--azul); background: var(--azul-claro); color: var(--azul-2); }
.forma .ico { width: 24px; height: 24px; }
.billetes { display: flex; gap: 6px; flex-wrap: wrap; }
.billetes button { border: 1px solid var(--borde-2); background: #fff; border-radius: 9px; padding: 6px 10px; cursor: pointer; font-weight: 600; }

/* Tablero de tiempos */
.tiempos { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tiempo { border: 1px solid var(--borde); border-radius: 16px; padding: 14px; background: #fff; border-left: 6px solid var(--azul); display: flex; flex-direction: column; gap: 6px; }
.tiempo .reloj { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.tiempo.pronto { background: #FFFBEB; } .tiempo.pronto .reloj { color: #B45309; }
.tiempo.vencido { background: #FFF1F2; animation: late 1.4s ease-in-out infinite; } .tiempo.vencido .reloj { color: var(--peligro); }
.tiempo.cobrar { background: #FFF7E6; }
@keyframes late { 50% { box-shadow: 0 0 0 4px rgba(220, 38, 38, .15); } }
.etq-alergia { display: inline-flex; gap: 4px; align-items: center; background: #FFE0E5; color: #BE123C; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.atr-tarjetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.atr { border: 1px solid var(--borde); border-radius: 16px; background: #fff; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.atr .cab-a { display: flex; gap: 10px; align-items: center; }

/* Agenda de eventos */
.agenda { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.agenda .dia-n { text-align: center; font-size: 12px; font-weight: 600; color: var(--tenue); padding: 4px 0; text-transform: uppercase; }
.agenda .dia { min-height: 92px; border: 1px solid var(--borde); border-radius: 12px; padding: 6px; background: #fff; cursor: pointer; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.agenda .dia.otro { background: #F8FAFD; opacity: .6; } .agenda .dia.hoy { border-color: var(--azul); box-shadow: inset 0 0 0 1px var(--azul); }
.agenda .dia .nd { font-size: 12px; font-weight: 600; }
.agenda .ev { font-size: 11px; border-radius: 6px; padding: 2px 5px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda .ev.provisional { opacity: .65; border: 1px dashed rgba(0, 0, 0, .3); }

/* Ventanas modales */
.velo { position: fixed; inset: 0; background: rgba(12, 24, 52, .45); backdrop-filter: blur(2px); display: grid; place-items: center; z-index: 80; padding: 16px; animation: aparece .15s; }
@keyframes aparece { from { opacity: 0; } }
.modal { background: #fff; border-radius: 22px; width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: var(--sombra-alta); animation: sube .18s; }
.modal.ancho { width: min(860px, 100%); } .modal.angosto { width: min(420px, 100%); }
@keyframes sube { from { transform: translateY(14px); opacity: 0; } }
.modal .m-cab { display: flex; align-items: center; gap: 10px; padding: 18px 20px 10px; }
.modal .m-cab h2 { font-size: 18px; flex: 1; }
.modal .m-cerrar { border: 0; background: #F1F4FA; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.modal .m-cuerpo { padding: 6px 20px 16px; overflow-y: auto; }
.modal .m-pie { padding: 12px 20px 18px; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--borde); }

/* Avisos (toasts) */
.avisos { position: fixed; z-index: 120; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(460px, calc(100% - 24px)); }
.toast { pointer-events: auto; background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 14px; box-shadow: var(--sombra-alta); display: flex; gap: 10px; align-items: center; font-weight: 500; animation: sube .2s; width: 100%; }
.toast.ok { background: #116D35; } .toast.alerta { background: #9A3412; } .toast.error { background: #B91C1C; }

/* Menú de usuario / desplegables */
.desplegable { position: fixed; z-index: 90; background: #fff; border: 1px solid var(--borde); border-radius: 16px; box-shadow: var(--sombra-alta); padding: 6px; min-width: 230px; }
.desplegable button, .desplegable a { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border: 0; background: none; border-radius: 10px; cursor: pointer; color: var(--texto); text-align: left; font-size: 14px; }
.desplegable button:hover, .desplegable a:hover { background: var(--fondo); }
.desplegable hr { border: 0; border-top: 1px solid var(--borde); margin: 4px 0; }

/* Acceso (login) con imagen de fondo semitransparente */
.acceso { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; position: relative; overflow: hidden; background: #FFF8EC; }
.acceso::before { content: ''; position: fixed; inset: 0; background: url(../img/login-fondo.jpg) center / cover no-repeat; opacity: .38; filter: saturate(1.1); }
.acceso::after { content: ''; position: fixed; inset: 0; background: radial-gradient(ellipse at center, rgba(255, 255, 255, .55) 0%, rgba(255, 248, 236, .35) 60%, rgba(15, 37, 80, .25) 100%); }
.acceso .caja-a { position: relative; z-index: 1; width: min(440px, 100%); background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .8); border-radius: 26px; box-shadow: 0 30px 70px rgba(15, 37, 80, .28); padding: 26px 26px 20px; }
.acceso .logo-a { display: block; width: 200px; margin: 0 auto 4px; }
.acceso .lema-a { text-align: center; color: var(--texto-2); font-size: 13px; margin-bottom: 16px; }
.acceso h2 { font-size: 19px; }
.acceso .panel { display: flex; flex-direction: column; gap: 14px; }
.modos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: #EEF2F9; padding: 5px; border-radius: 14px; }
.modos button { border: 0; background: none; border-radius: 10px; padding: 8px 4px; cursor: pointer; font-weight: 600; font-size: 12.5px; color: var(--texto-2); display: flex; flex-direction: column; align-items: center; gap: 3px; }
.modos button .ico { width: 20px; height: 20px; }
.modos button.activo { background: #fff; color: var(--azul); box-shadow: 0 2px 8px rgba(15, 37, 80, .1); }
.captcha { display: flex; gap: 8px; align-items: center; }
.captcha img { height: 58px; width: auto; border-radius: 12px; border: 1px solid var(--borde); background: #fff; flex: 1; min-width: 0; object-fit: contain; }
.codigo-in { font-size: 28px !important; letter-spacing: 10px; text-align: center; font-weight: 700; }
.qr-acceso { display: grid; place-items: center; gap: 8px; }
.qr-acceso .qr { width: 220px; height: 220px; display: grid; place-items: center; padding: 12px; background: #fff; border-radius: 18px; border: 1px solid var(--borde); }
.qr-acceso .qr svg { width: 100%; height: 100%; }
.qr-acceso .qr.vencido { opacity: .2; }
.credito { text-align: center; font-size: 11.5px; color: var(--tenue); margin-top: 14px; }
.acceso .pie-a { position: relative; z-index: 1; }

/* Instalador */
.instalar { min-height: 100vh; padding: 30px 16px; background: linear-gradient(180deg, #EAF1FF, #FFF8EC); }
.instalar .caja-i { max-width: 860px; margin: 0 auto; }
.instalar .logo-i { width: 210px; display: block; margin: 0 auto 6px; }
.instalar h1 { text-align: center; font-size: 26px; margin-bottom: 6px; }
.instalar .lead { text-align: center; color: var(--texto-2); max-width: 640px; margin: 0 auto 20px; }
.seccion-i { padding: 18px 0; border-bottom: 1px solid var(--borde); }
.seccion-i:last-of-type { border-bottom: 0; }
.seccion-i h3 { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; color: var(--navy); }
.chequeos-i { display: grid; gap: 6px; font-size: 13.5px; margin-bottom: 4px; }
.chequeos-i div { display: flex; gap: 8px; align-items: center; }
.cuadre { border-radius: 12px; padding: 12px 14px; font-size: 13.5px; }
.cuadre.mal { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.cuadre.bien { background: #ECFDF3; color: #166534; border: 1px solid #BBF7D0; }

/* Firma en pantalla */
.firma { border: 2px dashed var(--borde-2); border-radius: 14px; background: #FCFDFF; touch-action: none; width: 100%; height: 170px; display: block; cursor: crosshair; }

/* Ticket */
.ticket { font-family: 'Courier New', monospace; font-size: 12.5px; width: 300px; margin: 0 auto; color: #000; background: #fff; padding: 10px; }
.ticket .c { text-align: center; } .ticket hr { border: 0; border-top: 1px dashed #000; margin: 6px 0; }
.ticket .l { display: flex; justify-content: space-between; gap: 8px; }

/* Barra inferior del celular */
.barra-movil, .cab-movil, .suc-movil, .pos-flotante { display: none; }

/* ---------- Celular y tableta ---------- */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos { grid-template-columns: minmax(0, 1fr) 330px; }
}
@media (max-width: 900px) {
  .app { display: block; }
  .lateral { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 95; transform: translateX(-102%); transition: transform .22s; height: auto; }
  .app.menu-abierto .lateral { transform: none; box-shadow: var(--sombra-alta); }
  .app.menu-abierto::after { content: ''; position: fixed; inset: 0; background: rgba(12, 24, 52, .4); z-index: 94; }
  .principal { padding: 12px 14px 96px; }
  .barra { display: none; }
  .cab-movil { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #fff; position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--borde); }
  .cab-movil img { height: 40px; }
  .cab-movil .der { margin-left: auto; display: flex; gap: 8px; align-items: center; }
  .cab-movil .btn-redondo { width: 40px; height: 40px; box-shadow: none; }
  .suc-movil { display: flex; margin-bottom: 12px; } .suc-movil .chip-suc { width: 100%; box-shadow: none; }
  .barra-movil { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #fff; border-top: 1px solid var(--borde); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(15, 37, 80, .06); }
  .barra-movil a, .barra-movil button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--tenue); border: 0; background: none; padding: 4px 0; cursor: pointer; font-weight: 500; }
  .barra-movil .ico { width: 23px; height: 23px; }
  .barra-movil .activo { color: var(--azul); font-weight: 600; }
  .banner { min-height: 150px; background-position: 70% center; border-radius: 18px; }
  .banner::before { background: linear-gradient(90deg, rgba(20, 96, 214, .95) 0%, rgba(33, 118, 230, .8) 55%, rgba(33, 118, 230, .15) 100%); }
  .banner .contenido { padding: 18px; } .banner h1 { font-size: 24px; } .banner p { font-size: 13.5px; margin-bottom: 12px; }
  .kpi { padding: 14px; gap: 10px; flex-direction: column; } .kpi .v { font-size: 22px; } .kpi .ico-c { width: 40px; height: 40px; }
  .rejilla.dos, .rejilla.tres, .rejilla.cuatro { grid-template-columns: minmax(0, 1fr); }
  .rejilla-tab { grid-template-columns: minmax(0, 1fr) !important; }
  .cumples { grid-template-columns: minmax(0, 1fr); }
  .pos { grid-template-columns: minmax(0, 1fr); }
  .cuenta { position: static; max-height: none; }
  .pos-flotante { display: flex; position: fixed; left: 14px; right: 14px; bottom: calc(74px + env(safe-area-inset-bottom)); z-index: 55; padding: 13px; font-size: 15px; }
  .pos-grid { grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); gap: 10px; }
  .titulo-v h1 { font-size: 20px; }
  .titulo-v .acciones { margin-left: 0; width: 100%; }
  .agenda .dia { min-height: 60px; } .agenda .ev { font-size: 9.5px; padding: 1px 3px; }
  .modal { border-radius: 20px 20px 0 0; align-self: end; max-height: 92vh; }
  .velo { padding: 0; place-items: end center; }
  .tabla.resp thead { display: none; }
  .tabla.resp tr { display: block; border-bottom: 1px solid var(--borde); padding: 8px 0; }
  .tabla.resp td { display: flex; justify-content: space-between; gap: 10px; border: 0; padding: 4px 6px; }
  .tabla.resp td::before { content: attr(data-t); color: var(--tenue); font-size: 12px; }
  .tabla.resp td.der { text-align: right; }
}
@media (max-width: 420px) {
  .kpi .v { font-size: 20px; }
  .accesos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media print {
  body { background: #fff; }
  body > *:not(.impresion) { display: none !important; }
  .impresion { display: block !important; }
}
.impresion { display: none; }
