/* ADHENNA · Hotelería — estilo de la casa: azul marino con degradado, azul ADHENNA y tarjetas con sombra.
   (El mismo lenguaje visual del Control y del Captador.) Sin tipografías de internet: funciona sin conexión. */
:root {
  --azul: #005BFF; --azul-2: #2F7BFF; --azul-claro: #7FB0FF; --azul-suave: #E9F1FF; --azul-borde: #C9DCFF;
  --marino: #071A45; --marino-2: #0B2A6F; --marino-3: #0F3A96;
  --fondo: #EEF2F8; --panel: #FFFFFF; --lateral: #071A45; --suave: #F4F7FC; --borde: #DDE3ED; --borde2: #D3DBE8;
  --tinta: #0E1525; --tinta2: #5E6B80; --acento: #005BFF; --acento2: #0046CC;
  /* estados de las piezas */
  --libre-bg: #E2F7EE; --libre-bd: #A8E2C8; --libre: #0B7A55; --libre-p: #0E9F6E;
  --ocup-bg: #E6EFFF; --ocup-bd: #BCD3FF; --ocup: #0A3FB0; --ocup-p: #005BFF;
  --sucia-bg: #FFEBDD; --sucia-bd: #F8C7A3; --sucia: #A8480F; --sucia-p: #F0803C;
  --limp-bg: #FFF3D6; --limp-bd: #F3D58A; --limp: #8A5A00; --limp-p: #F5A524;
  --res-bg: #EFEBFF; --res-bd: #CFC4FF; --res: #4B2FCB; --res-p: #6D4AFF;
  --mant-bg: #FDE7E7; --mant-bd: #F3B9B9; --mant: #B42318; --mant-p: #D93A3A;
  --radio: 14px;
  --sombra: 0 1px 2px rgba(7,26,69,.06), 0 6px 20px rgba(7,26,69,.07);
  --sombra-alta: 0 10px 30px rgba(7,26,69,.16);
  --grad: linear-gradient(120deg, #061638 0%, #0B2A6F 55%, #0F48C8 100%);
  --grad-v: linear-gradient(175deg, #061638 0%, #0A2463 58%, #0F48C8 135%);
  --grad-azul: linear-gradient(135deg, #005BFF 0%, #2F7BFF 100%);
  --display: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --texto: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fondo); color: var(--tinta); font-family: var(--texto); font-size: 15px; line-height: 1.4; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.2px; color: var(--marino); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--acento); }
.oculto { display: none !important; }
.muted { color: var(--tinta2); }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }

