/* Sistema de diseño del panel de Eli (marca Elipgo): lateral navy, tarjetas, tablas, botones, estados.
   Origen: el panel de la Eli de recepción (recepcionista virtual, su panel de administración), para que toda Eli se
   vea igual. Versión: la copia que entró al repo en el commit 2a36b76 (2026-11-18); desde entonces lo único
   agregado acá es la regla `body.sin-admin .solo-admin`. Si el panel de recepción cambia sus reglas base, se vuelve a copiar entero.
   Lo propio de Eli para EONS NO va en este archivo: va en estatico/eli.css. */

  /* Panel de Eli — marca Elipgo (misma paleta y tipografía que Radar de Licitaciones):
     navy + verde Elipgo, IBM Plex Sans para la interfaz, Sora para títulos y marca,
     IBM Plex Mono para datos. Pensado primero para el celular del personal. */
  :root {
    --navy: #0B1B2B; --navy-2: #0E2740; --navy-3: #1B3550;
    --verde: #14A05A; --verde-claro: #2ED37E; --verde-texto: #0D7A43; --verde-fondo: #E7F5EE;
    --azul: #2F6FE0; --azul-osc: #1F55B8; --azul-fondo: #EAF1FD;
    --tinta: #1E2A38; --muted: #5B6B7C; --tenue: #8696A7;
    --linea: #E2E8F0; --linea-2: #CBD5E1;
    --panel: #F4F7FA; --blanco: #FFFFFF;
    --ambar: #9A5B00; --ambar-fondo: #FFF4E0; --ambar-borde: #F0C987;
    --rojo: #C0362C; --rojo-fondo: #FDECEA;
    --gris-fondo: #EEF1F5;
    --f-ui: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    --f-marca: "Sora", "IBM Plex Sans", system-ui, sans-serif;
    --f-cod: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
    --radio: 10px; --radio-chico: 6px;
    --sombra: 0 1px 2px rgba(11, 27, 43, .05), 0 1px 1px rgba(11, 27, 43, .03);
    --sombra-alta: 0 18px 40px -16px rgba(11, 27, 43, .35);
    --lateral: 248px;
    color-scheme: light;
  }
  * { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; }
  body { margin: 0; background: var(--panel); color: var(--tinta); font: 14px/1.5 var(--f-ui);
         -webkit-font-smoothing: antialiased; min-height: 100vh; }
  a { color: var(--azul); text-decoration: none; }
  a:hover { text-decoration: underline; text-underline-offset: 2px; }
  :focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; }
  h1, h2, h3 { margin: 0; line-height: 1.25; color: var(--tinta); text-wrap: balance; }
  h1 { font: 600 1.45rem/1.2 var(--f-marca); letter-spacing: -.015em; }
  h2 { font: 600 1rem/1.3 var(--f-marca); letter-spacing: -.005em; }
  h3 { font-size: .93rem; font-weight: 600; }
  p { margin: .4rem 0; }
  code, .cod { font-family: var(--f-cod); font-size: .86em; }
  code { background: var(--gris-fondo); border-radius: 4px; padding: 1px 5px; }
  .muted { color: var(--muted); }
  .chico { font-size: .8125rem; color: var(--muted); }
  .num { font-variant-numeric: tabular-nums; }
  [hidden] { display: none !important; }
  body.rol-citas .solo-admin { display: none !important; }
  body.sin-admin .solo-admin { display: none !important; }

  /* ───────── estructura: lateral (escritorio) + barra superior e inferior (celular) ───────── */
  .lateral { position: fixed; inset: 0 auto 0 0; width: var(--lateral); background: var(--navy); color: #B7C4D3;
             display: flex; flex-direction: column; z-index: 40; }
  .lateral .marca { display: flex; align-items: center; gap: .55rem; padding: 20px 20px 6px; color: #fff; }
  .marca svg { width: 22px; height: 22px; color: var(--verde-claro); flex: none; }
  .marca .wm { font: 600 1.2rem/1 var(--f-marca); letter-spacing: -.02em; color: #fff; }
  .marca .wm i { font-style: normal; color: var(--verde-claro); }
  .lateral .producto { padding: 0 20px 16px 49px; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: #8EA0B4; }
  .nav { flex: 1; overflow-y: auto; padding: 4px 10px 12px; scrollbar-width: thin; }
  .nav .grupo { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: #6F8297; padding: 14px 10px 6px; }
  .nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: #C9D4E0;
           font-weight: 500; text-decoration: none; position: relative; }
  .nav a svg { width: 18px; height: 18px; flex: none; opacity: .8; }
  .nav a:hover { background: var(--navy-2); color: #fff; }
  .nav a.activa { background: var(--navy-3); color: #fff; }
  .nav a.activa::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0;
                          background: var(--verde-claro); }
  .nav a.activa svg { opacity: 1; color: var(--verde-claro); }
  .badge-num { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--verde);
               color: #fff; font-size: .72rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
  .badge-num.alerta { background: #D9921A; }
  .badge-num[hidden] { display: none !important; }
  .lateral .quien { border-top: 1px solid var(--navy-3); padding: 12px 14px 16px; font-size: .8125rem; }
  .lateral .quien .email { color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .lateral .quien .rol { color: #8EA0B4; }
  .lateral .quien .fila { display: flex; gap: 8px; margin-top: 10px; }
  .lateral .quien a, .lateral .quien button { flex: 1; text-align: center; font-size: .8125rem; padding: 6px 8px; border-radius: 6px;
                    border: 1px solid var(--navy-3); background: transparent; color: #DCE4EE; cursor: pointer; min-height: 0; font-weight: 500; }
  .lateral .quien a:hover, .lateral .quien button:hover { background: var(--navy-2); text-decoration: none; color: #fff; }

  .principal { margin-left: var(--lateral); min-height: 100vh; }
  @media (min-width: 900px) { body { background: linear-gradient(90deg, var(--navy) var(--lateral), var(--panel) var(--lateral)); } }
  .contenido { max-width: 1180px; margin: 0 auto; padding: 28px 32px 64px; }
  .barra-movil, .barra-abajo, .velo { display: none; }

  @media (max-width: 899px) {
    .lateral { transform: translateX(-100%); transition: transform .2s ease; width: min(84vw, 300px); box-shadow: var(--sombra-alta); }
    body.nav-abierta .lateral { transform: none; }
    .velo { display: block; position: fixed; inset: 0; background: rgba(11, 27, 43, .45); z-index: 35; opacity: 0;
            pointer-events: none; transition: opacity .2s; }
    body.nav-abierta .velo { opacity: 1; pointer-events: auto; }
    .principal { margin-left: 0; padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
    .contenido { padding: 16px 16px 40px; }
    .barra-movil { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30; background: var(--navy);
                   color: #fff; padding: 10px 12px; padding-top: calc(10px + env(safe-area-inset-top)); }
    .barra-movil .marca { gap: .45rem; }
    .barra-movil .marca svg { width: 20px; height: 20px; }
    .barra-movil .marca .wm { font-size: 1.05rem; }
    .barra-movil .titulo { font: 600 .95rem/1 var(--f-marca); color: #DCE4EE; margin-left: 4px; padding-left: 10px;
                           border-left: 1px solid var(--navy-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .barra-movil .menu { margin-left: auto; background: transparent; border: 1px solid var(--navy-3); color: #fff; min-height: 38px;
                         padding: 0 10px; border-radius: 8px; }
    .barra-movil .menu svg { width: 20px; height: 20px; }
    .barra-abajo { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
                   background: #fff; border-top: 1px solid var(--linea); padding-bottom: env(safe-area-inset-bottom);
                   box-shadow: 0 -6px 18px -12px rgba(11, 27, 43, .25); }
    .barra-abajo a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 58px;
                     color: var(--muted); font-size: .72rem; font-weight: 500; text-decoration: none; position: relative; }
    .barra-abajo a svg { width: 22px; height: 22px; }
    .barra-abajo a.activa { color: var(--verde-texto); }
    .barra-abajo a.activa::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--verde); }
    .barra-abajo .badge-num { position: absolute; top: 6px; left: calc(50% + 6px); margin: 0; min-width: 18px; height: 18px; font-size: .68rem; }
    .barra-abajo button { background: none; border: 0; color: var(--muted); display: flex; flex-direction: column; align-items: center;
                          justify-content: center; gap: 2px; font-size: .72rem; font-weight: 500; min-height: 58px; padding: 0; }
  }

  /* ───────── páginas ───────── */
  .pagina { display: none; }
  .pagina.activa { display: block; animation: entrar .16s ease-out; }
  @keyframes entrar { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
  .pag-cab { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 18px; }
  .pag-cab > div:first-child { min-width: 0; flex: 1 1 320px; }
  .pag-cab p { color: var(--muted); margin: .35rem 0 0; max-width: 70ch; }
  .pag-cab .acciones { flex: none; }
  @media (max-width: 899px) { .pag-cab h1 { font-size: 1.25rem; } .pag-cab { margin-bottom: 14px; } }

  .tarjeta { background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radio); box-shadow: var(--sombra);
             padding: 18px 20px; margin-bottom: 16px; min-width: 0; }
  .tarjeta > h2 { margin-bottom: 4px; }
  .tarjeta-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; margin-bottom: 12px; }
  .tarjeta-cab h2 { margin: 0; }
  .tarjeta-cab .chico { margin: 0; }
  .tarjeta .ayuda { color: var(--muted); font-size: .875rem; margin: .2rem 0 .9rem; max-width: 78ch; }
  @media (max-width: 899px) { .tarjeta { padding: 14px; border-radius: 8px; margin-bottom: 12px; } }
  .rejilla { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
  .rejilla > .tarjeta { margin-bottom: 0; }
  .rejilla.tres { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
  #inicio-recados .item { grid-template-columns: 58px minmax(0, 1fr); }
  #inicio-recados .item .lado { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
  .rejilla + .tarjeta, .rejilla + .rejilla { margin-top: 16px; }
  .dos-col { display: grid; gap: 16px; }
  @media (min-width: 1100px) { .dos-col { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; } }
  .dos-col > div > .tarjeta:last-child { margin-bottom: 0; }
  @media (max-width: 1099px) { .dos-col { gap: 0; } .dos-col > div > .tarjeta:last-child { margin-bottom: 12px; } }

  /* indicadores (cifras) */
  .cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
  .cifra { background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); padding: 14px 16px; box-shadow: var(--sombra);
           text-decoration: none; color: inherit; display: block; }
  a.cifra:hover { border-color: var(--linea-2); text-decoration: none; }
  .cifra .n { font: 600 1.7rem/1.1 var(--f-marca); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
  .cifra .l { color: var(--muted); font-size: .8125rem; margin-top: 3px; }
  .etq-pantalla { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; border: 1px solid; }
  .etq-azul { color: var(--azul-osc); background: var(--azul-fondo); border-color: #B9CDF5; }
  .etq-verde { color: var(--verde-texto); background: var(--verde-fondo); border-color: #A9DCC2; }
  .etq-gris { color: var(--muted); background: var(--panel); border-color: var(--linea-2); }
  .cifra.ambar .n { color: var(--ambar); } .cifra.verde .n { color: var(--verde-texto); } .cifra.azul .n { color: var(--azul-osc); }
  @media (max-width: 520px) { .cifras { grid-template-columns: 1fr 1fr; gap: 8px; } .cifra { padding: 11px 12px; } .cifra .n { font-size: 1.4rem; } }

  /* ───────── botones y formularios ───────── */
  button, .boton { font: 500 .875rem/1.2 var(--f-ui); display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
                   min-height: 36px; padding: .45rem .95rem; border-radius: var(--radio-chico); border: 1px solid var(--linea-2);
                   background: #fff; color: var(--tinta); cursor: pointer; white-space: nowrap; text-decoration: none; }
  button:hover, .boton:hover { background: var(--panel); border-color: #A9B6C5; text-decoration: none; }
  button.primario, .boton.primario { background: var(--verde); border-color: var(--verde); color: #fff; font-weight: 600; }
  button.primario:hover, .boton.primario:hover { background: #108A4D; border-color: #108A4D; }
  button.peligro { color: var(--rojo); border-color: #E7B5B0; }
  button.peligro:hover { background: var(--rojo-fondo); border-color: var(--rojo); }
  button.fantasma { border-color: transparent; background: transparent; color: var(--azul); padding-inline: .5rem; }
  button.fantasma:hover { background: var(--azul-fondo); }
  button.chico { min-height: 30px; padding: .25rem .65rem; font-size: .8125rem; }
  button:disabled { opacity: .5; cursor: default; }
  button svg, .boton svg { width: 16px; height: 16px; flex: none; }
  .acciones { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
  @media (max-width: 899px) { button, .boton { min-height: 40px; } button.chico { min-height: 34px; } }

  input, select, textarea { font: inherit; color: var(--tinta); background: #fff; border: 1px solid var(--linea-2); border-radius: var(--radio-chico);
                            padding: .5rem .7rem; min-height: 40px; width: 100%; max-width: 100%; }
  input:focus, select:focus, textarea:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px #D5E2FA; }
  input[readonly] { background: var(--panel); color: var(--muted); }
  input[type=checkbox], input[type=radio] { width: auto; min-height: 0; accent-color: var(--verde); margin: 0; }
  input[type=range] { padding: 0; border: 0; min-height: 28px; accent-color: var(--verde); background: transparent; box-shadow: none; }
  input[type=file] { padding: .35rem; }
  @media (max-width: 899px) { input, select, textarea { font-size: 16px; } } /* sin zoom automático en iPhone */
  .campos { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
  .campo { display: grid; gap: 5px; min-width: 0; align-content: start; }
  .campo > .etq { font-weight: 600; font-size: .8125rem; color: var(--tinta); }
  .campo > .etq .opc { font-weight: 400; color: var(--muted); }
  .campo .ayuda-campo { font-size: .78rem; color: var(--muted); }
  .campo.ancho { grid-column: 1 / -1; }
  .casilla { display: inline-flex; gap: .5rem; align-items: center; cursor: pointer; font-size: .875rem; }
  .form-pie { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--linea); }
  .form-pie .estado-form { font-size: .875rem; color: var(--muted); }
  .form-pie .estado-form.error { color: var(--rojo); }
  @media (max-width: 520px) { .form-pie button { flex: 1 1 auto; } }

  /* buscador */
  .buscador { position: relative; flex: 1 1 260px; min-width: 0; }
  .buscador svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--tenue); pointer-events: none; }
  .buscador input { padding-left: 36px; }
  .filtros { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
  .filtros select { width: auto; flex: 0 1 230px; }
  .filtros .casilla { min-height: 40px; }
  @media (max-width: 520px) { .filtros select { flex: 1 1 100%; } }

  /* combobox (anfitrión con buscador) */
  .combo { position: relative; }
  .combo .lista-sug { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--linea-2);
                      border-radius: 8px; box-shadow: var(--sombra-alta); max-height: 280px; overflow-y: auto; z-index: 20; padding: 4px; }
  .combo .sug { padding: 8px 10px; border-radius: 6px; cursor: pointer; display: block; }
  .combo .sug:hover, .combo .sug.marcada { background: var(--azul-fondo); }
  .combo .sug b { font-weight: 600; }
  .combo .sug span { display: block; font-size: .78rem; color: var(--muted); }
  .combo .sug-vacia { padding: 8px 10px; color: var(--muted); font-size: .875rem; }
  .combo .elegido { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: var(--verde-texto); pointer-events: none; }
  .combo .elegido svg { width: 18px; height: 18px; }

  /* interruptor */
  .switch { position: relative; width: 40px; height: 23px; flex: none; display: inline-block; }
  .switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
  .switch .riel { position: absolute; inset: 0; background: #C3CDD8; border-radius: 999px; transition: background .15s; }
  .switch .riel::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; background: #fff; border-radius: 50%;
                         transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
  .switch input:checked + .riel { background: var(--verde); }
  .switch input:checked + .riel::after { transform: translateX(17px); }
  .switch input:disabled + .riel { opacity: .5; }
  .switch input:focus-visible + .riel { outline: 2px solid var(--azul); outline-offset: 2px; }
  .fila-switch { display: flex; align-items: center; gap: 12px; }
  .fila-switch .txt { min-width: 0; }
  .fila-switch .txt b { display: block; font-weight: 600; }
  .fila-switch .txt span { display: block; font-size: .8125rem; color: var(--muted); }

  /* ───────── estados (mismos colores en todo el panel) ───────── */
  .pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600;
          white-space: nowrap; border: 1px solid transparent; line-height: 1.5; }
  .pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
  .pill.pend { background: var(--ambar-fondo); color: var(--ambar); border-color: #F6DDB0; }
  .pill.info { background: var(--azul-fondo); color: var(--azul-osc); border-color: #CADBF9; }
  .pill.ok { background: var(--verde-fondo); color: var(--verde-texto); border-color: #BFE5D0; }
  .pill.mal { background: var(--rojo-fondo); color: var(--rojo); border-color: #F3C6C1; }
  .pill.gris, .pill.off { background: var(--gris-fondo); color: var(--muted); border-color: var(--linea); }
  .leyenda { display: flex; gap: 6px 12px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); align-items: center; }
  .punto { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
  .punto.ok { background: var(--verde); } .punto.mal { background: var(--rojo); } .punto.pend { background: #D9921A; }
  .punto.info { background: var(--azul); } .punto.gris { background: var(--tenue); }
  .punto.vivo { box-shadow: 0 0 0 0 rgba(20, 160, 90, .5); animation: latido 2s infinite; }
  @keyframes latido { 0% { box-shadow: 0 0 0 0 rgba(20, 160, 90, .45); } 70% { box-shadow: 0 0 0 8px rgba(20, 160, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(20, 160, 90, 0); } }

  /* ───────── tablas (en el celular se vuelven tarjetas) ───────── */
  .tabla-cont { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { width: 100%; border-collapse: collapse; font-size: .875rem; }
  th { text-align: left; font-weight: 600; font-size: .75rem; letter-spacing: .03em; text-transform: uppercase; color: var(--muted);
       padding: 8px 10px; border-bottom: 1px solid var(--linea-2); white-space: nowrap; background: var(--panel); }
  td { padding: 11px 10px; border-bottom: 1px solid var(--linea); vertical-align: top; }
  tbody tr:last-child td { border-bottom: 0; }
  tbody tr:hover td { background: #FAFBFD; }
  td.acc { white-space: nowrap; text-align: right; }
  td.acc .acciones { justify-content: flex-end; }
  .vacio { color: var(--muted); padding: 14px 4px; text-align: center; }
  img.mini { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--linea); display: block; }
  @media (max-width: 720px) {
    table.apilable thead { display: none; }
    table.apilable, table.apilable tbody { display: block; }
    table.apilable tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--linea); }
    table.apilable tr:last-child { border-bottom: 0; }
    table.apilable tbody tr:hover td { background: none; }
    table.apilable td { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border: 0; text-align: right; }
    table.apilable td::before { content: attr(data-label); color: var(--muted); text-align: left; font-size: .8125rem; flex: none; }
    table.apilable td.titular { display: block; text-align: left; padding-bottom: 6px; font-size: .95rem; }
    table.apilable td.titular::before { content: none; }
    table.apilable td.acc { justify-content: flex-start; padding-top: 8px; }
    table.apilable td.acc::before { content: none; }
    table.apilable td.acc .acciones { justify-content: flex-start; }
    table.apilable td:empty, table.apilable td.vacia { display: none; }
    table.apilable td.vacio { display: block; text-align: center; }
    table.apilable td.vacio::before { content: none; }
    table.apilable td.foto { float: right; padding: 0 0 6px 10px; }
    table.apilable td.foto::before { content: none; }
  }

  /* ───────── listas de items (citas, recados, llegadas) ───────── */
  .lista-items { display: grid; }
  .item { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; gap: 4px 14px; padding: 12px 2px; border-bottom: 1px solid var(--linea);
          align-items: start; }
  .item:last-child { border-bottom: 0; }
  .item .cuando { font-variant-numeric: tabular-nums; }
  .item .cuando b { display: block; font: 600 1rem/1.2 var(--f-marca); }
  .item .cuando span { display: block; font-size: .75rem; color: var(--muted); }
  .item .quien { font-weight: 600; overflow-wrap: anywhere; }
  .item .quien .flecha { color: var(--tenue); font-weight: 400; margin: 0 .25rem; }
  .item .quien .anf { font-weight: 500; color: var(--tinta); }
  .item .det { color: var(--muted); font-size: .8125rem; margin-top: 2px; overflow-wrap: anywhere; }
  .item .lado { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
  .item .lado .acciones { justify-content: flex-end; }
  .item.mia { background: linear-gradient(90deg, rgba(20, 160, 90, .06), transparent 60%); }
  .item .tuya { font-size: .7rem; font-weight: 700; color: var(--verde-texto); background: var(--verde-fondo); border-radius: 4px; padding: 0 5px; margin-left: 4px; vertical-align: 1px; }
  .grupo-dia { font: 600 .78rem/1 var(--f-ui); letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
               padding: 16px 2px 6px; border-bottom: 1px solid var(--linea-2); }
  .grupo-dia:first-child { padding-top: 2px; }
  .grupo-dia.hoy { color: var(--verde-texto); }
  @media (max-width: 640px) {
    .item { grid-template-columns: 58px minmax(0, 1fr); }
    .item .lado { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
    .item .lado .acciones { justify-content: flex-start; }
  }
  .ver-mas { display: inline-block; margin-top: 10px; font-weight: 500; }

  /* ───────── modal, hoja inferior y avisos ───────── */
  .modal-fondo { position: fixed; inset: 0; background: rgba(11, 27, 43, .5); display: grid; place-items: center; z-index: 60; padding: 16px; }
  .modal { background: #fff; border-radius: 12px; padding: 22px; width: 100%; max-width: 400px; box-shadow: var(--sombra-alta); text-align: center; }
  .modal h2 { margin-bottom: 6px; }
  .modal .qr { display: grid; place-items: center; margin: 14px auto; min-height: 220px; }
  .modal .enlace { font: .75rem/1.4 var(--f-cod); word-break: break-all; background: var(--panel); border-radius: 8px; padding: 8px; }
  .modal .acciones { justify-content: center; margin-top: 14px; }
  .modal .estado { margin-top: 12px; font-size: .875rem; font-weight: 600; }
  .avisos { position: fixed; left: 50%; transform: translateX(-50%); bottom: 22px; z-index: 70; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
  .toast { background: var(--navy); color: #fff; border-radius: 10px; padding: 11px 14px; font-size: .875rem; box-shadow: var(--sombra-alta);
           display: flex; gap: 10px; align-items: center; animation: entrar .18s ease-out; }
  .toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--verde-claro); flex: none; }
  .toast.error::before { background: #FF8A80; }
  @media (max-width: 899px) { .avisos { bottom: calc(76px + env(safe-area-inset-bottom)); } }

  .sheet-fondo { position: fixed; inset: 0; z-index: 55; background: rgba(11, 27, 43, .45); display: flex; align-items: flex-end; }
  .sheet { background: #fff; width: 100%; border-radius: 16px 16px 0 0; max-height: 92vh; overflow-y: auto; padding: 8px 16px calc(20px + env(safe-area-inset-bottom));
           animation: subir .2s ease-out; }
  @keyframes subir { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
  .sheet .asa { width: 40px; height: 4px; border-radius: 999px; background: var(--linea-2); margin: 4px auto 12px; }

  