/* ════════════════════════════════════════════════════════════════════════════
   Movimientos · Cruz Roja Mexicana — sistema de diseño
   Una sola hoja para el programa de Windows y el panel web / celular.
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Letras (incluidas: funciona sin internet) ── */
@font-face { font-family: Barlow; font-weight: 400; font-style: normal; font-display: swap; src: url(../fonts/barlow-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: Barlow; font-weight: 500; font-style: normal; font-display: swap; src: url(../fonts/barlow-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: Barlow; font-weight: 600; font-style: normal; font-display: swap; src: url(../fonts/barlow-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: Barlow; font-weight: 700; font-style: normal; font-display: swap; src: url(../fonts/barlow-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: Barlow; font-weight: 800; font-style: normal; font-display: swap; src: url(../fonts/barlow-latin-800-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url(../fonts/barlow-condensed-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-style: italic; font-display: swap; src: url(../fonts/barlow-condensed-latin-800-italic.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url(../fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url(../fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 600; font-style: normal; font-display: swap; src: url(../fonts/jetbrains-mono-latin-600-normal.woff2) format("woff2"); }

:root {
    --rojo: #E2231A;
    --rojo-osc: #C8102E;
    --rojo-suave: #FDECEB;
    --tinta: #1C1C22;
    --tinta-2: #3A3A44;
    --gris: #6E6E7A;
    --gris-2: #9A9AA5;
    --borde: #E6E6EA;
    --borde-2: #D6D6DD;
    --fondo: #F5F5F7;
    --blanco: #FFFFFF;
    --hover: #F2F2F5;

    --ent: #0F8A5F;
    --ent-2: #13A36E;
    --ent-suave: #E7F5EE;
    --sal: #C8312A;
    --sal-2: #D0342C;
    --sal-suave: #FCEBEA;
    --tra: #2457C5;
    --tra-suave: #EAF0FC;
    --ape: #6B4FD0;
    --ape-suave: #F0ECFC;
    --par: #B8600B;
    --par-suave: #FFF3E3;

    --lateral: #16161B;
    --lateral-2: #222229;
    --lateral-txt: #C9C9D2;

    --radio: 14px;
    --radio-chico: 10px;
    --sombra: 0 1px 2px rgba(20, 20, 30, .05), 0 1px 1px rgba(20, 20, 30, .03);
    --sombra-alta: 0 18px 50px -12px rgba(20, 20, 30, .35), 0 4px 14px rgba(20, 20, 30, .08);
    --letra: Barlow, "Segoe UI", system-ui, -apple-system, sans-serif;
    --letra-titulo: "Barlow Condensed", Barlow, "Segoe UI", sans-serif;
    --mono: "JetBrains Mono", Consolas, monospace;
    --ancho-lateral: 252px;
    --alto-barra: 58px;
    --alto-tabbar: 64px;
    --seguro-abajo: env(safe-area-inset-bottom, 0px);
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
    font-family: var(--letra);
    font-size: 15px;
    line-height: 1.45;
    color: var(--tinta);
    background: var(--fondo);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    font-feature-settings: "tnum" 1;
}
a { color: var(--tra); text-decoration: none; cursor: pointer; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
p { margin: 0 0 .5em; }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
.ico { flex: none; }
.mono { font-family: var(--mono); font-feature-settings: normal; }
.centro { text-align: center; }
.der { text-align: right; }
.cen { text-align: center; }
.gris { color: var(--gris); }
.ent { color: var(--ent); }
.sal { color: var(--sal); }
.tra { color: var(--tra); }
.par { color: var(--par); }
.crece { flex: 1 1 auto; }
.relleno { padding: 14px; }
.recorte { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sin-corte { white-space: nowrap; }
@media (min-width: 900px) { .solo-movil { display: none !important; } }
kbd {
    font-family: var(--mono);
    font-size: 10.5px;
    line-height: 1;
    padding: 3px 5px;
    border-radius: 5px;
    border: 1px solid var(--borde-2);
    border-bottom-width: 2px;
    background: var(--blanco);
    color: var(--gris);
}
:focus-visible { outline: 2px solid var(--tra); outline-offset: 2px; }
/* Foco del teclado: en el menú oscuro, un azul claro que sí se ve; en renglones que llenan su tarjeta, por dentro (si no, la tarjeta lo recorta). */
.lateral :focus-visible { outline-color: #82A8F5; }
.lm-fila:focus-visible, .ver-mas:focus-visible, .pestanas button:focus-visible, .ls-txt:focus-visible,
.lc-txt:focus-visible, .si-fila:focus-visible, .tabla tr:focus-visible { outline-offset: -2px; border-radius: 8px; }
.tab:focus-visible, .hm:focus-visible, .hc:focus-visible, .cm:focus-visible { outline-offset: 0; }
::selection { background: rgba(226, 35, 26, .18); }

/* ════════════════ Armazón ════════════════ */
.app { min-height: 100vh; }
.contenido { margin-left: var(--ancho-lateral); min-height: 100vh; }
.pagina { max-width: 1240px; margin: 0 auto; padding: 26px 30px 60px; display: flex; flex-direction: column; gap: 18px; }
.pagina.ancha { max-width: 1480px; }

.cargando { position: fixed; inset: 0; display: grid; place-items: center; background: var(--fondo); }
.cargando .logo-cruz { width: 64px; height: 64px; animation: latido 1.4s ease-in-out infinite; }
@keyframes latido { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.92); opacity: .7; } }

/* ── Menú lateral (PC) ── */
.lateral {
    position: fixed; inset: 0 auto 0 0; width: var(--ancho-lateral); z-index: 30;
    display: flex; flex-direction: column; gap: 14px;
    background: var(--lateral); color: var(--lateral-txt);
    padding: 18px 14px 14px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #3a3a44 transparent;
}
.lateral .marca { display: block; padding: 4px 6px 14px; border-bottom: 1px solid rgba(255, 255, 255, .07); text-decoration: none; }
.lat-titulo {
    display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: #7d7d89; padding: 10px 10px 6px;
}
.captura-rapida .lat-titulo { padding-top: 0; }
.captura-botones { display: grid; gap: 6px; }
.cr {
    display: flex; align-items: center; gap: 10px; width: 100%;
    border: 0; border-radius: 10px; padding: 9px 11px; cursor: pointer; text-align: left;
    font-weight: 600; font-size: 14.5px; color: #fff; background: var(--lateral-2);
    transition: background .15s, transform .1s;
}
.cr span { flex: 1; }
.cr kbd { background: transparent; border-color: rgba(255, 255, 255, .18); color: rgba(255, 255, 255, .55); }
.cr .ico { padding: 5px; width: 27px; height: 27px; border-radius: 8px; }
.cr.ent .ico { background: rgba(19, 163, 110, .22); color: #4ED19B; }
.cr.sal .ico { background: rgba(226, 35, 26, .22); color: #FF6B63; }
.cr.tra .ico { background: rgba(36, 87, 197, .28); color: #82A8F5; }
.cr:hover { background: #2c2c35; }
.cr:active { transform: scale(.98); }
.menu { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.menu-item {
    display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px;
    color: var(--lateral-txt); font-weight: 500; font-size: 14.5px; position: relative;
}
.menu-item span { flex: 1; }
.menu-item kbd { opacity: 0; background: transparent; border-color: rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .45); transition: opacity .15s; }
.menu-item:hover { background: rgba(255, 255, 255, .05); color: #fff; text-decoration: none; }
.menu-item:hover kbd { opacity: 1; }
.menu-item.activo { background: rgba(226, 35, 26, .14); color: #fff; }
.menu-item.activo::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--rojo); }
.menu-item.activo .ico { color: #FF5A52; }
.insignia {
    font-style: normal; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px;
    border-radius: 10px; background: var(--par); color: #fff; display: inline-grid; place-items: center;
}
.lateral-pie { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid rgba(255, 255, 255, .07); padding-top: 12px; }
.yo { display: flex; align-items: center; gap: 10px; padding: 4px 4px 0; }
.yo-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.yo-txt b { color: #fff; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yo-txt small { font-size: 12px; color: #8b8b97; }

/* ── Barras del celular ── */
.barra-movil, .tabbar { display: none; }

/* ── Logo ── */
.logo { display: flex; align-items: center; gap: 11px; color: var(--tinta); }
.logo-cruz {
    width: 40px; height: 40px; flex: none; display: grid; place-items: center;
    background: #fff; border-radius: 10px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06);
}
.logo-cruz svg { width: 74%; height: 74%; fill: var(--rojo); }
.logo-txt { display: flex; flex-direction: column; line-height: 1.05; }
.logo-txt b { font-family: var(--letra-titulo); font-weight: 700; font-size: 17px; letter-spacing: .02em; }
.logo-txt small { font-size: 12px; color: var(--gris); margin-top: 2px; }
.logo.claro { color: #fff; }
.logo.claro .logo-txt small { color: #a3a3ae; }
.logo.compacto .logo-cruz { width: 34px; height: 34px; border-radius: 9px; }
.logo.color .logo-txt b { color: var(--rojo-osc); }

/* ── Indicador de conexión ── */
.conexion {
    display: inline-flex; align-items: center; gap: 7px; border: 0; cursor: pointer;
    font-size: 12.5px; font-weight: 600; padding: 6px 10px; border-radius: 999px;
    background: rgba(255, 255, 255, .06); color: var(--lateral-txt);
}
.conexion .punto { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.conexion.en-linea .punto { background: #2BD08A; box-shadow: 0 0 0 3px rgba(43, 208, 138, .18); }
.conexion.enviando .punto, .conexion.conectando .punto { background: #F5B800; animation: latido 1s infinite; }
.conexion.sin-conexion .punto { background: #FF5A52; }
.conexion.sin-conexion { color: #FFB1AC; }
.conexion.movil { background: var(--hover); color: var(--tinta-2); padding: 6px 8px; }
.conexion.movil span { display: none; }

/* ════════════════ Encabezado de página ════════════════ */
.pag-enc { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pag-enc h1 { font-family: var(--letra-titulo); font-weight: 700; font-size: 32px; letter-spacing: -.005em; }
.pag-pre { font-size: 13.5px; font-weight: 600; color: var(--rojo-osc); margin: 0 0 2px; }
.pag-sub { color: var(--gris); max-width: 720px; margin: 4px 0 0; font-size: 14.5px; }
.pag-acciones { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.volver { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 13.5px; color: var(--gris); margin-bottom: -8px; }
.volver:hover { color: var(--tinta); text-decoration: none; }
.fila-derecha { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

/* ════════════════ Botones ════════════════ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 38px; padding: 0 14px; border-radius: 10px; cursor: pointer; white-space: nowrap;
    border: 1px solid var(--borde-2); background: var(--blanco); color: var(--tinta);
    font-weight: 600; font-size: 14px; box-shadow: var(--sombra);
    transition: background .12s, border-color .12s, transform .08s, box-shadow .12s;
    text-decoration: none !important; position: relative;
}
.btn:hover { background: var(--hover); border-color: #c8c8d0; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.deshabilitado { opacity: .5; pointer-events: none; }
.btn.primario { background: var(--rojo); border-color: var(--rojo); color: #fff; box-shadow: 0 1px 2px rgba(200, 16, 46, .3), inset 0 1px 0 rgba(255, 255, 255, .12); }
.btn.primario:hover { background: var(--rojo-osc); border-color: var(--rojo-osc); }
.btn.primario.ent { background: var(--ent); border-color: var(--ent); }
.btn.primario.ent:hover { background: #0B754F; }
.btn.primario.sal { background: var(--sal); border-color: var(--sal); }
.btn.primario.sal:hover { background: #AE2620; border-color: #AE2620; }
.btn.primario.tra { background: var(--tra); border-color: var(--tra); }
.btn.primario.tra:hover { background: #1C47A6; }
.btn.primario.ape { background: var(--ape); border-color: var(--ape); }
.btn.primario.ape:hover { background: #5A3FBA; border-color: #5A3FBA; }
.btn.peligro { background: var(--sal); border-color: var(--sal); color: #fff; }
.btn.peligro:hover { background: #AE2620; border-color: #AE2620; }
.btn.peligro-suave { color: var(--sal); border-color: #F1C6C3; background: #fff; }
.btn.peligro-suave:hover { background: var(--sal-suave); }
.btn.ent-suave { color: var(--ent); border-color: #BFE3D2; }
.btn.ent-suave:hover { background: var(--ent-suave); }
.btn.sal-suave { color: var(--sal); border-color: #F1C6C3; }
.btn.sal-suave:hover { background: var(--sal-suave); }
.btn.activo { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.btn.grande { height: 48px; font-size: 16px; border-radius: 12px; }
.btn.chico { height: 31px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.bloque { width: 100%; }
.btn.izquierda { margin-right: auto; }
.btn.con-punto::after { content: ""; position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--rojo); }
.btn input[type=file], .soltar-archivo input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.btn-icono {
    display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none;
    border: 0; border-radius: 9px; background: transparent; cursor: pointer; color: var(--gris);
    transition: background .12s, color .12s;
}
.btn-icono:hover { background: var(--hover); color: var(--tinta); }
.btn-icono:disabled { opacity: .35; pointer-events: none; }
.btn-icono.chico { width: 30px; height: 30px; border-radius: 8px; }
.btn-icono.claro { color: #8b8b97; }
.btn-icono.claro:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.btn-icono.peligro:hover { background: var(--sal-suave); color: var(--sal); }

.btn-texto {
    display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; padding: 4px 6px;
    color: var(--tra); font-weight: 600; font-size: 13.5px; cursor: pointer; border-radius: 6px;
}
.btn-texto:hover { background: var(--tra-suave); }
.btn-texto.chico { font-size: 12.5px; padding: 2px 5px; }

/* ── Chips, píldoras, avatar ── */
.chip {
    display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px;
    font-size: 12.5px; font-weight: 600; background: var(--hover); color: var(--tinta-2);
    border: 1px solid transparent; cursor: default; white-space: nowrap; font-style: normal;
}
button.chip { cursor: pointer; border-color: var(--borde); background: #fff; }
button.chip:hover { border-color: var(--borde-2); background: var(--hover); }
button.chip.activo { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.chip.gris { background: var(--hover); color: var(--gris); }
.chip.ent { background: var(--ent-suave); color: var(--ent); }
.chip.sal { background: var(--sal-suave); color: var(--sal); }
.chip.tra { background: var(--tra-suave); color: var(--tra); }
.chip.par { background: var(--par-suave); color: var(--par); }
.chip.rojo { background: var(--rojo-suave); color: var(--rojo-osc); }
.chip.gris-ent { background: #EEF4F1; color: #4E7D69; }

.pildora {
    display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px;
    font-size: 12px; font-weight: 700; background: var(--hover); color: var(--tinta-2);
}
.pildora.ent { background: var(--ent-suave); color: var(--ent); }
.pildora.sal { background: var(--sal-suave); color: var(--sal); }
.pildora.tra { background: var(--tra-suave); color: var(--tra); }
.pildora.ape { background: var(--ape-suave); color: var(--ape); }
.pildora.gris { color: var(--gris); }
.pildora.mini { font-size: 10.5px; padding: 1px 6px; }

.avatar {
    width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center;
    font-size: 13px; font-weight: 700; letter-spacing: .02em;
    background: linear-gradient(135deg, #E2231A, #A80D25); color: #fff;
}
.avatar.grande { width: 46px; height: 46px; font-size: 16px; }
.avatar.tra { background: linear-gradient(135deg, #3A6FE0, #1C47A6); }
.avatar.gris { background: linear-gradient(135deg, #9A9AA5, #6E6E7A); }

.punto-cuenta { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--gris-2)); margin-right: 6px; flex: none; }
.folio { font-family: var(--mono); font-size: 12px; color: var(--gris); font-weight: 500; }

/* ════════════════ Formularios ════════════════ */
.campo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.campo > span:first-child, .etiqueta { font-size: 12.5px; font-weight: 700; color: var(--tinta-2); letter-spacing: .01em; display: flex; align-items: center; gap: 6px; }
.etiqueta em, .campo > span em { font-style: normal; font-weight: 500; color: var(--gris-2); }
.etiqueta.chica { font-size: 11.5px; }
.campo input, .campo select, .campo textarea, select.sel, .renglon input, .un-caja select {
    width: 100%; height: 42px; padding: 0 12px; border-radius: 10px;
    border: 1px solid var(--borde-2); background: #fff; outline: none;
    transition: border-color .12s, box-shadow .12s; font-size: 15px;
}
.campo textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.4; }
.campo input:focus, .campo select:focus, .campo textarea:focus, select.sel:focus, .renglon input:focus {
    border-color: var(--tra); box-shadow: 0 0 0 3px rgba(36, 87, 197, .15);
}
.campo input:disabled, .campo select:disabled, .campo textarea:disabled { background: var(--fondo); color: var(--gris); }
select.sel { width: auto; min-width: 170px; height: 38px; font-size: 14px; font-weight: 500; padding-right: 30px; }
select {
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236E6E7A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 11px center; padding-right: 32px !important;
}
.fila-campos { display: flex; gap: 12px; }
.fila-campos > * { flex: 1 1 0; }
.fila-campos > .crece { flex: 2 1 0; }
.rejilla-campos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.ayuda-txt { font-size: 13px; color: var(--gris); margin: 0; font-style: normal; }
.error {
    display: flex; align-items: center; gap: 8px; margin: 0; padding: 9px 12px; border-radius: 10px;
    background: var(--sal-suave); color: #A3221B; font-size: 14px; font-weight: 500;
}
.exito { display: flex; align-items: center; gap: 8px; margin: 0; padding: 9px 12px; border-radius: 10px; background: var(--ent-suave); color: #0B6D4B; font-size: 14px; font-weight: 500; }
.nota-info { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--tra-suave); color: #1D3F8C; font-size: 13.5px; }
.aviso-suave { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-size: 13px; color: #8A5A00; }
.caja-gris { background: var(--fondo); border: 1px solid var(--borde); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.caja-peligro { background: #FFF6F5; border: 1px solid #F3CFCB; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; color: #8A1F18; }
.caja-peligro b { display: flex; align-items: center; gap: 6px; }
.caja-peligro small { color: #9A4A44; }
.caja-peligro ul { margin: 0; padding-left: 18px; font-size: 13.5px; }
.caja-peligro input { height: 40px; border-radius: 9px; border: 1px solid #E8B4AF; padding: 0 12px; outline: none; }
.fila-botones { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.con-ojo, .con-ico { position: relative; display: flex; align-items: center; }
.con-ojo input { padding-right: 44px !important; }
.con-ojo > .btn-icono, .con-ojo > .ojo { position: absolute; right: 5px; }
.con-ico > .ico:first-child { position: absolute; left: 13px; color: var(--gris-2); pointer-events: none; }
.con-ico input { padding-left: 42px !important; }
.ojo { border: 0; background: none; color: var(--gris-2); cursor: pointer; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; }
.ojo:hover { color: var(--tinta); background: var(--hover); }

/* Interruptor */
.interruptor { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; font-weight: 500; user-select: none; flex-wrap: wrap; }
.interruptor input { position: absolute; opacity: 0; width: 0; height: 0; }
.interruptor > span {
    width: 38px; height: 22px; border-radius: 11px; background: #CFCFD6; position: relative; flex: none; transition: background .15s;
}
.interruptor > span::after {
    content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s;
}
.interruptor input:checked + span { background: var(--ent); }
.interruptor input:checked + span::after { transform: translateX(16px); }
.interruptor input:focus-visible + span { outline: 2px solid var(--tra); outline-offset: 2px; }
.interruptor em { flex-basis: 100%; padding-left: 48px; margin-top: -6px; }

/* Casilla */
.casilla { position: relative; display: inline-grid; place-items: center; width: 22px; height: 22px; flex: none; cursor: pointer; }
.casilla input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.casilla span { width: 20px; height: 20px; border-radius: 6px; border: 2px solid #C4C4CC; background: #fff; transition: all .12s; }
.casilla input:checked + span {
    background: var(--ent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5 10 17 19 7'/%3E%3C/svg%3E") center/14px no-repeat;
    border-color: var(--ent);
}

/* Buscador */
.buscador {
    flex: 1 1 280px; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px;
    border: 1px solid var(--borde-2); border-radius: 10px; background: #fff; color: var(--gris-2);
    transition: border-color .12s, box-shadow .12s;
}
.buscador:focus-within { border-color: var(--tra); box-shadow: 0 0 0 3px rgba(36, 87, 197, .15); }
.buscador input { border: 0; outline: none; flex: 1; min-width: 0; height: 100%; background: transparent; color: var(--tinta); font-size: 14.5px; }
.buscador.chico { height: 36px; flex: none; width: 100%; }

/* Segmento */
.segmento { display: inline-flex; padding: 3px; border-radius: 11px; background: #EBEBEF; gap: 2px; }
.segmento .seg {
    border: 0; background: transparent; border-radius: 8px; padding: 0 14px; height: 34px; cursor: pointer;
    font-weight: 600; font-size: 14px; color: var(--gris); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
}
.segmento .seg:hover { color: var(--tinta); }
.segmento .seg:disabled { opacity: .35; cursor: not-allowed; }
.segmento .seg.activo { background: #fff; color: var(--tinta); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.segmento .seg.ent.activo { color: var(--ent); }
.segmento .seg.sal.activo { color: var(--sal); }
.segmento .seg.tra.activo { color: var(--tra); }
.segmento.chico .seg { height: 30px; padding: 0 11px; font-size: 13px; }
.segmento.completo { display: flex; }
.segmento.completo .seg { flex: 1; justify-content: center; }

/* ════════════════ Tarjetas e indicadores ════════════════ */
.tarjeta { background: var(--blanco); border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra); padding: 18px 20px; min-width: 0; }
.tarjeta.sin-relleno { padding: 0; overflow: hidden; }
.tarjeta-enc { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.tarjeta-enc h2 { font-size: 16.5px; font-weight: 700; }
.tarjeta-enc a { display: inline-flex; align-items: center; gap: 3px; font-size: 13.5px; font-weight: 600; }
.tarjeta-sub { font-size: 12.5px; color: var(--gris); }
.vacio { padding: 26px 18px; text-align: center; color: var(--gris); font-size: 14px; }
.vacio > .ico { margin: 0 auto 8px; color: #C6C6CE; }
.vacio > p { margin: 0; }
.vacio.chico { padding: 16px 10px; font-size: 13.5px; }
.vacio-grande, .tarjeta.vacio-grande { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 44px 20px; text-align: center; color: var(--gris); }
.vacio-grande .ico { color: #C6C6CE; margin-bottom: 4px; }
.vacio-grande p { margin: 0; font-weight: 600; color: var(--tinta-2); }
.vacio-grande .ayuda-txt { font-weight: 400; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpis.chicos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi {
    display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-radius: var(--radio);
    background: #fff; border: 1px solid var(--borde); box-shadow: var(--sombra); color: var(--tinta);
    text-decoration: none !important; transition: transform .12s, box-shadow .12s; position: relative; overflow: hidden;
}
a.kpi:hover { transform: translateY(-2px); box-shadow: 0 8px 22px -10px rgba(20, 20, 30, .25); }
.kpi-et { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--gris); }
.kpi-v { font-family: var(--letra-titulo); font-weight: 700; font-size: 30px; line-height: 1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kpi-d { font-size: 12.5px; color: var(--gris); }
.kpi.ent .kpi-et .ico { color: var(--ent); }
.kpi.sal .kpi-et .ico { color: var(--sal); }
.kpi.par .kpi-et .ico { color: var(--par); }
.kpi.ent { box-shadow: inset 0 3px 0 var(--ent), var(--sombra); }
.kpi.sal { box-shadow: inset 0 3px 0 var(--sal), var(--sombra); }
.kpi.par { box-shadow: inset 0 3px 0 var(--par), var(--sombra); }
.kpi.destacado { background: linear-gradient(145deg, #1E1E25 0%, #2A1416 100%); border-color: transparent; color: #fff; }
.kpi.destacado::after {
    content: ""; position: absolute; right: -26px; bottom: -26px; width: 120px; height: 120px; opacity: .12;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath fill='%23E2231A' d='M23 6h18v17h17v18H41v17H23V41H6V23h17z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.kpi.destacado .kpi-et, .kpi.destacado .kpi-d { color: #B9B9C4; }
.kpi.destacado .kpi-et .ico { color: #FF5A52; }

.resumen-importar { display: flex; gap: 10px; flex-wrap: wrap; }
.rf-caja {
    flex: 1 1 140px; display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 12px;
    background: #fff; border: 1px solid var(--borde); min-width: 0;
}
.rf-caja span { font-size: 12px; font-weight: 600; color: var(--gris); }
.rf-caja b { font-family: var(--letra-titulo); font-size: 22px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }

/* Tira de totales: una sola tarjeta con casillas separadas por líneas finas (las de la orilla las recorta la tarjeta). */
.resumen-filtro, .vr-kpis {
    display: flex; flex-wrap: wrap; background: #fff; border: 1px solid var(--borde); border-radius: var(--radio);
    box-shadow: var(--sombra); overflow: hidden;
}
.resumen-filtro > .rf-caja, .vr-kpis > .rf-caja {
    flex: 1 1 150px; border: 0; border-radius: 0; background: transparent; padding: 12px 16px;
    box-shadow: -1px 0 0 #EEEEF2, 0 -1px 0 #EEEEF2; container-type: inline-size;
}
/* El monto se achica un poco si la casilla es angosta, para que nunca se salga (p. ej. «Todo el historial»). */
.resumen-filtro > .rf-caja b, .vr-kpis > .rf-caja b { font-size: min(22px, 17.5cqi); white-space: nowrap; }
/* Por moneda: un renglón por moneda (entradas, salidas, diferencia) y el número de movimientos a un lado. */
.resumen-filtro.por-moneda, .vr-kpis.por-moneda { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, .75fr); }
.por-moneda > .rf-caja:last-child { grid-column: 4; grid-row: 1; background: #FAFAFB; }
.por-moneda > .rf-caja:last-child:nth-child(7) { grid-row: 1 / span 2; justify-content: center; }
.rf-caja b.chico { font-size: 16px; font-family: var(--letra); }
.rf-caja small { font-size: 12px; color: var(--gris); }
.rf-caja.ent b { color: var(--ent); }
.rf-caja.sal b { color: var(--sal); }
.rf-caja.par b { color: var(--par); }

/* ════════════════ Filtros ════════════════ */
.filtros { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; }
.filtros-fila { display: flex; gap: 10px; align-items: center; }
.filtros-fila.envolver { flex-wrap: wrap; }
.filtros-mas { display: flex; flex-direction: column; gap: 12px; }

/* Periodo */
.periodo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.periodo-nav { display: flex; align-items: center; gap: 2px; background: #fff; border: 1px solid var(--borde-2); border-radius: 10px; padding: 1px; }
.periodo-txt { min-width: 150px; display: flex; align-items: center; justify-content: center; gap: 7px; font-weight: 700; font-size: 14px; padding: 0 4px; white-space: nowrap; }
.periodo-txt svg { color: var(--gris-2); flex: none; }
.periodo-atajos { display: flex; gap: 6px; flex-wrap: wrap; }
.periodo-fechas { display: flex; align-items: center; gap: 6px; }
.periodo-fechas input { height: 36px; border-radius: 9px; border: 1px solid var(--borde-2); padding: 0 10px; font-size: 13.5px; background: #fff; }

/* ════════════════ Tablas ════════════════ */
.tabla-envoltura { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tabla-envoltura.alta { max-height: 360px; overflow-y: auto; }
.tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabla th {
    text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--gris); padding: 10px 14px; border-bottom: 1px solid var(--borde); background: #FAFAFB; white-space: nowrap;
    position: sticky; top: 0;
}
.tabla td { padding: 11px 14px; border-bottom: 1px solid #F0F0F3; vertical-align: middle; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla th.der, .tabla td.der { text-align: right; }
.tabla tr.clic { cursor: pointer; }
.tabla tr.clic td { transition: background .1s; }
.tabla tr.clic:hover td { background: #FAFAFC; }
/* La columna de texto largo toma el espacio que sobra y se recorta con «…» (así la tabla no se sale a lo ancho). */
.tabla td.col-resto { width: 100%; max-width: 0; }
.tabla tr.cancelado td { color: var(--gris-2); }
.tabla tr.cancelado td.mono { text-decoration: line-through; }
.tabla.chica td, .tabla.chica th { padding: 7px 12px; font-size: 13.5px; }

/* ════════════════ Lista de movimientos ════════════════ */
.lista-mov { display: flex; flex-direction: column; }
.lm-dia {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    padding: 14px 18px 6px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--gris);
    background: #fff; position: sticky; top: 0; z-index: 1;
}
.lm-dia em { font-style: normal; font-family: var(--mono); font-size: 12px; letter-spacing: 0; text-transform: none; }
.lm-fila {
    display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: #fff; text-align: left; cursor: pointer;
    padding: 10px 18px; border-bottom: 1px solid #F2F2F5; transition: background .1s;
}
.lm-fila:hover { background: #FAFAFC; }
.lm-fila:last-child { border-bottom: 0; }
.lm-ico { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--hover); color: var(--gris); }
.lm-ico.ent { background: var(--ent-suave); color: var(--ent); }
.lm-ico.sal { background: var(--sal-suave); color: var(--sal); }
.lm-ico.tra { background: var(--tra-suave); color: var(--tra); }
.lm-ico.ape { background: var(--ape-suave); color: var(--ape); }
.lm-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lm-txt > b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lm-txt > small { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lm-desc { display: block; font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lm-meta { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; font-size: 12.5px; color: var(--gris); min-width: 0; }
.lm-meta .sep { margin: 0 5px; color: #C6C6CE; }
.lm-meta .mono { font-size: 11.5px; }
.lm-monto { display: flex; flex-direction: column; align-items: flex-end; font-weight: 700; font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lm-monto small { font-weight: 500; font-size: 11.5px; color: var(--gris); max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.lm-monto.ent { color: var(--ent); }
.lm-monto.sal { color: var(--tinta); }
.lm-monto.tra { color: var(--tra); }
.lm-monto.ape { color: var(--ape); }
.lm-fila.cancelado .lm-desc, .lm-fila.cancelado .lm-monto { color: var(--gris-2); text-decoration: line-through; }
.lm-fila.cancelado .lm-ico { opacity: .45; }
.ver-mas { border-radius: 0; border-width: 1px 0 0; box-shadow: none; height: 46px; color: var(--tra); }

/* ════════════════ Inicio ════════════════ */
.rejilla-inicio { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 16px; align-items: start; }
.rejilla-inicio > .tarjeta:nth-child(3) { padding: 18px 0 0; }
.rejilla-inicio > .tarjeta:nth-child(3) .tarjeta-enc { padding: 0 20px; margin-bottom: 0; }
.si-lista { display: flex; flex-direction: column; gap: 2px; }
.si-fila { display: flex; align-items: center; gap: 12px; padding: 9px 10px; margin: 0 -10px; border-radius: 10px; color: var(--tinta); }
.si-fila:hover { background: var(--hover); text-decoration: none; }
.si-ico { width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 13%, white); }
.si-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.si-txt b { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.si-barra { height: 5px; border-radius: 3px; background: #EFEFF3; overflow: hidden; }
.si-barra i { display: block; height: 100%; border-radius: 3px; background: var(--c); }
.si-monto { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; }
.si-monto b { font-size: 15px; }
.si-monto small { font-size: 12px; color: var(--gris); }
.barras-concepto { display: flex; flex-direction: column; gap: 13px; }
.bc-fila { display: flex; flex-direction: column; gap: 5px; }
.bc-txt { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.bc-txt b { font-weight: 600; }
.bc-txt span { font-weight: 700; font-variant-numeric: tabular-nums; }
.bc-barra { height: 8px; border-radius: 4px; background: #F2F2F5; overflow: hidden; }
.bc-barra i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #E2231A, #F26B5B); }
.bc-fila small { font-size: 12px; color: var(--gris); }
.captura-movil { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cm {
    display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 6px; border-radius: 13px; cursor: pointer;
    border: 1px solid var(--borde); background: #fff; font-weight: 700; font-size: 14px; box-shadow: var(--sombra);
    transition: background .12s, transform .1s;
}
.cm:active { transform: scale(.97); background: var(--hover); }
.cm .ico { width: 32px; height: 32px; padding: 7px; border-radius: 10px; }
.cm.ent .ico { background: var(--ent-suave); color: var(--ent); }
.cm.sal .ico { background: var(--sal-suave); color: var(--sal); }
.cm.tra .ico { background: var(--tra-suave); color: var(--tra); }

/* Gráfica de meses */
.grafica-meses { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; height: 210px; padding: 6px 0 24px; }
.gm-ejes { display: flex; flex-direction: column; justify-content: space-between; height: 100%; }
.gm-ejes span { height: 0; display: flex; align-items: center; justify-content: flex-end; font-size: 11px; color: var(--gris-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.gm-area { position: relative; display: flex; align-items: stretch; gap: 4px; height: 100%; }
.gm-linea { position: absolute; left: 0; right: 0; height: 1px; background: #EEEEF2; pointer-events: none; }
.gm-mes { flex: 1; position: relative; cursor: pointer; border-radius: 8px 8px 0 0; min-width: 0; }
.gm-mes:hover, .gm-mes.sel { background: rgba(28, 28, 34, .035); }
.gm-barras { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.gm-barras i { width: min(14px, 34%); border-radius: 4px 4px 1px 1px; min-height: 2px; transition: height .3s; }
.gm-barras .e { background: var(--ent-2); }
.gm-barras .s { background: var(--sal-2); }
.gm-mes:not(.actual):not(.sel) .gm-barras i { opacity: .75; }
.gm-et { position: absolute; left: 0; right: 0; bottom: -21px; text-align: center; font-size: 11px; font-weight: 600; color: var(--gris); white-space: nowrap; }
.gm-mes.actual .gm-et { color: var(--tinta); font-weight: 800; }
.gm-detalle { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 13px; font-weight: 600; padding-top: 10px; margin-top: 4px; border-top: 1px solid #F2F2F5; }
.gm-detalle b { color: var(--tinta); text-transform: capitalize; }
.gm-detalle span { display: inline-flex; align-items: center; gap: 6px; }
.gm-detalle i { width: 9px; height: 9px; border-radius: 3px; background: currentColor; }
.gm-detalle .neto { margin-left: auto; font-family: var(--mono); }

/* ════════════════ Cuentas ════════════════ */
.total-cuentas { display: flex; gap: 0; background: var(--lateral); color: #fff; border-radius: var(--radio); overflow: hidden; }
.total-cuentas > div { flex: 1; padding: 16px 20px; display: flex; flex-direction: column; gap: 4px; border-right: 1px solid rgba(255, 255, 255, .08); }
.total-cuentas > div:last-child { border-right: 0; }
.total-cuentas span { font-size: 12.5px; color: #A3A3AE; font-weight: 600; }
.total-cuentas b { font-family: var(--letra-titulo); font-size: 28px; font-weight: 700; line-height: 1; }
.rejilla-cuentas { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.tarjeta-cuenta {
    position: relative; background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra);
    overflow: hidden; transition: transform .12s, box-shadow .12s;
}
.tarjeta-cuenta::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--c); }
.tarjeta-cuenta:hover { transform: translateY(-2px); box-shadow: 0 10px 26px -12px rgba(20, 20, 30, .3); }
.tarjeta-cuenta.inactiva { opacity: .65; }
.tc-cuerpo { display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 14px; color: var(--tinta); text-decoration: none !important; }
.tc-arriba { display: flex; align-items: center; gap: 11px; padding-right: 34px; }
.tc-ico { width: 38px; height: 38px; border-radius: 11px; flex: none; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 13%, white); }
.tc-ico.grande { width: 50px; height: 50px; border-radius: 14px; }
.tc-nombre { display: flex; flex-direction: column; min-width: 0; }
.tc-nombre b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-nombre small { font-size: 12.5px; color: var(--gris); }
.tc-saldo { font-family: var(--letra-titulo); font-weight: 700; font-size: 32px; line-height: 1; font-variant-numeric: tabular-nums; }
.tc-saldo.sal { color: var(--sal); }
.tc-usd { font-weight: 700; color: var(--tinta-2); font-size: 15px; margin-top: -4px; }
.tc-pie { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--gris); border-top: 1px solid #F0F0F3; padding-top: 10px; }
.tc-acciones { position: absolute; top: 14px; right: 10px; display: flex; gap: 2px; }
.inactivas summary { cursor: pointer; font-weight: 600; color: var(--gris); padding: 6px 0; }
.inactivas .rejilla-cuentas { margin-top: 10px; }
.colores { display: flex; gap: 8px; flex-wrap: wrap; }
.color { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; background: var(--c); cursor: pointer; box-shadow: 0 0 0 1px var(--borde-2); transition: transform .1s; }
.color:hover { transform: scale(1.1); }
.color.activo { box-shadow: 0 0 0 2px var(--c); }

/* Estado de cuenta */
.cuenta-enc { align-items: center; }
.ce-titulo { display: flex; align-items: center; gap: 14px; }
.flujo-saldo { display: flex; align-items: stretch; gap: 8px; }
.fs-caja { flex: 1; display: flex; flex-direction: column; gap: 3px; padding: 13px 16px; border-radius: 12px; background: #fff; border: 1px solid var(--borde); min-width: 0; }
.fs-caja span { font-size: 12px; font-weight: 600; color: var(--gris); }
.fs-caja b { font-family: var(--letra-titulo); font-size: 24px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fs-caja small { font-size: 11.5px; color: var(--gris); }
.fs-caja.ent b { color: var(--ent); }
.fs-caja.sal b { color: var(--sal); }
.fs-caja.final { background: var(--lateral); border-color: var(--lateral); }
.fs-caja.final span { color: #A3A3AE; }
.fs-caja.final b { color: #fff; }
.fs-op { display: grid; place-items: center; font-size: 22px; font-weight: 700; color: var(--gris-2); }

/* ════════════════ Conceptos ════════════════ */
.rejilla-conceptos { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.gc-enc { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 12px; border-bottom: 1px solid #F0F0F3; }
.gc-enc h2 { font-size: 15px; font-weight: 700; }
.lista-conceptos { list-style: none; margin: 0; padding: 4px 0 6px; }
.lista-conceptos li { position: relative; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 7px 16px 7px 18px; transition: background .12s; }
.lista-conceptos li:hover { background: #FAFAFC; }
.lista-conceptos li.inactivo { opacity: .55; }
.lc-punto { width: 8px; height: 8px; border-radius: 50%; flex: none; align-self: flex-start; margin-top: 6px; }
.lc-punto.ent { background: var(--ent); }
.lc-punto.sal { background: var(--sal); }
.lc-punto.amb { background: linear-gradient(90deg, var(--ent) 50%, var(--sal) 50%); }
.lc-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--tinta); }
.lc-txt:hover { text-decoration: none; }
.lc-txt:hover b { color: var(--tra); }
.lc-txt b { font-size: 14.5px; font-weight: 600; line-height: 1.3; text-wrap: pretty; }
.lc-txt small { font-size: 12px; color: var(--gris); }
.lc-monto { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--tinta-2); white-space: nowrap; }
.lc-acc { display: flex; gap: 0; transition: opacity .12s; }
/* Con ratón: los botones aparecen encima del monto al pasar o con el teclado, sin quitarle espacio al nombre. */
@media (hover: hover) {
    .lc-acc {
        position: absolute; right: 10px; top: 50%; transform: translateY(-50%); opacity: 0; pointer-events: none;
        padding-left: 14px; background: linear-gradient(90deg, rgba(250, 250, 252, 0), #FAFAFC 14px);
    }
    .lista-conceptos li:hover .lc-acc, .lista-conceptos li:focus-within .lc-acc { opacity: 1; pointer-events: auto; }
    .lista-conceptos li:focus-within { background: #FAFAFC; }
}
.union { display: flex; align-items: center; gap: 10px; }
.un-caja { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 12px; background: var(--sal-suave); min-width: 0; }
.un-caja small { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--gris); }
.un-caja b { font-size: 15px; }
.un-caja span { font-size: 12.5px; color: var(--gris); }
.un-caja.queda { background: var(--ent-suave); }

/* ════════════════ Reportes ════════════════ */
.rejilla-reporte { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 18px; align-items: start; }
.opciones-reporte { display: flex; flex-direction: column; gap: 4px; padding: 6px 0; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
.or-grupo { display: flex; flex-direction: column; gap: 9px; padding: 12px 18px; border-bottom: 1px solid #F0F0F3; }
.or-grupo:last-child { border-bottom: 0; }
.or-grupo > .etiqueta { justify-content: space-between; }
.or-grupo select.sel { width: 100%; }
.or-grupo .periodo { flex-direction: column; align-items: stretch; }
.or-grupo .periodo-nav { justify-content: space-between; }
.plantillas { display: grid; gap: 6px; }
.plantilla {
    display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center;
    text-align: left; padding: 9px 12px; border-radius: 11px; border: 1px solid var(--borde); background: #fff; cursor: pointer;
    transition: border-color .12s, background .12s, box-shadow .12s;
}
.plantilla .ico { grid-row: span 2; color: var(--gris); }
.plantilla b { font-size: 14px; }
.plantilla small { font-size: 12px; color: var(--gris); line-height: 1.25; }
.plantilla:hover { border-color: var(--borde-2); background: #FCFCFD; }
.plantilla.activa { border-color: var(--rojo); background: var(--rojo-suave); box-shadow: 0 0 0 1px var(--rojo); }
.plantilla.activa .ico { color: var(--rojo); }
.chips-elegir { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-elegir {
    display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 999px;
    border: 1px solid var(--borde-2); background: #fff; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--gris);
    transition: border-color .12s, background .12s, color .12s;
}
.chip-elegir i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); opacity: .35; }
.chip-elegir.activo { color: var(--tinta); border-color: var(--c); background: color-mix(in srgb, var(--c) 8%, white); }
.chip-elegir.activo i { opacity: 1; }
.vista-reporte { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.papel { background: #E4E4E9; border-radius: var(--radio); padding: 0 0 22px; overflow: hidden; border: 1px solid #DADAE0; }
.papel-barra { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; font-size: 12.5px; font-weight: 600; color: var(--gris); }
.papel-barra span { display: inline-flex; align-items: center; gap: 6px; }
.papel-hoja {
    display: block; width: calc(100% - 44px); max-width: 860px; height: 78vh; margin: 0 auto; border: 0; background: #fff;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .35); border-radius: 3px;
}
.papel-hoja.horizontal { max-width: 1100px; }

/* ════════════════ Paramédicos ════════════════ */
.pestanas { display: flex; gap: 4px; border-bottom: 1px solid var(--borde); overflow-x: auto; scrollbar-width: none; }
.pestanas button {
    border: 0; background: none; padding: 10px 14px; font-weight: 600; font-size: 14.5px; color: var(--gris); cursor: pointer;
    border-bottom: 2.5px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
    transition: color .12s, border-color .12s;
}
.pestanas button:hover { color: var(--tinta); }
@media (hover: hover) { .pestanas button:hover { border-bottom-color: var(--borde-2); } }
.pestanas button.activa { color: var(--tinta); border-bottom-color: var(--rojo); }
.rejilla-pagar { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; align-items: start; padding-bottom: 70px; }
.tarjeta-pagar { transition: box-shadow .15s; }
.tarjeta-pagar.con-seleccion { box-shadow: 0 0 0 2px var(--ent), var(--sombra); }
.tp-enc { display: flex; align-items: center; gap: 11px; padding: 14px 16px; border-bottom: 1px solid #F0F0F3; background: #FCFCFD; }
.tp-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tp-txt b { font-size: 15px; }
.tp-txt small { font-size: 12.5px; color: var(--gris); }
.tp-monto { font-family: var(--letra-titulo); font-size: 22px; color: var(--par); font-variant-numeric: tabular-nums; }
.lista-servicios { list-style: none; margin: 0; padding: 0; }
.lista-servicios li { display: flex; align-items: center; gap: 11px; padding: 9px 16px; border-bottom: 1px solid #F4F4F6; transition: background .12s; }
.lista-servicios li:last-child { border-bottom: 0; }
.lista-servicios li.sel { background: #F3FAF6; }
.ls-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; border: 0; background: none; text-align: left; cursor: pointer; padding: 0; }
.ls-txt b { font-size: 14px; display: flex; gap: 8px; align-items: baseline; }
.ls-txt small { font-size: 12.5px; color: var(--gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ls-txt:hover b { color: var(--tra); }
.ls-monto { font-weight: 700; font-variant-numeric: tabular-nums; }
.barra-accion {
    position: fixed; z-index: 40; left: calc(var(--ancho-lateral) + 50%); transform: translateX(calc(-50% - var(--ancho-lateral) / 2));
    bottom: 20px; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 18px; border-radius: 16px;
    background: var(--lateral); color: #fff; box-shadow: var(--sombra-alta); animation: subir .2s ease-out; white-space: nowrap;
}
.barra-accion .btn-texto { color: #A9C2F7; }
.barra-accion .btn-texto:hover { background: rgba(255, 255, 255, .08); }
.barra-accion .btn:not(.primario) { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .2); box-shadow: none; }
@keyframes subir { from { transform: translate(calc(-50% - var(--ancho-lateral) / 2), 20px); opacity: 0; } }
.rejilla-paramedicos { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.tarjeta-paramedico { display: flex; flex-direction: column; gap: 14px; }
.tarjeta-paramedico.inactiva { opacity: .6; }
.tpm-arriba { display: flex; align-items: center; gap: 12px; }
.tpm-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tpm-txt b { font-size: 15.5px; }
.tpm-txt small { font-size: 12.5px; color: var(--gris); }
.tpm-datos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tpm-datos > div { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 10px; background: var(--fondo); }
.tpm-datos small { font-size: 11.5px; color: var(--gris); font-weight: 600; }
.tpm-datos b { font-size: 15px; font-variant-numeric: tabular-nums; }
.tpm-pie { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--gris); }
.chips-tarifa { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-tarifa {
    display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 10px; cursor: pointer;
    border: 1px dashed #E0B98E; background: var(--par-suave); color: #7A3F06; font-weight: 700; font-size: 13px;
}
.chip-tarifa small { font-weight: 500; color: #A06A33; }
.chip-tarifa:hover { border-style: solid; background: #FFEBD2; }
.renglones { display: flex; flex-direction: column; gap: 6px; }
.renglon { display: grid; grid-template-columns: minmax(0, 1fr) 82px 108px 110px 30px; gap: 8px; align-items: center; }
.renglon input { height: 38px; font-size: 14px; }
.rg-num { display: flex; flex-direction: column; gap: 0; }
.rg-num small { display: none; }
.rg-num input { text-align: right; }
.rg-imp { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.total-servicio, .rp-total {
    display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-radius: 12px;
    background: var(--par-suave); color: #7A3F06; font-weight: 700;
}
.total-servicio b, .rp-total b { font-family: var(--letra-titulo); font-size: 26px; }
.resumen-pago { display: flex; flex-direction: column; gap: 4px; }
.rp-fila { display: flex; align-items: center; gap: 11px; padding: 8px 4px; border-bottom: 1px solid #F2F2F5; }
.rp-txt { flex: 1; display: flex; flex-direction: column; }
.rp-txt small { font-size: 12.5px; color: var(--gris); }
.rp-monto { font-variant-numeric: tabular-nums; }
.exito-grande { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 6px 0 10px; }
.eg-ico { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: var(--ent-suave); color: var(--ent); animation: aparecer .3s ease-out; }
.exito-grande b { font-size: 17px; }
.exito-grande small { color: var(--gris); }
@keyframes aparecer { from { transform: scale(.6); opacity: 0; } }

/* ════════════════ Usuarios ════════════════ */
.rejilla-roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.rol-info { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 14px; border-radius: 12px; background: #fff; border: 1px solid var(--borde); }
.rol-info small { font-size: 12.5px; color: var(--gris); }
.lista-usuarios { list-style: none; margin: 0; padding: 0; }
.lista-usuarios li { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid #F2F2F5; }
.lista-usuarios li:last-child { border-bottom: 0; }
.lista-usuarios li.inactivo { opacity: .55; }
.lu-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lu-txt b { display: flex; align-items: center; gap: 8px; }
.lu-txt small { font-size: 12.5px; color: var(--gris); }
.opciones-rol, .opciones-modo { display: flex; flex-direction: column; gap: 8px; }
.opcion-rol {
    display: grid; grid-template-columns: auto 1fr; column-gap: 10px; padding: 11px 13px; border-radius: 12px;
    border: 1px solid var(--borde-2); cursor: pointer; background: #fff;
}
.opcion-rol input { grid-row: span 2; margin: 3px 0 0; accent-color: var(--rojo); width: 16px; height: 16px; }
.opcion-rol b { font-size: 14.5px; }
.opcion-rol small { font-size: 12.5px; color: var(--gris); }
.opcion-rol.activa { border-color: var(--rojo); background: #FFF9F8; box-shadow: 0 0 0 1px var(--rojo); }

/* ════════════════ Bitácora ════════════════ */
.linea-tiempo { list-style: none; margin: 0; padding: 4px 0 10px; }
.lt-dia { padding: 16px 20px 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--gris); }
.lt-reg { display: grid; grid-template-columns: 52px 14px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 7px 20px; position: relative; }
.lt-reg:hover { background: #FAFAFC; }
.lt-hora { font-size: 12px; color: var(--gris); padding-top: 2px; }
.lt-punto { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; background: #C6C6CE; box-shadow: 0 0 0 3px #fff, 0 0 0 4px #E6E6EA; }
.lt-punto.ent { background: var(--ent); }
.lt-punto.sal { background: var(--sal); }
.lt-punto.tra { background: var(--tra); }
.lt-punto.ape { background: var(--ape); }
.lt-txt { display: flex; flex-direction: column; min-width: 0; }
.lt-txt b { font-size: 14px; font-weight: 600; }
.lt-txt small { font-size: 12.5px; color: var(--gris); overflow-wrap: anywhere; }
.lt-usuario { font-size: 12.5px; font-weight: 600; color: var(--tinta-2); background: var(--hover); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }

/* ════════════════ Configuración ════════════════ */
.indice-config { display: flex; gap: 6px; flex-wrap: wrap; }
.indice-config a { padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--borde); font-size: 13.5px; font-weight: 600; color: var(--tinta-2); }
.indice-config a:hover { border-color: var(--borde-2); text-decoration: none; }
.seccion-config { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 16px; }
.sc-enc { display: flex; gap: 12px; align-items: flex-start; }
.sc-enc h2 { font-size: 17px; }
.sc-enc small { font-size: 13px; color: var(--gris); }
.sc-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--rojo-suave); color: var(--rojo); flex: none; }
.estado-sinc { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; background: var(--fondo); border: 1px solid var(--borde); flex-wrap: wrap; }
.estado-sinc .conexion { background: #fff; color: var(--tinta-2); border: 1px solid var(--borde); }
.es-txt { flex: 1; min-width: 200px; display: flex; flex-direction: column; }
.es-txt small { font-size: 12.5px; color: var(--gris); overflow-wrap: anywhere; }
.es-pend { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.es-pend b { font-size: 22px; font-family: var(--letra-titulo); }
.es-pend small { font-size: 11.5px; color: var(--gris); }
.desplegable { border: 1px solid var(--borde); border-radius: 12px; padding: 0 14px; }
.desplegable > summary { cursor: pointer; padding: 11px 0; font-weight: 600; font-size: 14px; color: var(--tinta-2); }
.desplegable[open] { padding-bottom: 14px; display: flex; flex-direction: column; gap: 12px; }
.desplegable[open] > summary { border-bottom: 1px solid #F0F0F3; margin-bottom: 2px; }
.soltar-archivo {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 20px; text-align: center;
    border: 2px dashed var(--borde-2); border-radius: 14px; background: #FCFCFD; cursor: pointer; color: var(--gris); transition: border-color .15s, background .15s;
}
.soltar-archivo:hover { border-color: var(--ent); background: #F6FBF8; color: var(--ent); }
.soltar-archivo b { color: var(--tinta); font-size: 15px; }
.soltar-archivo.ocupado { opacity: .6; pointer-events: none; }
.lista-avisos { margin: 0; padding-left: 18px; font-size: 13px; color: var(--tinta-2); max-height: 260px; overflow-y: auto; }
.acciones-respaldo { display: flex; flex-direction: column; gap: 8px; }
.ar-item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--borde); }
.ar-item > .ico { color: var(--gris); }
.ar-item > div { flex: 1; display: flex; flex-direction: column; }
.ar-item small { font-size: 12.5px; color: var(--gris); }
.ar-item.peligro { border-color: #F3D3D0; background: #FFFBFA; }
.ar-item.peligro > .ico { color: var(--sal); }

/* ════════════════ Ayuda ════════════════ */
.rejilla-ayuda { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 18px; align-items: start; }
.indice-ayuda { position: sticky; top: 16px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.indice-ayuda ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.indice-ayuda a { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 8px; color: var(--tinta-2); font-weight: 500; font-size: 14px; }
.indice-ayuda a:hover { background: var(--hover); text-decoration: none; }
.indice-ayuda a .ico { color: var(--gris-2); }
.manual { display: flex; flex-direction: column; gap: 14px; max-width: 860px; }
.manual-sec { scroll-margin-top: 16px; }
.manual-sec h2 { display: flex; align-items: center; gap: 10px; font-size: 20px; margin-bottom: 12px; }
.ms-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--rojo-suave); color: var(--rojo); }
.manual-sec h3 { font-size: 15.5px; margin: 16px 0 6px; }
.manual-sec p, .manual-sec li, .manual-sec dd { font-size: 14.5px; line-height: 1.55; color: var(--tinta-2); }
.manual-sec ul, .manual-sec ol { padding-left: 20px; margin: 6px 0 10px; }
.manual-sec li { margin-bottom: 4px; }
.manual-sec .pasos { counter-reset: paso; list-style: none; padding-left: 0; }
.manual-sec .pasos li { counter-increment: paso; position: relative; padding-left: 34px; margin-bottom: 8px; }
.manual-sec .pasos li::before {
    content: counter(paso); position: absolute; left: 0; top: 0; width: 23px; height: 23px; border-radius: 50%;
    background: var(--tinta); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center;
}
.manual-sec .tip, .manual-sec .ojo { border-radius: 10px; padding: 10px 14px; font-size: 14px; margin: 10px 0; }
.manual-sec .tip { background: var(--ent-suave); border-left: 3px solid var(--ent); }
.manual-sec .ojo { background: #FFF4E5; border-left: 3px solid #E08A00; }
.manual-sec b.ent { color: var(--ent); }
.manual-sec b.sal { color: var(--sal); }
.manual-sec b.tra { color: var(--tra); }
.tabla-manual { width: 100%; border-collapse: collapse; font-size: 14px; margin: 6px 0 10px; }
.tabla-manual th, .tabla-manual td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--borde); vertical-align: top; }
.tabla-manual th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--gris); }
.tabla-manual.atajos td:nth-child(odd) { width: 60px; }
.preguntas dt { font-weight: 700; margin-top: 12px; }
.preguntas dd { margin: 3px 0 0; }
.acerca { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }

/* ════════════════ Ventanas (modal), cajón y hojas ════════════════ */
.modal-fondo {
    position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px;
    background: rgba(18, 18, 24, .45); backdrop-filter: blur(3px); animation: fundir .15s ease-out; overflow-y: auto;
}
.modal-fondo.arriba { z-index: 90; }
@keyframes fundir { from { opacity: 0; } }
.modal {
    width: min(560px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column;
    background: #fff; border-radius: 18px; box-shadow: var(--sombra-alta); animation: entrar .18s ease-out; overflow: hidden;
}
.modal.chico { width: min(460px, 100%); }
.modal.grande { width: min(720px, 100%); }
@keyframes entrar { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.modal-enc { display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px 20px; border-bottom: 1px solid #F0F0F3; }
.me-ico { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--hover); color: var(--tinta-2); }
.me-ico.ent { background: var(--ent-suave); color: var(--ent); }
.me-ico.sal { background: var(--sal-suave); color: var(--sal); }
.me-ico.tra { background: var(--tra-suave); color: var(--tra); }
.me-ico.ape { background: var(--ape-suave); color: var(--ape); }
.me-ico.par { background: var(--par-suave); color: var(--par); }
.me-ico[style] { color: #fff; }
.me-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.me-txt h2 { font-size: 18px; }
.me-txt small { font-size: 13px; color: var(--gris); }
.modal-cuerpo { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.modal-pie {
    display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap;
    margin: 4px -20px -18px; padding: 14px 20px; border-top: 1px solid #F0F0F3; background: #FCFCFD;
    position: sticky; bottom: -18px; z-index: 2;
    /* Sombra suave arriba: separa el pie de los campos que pasan por detrás al desplazarse. */
    box-shadow: 0 -10px 18px -14px rgba(20, 20, 30, .25);
}
/* El pie directo de la ventana (fuera del cuerpo) no necesita los márgenes negativos. */
.modal > .modal-pie { margin: 0; position: static; padding-bottom: calc(14px + var(--seguro-abajo, 0px)); box-shadow: none; }
.confirmar { flex-direction: row; gap: 14px; flex-wrap: wrap; }
.confirmar > div { flex: 1; min-width: 0; }
.confirmar h2 { font-size: 17px; margin-bottom: 4px; }
.confirmar p { color: var(--tinta-2); font-size: 14.5px; }
.confirmar .modal-pie { flex-basis: 100%; }
.confirmar-ico { width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--tra-suave); color: var(--tra); }
.confirmar-ico.peligro { background: var(--sal-suave); color: var(--sal); }

/* Captura de movimiento */
/* La ventana lleva la clase del tipo (ent/sal/tra) para el ícono y el monto; el resto del texto, en tinta. */
.modal.captura { color: var(--tinta); }
.captura .segmento.tipos { display: flex; }
.captura .segmento.tipos .seg { flex: 1; justify-content: center; height: 38px; }
.monto-grande {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 8px;
    padding: 14px 16px; border-radius: 14px; background: var(--fondo); border: 1.5px solid transparent; transition: border-color .15s, background .15s;
}
.monto-grande:focus-within { background: #fff; border-color: var(--borde-2); }
.monto-grande.ent:focus-within { border-color: var(--ent); }
.monto-grande.sal:focus-within { border-color: var(--sal); }
.monto-grande.tra:focus-within { border-color: var(--tra); }
.mg-signo { font-family: var(--letra-titulo); font-size: 30px; font-weight: 700; color: var(--gris-2); }
.mg-input {
    border: 0; outline: none; background: transparent; width: 100%; min-width: 0;
    font-family: var(--letra-titulo); font-size: 40px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums;
}
.monto-grande.ent .mg-input { color: var(--ent); }
.monto-grande.sal .mg-input { color: var(--sal); }
.monto-grande.tra .mg-input { color: var(--tra); }
.mg-moneda { display: flex; gap: 2px; background: #E6E6EB; padding: 3px; border-radius: 9px; }
.mg-moneda button { border: 0; background: none; padding: 4px 9px; border-radius: 7px; font-size: 12.5px; font-weight: 700; color: var(--gris); cursor: pointer; }
.mg-moneda button.activo { background: #fff; color: var(--tinta); box-shadow: 0 1px 2px rgba(0, 0, 0, .1); }
.mg-letra { grid-column: 1 / -1; font-size: 12.5px; color: var(--gris); margin-top: 4px; min-height: 18px; }
.chips-cuentas, .chips-cuenta { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-cuenta {
    display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center;
    padding: 8px 12px; border-radius: 12px; border: 1.5px solid var(--borde); background: #fff; cursor: pointer; text-align: left; min-width: 130px;
    transition: border-color .12s, background .12s;
}
.chip-cuenta > i { grid-row: span 2; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.chip-cuenta b { font-size: 14px; }
.chip-cuenta small { font-size: 12px; color: var(--gris); font-variant-numeric: tabular-nums; }
.chip-cuenta:not(:has(> i)) { grid-template-columns: 1fr; }
.chip-cuenta:not(:has(> i)) b::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); margin-right: 6px; }
.chip-cuenta:hover { border-color: var(--borde-2); }
.chip-cuenta.activo { border-color: var(--c); background: color-mix(in srgb, var(--c) 8%, white); box-shadow: 0 0 0 1px var(--c); }
.saldo-vista { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--fondo); font-size: 13.5px; color: var(--tinta-2); flex-wrap: wrap; }
.saldo-vista b { font-variant-numeric: tabular-nums; }

/* Cajón de detalle */
.cajon-fondo { position: fixed; inset: 0; z-index: 50; background: rgba(18, 18, 24, .3); animation: fundir .15s ease-out; }
.cajon {
    position: fixed; z-index: 51; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: #fff;
    display: flex; flex-direction: column; box-shadow: var(--sombra-alta); animation: deslizar .2s ease-out;
}
@keyframes deslizar { from { transform: translateX(30px); opacity: 0; } }
.cajon-enc { display: flex; align-items: center; gap: 10px; padding: 14px 14px 14px 20px; border-bottom: 1px solid #F0F0F3; }
.cajon-enc .folio { flex: 1; }
.cajon-cuerpo { flex: 1; overflow-y: auto; padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 6px; }
.det-monto { font-family: var(--letra-titulo); font-size: 44px; font-weight: 700; line-height: 1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.det-monto.ent { color: var(--ent); }
.det-monto.sal { color: var(--sal); }
.det-monto.tra { color: var(--tra); }
.det-monto.ape { color: var(--ape); }
.det-monto.cancelado { text-decoration: line-through; color: var(--gris-2); }
.det-titulo { font-size: 17px; font-weight: 700; margin-top: 6px; }
.det-fecha { font-size: 14px; color: var(--gris); }
.det-cancelado { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--sal-suave); color: #8A1F18; font-size: 13.5px; }
.det-cancelado > .ico { margin-top: 1px; }
.det-datos { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 0; margin: 16px 0 0; font-size: 14px; }
.det-datos dt { color: var(--gris); padding: 9px 0; border-top: 1px solid #F2F2F5; }
.det-datos dd { margin: 0; padding: 9px 0; border-top: 1px solid #F2F2F5; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; overflow-wrap: anywhere; }
.det-datos dd small { font-size: 12.5px; color: var(--gris); }
.det-cancelar { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 12px; background: #FFF8F7; border: 1px solid #F3D3D0; }
.cajon-pie { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px; border-top: 1px solid #F0F0F3; background: #FCFCFD; }
.cajon-pie .btn { flex: 1 1 calc(50% - 4px); }
.cajon-pie .ancho { flex-basis: 100%; }

/* Hojas que suben (celular) */
.hoja-fondo { position: fixed; inset: 0; z-index: 55; background: rgba(18, 18, 24, .4); display: flex; align-items: flex-end; animation: fundir .15s ease-out; }
.hoja {
    width: 100%; background: #fff; border-radius: 22px 22px 0 0; padding: 8px 18px calc(18px + var(--seguro-abajo));
    animation: subirHoja .22s cubic-bezier(.2, .8, .3, 1); max-height: 88vh; overflow-y: auto;
}
@keyframes subirHoja { from { transform: translateY(100%); } }
.hoja-asa { width: 40px; height: 5px; border-radius: 3px; background: #D6D6DD; margin: 4px auto 12px; }
.hoja h3 { font-size: 17px; margin-bottom: 12px; }
.hoja-captura { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hc {
    display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 14px; border-radius: 16px; border: 1px solid var(--borde);
    background: #fff; cursor: pointer; text-align: left; transition: background .12s, border-color .12s, transform .1s;
}
.hc:hover { border-color: var(--borde-2); background: #FCFCFD; }
.hc:active { transform: scale(.97); background: var(--hover); }
.hc > span { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 6px; }
.hc b { font-size: 15.5px; }
.hc small { font-size: 12.5px; color: var(--gris); }
.hc.ent > span { background: var(--ent-suave); color: var(--ent); }
.hc.sal > span { background: var(--sal-suave); color: var(--sal); }
.hc.tra > span { background: var(--tra-suave); color: var(--tra); }
.hc.par > span { background: var(--par-suave); color: var(--par); }
.hoja-yo { display: flex; align-items: center; gap: 12px; padding: 4px 2px 14px; border-bottom: 1px solid #F0F0F3; margin-bottom: 8px; }
.hoja-yo div { display: flex; flex-direction: column; }
.hoja-yo small { color: var(--gris); font-size: 13px; }
.hoja-menu { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 14px; }
.hm { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; background: var(--fondo); color: var(--tinta); font-weight: 600; font-size: 14.5px; transition: background .12s; }
.hm:active { background: var(--hover); }
.hm span { flex: 1; }
.hm.activo { background: var(--rojo-suave); color: var(--rojo-osc); }
.hm:hover { text-decoration: none; }

/* Aviso flotante */
.aviso {
    position: fixed; z-index: 100; left: 50%; transform: translateX(-50%); bottom: 26px;
    display: flex; align-items: center; gap: 10px; max-width: min(560px, calc(100% - 32px));
    padding: 12px 18px; border-radius: 14px; background: #222229; color: #fff; font-weight: 500; font-size: 14.5px;
    box-shadow: var(--sombra-alta); cursor: pointer; animation: avisar .25s cubic-bezier(.2, .8, .3, 1.2);
}
.aviso.ok .ico { color: #4ED19B; }
.aviso.error { background: #8E1B16; }
.aviso.info .ico { color: #82A8F5; }
@keyframes avisar { from { transform: translate(-50%, 16px); opacity: 0; } }

/* ════════════════ Pantalla de entrada ════════════════ */
.entrada { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: #fff; }
.entrada-marca {
    position: relative; overflow: hidden; color: #fff; padding: 40px 48px; display: flex; flex-direction: column; justify-content: space-between;
    background: radial-gradient(120% 90% at 0% 0%, #F0352B 0%, #C8102E 48%, #8C0A1F 100%);
}
.em-fondo { position: absolute; right: -12%; bottom: -16%; width: 72%; opacity: .1; pointer-events: none; }
.em-fondo svg { width: 100%; height: auto; fill: #fff; transform: rotate(-8deg); }
.em-arriba, .em-centro, .em-pie { position: relative; }
.em-arriba .logo-txt small { color: rgba(255, 255, 255, .78); }
.em-centro h1 { font-family: var(--letra-titulo); font-style: italic; font-weight: 800; font-size: clamp(44px, 6vw, 76px); letter-spacing: -.01em; line-height: .95; text-transform: uppercase; }
.em-centro p { font-size: 18px; max-width: 460px; color: rgba(255, 255, 255, .9); margin: 14px 0 22px; }
.em-centro ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.em-centro li { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.em-centro li .ico { width: 30px; height: 30px; padding: 6px; border-radius: 9px; background: rgba(255, 255, 255, .16); }
.em-pie { font-size: 12px; color: rgba(255, 255, 255, .65); letter-spacing: .02em; }
.entrada-form { display: grid; place-items: center; padding: 40px 28px; background: #fff; }
.ef-caja { width: min(390px, 100%); display: flex; flex-direction: column; gap: 14px; }
.ef-caja h2 { font-family: var(--letra-titulo); font-size: 34px; font-weight: 700; }
.ef-logo-movil { display: none; }
.ef-sub { color: var(--gris); font-size: 15px; margin: 0; }
.ef-form { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
.ef-form .campo input { height: 48px; font-size: 16px; border-radius: 12px; }
.ef-form .campo > span:first-child { font-size: 13px; }
.ef-estado { display: flex; flex-direction: column; gap: 10px; }
.ef-acciones { display: flex; gap: 8px; flex-wrap: wrap; }
.ef-nota { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--gris); margin: 4px 0 0; }
.ef-pie { margin-top: 18px; font-size: 12px; color: var(--gris-2); text-align: center; }

/* ════════════════ Celular y tableta ════════════════ */
@media (max-width: 1180px) {
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rejilla-inicio { grid-template-columns: minmax(0, 1fr); }
    .rejilla-reporte { grid-template-columns: minmax(0, 1fr); }
    .opciones-reporte { position: static; max-height: none; }
    .rejilla-ayuda { grid-template-columns: minmax(0, 1fr); }
    .indice-ayuda { position: static; }
}

@media (max-width: 899px) {
    body { font-size: 15.5px; background: var(--fondo); }
    .ocultar-movil { display: none !important; }
    .lateral { display: none; }
    .contenido { margin-left: 0; padding-top: var(--alto-barra); padding-bottom: calc(var(--alto-tabbar) + var(--seguro-abajo) + 10px); }
    .pagina { padding: 16px 14px 28px; gap: 14px; }

    .barra-movil {
        display: flex; align-items: center; gap: 10px; position: fixed; z-index: 30; top: 0; left: 0; right: 0; height: var(--alto-barra);
        padding: 0 12px; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid var(--borde);
    }
    .bm-logo { text-decoration: none !important; }
    .bm-titulo { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
    .bm-titulo b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .bm-titulo small { font-size: 11.5px; color: var(--gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .bm-avatar { border: 0; background: none; padding: 0; cursor: pointer; }
    .bm-avatar .avatar { width: 34px; height: 34px; }

    .tabbar {
        display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
        height: calc(var(--alto-tabbar) + var(--seguro-abajo)); padding-bottom: var(--seguro-abajo);
        background: rgba(255, 255, 255, .95); backdrop-filter: saturate(1.6) blur(12px); border-top: 1px solid var(--borde);
    }
    .tab {
        display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; background: none; cursor: pointer;
        color: var(--gris-2); font-size: 11px; font-weight: 600; padding: 6px 0; text-decoration: none !important;
    }
    .tab.activo { color: var(--rojo); }
    .tab-capturar {
        justify-self: center; width: 54px; height: 54px; border-radius: 18px; border: 0; cursor: pointer; margin-top: -18px;
        display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #F0352B, #C8102E);
        box-shadow: 0 8px 20px -6px rgba(200, 16, 46, .6), 0 0 0 4px #fff;
    }
    .tab-capturar:active { transform: scale(.95); }

    .pag-enc { align-items: flex-start; }
    .pag-enc h1 { font-size: 26px; }
    .pag-sub { font-size: 13.5px; }
    .pag-acciones { width: 100%; }
    .pag-acciones:empty { display: none; }
    .inicio .pag-enc .pag-sub { display: none; }

    .kpis, .kpis.chicos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .kpi { padding: 13px 13px; }
    .kpi-v { font-size: 23px; }
    .kpi-et { font-size: 12px; gap: 5px; }
    .kpi-et .ico { width: 14px; height: 14px; }
    .kpi-d { font-size: 11.5px; }
    .kpi.destacado { grid-column: 1 / -1; }
    .kpi.destacado .kpi-v { font-size: 34px; }
    /* La tarjeta que quedaría sola (Inicio: «Por pagar a paramédicos»; Paramédicos: «Por pagar») va a todo lo ancho, en un renglón. */
    .inicio .kpis > .kpi.par, .kpis.chicos > .kpi:first-child {
        grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 3px; align-items: center; padding: 12px 14px;
    }
    .inicio .kpis > .kpi.par .kpi-v, .kpis.chicos > .kpi:first-child .kpi-v { grid-column: 2; grid-row: 1 / span 2; font-size: 25px; }
    .captura-movil { margin-top: -2px; }

    .tarjeta { padding: 15px 14px; border-radius: 14px; }
    .tarjeta.vacio-grande { padding: 36px 18px; }
    .lm-fila { padding: 10px 14px; }
    .lm-dia { padding: 12px 14px 5px; }
    .rejilla-inicio > .tarjeta:nth-child(3) .tarjeta-enc { padding: 0 14px; }

    .filtros { padding: 12px; }
    .filtros-fila { flex-wrap: wrap; }
    .buscador { flex-basis: 100%; }
    .filtros-mas { display: none; }
    .filtros-mas.abierto { display: flex; }
    select.sel { flex: 1 1 160px; }
    .periodo { width: 100%; }
    .periodo-nav { flex: 1; justify-content: space-between; }
    /* Los atajos se deslizan de lado; el borde derecho se desvanece para que se note que hay más. */
    .periodo-atajos {
        overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; width: 100%; padding-right: 18px;
        -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent);
    }
    .resumen-importar .rf-caja { flex-basis: calc(50% - 5px); }
    .lm-monto small { max-width: 96px; }

    /* Tira de totales compacta: tres casillas por renglón; el número de movimientos, en un renglón aparte. */
    .resumen-filtro > .rf-caja, .vr-kpis > .rf-caja { flex: 1 1 0; padding: 9px 11px; gap: 1px; }
    .resumen-filtro .rf-caja span, .vr-kpis .rf-caja span { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .resumen-filtro > .rf-caja b, .vr-kpis > .rf-caja b { font-size: min(17.5px, 17.5cqi); }
    .resumen-filtro.por-moneda, .vr-kpis.por-moneda { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .por-moneda > .rf-caja:last-child, .por-moneda > .rf-caja:last-child:nth-child(7) {
        grid-column: 1 / -1; grid-row: auto; flex-direction: row; justify-content: space-between; align-items: center; padding: 7px 12px;
    }

    .pestanas { gap: 2px; }
    .pestanas button { flex: 1 0 auto; justify-content: center; padding: 10px 8px; font-size: 13.5px; gap: 5px; }
    .pestanas .insignia { min-width: 18px; height: 18px; padding: 0 5px; font-size: 10.5px; }

    /* Servicios de paramédicos: cada renglón como tarjetita (paramédico e importe arriba; fecha, folio y estado abajo). */
    .tabla-servicios, .tabla-servicios tbody { display: block; }
    .tabla-servicios thead { display: none; }
    .tabla-servicios tr {
        display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "pm pm imp" "fecha folio est";
        column-gap: 8px; row-gap: 4px; align-items: center; padding: 11px 14px; border-bottom: 1px solid #F0F0F3;
    }
    .tabla-servicios tr:last-child { border-bottom: 0; }
    .tabla-servicios tr.clic:active { background: #FAFAFC; }
    .tabla-servicios td { padding: 0; border: 0; }
    .tabla-servicios tr.clic:hover td { background: transparent; }
    .tabla-servicios .ts-pm { grid-area: pm; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .tabla-servicios .ts-imp { grid-area: imp; font-weight: 700; }
    .tabla-servicios .ts-fecha { grid-area: fecha; font-size: 13px; color: var(--gris); }
    .tabla-servicios .ts-folio { grid-area: folio; font-size: 12px; color: var(--gris); }
    .tabla-servicios .ts-est { grid-area: est; justify-self: end; display: flex; align-items: center; gap: 4px; }

    /* Tarifas: clave y precio arriba; descripción y cómo se cobra abajo; el lápiz a un lado. */
    .tabla-tarifas, .tabla-tarifas tbody { display: block; }
    .tabla-tarifas thead { display: none; }
    .tabla-tarifas tr {
        display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "clave precio acc" "desc desc acc" "uni uni acc";
        column-gap: 10px; row-gap: 2px; align-items: center; padding: 11px 10px 11px 14px; border-bottom: 1px solid #F0F0F3;
    }
    .tabla-tarifas tr:last-child { border-bottom: 0; }
    .tabla-tarifas td { padding: 0; border: 0; }
    .tabla-tarifas .tt-clave { grid-area: clave; }
    .tabla-tarifas .tt-precio { grid-area: precio; font-weight: 700; }
    .tabla-tarifas .tt-desc { grid-area: desc; font-size: 13.5px; color: var(--tinta-2); }
    .tabla-tarifas .tt-uni { grid-area: uni; font-size: 12.5px; color: var(--gris); }
    .tabla-tarifas .tt-acc { grid-area: acc; }

    .total-cuentas { flex-direction: column; }
    .total-cuentas > div { border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .08); padding: 12px 16px; flex-direction: row; justify-content: space-between; align-items: center; }
    .total-cuentas b { font-size: 22px; }
    .rejilla-cuentas, .rejilla-conceptos, .rejilla-pagar, .rejilla-paramedicos { grid-template-columns: minmax(0, 1fr); }
    .tc-saldo { font-size: 28px; }
    .flujo-saldo { display: grid; grid-template-columns: 1fr 1fr; }
    .fs-op { display: none; }
    .fs-caja { padding: 10px 13px; }
    .fs-caja b { font-size: 21px; }
    /* Saldo inicial y final a todo lo ancho, en un renglón; entradas y salidas, lado a lado. */
    .fs-caja:first-child, .fs-caja.final { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; column-gap: 10px; }
    .lc-acc { opacity: 1; position: static; transform: none; pointer-events: auto; padding-left: 0; background: none; }
    .lista-conceptos li { padding-right: 10px; }

    .rejilla-roles { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .rol-info { flex-direction: row; align-items: flex-start; gap: 10px; padding: 11px 12px; }
    .rol-info .chip { flex: none; width: 104px; justify-content: center; }
    .lista-usuarios li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 12px; row-gap: 5px; padding: 12px 14px; }
    .lista-usuarios li > .avatar { grid-row: 1 / span 2; }
    .lista-usuarios li > .lu-txt { grid-column: 2; grid-row: 1; }
    .lista-usuarios li > .chip { grid-column: 2; grid-row: 2; justify-self: start; }
    .lista-usuarios li > .btn-icono { grid-column: 3; grid-row: 1 / span 2; }
    .lu-txt b { flex-wrap: wrap; row-gap: 2px; }
    .lt-reg { grid-template-columns: 44px 12px minmax(0, 1fr); padding: 7px 14px; }
    .lt-usuario { grid-column: 3; justify-self: start; font-size: 11.5px; padding: 1px 8px; margin-top: -4px; }

    .tarjeta.opciones-reporte { padding: 4px 0; }
    .or-grupo { padding: 12px 14px; }

    .papel-hoja { width: calc(100% - 16px); height: 70vh; }

    /* Barra de selección: el resumen y «Quitar selección» arriba; los botones abajo, a lo ancho. */
    .barra-accion {
        left: 12px; right: 12px; transform: none; bottom: calc(var(--alto-tabbar) + var(--seguro-abajo) + 10px);
        flex-wrap: wrap; gap: 8px 10px; padding: 10px 12px 12px 16px; white-space: normal; animation: none;
    }
    .barra-accion > span { flex: 1 1 55%; }
    .barra-accion > .btn-texto { flex: none; }
    .barra-accion > .btn { flex: 1 1 40%; }
    .rejilla-pagar { padding-bottom: 104px; }

    /* Ventanas a pantalla completa desde abajo */
    .modal-fondo { padding: 0; place-items: end stretch; }
    .modal, .modal.chico, .modal.grande { width: 100%; max-height: 94vh; border-radius: 22px 22px 0 0; animation: subirHoja .22s cubic-bezier(.2, .8, .3, 1); }
    .modal-fondo.captura-fondo { place-items: stretch; }
    .modal.captura { max-height: 100vh; height: 100%; border-radius: 0; }
    .modal-cuerpo { padding: 16px; }
    .modal-pie { margin: 4px -16px -16px; padding: 12px 16px calc(12px + var(--seguro-abajo)); bottom: -16px; }
    .modal-pie .btn { flex: 1; }
    .fila-campos { flex-wrap: wrap; }
    .fila-campos > * { flex: 1 1 140px; }
    .mg-input { font-size: 36px; }
    .chip-cuenta { flex: 1 1 calc(50% - 4px); min-width: 0; }
    /* Renglones del servicio: descripción arriba; cantidad, precio, importe y quitar abajo. */
    .renglones { gap: 10px; }
    .renglon { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto 30px; row-gap: 4px; }
    .renglon + .renglon { border-top: 1px solid #F0F0F3; padding-top: 10px; }
    .renglon .rg-imp { align-self: end; line-height: 38px; min-width: 64px; font-size: 14px; }
    .renglon > .btn-icono { align-self: end; margin-bottom: 4px; }
    .rg-num small { display: block; font-size: 10.5px; color: var(--gris); }
    .renglon .rg-desc { grid-column: 1 / -1; }
    .union { flex-direction: column; align-items: stretch; }
    .union > .ico { transform: rotate(90deg); align-self: center; }
    .cajon { width: 100%; top: auto; max-height: 92vh; border-radius: 22px 22px 0 0; animation: subirHoja .22s cubic-bezier(.2, .8, .3, 1); }
    .cajon-pie { padding-bottom: calc(14px + var(--seguro-abajo)); }
    .aviso { bottom: calc(var(--alto-tabbar) + var(--seguro-abajo) + 12px); }

    .entrada { grid-template-columns: minmax(0, 1fr); }
    .entrada-marca { display: none; }
    .entrada-form { padding: 30px 20px; align-items: start; background: linear-gradient(180deg, #FFF5F4 0%, #fff 220px); }
    .ef-logo-movil { display: block; margin-bottom: 18px; }
}

@media (max-width: 420px) {
    .kpi-v { font-size: 21px; }
    .kpi-et { font-size: 11.5px; }
    .hoja-menu { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
