* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; background: #f4f6f8; color: #1f2933; }
button { font: inherit; cursor: pointer; }

/* Pantalla de entrada */
body.entrada { display: flex; min-height: 100vh; align-items: center; justify-content: center; }
.tarjeta-entrada { background: #fff; padding: 2rem; border-radius: 12px; width: 100%; max-width: 360px;
  box-shadow: 0 4px 20px rgba(0,0,0,.08); }
.tarjeta-entrada h1 { margin: 0; color: #0b5cad; }
.sub { margin: .2rem 0 1.5rem; color: #52606d; }
label { display: block; margin: .8rem 0 .3rem; font-weight: 600; font-size: .9rem; }
input { width: 100%; padding: .6rem .7rem; border: 1px solid #cbd2d9; border-radius: 8px; font: inherit; }
input:focus { outline: 2px solid #0b5cad; border-color: transparent; }
#boton { width: 100%; margin-top: 1.2rem; padding: .7rem; border: 0; border-radius: 8px; background: #0b5cad; color: #fff; font-weight: 600; }
#boton:disabled { opacity: .6; }
.mensaje { color: #c62828; min-height: 1.2em; margin: .8rem 0 0; }
.nota { font-size: .8rem; color: #7b8794; margin: 1rem 0 0; }

/* Página principal */
.barra { display: flex; justify-content: space-between; align-items: center; padding: .8rem 1.2rem; background: #0b5cad; color: #fff; }
.marca { font-weight: 700; font-size: 1.2rem; }
.enlace { background: none; border: 1px solid rgba(255,255,255,.6); color: #fff; border-radius: 6px; padding: .2rem .6rem; margin-left: .5rem; }
/* Tareas en curso (2026-09-27). Clases propias (p-…) para no chocar con la barra azul de arriba (.barra). */
.tareas { background: #fff8e1; border-bottom: 1px solid #f3e3ad; padding: .45rem 1.2rem; font-size: .82rem; color: #3e4c59; }
.tareas.listas { background: #f3faf4; border-bottom-color: #d8eddb; }
.tareas-cabeza { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.tareas-cabeza b { font-weight: 600; }
.tareas-cabeza .hora { color: #9aa5b1; }
.tareas-cabeza .ver { background: none; border: 0; color: #0b5cad; padding: 0; font-size: .8rem; cursor: pointer; }
.tareas-cabeza .ver:hover { text-decoration: underline; }
#tareas-lista { display: grid; gap: .25rem; margin-top: .35rem; }
.p-tarea { display: grid; grid-template-columns: 17em 12em 3em 1fr; gap: .8rem; align-items: center; }
.p-barra { height: 6px; background: #e4e7eb; border-radius: 999px; overflow: hidden; }
.p-relleno { height: 100%; width: 0; background: #0b5cad; border-radius: 999px; transition: width .6s ease; }
.p-tarea.hecha .p-relleno { background: #3a9b46; }
.p-pct { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; color: #1f2933; }
.p-detalle { color: #7b8794; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) { .p-tarea { grid-template-columns: 1fr 3em; } .p-barra, .p-detalle { grid-column: 1 / -1; } }
@media (prefers-reduced-motion: reduce) { .p-relleno { transition: none; } }
.cuerpo { display: flex; min-height: calc(100vh - 52px); }
.menu { width: 220px; background: #fff; border-right: 1px solid #e4e7eb; padding: 1rem 0; }
.modulo { margin: 0 1rem .6rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: #7b8794; }
.menu a { display: block; padding: .6rem 1rem; color: #1f2933; text-decoration: none; border-left: 3px solid transparent; }
.menu a:hover { background: #f0f4f8; }
.menu a.activo { border-left-color: #0b5cad; background: #e8f1fb; font-weight: 600; }
.contenido { flex: 1; padding: 1.5rem 2rem; }
.construccion { font-size: 1.1rem; color: #52606d; }
.estado { color: #7b8794; font-size: .9rem; }

/* Parte 2 (2026-09-26): Movimientos y Alertas */
[hidden] { display: none !important; }
.estado { margin-top: -.4rem; }
.filtros { display: flex; flex-wrap: wrap; gap: .8rem 1rem; align-items: flex-end; background: #fff; border: 1px solid #e4e7eb;
  border-radius: 10px; padding: .9rem 1rem; margin: 1rem 0; }
.filtros label { margin: 0; font-size: .8rem; color: #52606d; display: flex; flex-direction: column; gap: .3rem; }
.filtros .ancho { flex: 1; min-width: 200px; }
.filtros select, .filtros input { padding: .45rem .5rem; border: 1px solid #cbd2d9; border-radius: 6px; font: inherit; background: #fff; }
.secundario { background: #fff; border: 1px solid #cbd2d9; color: #1f2933; border-radius: 6px; padding: .45rem .9rem; }
.secundario:hover { border-color: #0b5cad; color: #0b5cad; }
.totales { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.total { background: #fff; border: 1px solid #e4e7eb; border-radius: 8px; padding: .6rem .8rem; }
.total .t { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: #7b8794; }
.total .v { font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
/* 2026-09-27: «Caja en vivo» */
.vivo-cabeza { display: flex; align-items: center; gap: 1rem; margin: .4rem 0 .8rem; }
.tabla tr.clicable { cursor: pointer; }
.tabla tr.clicable:hover { background: #f5f9ff; }
.tabla tr.elegida { background: #eef5fc; }

/* 2026-09-27: «Atención inmediata» */
.franja-urgente { display: block; background: #b3261e; color: #fff; padding: .55rem 1.2rem; text-decoration: none; font-size: .95rem; }
.franja-urgente:hover { background: #8f1d17; }
.franja-urgente[hidden] { display: none; }
.franja-urgente u { margin-left: .4rem; }
.rv-gravedad.g-urgente { background: #b3261e; color: #fff; }
.urg-tarjeta { border-left: 5px solid #b3261e; margin-bottom: 1rem; }

/* 2026-09-27: bandeja «Revisar» */
.boton-revisar { margin-left: 1rem; background: #fff3cd; color: #7a4d00; border-radius: 999px; padding: .25rem .8rem;
  font-weight: 700; text-decoration: none; font-size: .9rem; }
.boton-revisar:hover { background: #ffe8a1; }
.rv-avance { display: flex; align-items: center; gap: .8rem; margin: .4rem 0 .8rem; font-weight: 600; }
.rv-avance .p-barra { flex: 1; max-width: 320px; }
.rv-tarjeta { background: #fff; border: 1px solid #e4e7eb; border-radius: 12px; padding: 1.1rem 1.3rem; max-width: 820px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .05); }
.rv-cabeza { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.rv-gravedad { font-weight: 700; font-size: .85rem; padding: .15rem .6rem; border-radius: 999px; background: #eef2f6; }
.rv-gravedad.g-alta { background: #fdecea; color: #b3261e; }
.rv-gravedad.g-media { background: #fff3e0; color: #8a4b00; }
.rv-gravedad.g-pregunta { background: #eef5fc; color: #0b5cad; }
.rv-tipo { font-size: .85rem; color: #52606d; }
.rv-titulo { font-size: 1.2rem; margin: .6rem 0 .3rem; }
.rv-detalle { line-height: 1.5; white-space: pre-wrap; }
.rv-nota-l { display: block; font-size: .85rem; color: #52606d; margin-top: .8rem; }
.rv-tarjeta textarea { width: 100%; font: inherit; border: 1px solid #cbd2d9; border-radius: 8px; padding: .5rem; margin-top: .3rem; box-sizing: border-box; }
.rv-todos { display: block; margin-top: .5rem; }
.rv-botones { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.rv-b { font: inherit; padding: .55rem .9rem; border-radius: 8px; border: 1px solid #cbd2d9; background: #fff; cursor: pointer; font-weight: 600; }
.rv-b small { font-weight: 400; color: #52606d; }
.rv-ok { background: #e8f5ec; border-color: #1e7b34; color: #1e7b34; }
.rv-despues { background: #eef5fc; border-color: #0b5cad; color: #0b5cad; }
.rv-no { background: #f5f5f5; }
.rv-saltar { margin-left: auto; border-style: dashed; color: #52606d; }
.rv-vacio { font-size: 1.1rem; padding: 2rem 0; }

/* 2026-09-27: pantalla Resumen (agentes de vigilancia) */
.tarjeta-resumen { background: #fff; border: 1px solid #e4e7eb; border-radius: 10px; padding: 1rem 1.2rem; margin-bottom: 1.2rem; }
.tarjeta-resumen h3 { margin: 0 0 .2rem; }
.r-texto { white-space: pre-wrap; line-height: 1.5; }
.r-titulo { margin: 1.4rem 0 .2rem; }
button.chip { font: inherit; cursor: pointer; border: 1px solid #cbd2d9; background: #fff; border-radius: 999px; padding: .25rem .7rem; margin: 0 .4rem .4rem 0; }
button.chip.activo { border-color: #0b5cad; background: #eef5fc; color: #0b5cad; }
/* 2026-09-27: tarjetas que filtran al hacer clic */
button.total { font: inherit; text-align: left; cursor: pointer; color: inherit; }
button.total:hover { border-color: #0b5cad; box-shadow: 0 1px 4px rgba(11, 92, 173, .15); }
button.total:focus-visible { outline: 2px solid #0b5cad; outline-offset: 2px; }
.total.activo { border: 2px solid #0b5cad; background: #eef5fc; }
.total.activo .t::after { content: " · filtrando"; color: #0b5cad; text-transform: none; letter-spacing: 0; }
/* Estado clicable y ventana del motivo */
.est-boton { font: inherit; font-weight: 600; color: inherit; background: none; border: 0; padding: .1rem 0; cursor: pointer;
  text-decoration: underline dotted; text-underline-offset: 3px; white-space: nowrap; }
.est-boton:hover { text-decoration-style: solid; }
.motivo { border: 0; border-radius: 12px; padding: 0; width: min(560px, calc(100vw - 32px)); max-height: 85vh;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .25); color: #1f2933; }
.motivo::backdrop { background: rgba(15, 23, 42, .45); }
.motivo > * { margin-left: 1.2rem; margin-right: 1.2rem; }
.mo-cabeza { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1rem; }
.mo-cabeza h3 { margin: 0; font-size: 1.1rem; }
.mo-x { background: none; border: 0; font-size: 1.1rem; cursor: pointer; color: #52606d; padding: .3rem; }
.mo-estado { font-weight: 700; margin: .3rem 0 .6rem; }
.motivo h4 { margin: 1rem 0 .4rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: #7b8794; }
.motivo ul { padding-left: 1.2rem; margin-top: 0; line-height: 1.45; }
.mo-pregunta { border: 1px solid #e4e7eb; border-radius: 8px; padding: .7rem .8rem; margin-bottom: .6rem; background: #f8fafc; }
.mo-para { font-size: .78rem; color: #52606d; font-weight: 600; }
.mo-texto { margin: .3rem 0 .5rem; line-height: 1.45; }
.mo-copiar { font: inherit; font-size: .85rem; padding: .35rem .7rem; border-radius: 6px; border: 1px solid #0b5cad;
  background: #fff; color: #0b5cad; cursor: pointer; }
.mo-copiar:hover { background: #eef5fc; }
.mo-tecnico { margin-top: 1rem; margin-bottom: 1.2rem; font-size: .8rem; color: #52606d; }
.mo-tecnico pre { white-space: pre-wrap; font-family: inherit; }
.tabla-caja { overflow-x: auto; background: #fff; border: 1px solid #e4e7eb; border-radius: 10px; }
.tabla { border-collapse: collapse; width: 100%; font-size: .88rem; min-width: 820px; }
.tabla th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: #52606d;
  background: #f7f9fb; padding: .55rem .7rem; border-bottom: 1px solid #e4e7eb; position: sticky; top: 0; }
.tabla th.ordenable { cursor: pointer; user-select: none; }
.tabla th.ordenable:hover, .tabla th.ordenable:focus-visible { color: #0b5cad; outline: none; }
.tabla th.ordenable::after { content: attr(data-flecha); color: #0b5cad; }
.tabla td { padding: .45rem .7rem; border-bottom: 1px solid #eef1f4; vertical-align: top; }
.tabla .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabla tr.con-alerta { background: #fff8e6; }
.tabla tr.sin-info { background: #fdecea; }
.tabla tr.historico { color: #7b8794; }
.tabla td.fuerte { font-weight: 700; }
.filtros .casilla { flex-direction: row; align-items: center; gap: .4rem; padding-bottom: .5rem; }
.falta { color: #b3261e; font-weight: 600; white-space: nowrap; text-align: right; }
/* 2026-09-27: estado del DINERO de cada corte; verde solo con el depósito confirmado en el banco */
.est { white-space: nowrap; font-weight: 600; cursor: help; }
.est-ok { color: #1e7b34; }
.est-espera { color: #8a6100; }
.est-mal { color: #b3261e; }
.aviso { color: #a05a00; font-weight: 600; white-space: nowrap; }
.pie { color: #7b8794; font-size: .85rem; }
.ayuda { color: #52606d; max-width: 70ch; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: .8rem 0 1rem; }
.chip { background: #fff3d6; color: #8a4b00; border-radius: 999px; padding: .3rem .8rem; font-size: .85rem; font-weight: 600; }
.chip.bien { background: #e3f4e6; color: #256b32; }
.contador { background: #c62828; color: #fff; border-radius: 999px; font-size: .7rem; padding: .05rem .45rem; margin-left: .3rem; }
.wa { font-size: .85rem; background: rgba(255,255,255,.15); border-radius: 999px; padding: .2rem .7rem; margin-right: .6rem; }
/* Mis pendientes (2026-09-27) */
.modulo.segundo { margin-top: 1.2rem; }
.contador.azul { background: #0b5cad; }
.nuevo-pendiente { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0 .4rem; }
.nuevo-pendiente input { flex: 1 1 260px; width: auto; }
.nuevo-pendiente button { border: 0; border-radius: 8px; background: #0b5cad; color: #fff; font-weight: 600; padding: .6rem 1.2rem; }
.lista-pendientes { display: grid; gap: .7rem; max-width: 900px; }
.pendiente { background: #fff; border: 1px solid #e4e7eb; border-left: 4px solid #0b5cad; border-radius: 8px; padding: .8rem 1rem; }
.pendiente.en_espera { border-left-color: #c9a227; }
.pendiente.hecha { border-left-color: #3a9b46; opacity: .7; }
.pendiente.hecha h3 { text-decoration: line-through; }
.p-cabeza { display: flex; align-items: center; gap: .6rem; }
.pendiente h3 { margin: 0; font-size: 1rem; }
.p-estado { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .15rem .5rem;
  border-radius: 999px; background: #e8f1fb; color: #0b5cad; white-space: nowrap; }
.pendiente.en_espera .p-estado { background: #fbf1d3; color: #7a5d00; }
.pendiente.hecha .p-estado { background: #e3f4e6; color: #256b32; }
.p-texto { margin: .4rem 0 0; color: #3e4c59; }
.p-fecha { margin: .3rem 0 0; font-size: .8rem; color: #9aa5b1; }
.p-botones { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.p-botones .secundario { font-size: .82rem; padding: .3rem .7rem; }
.etiqueta-suc { display: inline-block; min-width: 7.5em; text-align: center; padding: .1rem .7rem; border-radius: 999px;
  background: #eef1f4; color: #1f2933; font-size: .85rem; white-space: nowrap; }
.boton-enlace { color: #0b5cad; font-weight: 600; text-decoration: none; white-space: nowrap; }
.boton-enlace:hover { text-decoration: underline; }

@media (max-width: 700px) {
  .cuerpo { flex-direction: column; }
  .menu { width: 100%; display: flex; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid #e4e7eb; padding: .5rem; }
  .modulo { width: 100%; }
  .menu a { border-left: 0; border-bottom: 3px solid transparent; padding: .4rem .6rem; }
  .menu a.activo { border-bottom-color: #0b5cad; }
  /* 2026-09-27: celular. Menú en una sola fila que se desliza, contenido a lo ancho, botones grandes */
  .menu { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; gap: .2rem; }
  .menu .modulo { display: none; }
  .menu a { white-space: nowrap; font-size: .95rem; padding: .55rem .7rem; }
  .contenido { padding: .8rem; }
  .contenido h1 { font-size: 1.35rem; }
  .barra { flex-wrap: wrap; gap: .4rem; padding: .6rem .8rem; }
  .barra .usuario { font-size: .85rem; }
  .boton-revisar { margin-left: 0; }
  .tareas { font-size: .85rem; }
  .rv-tarjeta { padding: .9rem; }
  .rv-titulo { font-size: 1.05rem; }
  .rv-botones { flex-direction: column; }
  .rv-b { width: 100%; padding: .8rem; font-size: 1rem; }
  .rv-saltar { margin-left: 0; }
  .mo-copiar { width: 100%; padding: .6rem; }
  .totales { grid-template-columns: repeat(2, 1fr); }
  .motivo { width: calc(100vw - 16px); }
  .ayuda { font-size: .88rem; }
}

/* ==========================================================================================================
   2026-09-28 · DISEÑO MINIMALISTA «CCF Admin Panel» (David: «un concepto más minimalista, que no se amontonen
   las cosas o botones… es demasiado agobiante»). Van al final y mandan sobre las reglas anteriores.
   Respaldo del diseño anterior: respaldos/antes_minimalista_20260928/.
   ========================================================================================================== */
:root { --azul: #1f5fbf; --tinta: #1d2733; --suave: #6b7785; --linea: #e8ecf1; --fondo: #f6f7f9; --rojo: #c0392b; }
body.minimal { background: var(--fondo); color: var(--tinta); font-size: 15px; }
/* Barra superior blanca: marca a la izquierda; a la derecha, cosas separadas con aire */
body.minimal .barra { background: #fff; color: var(--tinta); border-bottom: 1px solid var(--linea); padding: .7rem 1.6rem;
  position: sticky; top: 0; z-index: 20; }
body.minimal .marca { display: flex; align-items: center; gap: .55rem; font-weight: 600; font-size: 1.05rem; color: var(--tinta);
  text-decoration: none; letter-spacing: .01em; }
.logo { display: inline-grid; place-items: center; background: #1f5fbf; color: #fff; font-weight: 700; font-size: .72rem;
  letter-spacing: .06em; border-radius: 7px; padding: .3rem .45rem; vertical-align: middle; }
.tarjeta-entrada h1 { display: flex; align-items: center; gap: .6rem; color: #1d2733; font-size: 1.4rem; }
.barra-der { display: flex; align-items: center; gap: 1.2rem; }
body.minimal .wa { background: none; padding: 0; margin: 0; font-size: .85rem; color: var(--suave); white-space: nowrap; }
body.minimal .usuario { font-size: .9rem; color: var(--suave); white-space: nowrap; max-width: 14ch; overflow: hidden; text-overflow: ellipsis; }
.salir { background: none; border: 1px solid var(--linea); color: var(--tinta); border-radius: 8px; padding: .35rem .8rem; font-size: .85rem; }
.salir:hover { border-color: var(--azul); color: var(--azul); }
.campana { position: relative; text-decoration: none; font-size: 1.1rem; line-height: 1; }
.burbuja { position: absolute; top: -.45rem; right: -.7rem; background: var(--rojo); color: #fff; font-size: .65rem; font-weight: 700;
  border-radius: 999px; padding: .1rem .38rem; }
/* Menú lateral limpio */
body.minimal .cuerpo { min-height: calc(100vh - 56px); }
body.minimal .menu { width: 210px; background: transparent; border-right: 0; padding: 1.4rem 0 1rem .6rem; }
body.minimal .modulo { font-size: .68rem; letter-spacing: .09em; color: #9aa5b1; margin: 0 1rem .5rem; }
body.minimal .modulo.segundo { margin-top: 1.6rem; }
body.minimal .menu a { border-left: 0; border-radius: 8px; margin: 0 .6rem .15rem 0; padding: .55rem .9rem; color: #3b4754; font-size: .93rem; }
body.minimal .menu a:hover { background: #eceff3; }
body.minimal .menu a.activo { background: #fff; color: var(--azul); font-weight: 600; box-shadow: 0 1px 3px rgba(20, 30, 45, .08); }
body.minimal .contador { font-size: .66rem; }
/* Contenido con aire */
body.minimal .contenido { padding: 1.8rem 2.4rem 3rem; max-width: 1180px; }
body.minimal .contenido h1 { font-size: 1.55rem; font-weight: 650; margin: 0 0 1.1rem; }
body.minimal .estado:empty { display: none; }
body.minimal .ayuda { color: var(--suave); font-size: .9rem; margin: 0 0 1rem; }
/* Tarjetas y tablas más ligeras */
body.minimal .tabla-caja, body.minimal .tarjeta-resumen, body.minimal .rv-tarjeta, body.minimal .total, body.minimal .pendiente {
  border: 1px solid var(--linea); box-shadow: none; border-radius: 12px; }
body.minimal .tabla th { background: #fafbfc; color: #8a95a3; font-weight: 600; }
body.minimal .tabla td { border-bottom-color: #f1f3f6; }
/* Inicio: 4 números grandes */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.4rem; }
.kpi { background: #fff; border: 1px solid var(--linea); border-radius: 14px; padding: 1.1rem 1.2rem; text-decoration: none;
  color: var(--tinta); display: flex; flex-direction: column; gap: .35rem; transition: border-color .15s, transform .15s; }
.kpi:hover { border-color: var(--azul); transform: translateY(-1px); }
.kpi-v { font-size: 1.9rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi-t { font-size: .82rem; color: var(--suave); }
.kpi.rojo { border-color: #f1c9c4; background: #fdf4f3; }
.kpi.rojo .kpi-v { color: var(--rojo); }
.tr-cabeza { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.tr-cabeza h3 { margin: 0; font-size: 1rem; }
body.minimal .tarjeta-resumen { padding: 1.2rem 1.4rem; margin-bottom: 1.2rem; }
body.minimal .r-texto { color: #34404d; line-height: 1.6; }
/* Secciones plegables («Ver más») */
.plegable { background: #fff; border: 1px solid var(--linea); border-radius: 12px; padding: .2rem 1.2rem; margin-bottom: .9rem; }
.plegable > summary { cursor: pointer; padding: .85rem 0; font-weight: 600; font-size: .95rem; list-style: none; }
.plegable > summary::-webkit-details-marker { display: none; }
.plegable > summary::before { content: "›"; display: inline-block; margin-right: .6rem; color: var(--suave); transition: transform .15s; }
.plegable[open] > summary::before { transform: rotate(90deg); }
.plegable[open] { padding-bottom: 1rem; }
.plegable .tabla-caja { border: 0; }
.plegable .tareas { background: none; border: 0; padding: 0 0 .8rem; }
.filtros-plegable .filtros { border: 0; padding: 0 0 .6rem; margin: 0; }
/* Botones de las tarjetas «Revisar» menos pesados */
body.minimal .rv-b { font-weight: 600; border-radius: 10px; }
body.minimal .rv-tarjeta { padding: 1.3rem 1.5rem; }
body.minimal .franja-urgente { padding: .6rem 1.6rem; font-size: .9rem; }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) {
  body.minimal .barra { padding: .6rem .9rem; flex-wrap: nowrap; }
  .barra-der { gap: .8rem; }
  body.minimal .usuario { display: none; }            /* en el celular no cabe: el nombre sobra */
  /* el menú ocupa TODO el ancho (antes se quedaba en 210 px y se cortaba) y se desliza con el dedo */
  body.minimal .menu { width: 100%; padding: .4rem .6rem; background: #fff; border-bottom: 1px solid var(--linea); scrollbar-width: none; }
  body.minimal .menu::-webkit-scrollbar { display: none; }
  body.minimal .menu a { margin: 0; padding: .5rem .75rem; }
  body.minimal .menu a.activo { box-shadow: none; background: #eef3fb; }
  body.minimal .contenido { padding: 1rem .9rem 2rem; }
  body.minimal .contenido h1 { font-size: 1.25rem; margin-bottom: .8rem; }
  .kpis { gap: .6rem; }
  .kpi { padding: .85rem .9rem; }
  .kpi-v { font-size: 1.5rem; }
  /* 2026-09-28 (revisión en iPhone): en el celular solo las columnas que importan; nada se sale de la pantalla */
  body.minimal .tabla { min-width: 0; font-size: .85rem; }
  body.minimal .tabla td, body.minimal .tabla th { padding: .5rem .45rem; }
  /* Caja en vivo: Sucursal · Caja · Efectivo que debe haber (lo demás al tocar la sucursal) */
  #p-vivo #vivo-filas td:nth-child(3), #p-vivo #vivo-filas td:nth-child(4), #p-vivo #vivo-filas td:nth-child(5),
  #p-vivo #vivo-filas td:nth-child(6), #p-vivo #vivo-filas td:nth-child(8),
  #vivo-tabla th:nth-child(3), #vivo-tabla th:nth-child(4), #vivo-tabla th:nth-child(5),
  #vivo-tabla th:nth-child(6), #vivo-tabla th:nth-child(8) { display: none; }
  #vivo-mov td:nth-child(3), #vivo-mov td:nth-child(5), #vivo-detalle th:nth-child(3), #vivo-detalle th:nth-child(5) { display: none; }
  #vivo-tabla td, #vivo-tabla th, #vivo-tabla .est { white-space: normal; }   /* que quepa «Efectivo que debe haber» */
  .vivo-cabeza { flex-wrap: wrap; gap: .5rem; }
  /* Cortes: sin Ciudad ni Enviado; totales en una fila que se desliza */
  #m-filas td:nth-child(2), #m-filas td:nth-child(6), #m-encabezado th:nth-child(2), #m-encabezado th:nth-child(6) { display: none; }
  body.minimal .totales { display: flex; overflow-x: auto; gap: .5rem; padding-bottom: .3rem; scrollbar-width: none; }
  body.minimal .totales::-webkit-scrollbar { display: none; }
  body.minimal .total { flex: 0 0 auto; min-width: 118px; padding: .5rem .7rem; }
  body.minimal .etiqueta-suc { min-width: 0; padding: .1rem .5rem; }
  body.minimal .est-boton { white-space: normal; text-align: left; }
  /* Alertas: sin Ciudad */
  #a-filas td:nth-child(3), #a-encabezado th:nth-child(3) { display: none; }
}
/* Pantallas muy chicas (iPhone SE y similares): la marca en una línea y WhatsApp solo como punto de color */
body.minimal .marca { white-space: nowrap; }
@media (max-width: 440px) {
  body.minimal .wa-texto { display: none; }
  .barra-der { gap: .7rem; }
}
@media (max-width: 340px) {
  body.minimal .marca { font-size: .95rem; gap: .4rem; }
  body.minimal .barra { padding: .55rem .6rem; }
  .salir { padding: .3rem .55rem; }
}
/* Alertas: si no hay ninguna, no se muestra la tabla vacía */
#p-alertas .tabla-caja:has(tbody:empty) { display: none; }
/* Resumen del día: lo esencial; lo demás plegado */
.r-mas { margin-top: .6rem; }
.r-mas > summary { cursor: pointer; color: var(--azul); font-size: .88rem; }
.r-mas > div { white-space: pre-wrap; margin-top: .5rem; color: #4a5664; font-size: .9rem; line-height: 1.55; }

/* ===== 2026-09-28: entrada con Google, espacio de usuarios y pantalla «Usuarios» ===== */
.google-caja { display: flex; justify-content: center; min-height: 44px; margin: 1.2rem 0 .4rem; }
.con-contrasena { margin-top: 1.2rem; border-top: 1px solid var(--linea); padding-top: .8rem; }
.con-contrasena > summary { cursor: pointer; color: var(--suave); font-size: .85rem; }
.con-contrasena[hidden] { display: none; }

.es-contenido { max-width: 1100px; margin: 0 auto; padding: 1.6rem 1.6rem 2rem; }
.es-espera { background: #fff; border: 1px solid var(--linea); border-radius: 14px; padding: 2.4rem 1.6rem; text-align: center; max-width: 520px; margin: 3rem auto; }
.es-espera h1 { font-size: 1.4rem; margin: .4rem 0 .8rem; }
.es-espera p { color: #4a5664; line-height: 1.55; }
.es-icono { font-size: 2.4rem; }
.es-titulo { font-size: 1.5rem; font-weight: 650; margin: 0 0 .3rem; }
.es-sub { color: var(--suave); margin: 0 0 1.2rem; line-height: 1.5; }
.es-rejilla { display: grid; grid-template-columns: 300px 1fr; gap: 1.2rem; align-items: start; }
.es-objetivos { background: #fff; border: 1px solid var(--linea); border-radius: 14px; padding: 1rem 1.1rem; position: sticky; top: 1rem; }
.es-objetivos summary { cursor: pointer; font-size: 1rem; display: flex; justify-content: space-between; gap: .6rem; list-style: none; }
.es-objetivos summary::-webkit-details-marker { display: none; }
.es-avance { color: var(--suave); font-size: .85rem; font-weight: 400; }
.es-objetivos .p-barra { margin: .7rem 0 .4rem; }
.es-lista { list-style: none; padding: 0; margin: .4rem 0 0; }
.es-lista li { display: flex; gap: .6rem; align-items: flex-start; padding: .42rem 0; border-bottom: 1px solid #f1f3f6; font-size: .92rem; line-height: 1.35; }
.es-lista li:last-child { border-bottom: 0; }
.es-lista li.es-logrado { color: #1e7b3c; }
.es-punto { flex: none; width: .75rem; height: .75rem; border-radius: 50%; margin-top: .25rem; background: #cfd6de; display: inline-block; }
.es-punto.es-en_progreso { background: #f0b429; }
.es-punto.es-logrado { background: #2e9d52; box-shadow: 0 0 0 3px #d9f2e1; }
.es-leyenda { font-size: .75rem; color: var(--suave); margin: .8rem 0 0; display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.es-leyenda .es-punto { margin: 0 0 0 .4rem; width: .6rem; height: .6rem; box-shadow: none; }
.es-leyenda .es-punto:first-child { margin-left: 0; }
.es-chat { background: #fff; border: 1px solid var(--linea); border-radius: 14px; display: flex; flex-direction: column; min-height: 60vh; }
.es-mensajes { flex: 1; overflow-y: auto; padding: 1.1rem; display: flex; flex-direction: column; gap: .7rem; max-height: 65vh; }
.es-msg { max-width: 82%; padding: .7rem .95rem; border-radius: 14px; line-height: 1.5; font-size: .95rem; overflow-wrap: anywhere; }
.es-msg.ia { background: #f1f4f8; align-self: flex-start; border-bottom-left-radius: 4px; }
.es-msg.yo { background: var(--azul); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.es-msg.sistema { background: #fff6e0; color: #6b4e00; align-self: center; font-size: .85rem; }
.es-hora { display: block; font-size: .7rem; opacity: .6; margin-top: .3rem; text-align: right; }
.es-msg.pensando { display: flex; gap: .3rem; padding: .85rem 1rem; }
.es-msg.pensando span { width: .45rem; height: .45rem; border-radius: 50%; background: #9aa5b1; animation: es-salto 1.2s infinite; }
.es-msg.pensando span:nth-child(2) { animation-delay: .2s; } .es-msg.pensando span:nth-child(3) { animation-delay: .4s; }
@keyframes es-salto { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .es-msg.pensando span { animation: none; } }
.es-form { display: flex; gap: .6rem; padding: .8rem; border-top: 1px solid var(--linea); }
.es-form textarea { flex: 1; resize: none; border: 1px solid var(--linea); border-radius: 10px; padding: .6rem .7rem; font: inherit; font-size: 16px; }
.es-form textarea:focus { outline: 2px solid #c7d8f3; border-color: var(--azul); }
.es-form button { background: var(--azul); color: #fff; border: 0; border-radius: 10px; padding: 0 1.1rem; font-weight: 600; font-size: .95rem; }
.es-form button:disabled { opacity: .5; }
.es-chat > .mensaje { margin: 0 .9rem .6rem; }
@media (max-width: 760px) {
  .es-contenido { padding: 1rem 1rem 1.2rem; }
  .es-titulo { font-size: 1.25rem; }
  .es-rejilla { grid-template-columns: 1fr; gap: .8rem; }
  .es-objetivos { position: static; padding: .8rem .9rem; }
  .es-chat { min-height: 0; }
  .es-mensajes { max-height: 58vh; min-height: 45vh; padding: .8rem; }
  .es-msg { max-width: 90%; }
}

/* Copia de pruebas (2026-09-28): franja amarilla fija para no confundirla con la página en vivo */
.franja-pruebas { position: sticky; top: 0; z-index: 50; background: #ffd84d; color: #3d3000; text-align: center;
  font-weight: 700; font-size: .85rem; padding: .35rem .8rem; letter-spacing: .02em; }

/* Pantalla «Usuarios» del dueño */
.franja-usuarios { display: block; background: #1f5fbf; color: #fff; padding: .6rem 1.6rem; text-decoration: none; font-size: .9rem; }
.franja-usuarios[hidden] { display: none; }
.us-lista { display: grid; gap: .8rem; }
.us-tarjeta { background: #fff; border: 1px solid var(--linea); border-radius: 12px; padding: 1rem 1.2rem; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.us-tarjeta img, .us-tarjeta .us-sinfoto { width: 44px; height: 44px; border-radius: 50%; background: #e3e8ef; flex: none; object-fit: cover; }
.us-datos { flex: 1; min-width: 200px; }
.us-datos b { display: block; }
.us-datos .hora { display: block; }
.us-estado { font-size: .78rem; padding: .15rem .55rem; border-radius: 999px; background: #eef1f5; color: #4a5664; margin-left: .4rem; }
.us-estado.pendiente { background: #fff1d6; color: #8a5a00; }
.us-estado.autorizado { background: #dff3e6; color: #1e7b3c; }
.us-estado.rechazado { background: #fde3e1; color: #a32a20; }
.us-acciones { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.us-acciones select { padding: .4rem; border-radius: 8px; border: 1px solid var(--linea); }
.us-acciones button { border-radius: 8px; padding: .45rem .8rem; border: 1px solid var(--linea); background: #fff; font-weight: 600; cursor: pointer; }
.us-acciones button.si { background: #2e9d52; border-color: #2e9d52; color: #fff; }
.us-acciones button.no { color: var(--rojo); }
.us-chat { margin-top: 1.2rem; }
.us-chat .es-rejilla { grid-template-columns: minmax(0, 1fr); }
.us-chat .es-objetivos { position: static; }
.us-chat .es-chat { min-height: 0; }
.us-chat .es-lista li { flex-wrap: wrap; }
.us-chat .es-resumen { flex-basis: 100%; margin-left: 1.35rem; color: #4a5664; font-size: .82rem; }
@media (max-width: 760px) { .us-chat .es-rejilla { grid-template-columns: 1fr; } }
