/* Deptos Ruka — estilos. Azul río sobre gris frío; color solo para estado y empresa. */
:root {
  --fondo: #f2f4f7; --sup: #ffffff; --sup2: #f7f9fb; --linea: #e1e6ed; --linea2: #cfd7e1;
  --tinta: #172230; --tinta2: #566273; --tinta3: #8a95a4;
  --rio: #1e5a91; --rio2: #e6eff8; --rio3: #164672;
  --ok: #217a4e; --ok2: #e2f2e9; --av: #9a5d08; --av2: #fbefd9; --mal: #bf3a2b; --mal2: #fbe6e3;
  --r-panel: 14px; --r-ctrl: 9px; --r-tile: 7px;
  --sombra: 0 1px 2px rgba(23, 34, 48, .05);
  --sombra-alta: 0 12px 40px rgba(23, 34, 48, .18);
  --lat: 232px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #12171d; --sup: #1a2129; --sup2: #1f2731; --linea: #2c3743; --linea2: #3a4757;
    --tinta: #e6ebf1; --tinta2: #a5b1bf; --tinta3: #76828f;
    --rio: #6aa5df; --rio2: #1b2c3e; --rio3: #8bbbe9;
    --ok: #6cc59a; --ok2: #183126; --av: #e7b45f; --av2: #352a15; --mal: #f08a7e; --mal2: #3a201d;
    --sombra: none; --sombra-alta: 0 12px 40px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fondo); color: var(--tinta); font: 15px/1.5 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--rio); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--rio); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.cargando { padding: 4rem; text-align: center; color: var(--tinta2); }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- estructura ---------- */