/* ---------- Íconos ---------- */
.ic { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.ic-caja { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--grad-azul); color: #fff; box-shadow: 0 6px 16px rgba(0,91,255,.28); flex: 0 0 auto; }
.ic-caja .ic { width: 22px; height: 22px; }
.ic-caja.verde { background: linear-gradient(135deg, #0E9F6E, #34C792); box-shadow: 0 6px 16px rgba(14,159,110,.28); }
.ic-caja.naranjo { background: linear-gradient(135deg, #F0803C, #F5A524); box-shadow: 0 6px 16px rgba(240,128,60,.28); }
.ic-caja.violeta { background: linear-gradient(135deg, #6D4AFF, #9A82FF); box-shadow: 0 6px 16px rgba(109,74,255,.28); }
.ic-caja.rojo { background: linear-gradient(135deg, #D93A3A, #F06A6A); box-shadow: 0 6px 16px rgba(217,58,58,.28); }
.ic-caja.marino { background: var(--grad); box-shadow: 0 6px 16px rgba(7,26,69,.28); }

/* ---------- Botones y campos ---------- */
.btn { min-height: 42px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--borde); background: var(--panel); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; transition: transform .12s, box-shadow .15s, background .15s, border-color .15s; }
.btn:hover { border-color: var(--azul-borde); box-shadow: 0 2px 8px rgba(0,91,255,.12); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; box-shadow: none; transform: none; }
.btn-primario { background: var(--grad-azul); border-color: transparent; color: #fff; font-weight: 700; box-shadow: 0 4px 14px rgba(0,91,255,.3); }
.btn-primario:hover { box-shadow: 0 6px 18px rgba(0,91,255,.42); border-color: transparent; }
.btn-verde { background: linear-gradient(135deg, #0E9F6E, #2DBE8A); border-color: transparent; color: #fff; font-weight: 700; box-shadow: 0 4px 14px rgba(14,159,110,.3); }
.btn-verde:hover { box-shadow: 0 6px 18px rgba(14,159,110,.42); border-color: transparent; }
.btn-peligro { color: var(--mant); border-color: var(--mant-bd); }
.btn-peligro:hover { border-color: var(--mant-p); box-shadow: 0 2px 8px rgba(217,58,58,.14); }
.btn-grande { min-height: 54px; font-size: 16.5px; width: 100%; border-radius: 13px; }
.btn-chico { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn-icono { width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; font-size: 17px; color: var(--tinta2); display: inline-grid; place-items: center; }
.btn-icono svg { width: 20px; height: 20px; }
.btn-icono:hover { background: var(--suave); }
.campo { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--tinta2); }
.campo input, .campo select, .campo textarea { min-height: 42px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--borde); background: #fff; font-size: 15px; font-weight: 500; color: var(--tinta); transition: border-color .15s, box-shadow .15s; }
.campo textarea { min-height: 80px; resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: 0; border-color: var(--azul); box-shadow: 0 0 0 3px rgba(0,91,255,.15); }
.campo input[readonly] { background: var(--suave); }
.check { display: flex; align-items: center; gap: 10px; min-height: 38px; font-weight: 500; cursor: pointer; }
.check input { width: 19px; height: 19px; accent-color: var(--azul); }
.grilla2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grilla3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--suave); color: var(--marino-2); white-space: nowrap; }
.caja-info { padding: 12px 14px; border-radius: 12px; background: var(--azul-suave); border: 1px solid var(--azul-borde); color: var(--marino-2); font-size: 14px; }
.caja-info.verde { background: var(--libre-bg); border-color: var(--libre-bd); color: var(--libre); }
.caja-info.lila { background: var(--res-bg); border-color: var(--res-bd); color: var(--res); }
.caja-info.rosa { background: var(--mant-bg); border-color: var(--mant-bd); color: var(--mant); }
.caja-info.ambar { background: var(--limp-bg); border-color: var(--limp-bd); color: var(--limp); }

/* Colores por estado */
.e-libre { --bg: var(--libre-bg); --bd: var(--libre-bd); --ink: var(--libre); --pt: var(--libre-p); }
.e-ocupada { --bg: var(--ocup-bg); --bd: var(--ocup-bd); --ink: var(--ocup); --pt: var(--ocup-p); }
.e-sucia { --bg: var(--sucia-bg); --bd: var(--sucia-bd); --ink: var(--sucia); --pt: var(--sucia-p); }
.e-limpieza { --bg: var(--limp-bg); --bd: var(--limp-bd); --ink: var(--limp); --pt: var(--limp-p); }
.e-reservada { --bg: var(--res-bg); --bd: var(--res-bd); --ink: var(--res); --pt: var(--res-p); }
.e-mantencion { --bg: var(--mant-bg); --bd: var(--mant-bd); --ink: var(--mant); --pt: var(--mant-p); }
.pill.estado { background: var(--bg); color: var(--ink); }

/* ---------- Ingreso ---------- */
.login { position: fixed; inset: 0; background: var(--panel); display: grid; grid-template-columns: 1.1fr 1fr; z-index: 50; overflow: auto; }
.login-arte { position: relative; overflow: hidden; background: var(--grad); color: #fff; padding: 56px 48px; display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.login-arte::before { content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 36px 36px; -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%); }
.login-arte::after { content: ""; position: absolute; width: 420px; height: 420px; right: -140px; bottom: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(47,123,255,.55), transparent 65%); }
.login-arte > * { position: relative; z-index: 1; }
.login-logo-osc { width: 300px; max-width: 100%; aspect-ratio: 5 / 1; }
.login-producto { display: inline-flex; align-items: center; gap: 9px; align-self: flex-start; padding: 6px 13px; border-radius: 99px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); font-weight: 600; font-size: 13.5px; letter-spacing: .04em; color: #DCE7FF; }
.login-producto .ic { color: var(--azul-claro); }
.login-arte h2 { font-size: 32px; font-weight: 700; margin: 4px 0 0; max-width: 480px; color: #fff; line-height: 1.15; }
.resalte { background: linear-gradient(90deg, #7FB0FF, #B9D3FF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-puntos { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.login-puntos li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: #D7E4FF; }
.login-puntos .ic { width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.15); }
.login-pie { color: var(--azul-claro); letter-spacing: .25em; text-transform: uppercase; font-size: 11.5px; margin: 10px 0 0; }
.login-caja { align-self: center; justify-self: center; width: 100%; max-width: 420px; padding: 32px 26px; display: flex; flex-direction: column; gap: 18px; }
.login-logo { width: 200px; aspect-ratio: 5 / 1; }
.login-caja h1 { font-size: 28px; }
.login-caja .sub { margin: -12px 0 0; color: var(--tinta2); font-size: 14px; }
.login-usuarios { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.login-usuarios legend { font-size: 13px; font-weight: 600; color: var(--tinta2); margin-bottom: 8px; }
.chip-usuario input { position: absolute; opacity: 0; }
.chip-usuario span { display: flex; flex-direction: column; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--borde); cursor: pointer; font-weight: 700; min-width: 118px; transition: border-color .15s, box-shadow .15s, background .15s; }
.chip-usuario span:hover { border-color: var(--azul-borde); }
.chip-usuario small { font-weight: 500; color: var(--tinta2); font-size: 12px; }
.chip-usuario input:checked + span { background: var(--azul-suave); border-color: var(--azul); box-shadow: 0 0 0 3px rgba(0,91,255,.12); color: var(--marino-2); }
.chip-usuario input:focus-visible + span { outline: 2px solid var(--azul); }
.nota { font-size: 12px; color: var(--tinta2); margin: 0; text-align: center; }
.marca { display: flex; align-items: center; gap: 10px; }
.marca strong { display: block; font-family: var(--display); font-size: 16px; }
.marca small { color: var(--tinta2); font-size: 12px; }
.marca-logo { width: 38px; height: 38px; border-radius: 11px; background: var(--grad-azul); color: #fff; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.marca-logo svg { width: 20px; height: 20px; }

/* ---------- Avisos y ventanas ---------- */
#avisos { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; width: min(92vw, 460px); }
.aviso { padding: 12px 16px; border-radius: 12px; background: var(--marino); color: #fff; font-weight: 600; box-shadow: var(--sombra-alta); border-left: 4px solid #39D98A; }
.aviso-error { background: #7A1414; border-left-color: #FF8A8A; }
.modal-fondo { position: fixed; inset: 0; background: rgba(7,26,69,.45); backdrop-filter: blur(2px); display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; z-index: 60; overflow: auto; }
.modal { width: 100%; max-width: 560px; background: var(--panel); border-radius: 18px; display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(7,26,69,.35); overflow: hidden; }
.modal-cab { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 14px 20px; background: var(--grad); color: #fff; }
.modal-cab h2 { font-size: 18px; color: #fff; }
.modal-cab .btn-icono { color: #DCE7FF; }
.modal-cab .btn-icono:hover { background: rgba(255,255,255,.14); }
.modal-cuerpo { padding: 18px 20px 6px; display: flex; flex-direction: column; gap: 14px; }
.modal-pie { padding: 14px 20px 18px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- Tablas ---------- */
.tabla-caja { background: var(--panel); border: 1px solid var(--borde); border-radius: var(--radio); overflow: auto; box-shadow: var(--sombra); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--tinta2); font-weight: 700; padding: 11px 14px; border-bottom: 1px solid var(--borde); background: var(--suave); white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid #EDF0F6; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #FAFBFE; }
td.num, th.num { text-align: right; }

/* ---------- Mesón ---------- */
.meson { display: flex; min-height: 100vh; }
.lateral { position: sticky; top: 0; width: 252px; flex-shrink: 0; height: 100vh; overflow-y: auto; background: var(--grad-v); color: #fff; padding: 22px 14px 16px; display: flex; flex-direction: column; gap: 3px; }
.lateral::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 28px 28px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 55%); mask-image: linear-gradient(180deg, #000, transparent 55%); }
.lateral > * { position: relative; z-index: 1; }
.lateral-logo { width: 168px; aspect-ratio: 5 / 1; margin: 0 8px 4px; flex: 0 0 auto; }
.lateral .producto { margin: 0 8px 14px; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--azul-claro); font-weight: 600; }
.lateral .marca { padding: 10px 12px; margin-bottom: 12px; border-radius: 12px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); }
.lateral .marca strong { color: #fff; font-size: 15px; }
.lateral .marca small { color: #B9CCF5; }
.lateral .marca-logo { background: rgba(255,255,255,.14); }
.nav-item { position: relative; display: flex; align-items: center; gap: 11px; min-height: 41px; padding: 0 12px; border-radius: 10px; text-decoration: none; color: #C9D8F8; font-weight: 500; border: 0; background: transparent; cursor: pointer; text-align: left; width: 100%; font-size: 14.5px; transition: background .15s, color .15s; }
.nav-item .ic { color: var(--azul-claro); }
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item[aria-current="page"] { background: rgba(255,255,255,.15); color: #fff; font-weight: 700; box-shadow: inset 3px 0 0 var(--azul-claro); }
.nav-item[aria-current="page"] .ic { color: #fff; }
.nav-item .contador { margin-left: auto; font-size: 12px; font-weight: 800; background: #F5A524; color: #3A2600; border-radius: 99px; padding: 1px 8px; }
.nav-sep { height: 1px; background: rgba(255,255,255,.12); margin: 8px 8px; }
.nav-grupo { margin: 10px 12px 4px; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: #8FAAE6; font-weight: 700; }
#letra[aria-pressed="true"] { background: rgba(255,255,255,.15); color: #fff; font-weight: 700; }
.usuario-caja { margin-top: auto; padding: 10px 10px 10px 12px; border-radius: 12px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); font-size: 13px; display: flex; align-items: center; gap: 9px; }
.usuario-caja div { flex-grow: 1; display: flex; flex-direction: column; min-width: 0; }
.usuario-caja b { color: #fff; }
.usuario-caja .muted { color: #B9CCF5; }
.usuario-caja .btn-icono { color: #DCE7FF; }
.usuario-caja .btn-icono:hover { background: rgba(255,255,255,.14); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--grad-azul); color: #fff; display: grid; place-items: center; font-weight: 800; flex: 0 0 auto; }
#conexion { width: 9px; height: 9px; border-radius: 99px; background: #F0803C; flex-shrink: 0; box-shadow: 0 0 0 3px rgba(240,128,60,.25); }
#conexion[data-ok="1"] { background: #39D98A; box-shadow: 0 0 0 3px rgba(57,217,138,.25); }
.principal { flex-grow: 1; padding: 24px 30px 44px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.cabecera { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
@media (min-width: 1101px) { .cabecera { flex-wrap: nowrap; } }
.cabecera .titulos > div { min-width: 0; }
.cabecera h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cabecera .titulos { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 14px; }
.cabecera h1 { font-size: 26px; font-weight: 800; }
.cabecera .titulos .muted { display: block; font-size: 13.5px; }
.cabecera .titulos .muted::first-letter { text-transform: uppercase; }
.buscador { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px; border-radius: 11px; background: #fff; border: 1px solid var(--borde); flex: 1 1 170px; max-width: 290px; min-width: 150px; transition: border-color .15s, box-shadow .15s; }
.buscador:focus-within { border-color: var(--azul); box-shadow: 0 0 0 3px rgba(0,91,255,.15); }
.buscador svg { width: 18px; height: 18px; color: var(--tinta2); }
.buscador input { border: 0; outline: none; background: transparent; flex-grow: 1; min-width: 0; }
#contenido { display: flex; flex-direction: column; gap: 18px; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { position: relative; background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: 14px 18px; display: flex; flex-direction: column; gap: 5px; box-shadow: var(--sombra); overflow: hidden; }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grad-azul); }
.kpi span { font-size: 12.5px; color: var(--tinta2); font-weight: 600; }
.kpi strong { font-family: var(--display); font-size: 26px; font-weight: 800; color: var(--marino); line-height: 1.15; }
.kpi small { display: block; color: var(--tinta2); font-size: 12.5px; margin: 2px 0 0; font-weight: 500; }
.kpi.kpi-ic { flex-direction: row; align-items: center; gap: 14px; }
.kpi .ic-caja { color: #fff; }
.kpi.kpi-ic::before { display: none; }
.kpi.kpi-ic > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kpi.kpi-ic small { margin-left: 0; display: block; }
.kpi.bueno strong { color: var(--libre); } .kpi.bueno::before { background: #0E9F6E; }
.kpi.malo strong { color: var(--mant); } .kpi.malo::before { background: #D93A3A; }
.kpi.ojo::before { background: #F5A524; }

.filtros { display: flex; gap: 8px; flex-wrap: wrap; }
.filtro { min-height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--bd, var(--borde)); background: var(--bg, #fff); color: var(--ink, var(--tinta)); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; cursor: pointer; transition: box-shadow .15s, border-color .15s; }
.filtro:hover { box-shadow: 0 2px 8px rgba(7,26,69,.08); }
.filtro .punto { width: 9px; height: 9px; border-radius: 99px; background: var(--pt, var(--tinta2)); }
.filtro[aria-pressed="true"] { background: var(--marino-2); border-color: var(--marino-2); color: #fff; box-shadow: 0 4px 14px rgba(11,42,111,.28); }
.filtro[aria-pressed="true"] .punto { background: #fff; }
.mapa-y-detalle { display: flex; gap: 22px; align-items: flex-start; }
.mapa { flex-grow: 1; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.piso-cab { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.piso-cab h2 { font-size: 16.5px; }
.piso-cab .muted { font-size: 13px; }
.piso-cab::after { content: ""; flex: 1; height: 1px; background: var(--borde); }
.piezas { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 12px; }
.pieza { position: relative; min-height: 120px; padding: 12px 12px 12px 15px; border-radius: var(--radio); background: var(--bg); border: 1px solid var(--bd); color: var(--ink); display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 6px; cursor: pointer; text-align: left; overflow: visible; transition: transform .12s ease, box-shadow .15s ease; }
.pieza::before { content: ""; position: absolute; left: -1px; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: var(--pt); }
.pieza:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(7,26,69,.12); }
.pieza[aria-pressed="true"] { border-color: var(--azul); box-shadow: 0 0 0 3px rgba(0,91,255,.25), 0 8px 20px rgba(7,26,69,.12); }
.pieza .fila { display: flex; justify-content: space-between; width: 100%; align-items: flex-start; }
.pieza .numero { font-family: var(--display); font-size: 27px; font-weight: 800; line-height: 1; }
.pieza .tipo { font-size: 11px; font-weight: 600; opacity: .85; max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pieza .etiqueta { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: rgba(255,255,255,.78); }
.pieza .info { font-size: 12px; color: #33415C; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pieza .marca-sabanas { position: absolute; top: -8px; right: 10px; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: #fff; border: 1px solid var(--res-bd); color: var(--res); box-shadow: 0 2px 6px rgba(7,26,69,.08); }
.pieza .camas { display: flex; gap: 3px; }
.pieza .cama { width: 13px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.85); border: 1px solid var(--bd); }
.pieza .cama.llena { background: var(--pt); border-color: var(--pt); }
.detalle { width: 364px; flex-shrink: 0; background: #fff; border: 1px solid var(--borde); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow: auto; box-shadow: var(--sombra); }
.detalle-vacio { color: var(--tinta2); text-align: center; padding: 40px 10px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.detalle-vacio .ic-caja { width: 54px; height: 54px; border-radius: 16px; }
.detalle-vacio .ic-caja .ic { width: 26px; height: 26px; }
.detalle h2 { font-size: 28px; font-weight: 800; }
.dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.dl dt { font-size: 12px; color: var(--tinta2); }
.dl dd { margin: 0; font-weight: 600; font-size: 14px; }
.huesped { padding: 12px 14px; border-radius: 13px; background: var(--suave); border: 1px solid var(--borde); display: flex; flex-direction: column; gap: 4px; }
.huesped strong { font-size: 16px; color: var(--marino); }
.barra { height: 8px; border-radius: 99px; background: #E3E9F3; overflow: hidden; }
.barra i { display: block; height: 100%; border-radius: 99px; background: var(--grad-azul); }
.acciones { display: flex; flex-wrap: wrap; gap: 8px; }
.acciones .btn { flex: 1 1 auto; }
td .acciones .btn, .seccion-cab .acciones .btn { flex: 0 0 auto; }
.seccion { display: flex; flex-direction: column; gap: 12px; }
.seccion-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.seccion-cab h2 { font-size: 18px; }
.tarjetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.tarjeta { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--sombra); min-width: 0; }
.tarjeta h3 { font-size: 16.5px; }
.tarjeta .kpis { margin-top: 4px; }
.tarjeta .kpi { box-shadow: none; background: var(--suave); }
form.tarjeta h3 { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--borde); }
form.tarjeta h3:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

/* Rack */
.rack { overflow: auto; background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra); }
.rack table { border-collapse: separate; border-spacing: 0; min-width: 900px; }
.rack th, .rack td { padding: 0; border-bottom: 1px solid #EDF0F6; border-right: 1px solid #F1F4F9; height: 40px; }
.rack th { padding: 8px 6px; text-align: center; font-size: 11.5px; }
.rack th.hoy { background: var(--grad-azul); color: #fff; }
.rack td.pz { position: sticky; left: 0; background: #fff; padding: 0 12px; font-weight: 700; white-space: nowrap; z-index: 1; font-size: 13px; color: var(--marino); }
.rack .bloque { margin: 4px 2px; height: 30px; border-radius: 8px; padding: 0 8px; font-size: 12px; font-weight: 600; display: flex; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--bg); color: var(--ink); border: 1px solid var(--bd); cursor: pointer; }
.rack .bloque:hover { box-shadow: 0 3px 10px rgba(7,26,69,.14); }
.rack td.fuera { background: repeating-linear-gradient(45deg, #FDE7E7, #FDE7E7 6px, #fff 6px, #fff 12px); }
.leyenda { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--tinta2); align-items: center; }
.leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.leyenda i { width: 14px; height: 14px; border-radius: 4px; background: var(--bg); border: 1px solid var(--bd); display: inline-block; }

/* ---------- Pantallas de celular ---------- */
.movil { max-width: 480px; margin: 0 auto; min-height: 100vh; padding: 0 16px 96px; display: flex; flex-direction: column; gap: 16px; }
.movil > header:first-child { position: relative; overflow: hidden; margin: 0 -16px; padding: 22px 18px 20px; background: var(--grad); color: #fff; border-radius: 0 0 24px 24px; box-shadow: 0 10px 26px rgba(11,42,111,.28); }
.movil > header:first-child::after { content: ""; position: absolute; width: 240px; height: 240px; right: -90px; top: -130px; border-radius: 50%; background: radial-gradient(circle, rgba(47,123,255,.6), transparent 65%); pointer-events: none; }
.movil > header:first-child > * { position: relative; z-index: 1; }
.movil > header:first-child h1 { color: #fff; }
.movil > header:first-child .muted { color: #B9CCF5; }
.movil > header:first-child .btn-icono { color: #fff; background: rgba(255,255,255,.1); }
.movil-logo { width: 104px; aspect-ratio: 5 / 1; margin-bottom: 10px; }
.movil-cab { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.movil-cab h1 { font-size: 26px; font-weight: 800; }
.movil h2 { font-size: 17px; }
.progreso { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; }
.progreso .barra { flex-grow: 1; }
.progreso .barra i { background: linear-gradient(90deg, #39D98A, #7FB0FF); }
header .progreso .barra { background: rgba(255,255,255,.2); }
.tarea-actual { padding: 18px; border-radius: 20px; background: var(--limp-bg); border: 1px solid var(--limp-bd); display: flex; flex-direction: column; gap: 14px; box-shadow: var(--sombra); }
.tarea-actual .top { display: flex; justify-content: space-between; align-items: flex-start; }
.tarea-actual .grande { font-family: var(--display); font-size: 38px; font-weight: 800; line-height: 1.05; color: var(--marino); }
.tarea-actual .reloj { font-family: var(--display); font-size: 26px; font-weight: 800; color: var(--limp); text-align: right; }
.check-grande { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 0 14px; border-radius: 14px; background: #fff; font-size: 16px; font-weight: 600; cursor: pointer; }
.check-grande input { width: 24px; height: 24px; accent-color: var(--azul); margin: 0; }
.fila-tarea { min-height: 66px; padding: 8px 10px 8px 14px; border-radius: 16px; background: #fff; border: 1px solid var(--borde); border-left: 5px solid var(--pt); display: flex; align-items: center; gap: 12px; color: var(--tinta); box-shadow: var(--sombra); }
.fila-tarea .n { font-family: var(--display); font-size: 24px; font-weight: 800; width: 54px; color: var(--marino); }
.fila-tarea .t { display: flex; flex-direction: column; flex-grow: 1; font-size: 12px; color: var(--tinta2); }
.fila-tarea .t b { font-size: 14px; color: var(--ink); }
.fila-hecha { min-height: 44px; padding: 0 14px; border-radius: 12px; background: #fff; border: 1px solid var(--borde); display: flex; align-items: center; gap: 10px; color: var(--tinta2); font-size: 13px; }
.fila-hecha svg { width: 18px; height: 18px; color: var(--libre-p); flex: 0 0 auto; }
.fila-hecha b { color: var(--tinta); }
.anillo-caja { padding: 16px 18px; border-radius: 18px; background: #fff; border: 1px solid var(--borde); display: flex; align-items: center; gap: 18px; box-shadow: var(--sombra); }
.mini-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mini-kpi { min-height: 78px; padding: 12px 14px; border-radius: 16px; background: var(--bg, #fff); color: var(--ink, var(--marino)); border: 1px solid var(--bd, var(--borde)); display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--sombra); }
.mini-kpi span { font-size: 12px; font-weight: 600; opacity: .9; }
.mini-kpi strong { font-family: var(--display); font-size: 21px; font-weight: 800; }
.tarjeta .mini-kpi { box-shadow: none; background: var(--bg, var(--suave)); }
.alerta { padding: 14px; border-radius: 16px; background: #fff; border: 1px solid var(--borde); border-left: 5px solid var(--azul); display: flex; flex-direction: column; gap: 10px; box-shadow: var(--sombra); }
.alerta.rosa { background: var(--mant-bg); border-color: var(--mant-bd); border-left-color: var(--mant-p); box-shadow: none; }
.alerta.ambar { background: var(--limp-bg); border-color: var(--limp-bd); border-left-color: var(--limp-p); box-shadow: none; }
.alerta .fila { display: flex; gap: 8px; }
.alerta .fila .btn { flex: 1; }
.puntos { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.puntos span { aspect-ratio: 1; border-radius: 6px; background: var(--bg); border: 1px solid var(--bd); font-size: 9px; font-weight: 700; color: var(--ink); display: flex; align-items: center; justify-content: center; }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; height: 68px; background: #fff; border-top: 1px solid var(--borde); display: flex; justify-content: center; box-shadow: 0 -6px 20px rgba(7,26,69,.08); z-index: 20; }
.tabbar div { width: 100%; max-width: 480px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.tabbar button { border: 0; background: transparent; font-weight: 600; color: var(--tinta2); cursor: pointer; font-size: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.tabbar button .ic { width: 22px; height: 22px; }
.tabbar button[aria-current="page"] { color: var(--azul); font-weight: 800; }
.vacio { text-align: center; color: var(--tinta2); padding: 30px 10px; background: #fff; border-radius: 16px; border: 1px dashed var(--borde2); }

.qr-grilla { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.qr-tarjeta { border: 1px solid var(--borde); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; }
.qr-tarjeta .qr { width: 180px; height: 180px; }
.qr-tarjeta .qr svg { width: 100%; height: 100%; }
.qr-tarjeta code, .modal code { font-size: 12px; word-break: break-all; background: var(--suave); padding: 4px 8px; border-radius: 8px; }

/* ---------- Gráficos ---------- */
.grafico { position: relative; }
.graf-leyenda { display: flex; gap: 16px; font-size: 13px; color: var(--tinta2); margin: 6px 0 4px; flex-wrap: wrap; }
.graf-leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.graf-leyenda .k-barra { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.graf-leyenda .k-linea { width: 16px; height: 2px; border-radius: 2px; display: inline-block; }
.graf-tip { position: absolute; display: none; pointer-events: none; background: var(--marino); color: #fff; border-radius: 10px; padding: 8px 10px; box-shadow: var(--sombra-alta); font-size: 12px; z-index: 5; min-width: 140px; }
.graf-tip-t { color: #B9CCF5; margin-bottom: 4px; font-weight: 600; }
.graf-tip-f { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.graf-tip-f i { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }
.graf-tip-f b { color: #fff; font-size: 13px; }
.graf-tip-f span { color: #B9CCF5; }
.graf-tabla summary { cursor: pointer; font-size: 13px; color: var(--acento); margin-top: 6px; }
.graf-tabla table { margin-top: 8px; }
.barrah { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; align-items: center; gap: 10px; min-height: 30px; font-size: 13px; }
.barrah-n { color: var(--tinta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barrah-p { height: 12px; background: var(--suave); border-radius: 99px; overflow: hidden; }
.barrah-p i { display: block; height: 12px; border-radius: 99px; }
.barrah-v { color: var(--tinta2); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Clientes y autocompletar ---------- */
.fila-click { cursor: pointer; }
.fila-click:hover td { background: var(--azul-suave); }
.autocompletar { position: relative; }
.sugerencias { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--borde2); border-radius: 12px; box-shadow: var(--sombra-alta); z-index: 10; overflow: hidden; }
.sugerencia { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--borde); background: #fff; cursor: pointer; text-align: left; }
.sugerencia:last-child { border-bottom: 0; }
.sugerencia:hover, .sugerencia:focus { background: var(--azul-suave); outline: none; }
.sugerencia span { font-size: 12px; color: var(--tinta2); }

/* ---------- Administración y finanzas ---------- */
.banda { position: relative; overflow: hidden; background: var(--grad); color: #fff; border-radius: var(--radio); padding: 18px 20px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; justify-content: space-between; box-shadow: 0 10px 26px rgba(11,42,111,.25); }
.banda::after { content: ""; position: absolute; width: 300px; height: 300px; right: -80px; top: -190px; border-radius: 50%; background: radial-gradient(circle, rgba(47,123,255,.6), transparent 65%); pointer-events: none; }
.banda > * { position: relative; z-index: 1; }
.banda h2 { color: #fff; font-size: 19px; }
.banda p { margin: 3px 0 0; font-size: 13px; color: #B9CCF5; }
.banda .cifra { font-size: 30px; font-weight: 800; line-height: 1.1; }
.banda .cifra small { font-size: 13px; font-weight: 600; color: #B9CCF5; margin-left: 8px; }
.banda select, .banda input { min-height: 38px; border-radius: 10px; border: 0; padding: 6px 10px; background: rgba(255,255,255,.96); color: var(--tinta); font-weight: 600; }
.btn.vidrio { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff; }
.btn.vidrio:hover { background: rgba(255,255,255,.18); box-shadow: none; }
.dos-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.resultado { display: flex; flex-direction: column; }
.resultado .linea { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed #E3E9F3; font-size: 14px; }
.resultado .linea span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.resultado .linea.titulo { border-bottom: 0; padding-top: 12px; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--tinta2); font-weight: 700; }
.resultado .linea.sub { border-bottom: 1px solid var(--borde); font-weight: 700; color: var(--marino); }
.resultado .linea.total { border: 0; margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--libre-bg); color: var(--libre); font-weight: 800; font-size: 16px; }
.resultado .linea.total.neg { background: var(--mant-bg); color: var(--mant); }
.variacion { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--libre-bg); color: var(--libre); white-space: nowrap; }
.variacion.baja { background: var(--mant-bg); color: var(--mant); }
.variacion.neutra { background: var(--suave); color: var(--tinta2); }
.nota-pie { font-size: 12.5px; color: var(--tinta2); margin: 0; }
.arqueo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.arqueo div { padding: 12px 14px; border-radius: 12px; background: var(--suave); border: 1px solid var(--borde); }
.arqueo span { display: block; font-size: 12px; color: var(--tinta2); font-weight: 600; }
.arqueo b { font-size: 19px; color: var(--marino); font-variant-numeric: tabular-nums; }

/* ---------- Letra grande ---------- */
html.letra-grande body { zoom: 1.18; }

@media (max-width: 1100px) {
  .mapa-y-detalle { flex-direction: column; }
  .detalle { width: 100%; position: static; max-height: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dos-col { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .login { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .login-arte { padding: 26px 22px 24px; gap: 12px; border-radius: 0 0 26px 26px; }
  .login-arte h2, .login-puntos, .login-pie { display: none; }
  .login-logo-osc { width: 190px; }
  .login-caja { align-self: start; padding: 26px 22px; }
  .login-caja .login-logo { display: none; }
}
@media (max-width: 760px) {
  .meson { flex-direction: column; }
  .lateral { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; padding: 12px; overflow: visible; }
  .lateral-logo { width: 130px; }
  .lateral .producto, .nav-grupo, .nav-sep { display: none; }
  .lateral .marca { width: 100%; margin-bottom: 6px; }
  #nav { display: flex; flex-wrap: wrap; gap: 3px; }
  .nav-item { width: auto; }
  .usuario-caja { width: 100%; margin-top: 6px; }
  .principal { padding: 18px 14px 40px; }
  .buscador { flex: 1 1 100%; }
  .grilla2, .grilla3, .arqueo { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  .lateral, .cabecera, .modal-pie, #avisos { display: none !important; }
  .modal-fondo { position: static; background: #fff; padding: 0; }
  .modal { box-shadow: none; max-width: none !important; }
  body { background: #fff; }
}