.app { display: grid; grid-template-columns: var(--lat) 1fr; min-height: 100vh; }
.lateral { position: sticky; top: 0; height: 100vh; background: var(--sup); border-right: 1px solid var(--linea); display: flex; flex-direction: column; padding: 1rem .8rem; gap: .9rem; overflow-y: auto; }
.marca { display: flex; align-items: center; gap: .6rem; padding: .2rem .4rem .4rem; }
.marca svg { width: 34px; height: 34px; flex: none; }
.marca b { display: block; font-size: 1rem; letter-spacing: -.01em; }
.marca span { display: block; font-size: .8rem; color: var(--tinta2); }
.menu { display: flex; flex-direction: column; gap: 2px; }
.menu a { display: flex; align-items: center; gap: .65rem; padding: .5rem .6rem; border-radius: var(--r-ctrl); color: var(--tinta2); font-weight: 500; text-decoration: none; }
.menu a svg { width: 18px; height: 18px; flex: none; }
.menu a:hover { background: var(--sup2); color: var(--tinta); }
.menu a.activo { background: var(--rio2); color: var(--rio); }
.menu .cuenta { margin-left: auto; font-size: .75rem; font-weight: 600; background: var(--mal); color: #fff; border-radius: 999px; padding: 0 .45rem; min-width: 1.3rem; text-align: center; }
.menu .cuenta.suave { background: var(--linea); color: var(--tinta2); }
.lateral .pie { margin-top: auto; display: flex; align-items: center; justify-content: space-between; font-size: .85rem; color: var(--tinta2); padding: .4rem; border-top: 1px solid var(--linea); padding-top: .8rem; }
main { min-width: 0; padding: 1.6rem 2rem 6rem; max-width: 1240px; width: 100%; }
.abajo { display: none; }

.cabeza { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.cabeza h1 { font-size: 1.6rem; line-height: 1.15; margin: 0; letter-spacing: -.02em; font-weight: 650; }
.cabeza p { margin: .25rem 0 0; color: var(--tinta2); }
.acciones { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
h2 { font-size: 1.02rem; margin: 0; font-weight: 650; letter-spacing: -.01em; }
h3 { font-size: .9rem; margin: 1.1rem 0 .5rem; font-weight: 650; color: var(--tinta2); }

/* ---------- paneles ---------- */
.panel-c { background: var(--sup); border: 1px solid var(--linea); border-radius: var(--r-panel); box-shadow: var(--sombra); margin-bottom: 1rem; }
.panel-c > .tit { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--linea); flex-wrap: wrap; }
.panel-c > .tit p { margin: .1rem 0 0; color: var(--tinta2); font-size: .85rem; }
.panel-c > .cue { padding: 1rem 1.1rem; }
.panel-c > .cue.sin { padding: 0; }
.vacio { padding: 1.6rem 1.1rem; color: var(--tinta2); text-align: center; }

/* franja de cifras */
.cifras { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--sup); border: 1px solid var(--linea); border-radius: var(--r-panel); margin-bottom: 1rem; box-shadow: var(--sombra); }
.cifra { padding: .9rem 1.1rem; border-left: 1px solid var(--linea); min-width: 0; }
.cifra:first-child { border-left: 0; }
.cifra .v { font-size: 1.35rem; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cifra .e { font-size: .82rem; color: var(--tinta2); }
.cifra .barra { height: 5px; background: var(--linea); border-radius: 3px; margin-top: .5rem; overflow: hidden; }
.cifra .barra i { display: block; height: 100%; background: var(--rio); border-radius: 3px; }
.rojo { color: var(--mal); } .verde { color: var(--ok); } .gris { color: var(--tinta2); } .ambar { color: var(--av); }

/* ---------- tablero de deptos ---------- */
.tablero { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.ficha { border: 0; border-radius: var(--r-tile); padding: .45rem .5rem .4rem; text-align: left; cursor: pointer; min-height: 58px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; background: var(--c, #64748b); position: relative; transition: transform .08s ease, box-shadow .08s ease; }
.ficha:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(23, 34, 48, .18); }
.ficha b { font-size: .88rem; line-height: 1.1; font-weight: 650; }
.ficha span { font-size: .7rem; opacity: .88; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ficha.vacia { background: var(--sup); color: var(--mal); box-shadow: inset 0 0 0 2px var(--mal); background-image: repeating-linear-gradient(135deg, transparent 0 7px, var(--mal2) 7px 9px); }
.ficha.propia { background: var(--sup); color: var(--tinta); box-shadow: inset 0 0 0 1px var(--linea2); }
.ficha.mant { background: var(--av2); color: var(--av); box-shadow: inset 0 0 0 2px var(--av); }
.ficha .punto { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--av); }
.leyenda { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .82rem; color: var(--tinta2); }
.leyenda i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: .35rem; background: var(--c); }
.leyenda i.vacia { background: var(--sup); box-shadow: inset 0 0 0 2px var(--mal); }

/* ---------- listas ---------- */
.filas { display: flex; flex-direction: column; }
.fila { display: flex; align-items: center; gap: .8rem; padding: .7rem 1.1rem; border-top: 1px solid var(--linea); min-width: 0; }
.fila:first-child { border-top: 0; }
.fila.click { cursor: pointer; } .fila.click:hover { background: var(--sup2); }
.fila .cu { flex: 1; min-width: 0; }
.fila .t { font-weight: 600; overflow-wrap: anywhere; }
.fila .d { font-size: .84rem; color: var(--tinta2); overflow-wrap: anywhere; }
.fila .m { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.fila .m small { display: block; font-weight: 400; color: var(--tinta2); font-size: .78rem; }
.aviso-f { border-left: 3px solid var(--tinta3); }
.aviso-f.alta { border-left-color: var(--mal); } .aviso-f.media { border-left-color: var(--av); }
.fecha-c { font-size: .78rem; color: var(--tinta2); white-space: nowrap; font-variant-numeric: tabular-nums; width: 4.6rem; flex: none; }

/* pastillas */
.pas { display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; font-weight: 600; padding: .08rem .5rem; border-radius: 999px; background: var(--sup2); color: var(--tinta2); border: 1px solid var(--linea); white-space: nowrap; vertical-align: 1px; }
.pas.ok { background: var(--ok2); color: var(--ok); border-color: transparent; }
.pas.mal { background: var(--mal2); color: var(--mal); border-color: transparent; }
.pas.av { background: var(--av2); color: var(--av); border-color: transparent; }
.pas.rio { background: var(--rio2); color: var(--rio); border-color: transparent; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--tinta3)); margin-right: .4rem; vertical-align: 0; flex: none; }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 1px solid var(--linea2); background: var(--sup); border-radius: var(--r-ctrl); padding: .48rem .9rem; font-weight: 550; cursor: pointer; color: var(--tinta); white-space: nowrap; text-decoration: none; min-height: 2.35rem; }
.btn:hover { border-color: var(--rio); text-decoration: none; }
.btn svg { width: 16px; height: 16px; }
.btn.pri { background: var(--rio); border-color: var(--rio); color: #fff; }
.btn.pri:hover { background: var(--rio3); }
@media (prefers-color-scheme: dark) { .btn.pri { color: #0d1824; } }
.btn.peli { color: var(--mal); }
.btn.fan { border-color: transparent; background: transparent; color: var(--tinta2); }
.btn.fan:hover { background: var(--sup2); color: var(--tinta); }
.btn.ch { padding: .25rem .6rem; font-size: .85rem; min-height: 1.9rem; }
.btn.ancho { width: 100%; }
.btn:disabled { opacity: .45; cursor: default; }
.ico { width: 2.1rem; height: 2.1rem; padding: 0; min-height: 0; }

.tilde { width: 1.55rem; height: 1.55rem; border-radius: 50%; border: 2px solid var(--linea2); background: var(--sup); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex: none; color: transparent; padding: 0; }
.tilde svg { width: 14px; height: 14px; }
.tilde:hover { border-color: var(--ok); }
.tilde.si { background: var(--ok); border-color: var(--ok); color: #fff; }

/* chips (selección) */
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { border: 1px solid var(--linea2); background: var(--sup); border-radius: 999px; padding: .32rem .8rem; font-size: .88rem; cursor: pointer; font-weight: 500; color: var(--tinta2); white-space: nowrap; }
.chip:hover { border-color: var(--rio); color: var(--tinta); }
.chip.si { background: var(--rio); border-color: var(--rio); color: #fff; }
@media (prefers-color-scheme: dark) { .chip.si { color: #0d1824; } }
.chip .n { opacity: .7; margin-left: .25rem; font-variant-numeric: tabular-nums; }
.seg { display: inline-flex; background: var(--sup2); border: 1px solid var(--linea); border-radius: var(--r-ctrl); padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: .35rem .8rem; border-radius: 7px; cursor: pointer; font-weight: 550; color: var(--tinta2); font-size: .9rem; }
.seg button.si { background: var(--sup); color: var(--tinta); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.seg button .n { color: var(--tinta3); margin-left: .25rem; font-weight: 500; }

/* ---------- formularios ---------- */
.campo { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.campo > label, .lbl { font-size: .8rem; color: var(--tinta2); font-weight: 550; }
.inp, .campo input:not([type=checkbox]):not([type=file]), .campo select, .campo textarea { background: var(--sup); border: 1px solid var(--linea2); border-radius: var(--r-ctrl); padding: .48rem .65rem; width: 100%; min-height: 2.4rem; }
.campo textarea { min-height: 4.5rem; resize: vertical; }
.inp:focus, .campo input:focus, .campo select:focus, .campo textarea:focus { outline: 2px solid var(--rio); outline-offset: -1px; border-color: var(--rio); }
.campo .ayuda { font-size: .76rem; color: var(--tinta3); }
.grilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .8rem 1rem; }
.grilla .ancho { grid-column: 1 / -1; }
.interruptor { display: inline-flex; align-items: center; gap: .55rem; cursor: pointer; user-select: none; min-height: 2.4rem; font-size: .92rem; }
.interruptor input { appearance: none; width: 2.3rem; height: 1.3rem; border-radius: 999px; background: var(--linea2); position: relative; cursor: pointer; transition: background .15s; flex: none; margin: 0; }
.interruptor input::after { content: ""; position: absolute; top: 2px; left: 2px; width: calc(1.3rem - 4px); height: calc(1.3rem - 4px); border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.interruptor input:checked { background: var(--rio); }
.interruptor input:checked::after { transform: translateX(1rem); }
.buscar { position: relative; flex: 1 1 240px; max-width: 360px; }
.buscar svg { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--tinta3); }
.buscar input { padding-left: 2.1rem !important; }
.barra-h { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: .9rem; }
.subir { display: flex; align-items: center; justify-content: center; gap: .5rem; border: 1.5px dashed var(--linea2); border-radius: var(--r-ctrl); padding: .9rem; color: var(--tinta2); cursor: pointer; text-align: center; font-size: .9rem; }
.subir:hover, .subir.sobre { border-color: var(--rio); color: var(--rio); background: var(--rio2); }
.subir input { display: none; }

/* ---------- tabla de deptos ---------- */
.tabla { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tabla th { text-align: left; font-size: .78rem; color: var(--tinta2); font-weight: 600; padding: .55rem .7rem; border-bottom: 1px solid var(--linea); background: var(--sup2); position: sticky; top: 0; z-index: 1; white-space: nowrap; }
.tabla td { padding: .6rem .7rem; border-bottom: 1px solid var(--linea); vertical-align: middle; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla tbody tr { cursor: pointer; }
.tabla tbody tr:hover td { background: var(--sup2); }
.tabla tbody tr.sel td { background: var(--rio2); }
.tabla .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabla .cb { width: 2.4rem; padding-right: 0; }
.tabla input[type=checkbox], .lista-sel input[type=checkbox] { width: 1.1rem; height: 1.1rem; accent-color: var(--rio); cursor: pointer; }
.tabla .nom b { display: block; font-weight: 600; }
.tabla .nom span { font-size: .8rem; color: var(--tinta2); }
.tabla-c { overflow-x: auto; }

/* barra de selección */
.barra-sel { position: fixed; left: calc(var(--lat) + (100vw - var(--lat)) / 2); transform: translateX(-50%); bottom: 1.2rem; z-index: 30; background: var(--tinta); color: var(--fondo); border-radius: 14px; padding: .5rem .5rem .5rem 1rem; display: flex; align-items: center; gap: .4rem; box-shadow: var(--sombra-alta); max-width: calc(100vw - var(--lat) - 2rem); flex-wrap: wrap; }
.barra-sel b { margin-right: .5rem; white-space: nowrap; }
.barra-sel .btn { background: transparent; color: inherit; border-color: rgba(255,255,255,.25); }
@media (prefers-color-scheme: dark) { .barra-sel .btn { border-color: rgba(0,0,0,.25); } }
.barra-sel .btn:hover { background: rgba(255,255,255,.12); }
.pop { position: fixed; z-index: 40; background: var(--sup); border: 1px solid var(--linea); border-radius: var(--r-panel); box-shadow: var(--sombra-alta); padding: 1rem; width: min(420px, calc(100vw - 2rem)); left: 50%; bottom: 5rem; transform: translateX(-50%); }
.pop h2 { margin-bottom: .7rem; }

/* ---------- panel lateral (ficha) ---------- */
.velo { position: fixed; inset: 0; background: rgba(15, 23, 32, .35); z-index: 45; }
.cajon { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--fondo); z-index: 46; display: flex; flex-direction: column; box-shadow: var(--sombra-alta); animation: entra .18s ease-out; }
@keyframes entra { from { transform: translateX(32px); } to { transform: none; } }
.cajon .cab { background: var(--sup); border-bottom: 1px solid var(--linea); padding: 1rem 1.2rem .7rem; }
.cajon .cab .arriba { display: flex; align-items: flex-start; gap: .6rem; }
.cajon .cab h2 { font-size: 1.25rem; letter-spacing: -.02em; }
.cajon .cab p { margin: .15rem 0 0; color: var(--tinta2); font-size: .88rem; }
.cajon .cab .cerrar { margin-left: auto; }
.pestanas { display: flex; gap: .2rem; margin-top: .8rem; overflow-x: auto; scrollbar-width: none; }
.pestanas button { border: 0; background: transparent; padding: .45rem .75rem; border-radius: 8px 8px 0 0; cursor: pointer; font-weight: 550; color: var(--tinta2); border-bottom: 2px solid transparent; white-space: nowrap; }
.pestanas button.si { color: var(--rio); border-bottom-color: var(--rio); }
.cajon .cuerpo { flex: 1; overflow-y: auto; padding: 1rem 1.2rem 3rem; }
.dinero { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--sup); border: 1px solid var(--linea); border-radius: var(--r-panel); margin-bottom: 1rem; }
.dinero > div { padding: .7rem .9rem; border-left: 1px solid var(--linea); }
.dinero > div:first-child { border-left: 0; }
.dinero .v { font-weight: 650; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.dinero .e { font-size: .78rem; color: var(--tinta2); }
.seccion { background: var(--sup); border: 1px solid var(--linea); border-radius: var(--r-panel); margin-bottom: .9rem; }
.seccion > h3 { margin: 0; padding: .7rem 1rem; border-bottom: 1px solid var(--linea); color: var(--tinta); font-size: .92rem; display: flex; align-items: center; justify-content: space-between; }
.seccion > .g { padding: .3rem 1rem .6rem; }
.par { display: grid; grid-template-columns: 9.5rem 1fr; gap: .8rem; align-items: center; padding: .38rem 0; border-top: 1px solid var(--linea); }
.par:first-child { border-top: 0; }
.par > label { font-size: .85rem; color: var(--tinta2); }
.par .inp { min-height: 2.15rem; padding: .32rem .55rem; border-color: transparent; background: transparent; }
.par .inp:hover { border-color: var(--linea2); background: var(--sup); }
.par .inp:focus { background: var(--sup); }
.par textarea.inp { min-height: 3.5rem; resize: vertical; }
.par .ayuda { grid-column: 2; font-size: .76rem; color: var(--tinta3); margin-top: -.3rem; }
.dias { display: flex; gap: .25rem; flex-wrap: wrap; }
.dias button { width: 2.2rem; height: 2rem; border-radius: 8px; border: 1px solid var(--linea2); background: var(--sup); cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--tinta2); padding: 0; }
.dias button.si { background: var(--rio); border-color: var(--rio); color: #fff; }
.tarjeta-c { background: var(--sup); border: 1px solid var(--linea); border-radius: var(--r-panel); padding: .85rem 1rem; margin-bottom: .7rem; }
.tarjeta-c .t { font-weight: 600; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.tarjeta-c .d { font-size: .85rem; color: var(--tinta2); margin-top: .2rem; }
.tarjeta-c .acc { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .6rem; }
.datos-c { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .4rem .9rem; margin-top: .5rem; font-size: .85rem; }
.datos-c div span { display: block; color: var(--tinta3); font-size: .75rem; }

/* ---------- modal y visor ---------- */
.modal { position: fixed; inset: 0; background: rgba(15, 23, 32, .45); z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 4vh 1rem; overflow-y: auto; }
.caja { background: var(--sup); border-radius: 16px; width: 100%; max-width: 640px; box-shadow: var(--sombra-alta); margin: auto 0; }
.caja > .cab { padding: 1.1rem 1.3rem .2rem; display: flex; align-items: center; gap: .5rem; }
.caja > .cab h2 { font-size: 1.15rem; }
.caja > .cab .cerrar { margin-left: auto; }
.caja > .cue { padding: .8rem 1.3rem 1.2rem; }
.caja > .pie { display: flex; gap: .5rem; justify-content: flex-end; padding: .9rem 1.3rem; border-top: 1px solid var(--linea); flex-wrap: wrap; }
.caja > .pie .izq { margin-right: auto; }
.visor { position: fixed; inset: 0; z-index: 70; background: rgba(10, 15, 22, .85); display: flex; flex-direction: column; }
.visor .cab { display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; color: #fff; }
.visor .cab b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visor .cab .btn { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.2); }
.visor iframe, .visor .img { flex: 1; border: 0; background: #fff; width: 100%; }
.visor .img { background: transparent; display: flex; align-items: center; justify-content: center; overflow: auto; }
.visor .img img { max-width: 100%; max-height: 100%; }
.toast { position: fixed; bottom: 1.4rem; right: 1.4rem; background: var(--tinta); color: var(--fondo); padding: .6rem 1rem; border-radius: 10px; z-index: 80; box-shadow: var(--sombra-alta); max-width: min(90vw, 420px); font-size: .92rem; }
.toast.error { background: var(--mal); color: #fff; }
.clave-nueva { font: 600 1.25rem ui-monospace, Consolas, monospace; background: var(--sup2); padding: .7rem; border-radius: 10px; text-align: center; user-select: all; border: 1px solid var(--linea); }

/* ---------- limpieza ---------- */
.pasos { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.paso .lbl { display: block; margin-bottom: .5rem; font-size: .85rem; }
.paso .lbl b { color: var(--rio); margin-right: .3rem; }
.lista-sel .grupo { border-top: 1px solid var(--linea); }
.lista-sel .grupo:first-child { border-top: 0; }
.lista-sel .gcab { display: flex; align-items: center; gap: .6rem; padding: .55rem 1.1rem; background: var(--sup2); font-weight: 600; font-size: .88rem; cursor: pointer; }
.lista-sel label.it { display: flex; align-items: center; gap: .7rem; padding: .5rem 1.1rem .5rem 2.4rem; cursor: pointer; border-top: 1px solid var(--linea); }
.lista-sel label.it:hover { background: var(--sup2); }
.lista-sel label.it .cu { flex: 1; min-width: 0; }
.lista-sel label.it .d { font-size: .8rem; color: var(--tinta2); }
.pie-fijo { position: sticky; bottom: 0; background: var(--sup); border-top: 1px solid var(--linea); padding: .8rem 1.1rem; display: flex; align-items: center; gap: .8rem; justify-content: space-between; border-radius: 0 0 var(--r-panel) var(--r-panel); flex-wrap: wrap; }
.agenda { overflow-x: auto; }
.agenda table { border-collapse: collapse; width: 100%; min-width: 680px; font-size: .88rem; }
.agenda th { font-size: .78rem; color: var(--tinta2); font-weight: 600; padding: .55rem .4rem; border-bottom: 1px solid var(--linea); background: var(--sup2); }
.agenda td { border-bottom: 1px solid var(--linea); padding: .45rem .4rem; }
.agenda td:first-child, .agenda th:first-child { padding-left: 1.1rem; text-align: left; }
.agenda .dia { text-align: center; }
.agenda .hoy { background: var(--rio2); }
.celda { width: 2rem; height: 2rem; border-radius: 8px; border: 1px dashed var(--linea2); background: transparent; cursor: pointer; color: transparent; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.celda svg { width: 14px; height: 14px; }
.celda.plan { border: 2px solid var(--av); color: var(--av); }
.celda.plan::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--av); }
.celda.hecha { background: var(--ok); border: 2px solid var(--ok); color: #fff; }
.celda.prog { border: 2px solid var(--rio); }
.celda.prog::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--rio); }

/* tarifas */
.tarifas { width: 100%; border-collapse: collapse; }
.tarifas td, .tarifas th { padding: .5rem 0; border-bottom: 1px solid var(--linea); text-align: left; font-size: .9rem; }
.tarifas th { font-size: .78rem; color: var(--tinta2); font-weight: 600; }
.tarifas tr:last-child td { border-bottom: 0; }
.tarifas .inp { max-width: 190px; text-align: right; font-variant-numeric: tabular-nums; }
.aumento { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; background: var(--sup2); border-radius: var(--r-ctrl); padding: .7rem .8rem; margin-top: .9rem; }
.aumento .inp { width: 6.5rem; }

/* calendario por día */
.cal { border-collapse: collapse; font-size: .72rem; }
.cal th { padding: .25rem; font-weight: 600; color: var(--tinta2); min-width: 1.6rem; text-align: center; }
.cal td { height: 1.9rem; border-left: 1px solid var(--linea); border-top: 1px solid var(--linea); text-align: center; padding: 0; }
.cal td.res { background: var(--rio); color: #fff; cursor: pointer; font-weight: 600; }
.cal td.fin, .cal th.fin { background: var(--sup2); }
.cal td.nom { text-align: left; white-space: nowrap; padding: 0 .7rem 0 1.1rem; position: sticky; left: 0; background: var(--sup); font-size: .84rem; border-left: 0; }

/* ingreso */
.ingreso { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.ingreso .caja { max-width: 380px; padding: 1.8rem; }
.ingreso .marca { margin-bottom: 1.2rem; padding: 0; }
.error-txt { color: var(--mal); font-size: .88rem; min-height: 1.3rem; margin: .4rem 0; }

/* ---------- celular ---------- */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .lateral { display: none; }
  main { padding: 1rem .9rem 6.5rem; }
  .cabeza h1 { font-size: 1.35rem; }
  .abajo { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; background: var(--sup); border-top: 1px solid var(--linea); padding: .3rem .2rem calc(.3rem + env(safe-area-inset-bottom)); }
  .abajo a, .abajo button { display: flex; flex-direction: column; align-items: center; gap: .1rem; font-size: .7rem; color: var(--tinta2); padding: .3rem 0; border: 0; background: transparent; text-decoration: none; cursor: pointer; position: relative; }
  .abajo svg { width: 22px; height: 22px; }
  .abajo .activo { color: var(--rio); }
  .abajo .cuenta { position: absolute; top: 0; left: 55%; background: var(--mal); color: #fff; border-radius: 999px; font-size: .62rem; padding: 0 .3rem; font-weight: 700; }
  .cifras { grid-template-columns: 1fr 1fr; }
  .cifra:nth-child(3) { border-left: 0; }
  .cifra:nth-child(n+3) { border-top: 1px solid var(--linea); }
  .cifra .v { font-size: 1.12rem; }
  .tablero { grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 5px; }
  .ficha { min-height: 52px; padding: .35rem .4rem; }
  .ficha b { font-size: .8rem; }
  .ocm { display: none; }
  .barra-sel { left: 50%; bottom: calc(4.6rem + env(safe-area-inset-bottom)); max-width: calc(100vw - 1rem); }
  .pop { bottom: calc(9rem + env(safe-area-inset-bottom)); }
  .pasos { grid-template-columns: 1fr; }
  .col-con { grid-template-columns: 1fr !important; }
  .par { grid-template-columns: 7.5rem 1fr; gap: .5rem; }
  .toast { left: 1rem; right: 1rem; bottom: calc(5rem + env(safe-area-inset-bottom)); }
  .fila { padding: .65rem .9rem; }
  .panel-c > .tit, .panel-c > .cue { padding-left: .9rem; padding-right: .9rem; }
  .modal { padding: 0; align-items: flex-end; }
  .caja { border-radius: 16px 16px 0 0; max-height: 94vh; overflow-y: auto; }
}
@media print { .lateral, .abajo, .btn, .barra-sel { display: none !important; } .app { display: block; } }
