/* ============================================================
   Sistema visual — sobrio y minimalista.
   Negro, blanco y grises. El color existe solo cuando significa
   algo (cumplió / no cumplió / por revisar / colores de marca).
   Sin gradientes, sin brillos, sin adornos: menos es más.
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Sistema de espaciado, radios y toque (una regla en vez de valores sueltos) */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px;
  --tap: 44px; --radio: 8px; --radio-lg: 12px;
  /* Modo claro */
  --bg: #fafafa;
  --card: #ffffff;
  --surface2: #f4f4f5;
  --text: #18181b;
  --muted: #71717a;
  --line: #e4e4e7;
  --primary: #18181b;        /* neutro base (texto/superficies) */
  --primary-text: #ffffff;
  --acento: #4f46e5;         /* índigo de marca (Nocta) — plano, solo en acción/foco/selección */
  --acento-text: #ffffff;
  --acento-weak: color-mix(in srgb, var(--acento) 12%, transparent);
  --ok: #16a34a; --bad: #dc2626; --warn: #d97706;
  --sombra: 0 1px 2px rgba(0, 0, 0, .04);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0b;
    --card: #131316;
    --surface2: #1c1c21;
    --text: #f4f4f5;
    --muted: #8b8b93;
    --line: #26262b;
    --primary: #f4f4f5;      /* neutro base en oscuro */
    --primary-text: #0a0a0b;
    --acento: #6e76f0;       /* índigo de marca, un poco más brillante para separarse del casi-negro */
    --acento-text: #ffffff;
    --acento-weak: color-mix(in srgb, var(--acento) 16%, transparent);
    --ok: #4ade80; --bad: #f87171; --warn: #fbbf24;
    --sombra: none;
  }
}
/* Hooks por si algún día se agrega un toggle de tema */
:root[data-theme="light"] {
  --bg: #fafafa; --card: #ffffff; --surface2: #f4f4f5; --text: #18181b; --muted: #71717a;
  --line: #e4e4e7; --primary: #18181b; --primary-text: #ffffff;
  --acento: #4f46e5; --acento-text: #ffffff; --acento-weak: color-mix(in srgb, var(--acento) 12%, transparent);
  --ok: #16a34a; --bad: #dc2626; --warn: #d97706; --sombra: 0 1px 2px rgba(0, 0, 0, .04);
}
:root[data-theme="dark"] {
  --bg: #0a0a0b; --card: #131316; --surface2: #1c1c21; --text: #f4f4f5; --muted: #8b8b93;
  --line: #26262b; --primary: #f4f4f5; --primary-text: #0a0a0b;
  --acento: #6e76f0; --acento-text: #ffffff; --acento-weak: color-mix(in srgb, var(--acento) 16%, transparent);
  --ok: #4ade80; --bad: #f87171; --warn: #fbbf24; --sombra: none;
}

body { font-family: -apple-system, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }
td, .card .num, .pt-pct, .cumple-fecha { font-variant-numeric: tabular-nums; }

:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; }

/* ---------- Header y navegación ---------- */
header { background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px 22px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; position: sticky; top: 0; z-index: 10; }
.logo { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
/* Encabezado simple: ☰ a la izquierda + título centrado de la sección actual. */
.top-row { display: flex; align-items: center; gap: 10px; width: 100%; }
.top-titulo { flex: 1; text-align: center; margin: 0; font-size: 16px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.top-spacer { flex: none; width: 40px; }
nav { display: flex; gap: 2px; flex-wrap: wrap; }
nav button { border: none; background: transparent; padding: 7px 12px; border-radius: 6px; cursor: pointer; font-size: 13.5px; color: var(--muted); transition: background .12s, color .12s; }
nav button.active { background: var(--surface2); color: var(--text); font-weight: 500; }
nav button:hover:not(.active) { color: var(--text); }

main { max-width: 1180px; margin: 0 auto; padding: 24px 22px; }
.tab { display: none; }
.tab.active { display: block; }

/* ---------- Botón volver a áreas ---------- */
.btn-areas { border: 1px solid var(--line); background: var(--card); color: var(--text); padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.btn-areas:hover { background: var(--surface2); }
/* Acciones del buscador de puerta (Escanear carnet / Limpiar): toque cómodo para el guardia */
.pt-accion { min-height: 44px; padding: 10px 18px; font-size: 15px; }

/* ---------- Landing de áreas ---------- */
/* ---------- Inicio (landing) — claro premium, estilo Nocta ---------- */
/* El inicio se pinta con un fondo claro inmersivo (sin costura) y tarjetas blancas con relieve.
   Se activa con la clase body.inicio-skin que pone/quita el JS al entrar y salir del inicio. */
body.inicio-skin { background: radial-gradient(120% 55% at 50% -6%, rgba(79,70,229,.08), transparent 58%), #f6f7f9; min-height: 100vh; }
body.inicio-skin header { background: transparent; border-bottom-color: rgba(17,20,26,.06); }
#landing { --l-card: #ffffff; --l-card2: #fbfbfd; --l-line: rgba(17,20,26,.09); --l-line2: rgba(17,20,26,.16); --l-tx: #14161c; --l-mut: #5c6270; --l-mut2: #9aa0ac;
  --l-ac-soft: rgba(79,70,229,.09); --l-ac-bd: rgba(79,70,229,.18); --l-ac-ico: #4f46e5;
  --l-shadow: 0 1px 2px rgba(17,20,26,.04), 0 10px 30px -16px rgba(17,20,26,.16);
  --l-shadow-hover: 0 2px 4px rgba(17,20,26,.05), 0 20px 44px -18px rgba(17,20,26,.26);
  max-width: 720px; margin: 0 auto; padding: 22px 4px 52px; color: var(--l-tx); }
.landing-kick { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--l-mut2); font-weight: 600; }
.landing-titulo { font-size: 32px; font-weight: 600; letter-spacing: -.035em; line-height: 1.05; margin: 10px 0 6px; color: var(--l-tx); }
.landing-sub { font-size: 13.5px; margin: 0 0 22px; max-width: 52ch; color: var(--l-mut); }
.landing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 620px) { .landing-grid { grid-template-columns: repeat(3, 1fr); } }

#landing .area-card { position: relative; border: 1px solid var(--l-line); border-radius: 18px; padding: 16px; min-height: 126px; box-shadow: var(--l-shadow);
  background: linear-gradient(180deg, var(--l-card), var(--l-card2)); display: flex; flex-direction: column; gap: 6px; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
#landing .area-card.abierta { cursor: pointer; }
#landing .area-card.abierta:hover { border-color: var(--l-line2); transform: translateY(-2px); box-shadow: var(--l-shadow-hover); }
#landing .area-card.bloqueada { opacity: .5; }
#landing .area-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 0; margin-bottom: 8px;
  background: var(--l-ac-soft); color: var(--l-ac-ico); border: 1px solid var(--l-ac-bd); }
#landing .area-icon svg { width: 22px; height: 22px; color: inherit; }
#landing .area-nombre { font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--l-tx); display: flex; align-items: center; gap: 7px; }
#landing .area-desc { font-size: 12px; line-height: 1.45; color: var(--l-mut); }
#landing .area-lock { font-size: 13px; }
#landing .area-bloq { font-size: 11.5px; margin-top: auto; color: var(--l-mut); }
.area-arrow { position: absolute; top: 13px; right: 13px; color: var(--l-mut2, #9aa0ac); display: inline-flex; transition: color .18s, transform .18s; }
.area-arrow svg { width: 17px; height: 17px; color: inherit; }
#landing .area-card.abierta:hover .area-arrow { color: var(--l-tx); transform: translate(1px, -1px); }
.area-badge { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; background: rgba(17,20,26,.04); border: 1px solid var(--l-line2, rgba(17,20,26,.16)); color: var(--l-mut, #5c6270); border-radius: 999px; padding: 1px 8px; font-weight: 500; }
/* Ramas (Embajadores / Local / Listas / Configuración) — TODAS con el mismo ícono, sin excepciones */
#landing .rama-card { position: relative; border: 1px solid var(--l-line); border-radius: 20px; padding: 22px; min-height: 148px; cursor: pointer; box-shadow: var(--l-shadow);
  background: linear-gradient(180deg, var(--l-card), var(--l-card2)); display: flex; flex-direction: column; justify-content: center; gap: 8px; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
#landing .rama-card:hover { border-color: var(--l-line2); transform: translateY(-2px); box-shadow: var(--l-shadow-hover); }
#landing .rama-icon { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; font-size: 0; margin-bottom: 4px;
  background: var(--l-ac-soft); color: var(--l-ac-ico); border: 1px solid var(--l-ac-bd); }
#landing .rama-icon svg { width: 24px; height: 24px; color: inherit; }
#landing .rama-nombre { font-size: 21px; font-weight: 600; letter-spacing: -.02em; color: var(--l-tx); }
#landing .rama-desc { font-size: 13px; line-height: 1.45; color: var(--l-mut); }
/* rama-mini (Configuración) mantiene el MISMO ícono que las otras; solo cambia el título un poco */
#landing .rama-mini .rama-nombre { font-size: 19px; }
#landing .area-volver { justify-content: center; background: rgba(17,20,26,.02); }
#landing .area-volver .area-icon { font-size: 20px; width: auto; height: auto; background: none; border: none; color: var(--l-mut); margin-bottom: 2px; }
#landing .marca-card { min-height: 82px; justify-content: center; }
.ctx-chip { font-size: 13px; font-weight: 600; background: var(--surface2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.ctx-chip a { color: var(--muted); font-weight: 500; cursor: pointer; text-decoration: underline; }
.landing-ctx-wrap { margin: 0 0 16px; }
.landing-ctx { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; background: var(--l-card, #fff); border: 1px solid var(--l-line2, rgba(17,20,26,.16)); border-radius: 999px; padding: 7px 16px; color: var(--l-tx, #14161c); box-shadow: var(--l-shadow); }
.landing-ctx a { color: var(--l-mut, #5c6270); cursor: pointer; text-decoration: underline; font-size: 12.5px; }
.construccion h2 { margin: 0 0 8px; font-size: 20px; }
.construccion p { max-width: 640px; line-height: 1.5; }

/* ---------- Controles ---------- */
/* La barra de herramientas "retrocede" (fondo tenue, sin borde/sombra) para leerse como CONTROLES y no
   como otra caja de contenido igual al panel — crea jerarquía y ordena la pantalla. */
.toolbar { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-4); background: var(--surface2); padding: var(--sp-3) var(--sp-4); border-radius: var(--radio); border: none; }
.toolbar label { font-size: 13.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
input, select, textarea { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radio); font-size: 14px; background: var(--card); color: var(--text); }
/* Campos con área de toque cómoda (se excluyen los numéricos chicos .mny de Caja/Barra que van en línea) */
input:not(.mny), select, textarea { min-height: var(--tap); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--acento); box-shadow: 0 0 0 3px var(--acento-weak); }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 90%, transparent); }
textarea { width: 100%; box-sizing: border-box; resize: vertical; } /* el cuadro de texto ocupa todo el ancho, igual que el botón de abajo */
button { padding: 10px 16px; border: 1px solid var(--line); background: var(--card); border-radius: var(--radio); cursor: pointer; font-size: 13.5px; color: var(--text); min-height: var(--tap); transition: background .12s, border-color .12s, transform .05s; }
button:hover { background: var(--surface2); }
button:active:not(:disabled) { transform: translateY(1px); }
button.primary { background: var(--acento); border-color: var(--acento); color: var(--acento-text); font-weight: 600; min-height: var(--tap); padding: 11px 18px; }
button.primary:hover { opacity: .92; background: var(--acento); }
button:disabled { opacity: .5; cursor: not-allowed; }
/* Acción PRIMARIA a ancho completo (misma clase en Listas/Login, ahora del sistema) */
.full, button.full { width: 100%; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; }
.muted { color: var(--muted); font-size: 13px; }
a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 2px; }
a:hover { text-decoration-color: var(--muted); }

/* ---------- Tarjetas de estadística ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-5); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radio-lg); padding: var(--sp-4); box-shadow: var(--sombra); }
.card .num { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.card .lbl { font-size: 13px; color: var(--muted); margin-top: 2px; }
.card.clickable { cursor: pointer; transition: border-color .12s; }
.card.clickable:hover { border-color: var(--muted); }

/* ---------- Paneles ---------- */
.panel-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radio-lg); padding: var(--sp-4); margin-bottom: var(--sp-5); box-shadow: var(--sombra); position: relative; }
.panel-box h3 { margin: 0 0 var(--sp-3); font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.panel-box h3 { margin-bottom: 10px; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.panel-box.alerta { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
/* Panel clave de la pantalla: un filo índigo a la izquierda. Máximo UNO visible por pantalla. */
.panel-box.destacado { border-left: 3px solid var(--acento); }
/* Grupo de embajadores plegable (Revisión automática): al entrar no muestra toda la lista */
.grupo-emb > summary { cursor: pointer; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; list-style: none; }
.grupo-emb > summary::-webkit-details-marker { display: none; }
.grupo-chev { margin-left: auto; color: var(--acento); font-size: 14px; transition: transform .15s; flex: none; }
.grupo-emb[open] > summary .grupo-chev { transform: rotate(180deg); }
.grupo-nom { font-weight: 600; font-size: 15px; }
.grupo-meta { font-size: 12.5px; }
.gr-ok { color: var(--ok); } .gr-bad { color: var(--bad); } .gr-rev { color: var(--warn); }
/* Miniatura de la captura que sube una cuenta privada (Revisión manual) */
.cap-mini { width: 42px; height: 42px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); margin-right: 4px; vertical-align: middle; }
.cap-mini:hover { border-color: var(--acento); }
tr.con-captura td { background: var(--acento-weak); }
/* Tarea de hoy: grilla de gráficas subidas por el admin */
.th-imgs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.th-img { position: relative; }
.th-img img { width: 92px; height: 92px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
.th-img-del { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; min-height: 0; border-radius: 50%; padding: 0; background: var(--bad); color: #fff; border: none; font-size: 13px; line-height: 1; }
/* Etiqueta de campo: el texto y el asterisco quedan en la MISMA línea */
.cajf-lbl { display: inline; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; }
.form-row input { flex: 1; min-width: 160px; }
.form-col { display: flex; flex-direction: column; gap: var(--sp-3); }
.form-col > input, .form-col > select, .form-col > textarea, .form-col > button.primary, .form-col > .full { width: 100%; }
.form-col label { margin: 0 0 4px; }
.form-col label { font-size: 13px; color: var(--muted); margin-top: 6px; }

.brand-header { display: flex; align-items: center; gap: 10px; padding: 10px 0 6px; }
.brand-toggle { cursor: pointer; user-select: none; margin: -10px 0 -6px; padding: 10px 0; }
.brand-toggle:hover h3 { color: var(--muted); }
.chev { color: var(--muted); font-size: 13px; width: 14px; flex-shrink: 0; }
.brand-body { margin-top: 6px; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; }
.brand-header h3 { font-size: 14.5px; }
.brand-header .muted { flex: 1; }
/* Tarjeta de marca rediseñada: nombre grande arriba, info a lo ancho abajo, sin botones en la cabecera */
.brand-header.marca-cab { display: block; }
.marca-cab-top { display: flex; align-items: center; gap: 10px; }
.marca-nom { margin: 0 !important; font-size: 18px !important; font-weight: 700; flex: 1; letter-spacing: -0.01em; }
.marca-cab-meta { margin-top: 6px; padding-left: 24px; font-size: 12.5px; line-height: 1.4; }
.marca-acciones { display: flex; gap: 8px; margin-bottom: 12px; }

/* ---------- Tablas ---------- */
table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 10px; overflow: hidden; font-size: 13.5px; }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-weight: 500; font-size: 13px; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background .1s; }
tbody tr:hover { background: var(--surface2); }
.scrollx { overflow-x: auto; }

/* Estados en celdas: tinte sutil, el símbolo carga el color */
.cell-ok   { background: color-mix(in srgb, var(--ok) 10%, var(--card));  color: var(--ok);   text-align: center; font-weight: 600; }
.cell-bad  { background: color-mix(in srgb, var(--bad) 10%, var(--card)); color: var(--bad);  text-align: center; font-weight: 600; }
.cell-warn { background: color-mix(in srgb, var(--warn) 10%, var(--card)); color: var(--warn); text-align: center; font-weight: 600; }
.cell-none { background: transparent; text-align: center; color: color-mix(in srgb, var(--muted) 45%, transparent); }

/* ---------- Chips ---------- */
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; background: color-mix(in srgb, currentColor 10%, transparent); border: 1px solid color-mix(in srgb, currentColor 25%, transparent); }
.chip.cumplio { color: var(--ok); }
.chip.no_cumplio { color: var(--bad); }
.chip.revisar { color: var(--warn); }
.chip.sin_revisar { color: var(--muted); }

/* ---------- Revisión manual ---------- */
.manual-tarea { background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; box-shadow: var(--sombra); overflow: hidden; }
.manual-tarea > summary { cursor: pointer; padding: 14px 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; list-style: none; }
.manual-tarea > summary::-webkit-details-marker { display: none; }
.manual-tarea > summary::before { content: '▸'; color: var(--muted); font-size: 13px; transition: transform .15s; }
.manual-tarea[open] > summary::before { transform: rotate(90deg); }
.manual-tarea > summary:hover { background: var(--surface2); }
.manual-conteo { margin-left: auto; background: var(--surface2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: 12px; color: var(--muted); }
.seccion-head { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; letter-spacing: -.01em; border-bottom: 1px solid var(--line); padding-bottom: 8px; margin: 22px 0 4px; }
.manual-subcopy { font-size: 12.5px; margin: 0 0 12px; }
.manual-resumen { font-size: 15px; font-weight: 600; margin: 4px 0 6px; }
.manual-resumen .r-pend { color: var(--warn); }
.empty-elegante { padding: 22px; text-align: center; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); font-size: 13.5px; }
.logo-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.logo-row:last-child { border-bottom: 0; }
.logo-prev { flex: 0 0 84px; height: 56px; display: flex; align-items: center; justify-content: center; background: #0b0b0d; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.logo-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-prev .muted { font-size: 11px; }
.logo-info { flex: 1 1 auto; }
.logo-acc { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.logo-acc label.small-btn { cursor: pointer; }
/* Modal de edición de embajador */
.amb-ov { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.amb-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px 22px 20px; width: 100%; max-width: 480px; box-shadow: 0 24px 60px rgba(0,0,0,.3); }
.amb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.amb-head h3 { margin: 0 0 3px; font-size: 17px; letter-spacing: -.01em; }
.amb-x { background: none; border: none; font-size: 18px; color: var(--muted); cursor: pointer; line-height: 1; padding: 2px 4px; min-height: 0; }
.amb-x:hover { color: var(--text); }
.amb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 14px; margin-top: 16px; }
.amb-grid .full { grid-column: 1 / -1; }
.amb-grid label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.amb-grid input { width: 100%; box-sizing: border-box; }
.amb-hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.amb-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
@media (max-width: 480px) { .amb-grid { grid-template-columns: 1fr; } }
.amb-grupos { margin-top: 16px; }
.amb-grupos > label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.amb-grupos-list { display: flex; flex-wrap: wrap; gap: 8px; }
.amb-grupo { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13.5px; cursor: pointer; user-select: none; }
.amb-grupo:has(input:checked) { border-color: var(--acento); background: color-mix(in srgb, var(--acento) 8%, transparent); }
.amb-grupo input { margin: 0; accent-color: var(--acento); }
.amb-grupo .brand-dot { display: inline-block; }
.manual-tarea-cuerpo { padding: 4px 16px 14px; }
.manual-tarea-cuerpo .story-card { box-shadow: none; }
.story-card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 12px; box-shadow: var(--sombra); }
.story-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.story-head b { font-size: 15px; }
.story-thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.story-thumbs a img { height: 190px; border-radius: 8px; border: 1px solid var(--line); display: block; }
.story-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-bad { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-ok:hover { background: var(--ok); opacity: .9; }
.btn-bad:hover { background: var(--bad); opacity: .9; }

.amb-row-inactive { opacity: .45; }
.small-btn { padding: 5px 10px; font-size: 12px; min-height: 32px; }
.miniatura-caida { display: inline-block; padding: 8px 10px; font-size: 12px; color: var(--muted); background: var(--surface2); border: 1px dashed var(--line); border-radius: 8px; }
/* Comentarios */
.com-filtros { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 14px; }
.com-chip { border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 999px; padding: 5px 12px; font-size: 13px; cursor: pointer; }
.com-chip.activo { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 500; }
.com-item { border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 8px; padding: 10px 14px; margin-bottom: 10px; background: var(--card); }
.com-item.com-embajador { border-left-color: var(--muted); }
.com-item.com-cliente { border-left-color: var(--warn); }
.com-item.com-trabajador { border-left-color: var(--ok); }
.com-cab { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; font-size: 14px; }
.com-badge { font-size: 11px; background: var(--surface2); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; color: var(--muted); }
.com-texto { white-space: pre-wrap; line-height: 1.45; }
/* Evento del día */
.ev-banner { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--ok); border-radius: 10px; padding: 12px 16px; margin-bottom: 14px; font-size: 15px; }
.ev-banner.ev-sin { border-left-color: var(--muted); color: var(--muted); }
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-top: 12px; }
.ev-card { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: var(--card); display: flex; flex-direction: column; gap: 8px; }
.ev-card.ev-on { border-color: var(--ok); }
.ev-cab { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.ev-estado { font-size: 14px; line-height: 1.5; }
.ev-card button { align-self: flex-start; }
/* Caja */
.cajf { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; font-size: 13px; color: var(--muted); }
.cajf input { min-width: 150px; }
.mny { text-align: right; font-variant-numeric: tabular-nums; }
.caj-sub { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.caj-sub-cab { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.caj-mov { display: flex; gap: 8px; margin-bottom: 6px; }
.caj-mov input:first-child { flex: 1; }
.caj-mov input.mny { max-width: 130px; }
.caj-calc { margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; background: var(--surface2); }
.caj-linea { display: flex; justify-content: space-between; align-items: baseline; padding: 5px 0; gap: 12px; }
.caj-dif { font-size: 18px; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); margin: 6px 0; padding: 10px 0; }
.caj-ok { color: var(--ok); font-weight: 700; }
.caj-sobra { color: var(--warn); font-weight: 700; }
.caj-falta { color: var(--bad); font-weight: 700; }
.caj-resumen .caj-res-cab { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.caj-msg { margin-top: 16px; background: var(--surface2); border-radius: 10px; padding: 14px 16px; text-align: center; line-height: 1.5; }
.caj-mov-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 2px 0 10px; font-size: 12px; }
.caj-mov-trab { max-width: 220px; font-size: 13px; }
.caj-check { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 4px 0; cursor: pointer; }
.caj-check input { width: auto; min-width: 0; }
.caj-detalle { border: 1px solid var(--line); border-radius: 10px; padding: 6px 14px; margin-bottom: 10px; background: var(--card); }
.caj-detalle summary { cursor: pointer; padding: 8px 0; display: flex; align-items: center; gap: 8px; font-size: 15px; list-style: none; }
.caj-detalle summary::-webkit-details-marker { display: none; }
.caj-detalle summary::before { content: '▸'; color: var(--muted); }
.caj-detalle[open] summary::before { content: '▾'; }
.caj-det-estado { margin-left: auto; font-size: 13px; font-weight: 600; }
.caj-linea-min { padding: 3px 0; font-size: 14px; }
.caj-puntos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.caj-punto { display: inline-flex; align-items: center; gap: 6px; background: var(--surface2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; font-size: 13px; }
.caj-punto a { color: var(--bad); cursor: pointer; font-weight: 700; }
.caj-prop-total { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; background: var(--surface2); }
.caj-prop-suma { border-top: 1px dashed var(--line); margin-top: 4px; padding-top: 8px; font-weight: 700; }
.liq-pagar { color: var(--ok); font-variant-numeric: tabular-nums; }
.liq-ajuste { display: inline-block; font-size: 11px; background: var(--surface2); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; margin: 2px 2px 0 0; }
.liq-ajuste a { color: var(--bad); cursor: pointer; font-weight: 700; margin-left: 2px; }
.cruce-alerta td { background: var(--surface2); color: var(--bad); font-weight: 600; }
.cruce-sobra td { color: var(--muted); }
/* Asistencia (calendario) */
.asis-nav { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.asis-tabla { width: 100%; border-collapse: collapse; }
.asis-tabla th, .asis-tabla td { text-align: center; padding: 8px 6px; border: 1px solid var(--line); font-size: 13px; }
.asis-tabla thead th { color: var(--muted); font-weight: 600; }
.asis-tabla .asis-nom { text-align: left; white-space: nowrap; font-size: 13px; }
.asis-tabla .asis-hoy { color: var(--text); font-weight: 700; }
.asis-si { background: var(--surface2); color: var(--ok); font-weight: 700; cursor: pointer; }
.asis-si:hover { filter: brightness(0.96); }
.asis-no { color: var(--muted); opacity: .45; cursor: pointer; }
.asis-no:hover { background: var(--surface2); opacity: 1; }
.asis-hora { font-weight: 400; font-size: 11px; color: var(--muted); }
.asis-tot { font-weight: 700; font-variant-numeric: tabular-nums; }
.asis-link { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.asis-url { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.asis-url code { background: var(--surface2); padding: 8px 12px; border-radius: 8px; font-size: 14px; word-break: break-all; }
/* Recetas */
.rec-ings { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.rec-ing { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rec-ing select { min-width: 180px; flex: 1; }
.rec-ing label { display: flex; align-items: center; gap: 6px; font-size: 13px; }
/* Barra / inventario */
.barra-buscar { width: 100%; box-sizing: border-box; margin-top: 10px; position: sticky; top: 6px; z-index: 3; }
.barra-lista { margin-top: 8px; }
.barra-prod { border-top: 1px solid var(--line); padding: 10px 0; }
.barra-prod-nom { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.barra-ml { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.barra-prod-in { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.barra-abiertas { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.barra-ab { display: inline-flex; align-items: center; gap: 2px; }

/* ---------- Avisos ---------- */
#toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 100; max-width: 380px; }
.toast { padding: 12px 14px; border-radius: 8px; font-size: 13.5px; background: var(--card); color: var(--text); border: 1px solid var(--line); border-left-width: 3px; box-shadow: 0 4px 16px rgba(0, 0, 0, .18); animation: toast-in .2s ease; }
.toast.error { border-left-color: var(--bad); }
.toast.warn { border-left-color: var(--warn); }
.toast.ok { border-left-color: var(--ok); }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

.onboarding ol { margin: 8px 0 0 20px; line-height: 2; font-size: 14.5px; }

/* ---------- Tarea de hoy (carga admin) ---------- */
.th-campo { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.th-campo:first-child { margin-top: 4px; }
.th-input { width: 100%; box-sizing: border-box; }

/* ---------- Cajas de configuración dentro de marcas ---------- */
.auto-box { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding: 10px 12px; background: var(--surface2); border: 1px solid var(--line); border-radius: 8px; font-size: 13.5px; }
.promo-dias { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 6px 0; }
.promo-dia { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; white-space: nowrap; }
.promo-dia input { margin: 0; }
.dia-chk { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; color: var(--muted); }
#rep-rachas select { padding: 4px 6px; }
.acceso-marcas { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.importar-box { margin-top: 10px; padding: 12px; background: var(--surface2); border: 1px solid var(--line); border-radius: 8px; }

/* Franja del modo de pruebas (visible para todos mientras dura la prueba) */
.banner-prueba { position: relative; z-index: 9; text-align: center; padding: 9px 14px; font-size: 13.5px;
  color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, var(--bg));
  border-bottom: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); }
/* Cartel grande de "noche completa": más peso visual, lo ve todo el equipo al entrar. */
.banner-prueba.banner-noche { padding: 13px 16px; font-size: 14px; letter-spacing: .02em; line-height: 1.4;
  color: #fff; background: color-mix(in srgb, var(--warn) 82%, #000);
  border-bottom: 2px solid color-mix(in srgb, var(--warn) 55%, #000); }
/* Escenario estrella de la lista de pruebas: destacado con borde de acento. */
.pr-esc-estrella { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 8%, var(--card)); }
.pr-esc-estrella:hover { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, var(--card)); }

/* Barra de progreso de la revisión */
.rp-barra { height: 8px; background: var(--surface2); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.rp-relleno { height: 100%; width: 0%; background: var(--acento); border-radius: 99px; transition: width 1.4s ease; }
.importar-box textarea { width: 100%; padding: 10px; font-family: inherit; margin: 8px 0; resize: vertical; }

/* ---------- Pantalla de puerta (celular, de noche) ---------- */
.pt-buscador { width: 100%; padding: 15px; font-size: 19px; border-radius: 10px; margin-top: 6px; }
/* Tarjeta de embajador en puerta/caja: borde más marcado y separación clara para que no se enreden entre sí */
.pt-card { border-radius: 12px; border: 2px solid color-mix(in srgb, var(--muted) 38%, var(--line)); margin-bottom: 16px; box-shadow: var(--sombra); }
.pt-card:last-child { margin-bottom: 0; }
/* Campos deshabilitados: se ven claramente bloqueados */
input:disabled, textarea:disabled, select:disabled { opacity: .55; cursor: not-allowed; background: var(--surface2); }
.caj-pe-campos.bloqueado { opacity: .5; }
.pt-nombre { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pt-user { font-size: 16px; color: var(--muted); }
.pt-marcas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.pt-marca { flex: 1; min-width: 240px; border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: var(--surface2); }
.pt-marca-head { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.pt-pct { font-size: 42px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.pt-alerta { color: var(--bad); font-weight: 600; margin: 4px 0; }
.pt-info { margin-top: 10px; padding: 10px 12px; background: color-mix(in srgb, var(--ok) 10%, var(--card)); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); border-radius: 8px; font-size: 14.5px; font-weight: 600; color: var(--ok); }
.pt-chips { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.pt-invitados { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.pt-promo { width: 100%; padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.pt-promo-ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, var(--card)); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); }
.pt-promo-no { color: var(--muted); background: var(--surface2); border: 1px solid var(--line); }
.pt-inv-botones { display: flex; gap: 8px; flex-wrap: wrap; }
.pt-inv-botones button { min-width: 52px; min-height: 52px; font-size: 20px; font-weight: 600; border-radius: 10px; }

/* Selector Embajadores / Contador (guardias) */
.pt-switch { display: flex; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 14px; }
.pt-switch button { flex: 1; padding: 13px; font-size: 16px; border: none; border-radius: 0; background: var(--card); color: var(--muted); }
.pt-switch button.activo { background: var(--acento); color: var(--acento-text); font-weight: 600; }
/* Variante con muchas pestañas (Barra: 6): scroll horizontal en vez de envolver en varias líneas */
.pt-switch-scroll { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.pt-switch-scroll::-webkit-scrollbar { display: none; }
.pt-switch-scroll button { flex: 0 0 auto; white-space: nowrap; font-size: 14px; padding: 12px 16px; }
/* Cierre de caja: los dos campos de arriba (nombre + puesto) crecen y no se apilan a la izquierda */
/* Solo en desktop: reparte los campos del cierre (en móvil la fila es columna y esto se volvía ALTURA). */
@media (min-width: 721px) { #caja-cont .form-row > .cajf { flex: 1 1 180px; } }
/* El cuadro del monto ocupa todo el ancho de su campo (se ve mejor y calza con el resto). */
#caja-cont .cajf .mny { width: 100%; box-sizing: border-box; max-width: none; }

/* Contador de gente de la noche */
.contador-box { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 26px 16px; text-align: center; }
.contador-num { font-size: 96px; font-weight: 700; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.contador-mas { width: 100%; max-width: 420px; min-height: 170px; font-size: 44px; font-weight: 700; border-radius: 16px; background: var(--ok); border-color: var(--ok); color: #fff; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.contador-mas:hover { background: var(--ok); opacity: .92; }
.contador-mas:active { transform: scale(.98); }
.contador-menos { padding: 10px 18px; font-size: 14px; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); background: transparent; touch-action: manipulation; -webkit-user-select: none; user-select: none; }

/* ---------- Modo rápido de listas (puerta) ---------- */
#pt-rapido { margin: 12px 0; }
.rap-toggle { width: 100%; padding: 15px; border-radius: 14px; font-size: 15px; font-weight: 800; letter-spacing: .03em; border: 2px solid var(--acento); background: var(--acento-weak); color: var(--acento); cursor: pointer; touch-action: manipulation; }
.rap-toggle.on { border-color: #16a34a; background: color-mix(in srgb, #16a34a 14%, var(--card)); color: #15803d; }
.rap-botones { display: flex; gap: 12px; margin-top: 12px; }
.rap-ok, .rap-no { flex: 1; min-width: 0; min-height: 130px; border: none; border-radius: 16px; font-size: 25px; font-weight: 900; letter-spacing: .02em; color: #fff; cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.rap-ok { background: #16a34a; }
.rap-no { background: #dc2626; }
.rap-ok:active, .rap-no:active { transform: scale(.98); }
.rap-warn { margin-top: 12px; padding: 11px 14px; border-radius: 12px; background: #c81e1e; color: #fff; font-size: 12.5px; font-weight: 800; line-height: 1.4; text-align: center; border: 2px solid #7f1010; }
/* Overlay a pantalla completa al aceptar/rechazar */
.rap-ov { position: fixed; inset: 0; z-index: 3000; display: none; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #fff; padding: 24px; cursor: pointer; -webkit-user-select: none; user-select: none; }
.rap-ov.ok { background: #16a34a; }
.rap-ov.no { background: #dc2626; }
.rap-ov .rap-ov-ic { font-size: 96px; font-weight: 900; line-height: 1; }
.rap-ov .rap-ov-txt { font-size: 34px; font-weight: 900; letter-spacing: .04em; margin-top: 14px; max-width: 12ch; }
.rap-ov .rap-ov-tap { margin-top: 22px; font-size: 15px; font-weight: 600; opacity: .9; }
.contador-menos:active { transform: scale(.97); }

/* ---------- Cumpleaños ---------- */
.cumple-cards { display: flex; gap: 12px; flex-wrap: wrap; }
.cumple-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; min-width: 200px; background: var(--card); }
.cumple-fecha { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; }
.cal-wrap { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; min-width: 560px; }
.cal-dow { text-align: center; font-size: 12px; color: var(--muted); font-weight: 500; padding: 4px; }
.cal-cell { min-height: 66px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; background: var(--card); }
.cal-empty { border: none; background: none; }
.cal-num { font-size: 12.5px; color: var(--muted); }
.cal-today { border-color: var(--text); }
.cal-hasbday { background: var(--surface2); cursor: pointer; }
.cal-hasbday:hover { border-color: var(--text); }
.cal-sel { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.cal-bdays { font-weight: 600; font-size: 13px; }
.cal-names { font-size: 11px; color: var(--muted); line-height: 1.3; }
.cal-det { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--card); }
.cal-det h4 { margin: 0 0 8px; font-size: 14px; }
.cal-det-fila { padding: 5px 0; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.cal-det-fila:first-of-type { border-top: none; }

/* ---------- Movimiento respetuoso ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Adaptación a celular ---------- */
@media (max-width: 720px) {
  main { padding: 12px; }
  header { padding: 10px 12px; gap: 10px; }
  .logo { font-size: 14px; }
  nav { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  nav::-webkit-scrollbar { display: none; }
  nav button { white-space: nowrap; padding: 11px 14px; min-height: 44px; }
  #quien { margin-left: auto; font-size: 12px; }
  input, select, textarea { font-size: 16px; }
  .panel-box { padding: 13px; overflow-x: auto; }
  table { min-width: 500px; }
  .toolbar { padding: 10px; gap: 8px; }
  .small-btn { padding: 9px 12px; font-size: 13px; min-height: 40px; }
  .cards { gap: var(--sp-2); grid-template-columns: 1fr 1fr; }
  .card { min-width: 0; padding: 12px 14px; }
  #toasts { left: 12px; right: 12px; max-width: none; }
  .pt-pct { font-size: 36px; }
  .contador-num { font-size: 84px; }
  .contador-mas { min-height: 44vh; }
  /* Pedido de Vicente: en celular los formularios y barras se apilan en COLUMNA y sus controles ocupan
     todo el ancho (más simétrico y fácil de tocar). Se excluyen las filas chicas en línea de Caja/Barra. */
  .form-row, .toolbar, .emb-form, .cat-form, .dj-add { flex-direction: column; align-items: stretch; }
  .form-row > *, .toolbar > *, .emb-form > *, .cat-form > *, .dj-add > * { width: 100%; min-width: 0; max-width: none !important; }
  /* Inputs metidos dentro de un <label> también a ancho completo (Revisión: opciones; Turnos: programar) */
  .form-row label input:not(.mny), .form-row label select { width: 100%; max-width: none !important; }
  #caja-cont .cajf .mny { width: 100% !important; max-width: none !important; } /* monto del cierre a ancho completo en celular */
  .lst-kpis { grid-template-columns: 1fr 1fr; } /* KPIs de Listas: 2x2 en vez de 4 apretadas */
  .lst-kpis.grande .k { font-size: 28px; }
  /* Botón de acción PRIMARIA a ancho completo, venciendo los max-width fijos puestos a mano */
  .panel-box button.primary, .emb-form button, .cat-form button, .form-col button.primary { width: 100% !important; max-width: none !important; min-height: 48px; }
}

/* ---------- Rama LISTAS ---------- */
.lst-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 12px; background: var(--bg); }
.lst-card:last-child { margin-bottom: 0; }
.lst-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
/* Controles a ancho completo (flujo de Listas por etapas: Ingresar / Crear / Estadísticas) */
.lst-full { width: 100%; box-sizing: border-box; display: block; margin: 6px 0 18px; }
button.lst-full { margin: 16px 0 0; min-height: 48px; font-weight: 600; }
/* Detalles estilo Relevent/Vendeme: asterisco en obligatorios, ícono dentro del campo, botón flotante */
.req::after { content: " *"; color: var(--bad); font-weight: 700; }
.ast { color: var(--bad); font-weight: 700; }
/* Escenarios del modo de pruebas */
.pr-escs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.pr-esc { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left; padding: 14px; border: 1px solid var(--line); border-radius: var(--radio-lg); background: var(--card); cursor: pointer; }
.pr-esc:hover { border-color: var(--muted); background: var(--surface2); }
.pr-esc b { font-size: 15px; }
.pr-esc span { color: var(--muted); font-size: 13px; font-weight: 400; }
.inp-ico { position: relative; display: block; }
.inp-ico > input { padding-right: 40px; }
.inp-ico > .ico { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); display: inline-flex; pointer-events: none; }
.inp-ico > .ico.clear { pointer-events: auto; cursor: pointer; background: none; border: none; padding: 4px; min-height: 0; border-radius: 999px; }
.inp-ico > .ico.clear:hover { color: var(--text); background: var(--surface2); }
.fab { position: fixed; right: 16px; bottom: 16px; z-index: 40; display: inline-flex; align-items: center; gap: 8px; padding: 13px 20px; border-radius: 999px; background: var(--acento); color: var(--acento-text); border: none; font-weight: 600; font-size: 15px; box-shadow: 0 6px 20px rgba(0,0,0,.28); min-height: 0; }
.fab:hover { background: var(--acento); opacity: .92; }
@media (max-width: 720px) { .fab { right: 14px; bottom: 14px; } }
/* FAB de un solo "+" (agenda de turnos): cuadrado redondeado, como una app de eventos. */
.fab.fab-mas, #adm-fab { width: 58px; height: 58px; padding: 0; border-radius: 18px; justify-content: center; font-size: 30px; font-weight: 400; line-height: 1; }

/* ---------- Agenda de turnos (tarjetas estilo evento) ---------- */
.ev-cards { display: flex; flex-direction: column; gap: 12px; }
/* Dos columnas: bloque de fecha (altura completa) + info alineada en una sola columna vertical. */
.ev-card { display: grid; grid-template-columns: 104px 1fr; align-items: stretch; background: var(--card); border: 1px solid var(--line); border-radius: var(--radio-lg); overflow: hidden; padding: 0; gap: 0; }
.ev-card.ev-hoy { border-color: color-mix(in srgb, var(--ok) 50%, var(--line)); }
.ev-card.ev-click { cursor: pointer; transition: border-color .12s; }
.ev-card.ev-click:hover { border-color: var(--muted); }
.ev-card.ev-sel { border-color: var(--acento); box-shadow: inset 0 0 0 1px var(--acento); }
.ev-fecha { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 16px 8px; background: var(--surface2); border-right: 1px solid var(--line); text-align: center; }
.ev-dia { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.ev-num { font-size: 38px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.ev-mes { font-size: 12.5px; color: var(--muted); }
.ev-info { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 15px 18px; min-width: 0; }
.ev-eyebrow { display: flex; align-items: center; gap: 8px; }
.ev-hoy-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); padding: 2px 8px; border-radius: 999px; }
.ev-monto { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; line-height: 1.05; }
.ev-monto-vacio { font-size: 22px; font-weight: 700; }
.ev-sub { font-size: 12.5px; color: var(--muted); }
.ev-acciones { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.small-btn.ev-iniciar { background: var(--acento); border-color: var(--acento); color: var(--acento-text); font-weight: 700; }
.small-btn.ev-iniciar:hover { opacity: .92; background: var(--acento); }
.ev-estado { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ev-estado::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.ev-estado.est-abierto { color: var(--ok); } .ev-estado.est-abierto::before { background: var(--ok); }
.ev-estado.est-programado { color: var(--warn); } .ev-estado.est-programado::before { background: var(--warn); }
.ev-estado.est-cerrado { color: var(--muted); } .ev-estado.est-cerrado::before { background: var(--muted); }
@media (max-width: 720px) { .ev-card { grid-template-columns: 84px 1fr; } .ev-fecha { padding: 14px 4px; } .ev-num { font-size: 30px; } .ev-info { padding: 14px 14px; } }
.lst-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.lst-kpis .k { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.lst-kpis.grande .k { font-size: 34px; }
.lst-kpis .l { font-size: 11.5px; }
.lst-fila { display: flex; align-items: center; justify-content: space-between; padding: 12px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.lst-fila:last-child { border-bottom: 0; }
.lst-fila:hover { background: var(--surface2); }
.lst-detalle-head { margin-bottom: 12px; }
.lst-listas .lst-lista-fila { display: flex; align-items: center; justify-content: space-between; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.lst-listas .lst-lista-fila:last-child { border-bottom: 0; }
.lst-tabla-wrap { overflow-x: auto; }
.lst-tabla { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.lst-tabla th { text-align: left; color: var(--muted); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.lst-tabla td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
/* Puerta de listas */
.lp-found { border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: var(--bg); }
.lp-nombre { font-size: 24px; font-weight: 800; }
.lp-meta { margin-top: 8px; font-size: 14px; }
.lp-btns { display: flex; gap: 12px; margin-top: 16px; }
.lp-btns button { flex: 1; padding: 18px; font-size: 18px; font-weight: 700; border-radius: 12px; border: none; cursor: pointer; color: #fff; }
.lp-in { background: #16a34a; }
.lp-out { background: #dc2626; }
.lp-in:hover { background: #15803d; } /* mantener verde/rojo al pasar el mouse (si no, la regla genérica los pone grises) */
.lp-out:hover { background: #b91c1c; }
.lp-ya { margin-top: 12px; font-weight: 700; font-size: 16px; }
.lp-nofound { border: 1px solid var(--bad); color: var(--bad); border-radius: 14px; padding: 20px; text-align: center; font-size: 18px; }
.lp-done { text-align: center; font-size: 28px; font-weight: 800; padding: 30px 0; border-radius: 14px; color: #fff; }
.lp-done.in { background: #16a34a; }
.lp-done.out { background: #dc2626; }
.lp-scan { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lp-scan-video { width: 100%; max-width: 380px; border-radius: 14px; overflow: hidden; background: #000; aspect-ratio: 4/3; }
.lp-scan video { width: 100%; height: 100%; background: #000; object-fit: cover; display: block; transform-origin: center; }
.lp-scan-ctrls { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 10px; }
.lp-zoom-wrap { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.lp-zoom-wrap input[type="range"] { flex: 1; accent-color: var(--acento); height: 26px; }
#lp-zoom-val { min-width: 34px; text-align: right; font-weight: 700; font-size: 13px; color: var(--muted); }
.lp-scan-botones { display: flex; gap: 8px; }
.lp-cbtn { flex: 1; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-weight: 700; font-size: 14px; }
.lp-cbtn.on { background: var(--acento); color: var(--acento-text); border-color: var(--acento); }
.lp-scan-hint { color: var(--muted); font-size: 13px; text-align: center; }

/* ---------- Registro de cumpleaños ---------- */
.cpl-check { display: flex; gap: 8px; align-items: center; margin-top: 14px; font-size: 14px; color: var(--text); cursor: pointer; }
.cpl-check input { width: auto; }
.cpl-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-top: 12px; background: var(--bg); }
.cpl-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cpl-del { background: none; border: none; color: var(--bad); cursor: pointer; font-size: 13px; padding: 4px 6px; }
.cpl-acciones { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.cpl-editar { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 13px; padding: 4px 6px; }
.cpl-editar:hover { color: var(--text); }
.cpl-edit { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.cpl-edit input:not([type=checkbox]) { width: 100%; }
.cpl-edit label { font-size: 12px; margin-top: 4px; }
.cpl-edit .cpl-check { margin-top: 12px; font-size: 14px; }
.cpl-edit .cpl-check input[type=checkbox] { width: auto; flex: none; }
.cpl-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cpl-chips a.chip { text-decoration: none; }
.cpl-prop { margin-top: 10px; padding: 10px 12px; background: var(--surface2); border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; }
.rol-sel { font-size: 12.5px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--text); }

/* ---------- Detalles de la semana ---------- */
.sem-head { display: flex; flex-direction: column; gap: 10px; }
.sem-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.sem-titulo { font-weight: 700; font-size: 16px; }
.dia-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; background: var(--card); }
.dia-card.dia-hoy { border-color: var(--text); }
/* Resumen de la semana: bloque por día con secciones desplegables */
.res-dia { margin-bottom: 12px; }
.res-det { border: 1px solid var(--line); border-radius: 10px; margin-top: 8px; background: var(--surface2); overflow: hidden; }
.res-det > summary { cursor: pointer; padding: 10px 12px; font-weight: 700; font-size: 14px; list-style: none; display: flex; align-items: center; gap: 8px; }
.res-det > summary::-webkit-details-marker { display: none; }
.res-det > summary::after { content: '⌄'; margin-left: auto; color: var(--muted); font-size: 16px; transition: transform .15s; }
.res-det[open] > summary::after { transform: rotate(180deg); }
.res-det > summary:hover { background: var(--line); }
.res-body { padding: 4px 12px 12px; font-size: 13.5px; }
.res-fila { padding: 6px 0; border-bottom: 1px solid var(--line); }
.res-fila:last-child { border-bottom: 0; }
.res-sub { font-size: 12.5px; margin-top: 2px; padding-left: 6px; }
.dia-head { font-weight: 700; font-size: 15px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.dia-sec { margin-top: 12px; }
.dia-sec > label { display: block; margin-bottom: 5px; }
.dia-promo { width: 100%; }
.dj-fila { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.dj-fila:last-child { border-bottom: 0; }
.dj-add { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.dj-add input { flex: 1; min-width: 120px; }
.dj-add input[type=number] { max-width: 120px; flex: 0 0 auto; }
/* DJ con sus costos extra (comida/hotel/traslado) */
.dj-bloque { padding: 5px 0; border-bottom: 1px solid var(--line); }
.dj-bloque:last-child { border-bottom: 0; }
.dj-bloque .dj-fila { border-bottom: 0; padding-bottom: 2px; }
.dj-extra { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); padding: 2px 0 2px 18px; }
.dj-extra-add { margin: 4px 0 2px 18px; }
.dj-extra-add input { min-width: 100px; }
.dia-promo-ro { font-size: 14px; white-space: pre-wrap; line-height: 1.5; padding: 4px 0; }
.dia-add-cumple { display: inline-block; margin-top: 8px; font-size: 13px; cursor: pointer; text-decoration: underline; }

/* ---------- Mantenciones / pedidos ---------- */
.mant-cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.mant-cat { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px 20px; cursor: pointer; transition: border-color .12s, transform .12s, box-shadow .12s; box-shadow: var(--sombra); min-height: 150px; }
.mant-cat:hover { border-color: var(--acento); transform: translateY(-2px); }
.mant-cat-ic { font-size: 34px; line-height: 1; }
.mant-cat-t { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.mant-cat-d { font-size: 13px; }
@media (max-width: 720px) { .mant-cats { grid-template-columns: 1fr; gap: 12px; } .mant-cat { min-height: 0; flex-direction: row; align-items: center; flex-wrap: wrap; } .mant-cat-ic { font-size: 28px; } .mant-cat-t { flex: 1; } .mant-cat-d { flex-basis: 100%; } }

.mant-add { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; margin-top: 10px; }
.mant-add-urg { flex: 1; min-width: 200px; }
.mant-range { width: 100%; accent-color: var(--acento); }
.mant-precio-in { max-width: 150px; }
.mant-urg-v { font-variant-numeric: tabular-nums; }
.mant-urg-v.urg-alta { color: var(--bad); } .mant-urg-v.urg-media { color: var(--warn); } .mant-urg-v.urg-baja { color: var(--ok); }

.mant-grupo { margin-bottom: 14px; }
.mant-gtit { font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 8px; padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.mant-gcount { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface2); border-radius: 20px; padding: 1px 9px; }
.mant-gtit.g-pend { color: var(--warn); } .mant-gtit.g-real { color: var(--text); } .mant-gtit.g-pag { color: var(--ok); }

.mant-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-top: 10px; background: var(--card); }
.mant-item-top { display: flex; align-items: flex-start; gap: 12px; }
.mant-urg { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.mant-urg.urg-alta { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad); }
.mant-urg.urg-media { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.mant-urg.urg-baja { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
/* Nivel de urgencia claro: etiqueta + barra + N/10 (para que no se confunda con una cantidad) */
.mant-urg-row { display: flex; align-items: center; gap: 8px; margin: 8px 0 2px; }
.mant-urg-lbl { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 700; flex: none; }
.mant-urg-bar { flex: 1; height: 7px; border-radius: 4px; background: var(--surface2); overflow: hidden; min-width: 60px; }
.mant-urg-bar > i { display: block; height: 100%; border-radius: 4px; }
.mant-urg-row.urg-alta .mant-urg-bar > i { background: var(--bad); } .mant-urg-row.urg-alta .mant-urg-n { color: var(--bad); }
.mant-urg-row.urg-media .mant-urg-bar > i { background: var(--warn); } .mant-urg-row.urg-media .mant-urg-n { color: var(--warn); }
.mant-urg-row.urg-baja .mant-urg-bar > i { background: var(--ok); } .mant-urg-row.urg-baja .mant-urg-n { color: var(--ok); }
.mant-urg-n { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }
.mant-fecha-in { max-width: 160px; }
.mant-fecha-chip { display: inline-block; font-size: 12.5px; color: var(--acento); background: var(--acento-weak); border-radius: 8px; padding: 4px 10px; margin-top: 8px; }
.mant-com { flex: 1; font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.mant-right { flex: none; display: flex; align-items: center; gap: 8px; }
.mant-precio { font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.mant-x { background: none; border: none; cursor: pointer; font-size: 15px; padding: 2px 4px; opacity: .7; }
.mant-x:hover { opacity: 1; }
.mant-acciones { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.mant-b { flex: 1; min-width: 90px; padding: 9px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.mant-b:hover:not(:disabled) { border-color: var(--acento); }
.mant-b.on { background: var(--acento); border-color: var(--acento); color: var(--acento-text); }
.mant-b:disabled { opacity: .45; cursor: not-allowed; }
.mant-b.primary-ghost { border-color: var(--acento); color: var(--acento); font-weight: 700; }
.mant-b.danger { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); color: var(--bad); }
.mant-meta { font-size: 12px; margin-top: 9px; }
/* Flujo por pasos + boletas */
.mant-paso { margin-top: 10px; }
.mant-inline { display: flex; gap: 8px; align-items: center; margin-top: 4px; flex-wrap: wrap; }
.mant-inline .mant-precio-in { flex: 0 0 auto; }
.mant-inline input[type=file] { flex: 1; min-width: 140px; font-size: 13px; }
.mant-hint { font-size: 12.5px; margin-top: 8px; }
.mant-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.mant-precio-est { font-size: 12.5px; color: var(--muted); text-decoration: line-through; opacity: .8; margin-right: 2px; }
.mant-fotos { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.mant-foto-link { font-size: 12.5px; color: var(--acento); text-decoration: none; font-weight: 600; }
.mant-foto-link:hover { text-decoration: underline; }
.bol-tipos { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 4px; }
.bol-tipo { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.bol-tipo input { width: auto; margin: 0; }
.bol-ic { flex: none; font-size: 24px; line-height: 1; width: 30px; text-align: center; }

/* ---------- Pulseras y covers ---------- */
.pc-cant { flex: none; min-width: 34px; height: 34px; padding: 0 8px; display: grid; place-items: center; border-radius: 9px; font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; background: var(--acento-weak); color: var(--acento); }
#pc-res { margin-top: 10px; }
.pc-persona { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; background: var(--surface2); }
.pc-marcas { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.pc-marca { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.pc-marca .brand-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.pc-vip { margin-top: 5px; font-size: 13px; padding: 6px 10px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--acento) 40%, transparent); background: color-mix(in srgb, var(--acento) 7%, var(--card)); }
.pc-vip-covers { margin-top: 6px; font-size: 13px; }
.pc-vip-covers .btn-ok { margin-left: 8px; }
/* Botón llamativo "quiero dar covers/descuento" y selector de modo */
.pc-cta { -webkit-appearance: none; appearance: none; width: 100%; padding: 16px; border-radius: 14px; font-size: 15px; font-weight: 800; letter-spacing: .02em; line-height: 1.3; color: var(--acento-text, #fff); background: var(--acento); border: none; cursor: pointer; box-shadow: var(--sombra); touch-action: manipulation; text-align: center; }
.pc-cta:hover { opacity: .93; }
/* Entrega directa: mismo botón morado que el CTA, pero como <summary> (quita el triángulo nativo) */
.pc-directo { margin-top: 4px; }
summary.pc-cta { list-style: none; display: block; }
summary.pc-cta::-webkit-details-marker { display: none; }
summary.pc-cta::marker { content: ''; }
.pc-cta-sub { font-weight: 600; opacity: .85; }
details.pc-directo[open] > summary.pc-cta { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.pc-modos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.pc-modo { flex: 1; min-width: 120px; padding: 12px; border-radius: 11px; font-size: 13.5px; font-weight: 700; border: 1.5px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; touch-action: manipulation; }
.pc-modo.on { border-color: var(--acento); background: var(--acento); color: var(--acento-text); }

/* ---------- Ajustes de contraste y toque (auditoría de diseño) ---------- */
/* En modo oscuro, los botones de acción de la noche usan verde/rojo SÓLIDOS (texto blanco legible). */
@media (prefers-color-scheme: dark) {
  .btn-ok, .contador-mas { background: #16a34a; border-color: #16a34a; color: #fff; }
  .btn-ok:hover, .contador-mas:hover { background: #15803d; opacity: 1; }
  .btn-bad { background: #dc2626; border-color: #dc2626; color: #fff; }
  .btn-bad:hover { background: #b91c1c; opacity: 1; }
  .contador-menos { color: #f87171; }
}
:root[data-theme="dark"] .btn-ok, :root[data-theme="dark"] .contador-mas { background: #16a34a; border-color: #16a34a; color: #fff; }
:root[data-theme="dark"] .btn-bad { background: #dc2626; border-color: #dc2626; color: #fff; }
:root[data-theme="light"] .btn-ok { background: var(--ok); border-color: var(--ok); }
:root[data-theme="light"] .btn-bad { background: var(--bad); border-color: var(--bad); }
/* Botones de acción de Puerta: área de toque cómoda para la noche. */
.pt-card .story-actions button { min-height: 52px; font-size: 16px; }
@media (max-width: 560px) { .pt-card .story-actions button { width: 100%; } }

/* ---------- Tablas anchas: primera columna fija al hacer scroll horizontal ---------- */
.scrollx { position: relative; }
.scrollx table td:first-child, .scrollx table th:first-child {
  position: sticky; left: 0; background: var(--card); z-index: 1;
}
.scrollx table thead th:first-child { z-index: 2; }

/* Íconos de línea del inicio (sobrios, monocromos) */
.area-icon svg { width: 26px; height: 26px; display: block; color: var(--muted); }
.rama-icon svg { width: 34px; height: 34px; display: block; color: var(--muted); }
.rama-mini .rama-icon svg { width: 24px; height: 24px; }
.area-card.abierta:hover .area-icon svg, .rama-card:hover .rama-icon svg { color: var(--text); }

/* ---------- Reportes: tablero (dashboard) ---------- */
.dash-head { position: sticky; top: 60px; z-index: 5; }
.dash-controls { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.seg button { border: none; border-radius: 0; background: transparent; color: var(--muted); padding: 7px 16px; font-size: 13.5px; }
.seg button.activo { background: var(--surface2); color: var(--text); font-weight: 500; }
.seg button:not(.activo):hover { color: var(--text); }
.dash-nav { display: flex; align-items: center; gap: 8px; }
.dash-rango { font-weight: 500; min-width: 168px; text-align: center; font-variant-numeric: tabular-nums; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 16px; }
.dash-card { border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 8px; min-height: 108px; }
.dash-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.dash-num { font-size: 30px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; margin-top: auto; }
.dash-sub { font-size: 12.5px; color: var(--muted); }
.dash-num-lock svg { width: 22px; height: 22px; color: var(--muted); }
.dash-card-lock { background: var(--surface2); }
.dash-card-click { cursor: pointer; transition: border-color .12s, transform .12s; }
.dash-card-click:hover { border-color: var(--acento); transform: translateY(-2px); }
.dash-chev { color: var(--acento); font-weight: 700; margin-left: 6px; }
/* Drill-down del reporte */
.dash-det-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.dash-det-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.det-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.det-stats > div { border: 1px solid var(--line); border-radius: 10px; padding: 12px 10px; text-align: center; background: var(--bg); }
.det-k { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.det-l { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.det-tabla { width: 100%; border-collapse: collapse; font-size: 13px; }
.det-tabla th { text-align: left; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 6px 10px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); }
.det-tabla td { padding: 8px 10px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.det-tabla tbody tr:nth-child(even) { background: color-mix(in srgb, var(--surface2) 45%, transparent); }
.det-quien { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.det-chip { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); white-space: nowrap; }
.det-chip.pago-g { color: var(--acento); border-color: color-mix(in srgb, var(--acento) 35%, var(--line)); }
.det-chip.pend { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
@media (max-width: 560px) { .det-stats { grid-template-columns: repeat(2, 1fr); } }
/* Tarjeta hero (venta total): el dato estrella, con el color de marca (como la verde de Vendeme). */
.dash-card-hero { grid-column: 1 / -1; background: var(--acento); border-color: var(--acento); align-items: center; text-align: center; padding: 22px 18px; }
.dash-card-hero .dash-label { color: color-mix(in srgb, var(--acento-text) 80%, transparent); }
.dash-card-hero .dash-num { color: var(--acento-text); font-size: 40px; font-weight: 800; margin-top: 4px; }
.dash-card-hero .dash-sub { color: color-mix(in srgb, var(--acento-text) 78%, transparent); }
.pex-form { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; margin-top: 8px; }
.cl-mover { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* ---------- Menú lateral (drawer) ---------- */
.btn-menu { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 34px; padding: 0; border: 1px solid var(--line); background: var(--card); border-radius: 8px; cursor: pointer; color: var(--text); }
.btn-menu svg { width: 20px; height: 20px; }
.btn-menu:hover { background: var(--surface2); }
.btn-menu:disabled { opacity: .6; cursor: default; }
.girando svg { animation: girar .6s linear; }
@keyframes girar { from { transform: rotate(0); } to { transform: rotate(360deg); } }
.drawer-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); opacity: 0; pointer-events: none; transition: opacity .18s; z-index: 40; }
.drawer-overlay.visible { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; left: 0; height: 100%; width: 270px; max-width: 82vw; background: var(--card); border-right: 1px solid var(--line); transform: translateX(-100%); transition: transform .2s ease; z-index: 50; overflow-y: auto; padding: 12px 12px 24px; box-shadow: var(--sombra); }
.drawer.abierto { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 12px; }
.drawer-logo { font-weight: 600; letter-spacing: .02em; }
.drawer-x { border: none; background: transparent; font-size: 18px; color: var(--muted); cursor: pointer; padding: 4px 8px; }
.drawer-x:hover { color: var(--text); }
.drawer-group { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 14px 10px 6px; }
.drawer-item { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; border: none; background: transparent; color: var(--text); padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.drawer-item:hover { background: var(--surface2); }
.drawer-item.activa { background: var(--surface2); font-weight: 500; box-shadow: inset 3px 0 0 var(--acento); }
.drawer-ico { display: inline-flex; width: 18px; height: 18px; color: var(--muted); flex: none; }
.drawer-ico svg { width: 18px; height: 18px; }
.drawer-item.activa .drawer-ico { color: var(--text); }
.drawer-item.bloqueada { color: var(--muted); cursor: not-allowed; opacity: .55; }
.drawer-item.bloqueada:hover { background: transparent; }
.drawer-lock { margin-left: auto; display: inline-flex; }
.drawer-lock svg { width: 14px; height: 14px; color: var(--muted); }
/* Pie del menú: contexto (local/marca), usuario y cerrar sesión. */
.drawer-foot { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.drawer-ctx { font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px; }
.drawer-ctx a { color: var(--muted); font-weight: 500; cursor: pointer; text-decoration: underline; }
.drawer-user { font-size: 13px; color: var(--muted); padding: 2px 6px; }
.drawer-salir { margin-top: 4px; border: 1px solid var(--line); background: transparent; color: var(--text); padding: 10px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 500; }
.drawer-salir:hover { background: var(--surface2); border-color: var(--bad); color: var(--bad); }

/* ---------- Tarjetas VIP ---------- */
.pt-vip { border-left: 3px solid var(--text); background: var(--surface2); border-radius: 8px; padding: 10px 12px; margin: 10px 0; }
.pt-vip-cab { display: flex; align-items: center; gap: 8px; }
.pt-vip-tag { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--text); color: var(--bg); border-radius: 4px; padding: 2px 7px; }
.pt-vip-benef { margin-top: 6px; font-size: 14px; line-height: 1.4; }
/* Beneficio por MISIÓN: se distingue del cover normal y del VIP con el acento indigo. */
.pt-vip.pt-mision { border-left-color: var(--acento); }
.pt-vip.pt-mision .pt-vip-tag { background: var(--acento); color: #fff; }
/* Panel admin de misiones: participaciones a revisar */
.mis-parts { display: flex; flex-direction: column; gap: 10px; }
.mis-part { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mis-part:last-child { border-bottom: 0; }
.mis-part-img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); flex-shrink: 0; }
.mis-part-info { flex: 1; min-width: 0; font-size: 14px; }
.mis-part-acc { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.mis-btn-ok, .mis-btn-no { padding: 7px 12px; font-size: 13px; border-radius: 8px; cursor: pointer; border: 1px solid var(--line); }
.mis-btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.mis-btn-no { background: transparent; color: var(--bad); border-color: var(--bad); }
.chip.no { color: var(--bad); }
.vip-form { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.vip-form > div { flex: 1 1 160px; min-width: 0; }
.vip-form input, .vip-form select { width: 100%; }
#vip-cont label.muted { display: block; margin-bottom: 4px; }
#vip-cont textarea { width: 100%; }
.vip-locales { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }

/* ---------- La Credencial: tarjeta de embajador (compartida: carta.html, listas.html, puerta) ---------- */
.mono { font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace; }
.cred { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.cred-lomo { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; display: flex; flex-direction: column; }
.cred-lomo span { flex: 1; }
.cred-cuerpo { padding: 24px 24px 22px 28px; }
.cred-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.cred-rotulo, .cred-id { font-size: 11px; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.cred-nombre { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; margin-top: 14px; text-wrap: balance; }
.cred-ig { color: var(--muted); font-size: 13px; margin-top: 5px; }
.cred-ledger { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface2); border: 1px solid var(--line); border-radius: 12px; margin: 18px 0 4px; overflow: hidden; }
.cred-ledger.solo { grid-template-columns: 1fr; }
.cred-lcell { padding: 14px 16px; }
.cred-ledger .cred-lcell + .cred-lcell { border-left: 1px solid var(--line); }
.cred-lcell .cred-n { font-size: 30px; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.cred-lcell .cred-l { font-size: 11px; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; margin-top: 7px; }
.cred-sec { font-size: 11px; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; display: flex; align-items: center; gap: 10px; margin: 18px 0 4px; }
.cred-sec::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.cred-marca-row { display: flex; gap: 11px; padding: 11px 0; border-top: 1px solid var(--line); }
.cred-marca-row:first-of-type { border-top: none; }
.cred-cap { width: 3px; border-radius: 2px; align-self: stretch; flex: none; }
.cred-marca-main { flex: 1; min-width: 0; }
.cred-marca-top { display: flex; align-items: baseline; gap: 8px; }
.cred-marca-nombre { font-weight: 500; font-size: 14.5px; }
.cred-pct { margin-left: auto; font-family: ui-monospace, Menlo, monospace; font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 500; }
.cred-bajo { font-family: ui-monospace, Menlo, monospace; font-size: 9px; letter-spacing: .06em; color: var(--warn); margin-left: 6px; }
.cred-meter { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin: 7px 0 6px; }
.cred-meter.bajo { box-shadow: inset 2px 0 0 var(--bad); }
.cred-meter.vacio { background: transparent; border: 1px dashed var(--line); }
.cred-meter > i { display: block; height: 100%; background: var(--text); }
@media (prefers-reduced-motion: no-preference) { .cred-meter > i { transition: width .55s cubic-bezier(.2,.7,.2,1); } }
.cred-marca-sub { font-size: 12px; color: var(--muted); }
.cred-benef { font-size: 12.5px; color: var(--text); margin-top: 5px; }
.cred-benef b { font-family: ui-monospace, Menlo, monospace; font-size: 10px; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin-right: 6px; }
.cred-pie { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.cred-pie a { color: var(--muted); text-transform: none; letter-spacing: 0; text-decoration: none; }
.pt-vip-covers { margin-top: 8px; font-size: 13px; }
.pt-vip-covers .btn-ok { margin-top: 6px; }
.pt-cumple-entrega { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.pt-cumple-entrega .btn-ok { margin-top: 0; }
.pt-cumple-cant { width: 70px; text-align: center; font-variant-numeric: tabular-nums; }
.barra-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-barra { display: inline-flex; align-items: center; gap: 6px; background: var(--surface2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 13px; }

/* ---- Flujo guiado del conteo de barra ---- */
.barra-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.barra-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left; padding: 14px; background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 12px; }
.barra-pick:hover { border-color: var(--muted); }
.barra-pick .bp-nom { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 15px; }
.bp-alerta { font-size: 11px; color: var(--warn); font-weight: 600; }
.be-borde-inicial { border-left-color: var(--muted); }
.be-borde-pedido { border-left-color: var(--warn); }
.be-borde-operando { border-left-color: var(--ok); }
.be-borde-cerrada { border-left-color: var(--line); opacity: .72; }
.barra-etapa { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; border-radius: 999px; padding: 2px 9px; font-weight: 600; border: 1px solid var(--line); background: var(--surface2); color: var(--muted); }
.be-pedido { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }
.be-operando { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.barra-flujo-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.bf-paso { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 7px; background: var(--primary); color: var(--primary-text); font-weight: 700; font-size: 13px; }
.barra-resumen-mini { display: flex; flex-wrap: wrap; gap: 16px; margin: 10px 0; padding: 10px 12px; background: var(--surface2); border-radius: 10px; font-size: 14px; }
.barra-menu-acc { display: grid; gap: 10px; }
.barra-menu-acc button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.barra-menu-acc button:hover { border-color: var(--muted); }
.barra-menu-acc button b { font-size: 15px; }
.barra-menu-acc .acc-final { border-color: color-mix(in srgb, var(--primary) 30%, var(--line)); background: color-mix(in srgb, var(--primary) 5%, var(--card)); }
.barra-recibir { margin: 12px 0; padding: 12px; border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--line)); border-radius: 12px; background: color-mix(in srgb, var(--warn) 6%, var(--card)); }
.tr-card { padding: 10px 0; border-top: 1px solid var(--line); }
.tr-card:first-of-type { border-top: none; }
.tr-items { font-size: 12.5px; margin-top: 2px; }
.small-btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
/* ---- Estado de barras (jefe/admin) ---- */
.est-barra { padding: 12px 0; border-top: 1px solid var(--line); }
.est-barra:first-of-type { border-top: none; }
.est-cab { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.est-pedido { margin-top: 5px; font-size: 13.5px; }
.est-nums { margin-top: 4px; font-size: 12px; }
/* ---- Alerta de descuadre entre turnos ---- */
.descuadre-alerta { margin-bottom: 14px; padding: 14px; border: 1px solid color-mix(in srgb, var(--bad) 45%, var(--line)); border-left: 3px solid var(--bad); border-radius: 12px; background: color-mix(in srgb, var(--bad) 6%, var(--card)); }
.descuadre-alerta h4 { margin: 0 0 6px; color: var(--bad); }
.descuadre-alerta p { margin: 0 0 10px; font-size: 13.5px; }
.dq-barra { padding: 8px 0; border-top: 1px solid color-mix(in srgb, var(--bad) 18%, var(--line)); }
.dq-cab { display: flex; gap: 10px; align-items: center; }
.dq-falta { color: var(--bad); font-weight: 700; font-size: 12.5px; }
.dq-sobra { color: var(--warn); font-weight: 700; font-size: 12.5px; }
.dq-items { font-size: 12px; margin-top: 3px; }
/* ---- Pantalla roja de RECHAZO en la puerta ---- */
.rechazo-full { position: fixed; inset: 0; z-index: 9999; background: #c81e1e; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 24px; animation: rechazo-in .1s ease; }
.rechazo-txt { color: #fff; font-size: clamp(30px, 9vw, 68px); font-weight: 800; text-align: center; line-height: 1.1; letter-spacing: .01em; text-transform: uppercase; }
@keyframes rechazo-in { from { opacity: .4; } to { opacity: 1; } }
/* ---- Alta de producto en el catálogo ---- */
.cat-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.cat-form .cajf { flex: 1; min-width: 140px; }
.cat-form button { min-height: 40px; }
/* ---- Herramienta agregar/eliminar embajador ---- */
.emb-form { display: flex; flex-wrap: wrap; gap: 10px; }
.emb-form .cajf { flex: 1; min-width: 150px; }
/* ---- Cuentas privadas (al final, plegado, en tarjetas) ---- */
.priv-sum { cursor: pointer; font-weight: 600; letter-spacing: .01em; }
.priv-lista { display: flex; flex-direction: column; gap: 8px; }
.priv-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface2); }
.priv-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.priv-card .small-btn { flex: none; white-space: nowrap; }

/* Registro de previas (panel dueño/admin) */
.prevadm-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.prevadm-stats > div { flex: 1 1 90px; text-align: center; padding: 12px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface2); }
.prevadm-stats b { display: block; font-size: 24px; font-weight: 800; }
.prevadm-stats span { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.prevadm-tags { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.prevadm-big { font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: var(--acento); color: var(--acento-text); }
.prevadm-big b { font-size: 15px; }
.prevadm-tag { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--surface2); border: 1px solid var(--line); }
.prevadm-tag.ok { color: var(--ok); } .prevadm-tag.pend { color: var(--acento); } .prevadm-tag.no { color: var(--bad); }
.prevadm-tabla { width: 100%; border-collapse: collapse; font-size: 13px; }
.prevadm-tabla th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.prevadm-tabla td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prevadm-tabla tr:last-child td { border-bottom: 0; }
.prevadm-b { font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.prevadm-b.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, var(--card)); }
.prevadm-b.no { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--card)); }
.prevadm-b.pend { color: var(--acento); background: color-mix(in srgb, var(--acento) 12%, var(--card)); }
.prevadm-wa { flex: none; padding: 8px 12px; border-radius: 10px; background: #25d366; color: #062e16; font-weight: 800; font-size: 13px; text-decoration: none; white-space: nowrap; }

/* Botón "tantear" y modal de pre-reporte (tanteo en vivo, no registra) */
.btn-tantear { padding: 10px 16px; border-radius: 10px; border: 1px solid var(--acento); background: transparent; color: var(--acento); font-weight: 700; font-size: 14px; cursor: pointer; }
.btn-tantear:hover { background: color-mix(in srgb, var(--acento) 10%, transparent); }
.btn-tantear:disabled { opacity: .5; cursor: default; }
.pre-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.pre-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 26px 24px; width: 100%; max-width: 440px; box-shadow: 0 24px 60px rgba(0,0,0,.3); text-align: center; }
.pre-kicker { font-size: 12px; font-weight: 800; letter-spacing: .12em; color: var(--acento); }
.pre-marca { font-size: 24px; font-weight: 800; margin-top: 6px; }
.pre-fecha { font-size: 13px; color: var(--muted); margin-top: 2px; }
.pre-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0 14px; }
.pre-stat { border: 1px solid var(--line); border-radius: 14px; padding: 14px 6px; background: var(--surface2); }
.pre-stat .pre-em { font-size: 20px; }
.pre-stat .pre-n { font-size: 32px; font-weight: 800; line-height: 1.1; margin: 2px 0; }
.pre-stat .pre-lab { font-size: 11px; color: var(--muted); line-height: 1.25; }
.pre-stat.ok .pre-n { color: var(--ok); }
.pre-stat.cap .pre-n { color: var(--acento); }
.pre-stat.dudas .pre-n { color: #b45309; }
.pre-stat.falta .pre-n { color: var(--bad); }
.pre-barra { height: 10px; border-radius: 999px; background: var(--surface2); border: 1px solid var(--line); overflow: hidden; }
.pre-barra-in { height: 100%; background: var(--acento); border-radius: 999px; }
.pre-total { font-size: 13px; color: var(--muted); margin-top: 8px; font-weight: 700; }
.pre-desglose { margin-top: 12px; text-align: left; border-top: 1px solid var(--line); padding-top: 10px; }
.pre-dm { font-size: 13px; padding: 4px 0; }
.pre-nota { margin-top: 16px; font-size: 12.5px; color: var(--muted); background: var(--surface2); border-radius: 10px; padding: 9px 11px; }
.pre-acciones { display: flex; gap: 10px; margin-top: 16px; }
.pre-acciones button { flex: 1; }
.pre-hint { font-size: 12px; margin-top: 10px; }


/* ==========================================================================
   NOCTA OS - CAPA CLARA PREMIUM . PASO 1: SISTEMA (tokens + tema)
   Pegar al FINAL de styles.css. Solo visual. Reversible (borrar el bloque).
   Gana por orden de cascada; NO edita ninguna linea existente.
   ========================================================================== */

/* 1a) Valores objetivo (mismos NOMBRES existentes + tokens aditivos).
       Suben todo el sistema al look del landing sin tocar componentes. */
:root {
  --radio: 10px; --radio-lg: 16px;
  --bg: #f6f7f9;
  --card: #ffffff;
  --card2: #fbfbfd;
  --surface2: #eef0f3;
  --text: #14161c;
  --muted: #5c6270;
  --muted2: #9aa0ac;
  --line: rgba(17,20,26,.09);
  --line2: rgba(17,20,26,.16);
  --line-hover: rgba(17,20,26,.16);
  --primary: #14161c; --primary-text: #ffffff;
  --acento: #4f46e5; --acento-text: #ffffff;
  --acento-weak: rgba(79,70,229,.09);
  --acento-bd: rgba(79,70,229,.18);
  --acento-ico: #4f46e5;
  --ok: #16a34a; --bad: #dc2626; --warn: #d97706;
  /* Relieve suave (doble capa) enrutado por token para poder anularlo en oscuro */
  --sombra:    0 1px 2px rgba(17,20,26,.04), 0 10px 30px -16px rgba(17,20,26,.16);
  --sombra-sm: 0 1px 2px rgba(17,20,26,.04);
  --sombra-md: 0 1px 2px rgba(17,20,26,.04), 0 10px 30px -16px rgba(17,20,26,.16);
  --sombra-lg: 0 2px 4px rgba(17,20,26,.05), 0 20px 44px -18px rgba(17,20,26,.26);
  --card-grad: linear-gradient(180deg, #ffffff, #fbfbfd);
  --radio-btn: 10px; --radio-card: 14px; --radio-panel: 18px;
  color-scheme: light;
}

/* 1b) FORZAR CLARO aunque el telefono este en modo oscuro.
       :root:not([data-theme="dark"]) (0,2,0) gana al :root del @media dark (0,1,0).
       Deja intacto el oscuro para quien ponga data-theme="dark" a mano. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="dark"]) {
    --bg:#f6f7f9; --card:#ffffff; --card2:#fbfbfd; --surface2:#eef0f3;
    --text:#14161c; --muted:#5c6270; --muted2:#9aa0ac;
    --line:rgba(17,20,26,.09); --line2:rgba(17,20,26,.16); --line-hover:rgba(17,20,26,.16);
    --primary:#14161c; --primary-text:#ffffff;
    --acento:#4f46e5; --acento-text:#ffffff;
    --acento-weak:rgba(79,70,229,.09); --acento-bd:rgba(79,70,229,.18); --acento-ico:#4f46e5;
    --ok:#16a34a; --bad:#dc2626; --warn:#d97706;
    --sombra:    0 1px 2px rgba(17,20,26,.04), 0 10px 30px -16px rgba(17,20,26,.16);
    --sombra-sm: 0 1px 2px rgba(17,20,26,.04);
    --sombra-md: 0 1px 2px rgba(17,20,26,.04), 0 10px 30px -16px rgba(17,20,26,.16);
    --sombra-lg: 0 2px 4px rgba(17,20,26,.05), 0 20px 44px -18px rgba(17,20,26,.26);
    --card-grad: linear-gradient(180deg, #ffffff, #fbfbfd);
  }
  /* Devolver los botones nocturnos verde/rojo al look claro al forzar claro */
  :root:not([data-theme="dark"]) .btn-ok  { background:var(--ok);  border-color:var(--ok);  color:#fff; }
  :root:not([data-theme="dark"]) .btn-bad { background:var(--bad); border-color:var(--bad); color:#fff; }
  :root:not([data-theme="dark"]) .contador-menos { color:var(--bad); }
}

/* 1c) Coherencia con el toggle explicito claro (mismos valores). */
:root[data-theme="light"] {
  --radio:10px; --radio-lg:16px;
  --bg:#f6f7f9; --card:#ffffff; --card2:#fbfbfd; --surface2:#eef0f3;
  --text:#14161c; --muted:#5c6270; --muted2:#9aa0ac;
  --line:rgba(17,20,26,.09); --line2:rgba(17,20,26,.16); --line-hover:rgba(17,20,26,.16);
  --acento-weak:rgba(79,70,229,.09); --acento-bd:rgba(79,70,229,.18); --acento-ico:#4f46e5;
  --sombra:0 1px 2px rgba(17,20,26,.04),0 10px 30px -16px rgba(17,20,26,.16);
  --sombra-sm:0 1px 2px rgba(17,20,26,.04);
  --sombra-md:0 1px 2px rgba(17,20,26,.04),0 10px 30px -16px rgba(17,20,26,.16);
  --sombra-lg:0 2px 4px rgba(17,20,26,.05),0 20px 44px -18px rgba(17,20,26,.26);
  --card-grad:linear-gradient(180deg,#ffffff,#fbfbfd);
  --radio-btn:10px; --radio-card:14px; --radio-panel:18px;
}

/* 1d) Higiene del modo oscuro EXPLICITO: evitar el degradado/sombra clara
       lavada si alguien pone data-theme="dark" a mano. */
:root[data-theme="dark"] {
  --sombra-sm:none;
  --sombra-md:0 1px 2px rgba(0,0,0,.4);
  --sombra-lg:0 12px 34px -18px rgba(0,0,0,.6);
  --card-grad:var(--card);
  --line-hover:color-mix(in srgb, var(--line) 60%, var(--muted));
}

/* ==========================================================================
   NOCTA OS - PASO 1 (cont.): COMPONENTES COMPARTIDOS
   Relieve + degradado + redondez premium. Solo color/borde/sombra/radio.
   NADA de layout (no toca display/flex/grid/position/width/min-height/gap).
   ========================================================================== */

/* Tarjetas de estadistica */
.card {
  background: var(--card-grad);
  border-color: var(--line);
  border-radius: var(--radio-card);
  box-shadow: var(--sombra-md);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.card.clickable:hover, .dash-card-click:hover, .mant-cat:hover {
  border-color: var(--line-hover);
  box-shadow: var(--sombra-lg);
  transform: translateY(-2px);
}

/* Paneles */
.panel-box {
  background: var(--card-grad);
  border-color: var(--line);
  border-radius: var(--radio-panel);
  box-shadow: var(--sombra-md);
}
.panel-box.destacado { border-left: 3px solid var(--acento); } /* conserva el filo indigo */

/* Botones */
button { border-radius: var(--radio-btn); box-shadow: var(--sombra-sm); }
button:hover { border-color: var(--line-hover); }
button.primary { box-shadow: 0 1px 2px rgba(17,20,26,.06), 0 8px 20px -12px rgba(79,70,229,.55); }
button.primary:hover { box-shadow: 0 2px 4px rgba(17,20,26,.08), 0 12px 26px -12px rgba(79,70,229,.6); }
.btn-areas { border-radius: var(--radio-btn); }

/* Campos (el foco indigo existente se conserva tal cual) */
input, select, textarea { border-radius: var(--radio-btn); }

/* Tablas y su contenedor de scroll */
.scrollx { border: 1px solid var(--line); border-radius: var(--radio-card); box-shadow: var(--sombra-md); background: var(--card); }
.scrollx > table { border-radius: 0; box-shadow: none; }
table { border-radius: var(--radio-card); box-shadow: var(--sombra-sm); }

/* Barra de herramientas: sigue 'retrocediendo' con gris frio */
.toolbar { background: var(--surface2); }

/* ==========================================================================
   NOCTA OS - PASO 2: CHROME (marcos de navegacion) - claro premium.
   Valores LITERALES claros (igual que #landing): el marco queda claro siempre.
   No toca display/flex/transform/position: el JS sigue mandando visibilidad.
   ========================================================================== */

/* Header (el inicio conserva su header transparente por body.inicio-skin) */
header { background:#ffffff; border-bottom:1px solid rgba(17,20,26,.08); box-shadow:0 1px 2px rgba(17,20,26,.04); }
.top-titulo { color:#14161c; letter-spacing:.04em; }

/* Botones de menu / refrescar (.btn-menu) - NO poner display, lo alterna el JS */
.btn-menu { background:#ffffff; border:1px solid rgba(17,20,26,.10); border-radius:10px; color:#14161c; box-shadow:0 1px 2px rgba(17,20,26,.04); }
.btn-menu:hover { background:#f6f7f9; border-color:rgba(17,20,26,.16); }

/* Barra de pestanas #tabs (nav) - NO poner display, lo controla app.js */
#tabs { gap:4px; }
#tabs button { color:#5c6270; border:1px solid transparent; border-radius:10px; padding:7px 13px; font-size:13.5px; font-weight:500; transition:background .14s, color .14s, border-color .14s; }
#tabs button:hover:not(.active) { color:#14161c; background:rgba(17,20,26,.04); }
#tabs button.active { background:rgba(79,70,229,.09); color:#4f46e5; border-color:rgba(79,70,229,.18); font-weight:600; }

/* Menu lateral .drawer - NO tocar transform/.abierto/position (animacion abrir-cerrar) */
.drawer { background:#ffffff; border-right:1px solid rgba(17,20,26,.08); box-shadow:0 24px 60px -20px rgba(17,20,26,.35), 0 8px 24px -12px rgba(17,20,26,.16); padding:14px 12px 26px; }
.drawer-overlay { background:rgba(17,20,26,.38); }
.drawer-head { padding:6px 8px 14px; margin-bottom:4px; border-bottom:1px solid rgba(17,20,26,.06); }
.drawer-logo { color:#14161c; font-weight:600; letter-spacing:-.01em; }
.drawer-x { color:#9aa0ac; border-radius:8px; }
.drawer-x:hover { color:#14161c; background:rgba(17,20,26,.05); }
.drawer-group { color:#9aa0ac; letter-spacing:.08em; }
.drawer-item { color:#14161c; border:1px solid transparent; border-radius:10px; padding:9px 11px; transition:background .14s, color .14s, border-color .14s; }
.drawer-item:hover { background:rgba(17,20,26,.04); }
.drawer-ico { color:#9aa0ac; }
/* Item activo: chip indigo en vez de la barra inset gris (anula el inset de la linea 881) */
.drawer-item.activa { background:rgba(79,70,229,.09); border-color:rgba(79,70,229,.18); color:#4f46e5; font-weight:600; box-shadow:none; }
.drawer-item.activa .drawer-ico { color:#4f46e5; }
.drawer-item.bloqueada { color:#9aa0ac; }
.drawer-lock svg { color:#9aa0ac; }
.drawer-foot { border-top:1px solid rgba(17,20,26,.08); }
.drawer-ctx { color:#14161c; }
.drawer-ctx a, .drawer-user { color:#5c6270; }
.drawer-salir { border:1px solid rgba(17,20,26,.12); border-radius:10px; color:#14161c; }
.drawer-salir:hover { background:#fef2f2; border-color:#dc2626; color:#dc2626; }

/* ===== A · GRUPO EMBAJADORES (Revisión de tarea + Revisión manual + Marcas) ===== */
/* ==========================================================================
   NOCTA OS - PREMIUM CLARO · A. GRUPO EMBAJADORES (componentes propios)
   Append-only al FINAL de styles.css. Gana por cascada. Solo visual.
   OJO: .cumple-card / .cal-det / .cal-hasbday se movieron al bloque D
   (Cumpleaños) para deduplicar con el grupo Reportes/Detalles.
   ========================================================================== */

/* Revisión de tarea: grupo de embajadores plegable (es .panel-box) */
.grupo-emb {
  border-radius: var(--radio-panel);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.grupo-emb:hover { border-color: var(--line-hover); box-shadow: var(--sombra-lg); }

/* Revisión de tarea: tarjetas de estadística del pre-reporte (tanteo) */
.pre-stat {
  background: var(--card-grad);
  border-color: var(--line);
  border-radius: var(--radio-card);
  box-shadow: var(--sombra-sm);
}

/* Revisión manual: tarjeta de tarea (colapsable, clickeable) */
.manual-tarea {
  background: var(--card-grad);
  border-color: var(--line);
  border-radius: var(--radio-card);
  box-shadow: var(--sombra-md);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.manual-tarea:hover { border-color: var(--line-hover); box-shadow: var(--sombra-lg); }

/* Revisión manual: tarjeta de historia del embajador.
   Las .story-card anidadas en una tarea siguen planas: la regla existente
   `.manual-tarea-cuerpo .story-card{box-shadow:none}` (línea 279) es más
   específica y manda. */
.story-card {
  background: var(--card-grad);
  border-color: var(--line);
  border-radius: var(--radio-card);
  box-shadow: var(--sombra-md);
}

/* Marcas y embajadores: tarjeta de cuenta privada (conserva fondo surface2) */
.priv-card {
  border-color: var(--line);
  border-radius: var(--radio-card);
  box-shadow: var(--sombra-sm);
}

/* Marcas y embajadores: cajas de config e importación (solo unifica el radio) */
.auto-box, .importar-box { border-radius: var(--radio-card); }

/* ===== B · REPORTES DEL LOCAL (dashboard bento) ===== */
/* ==========================================================================
   NOCTA OS - PREMIUM CLARO · B. REPORTES DEL LOCAL (dashboard)
   El hover de las clickeables ya vive en la regla compartida (línea 1174);
   aquí solo se agrega la transición base para que anime suave.
   ========================================================================== */

.dash-card {
  background: var(--card-grad);
  border-color: var(--line);
  border-radius: var(--radio-card);
  box-shadow: var(--sombra-md);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

/* Reafirmar el fondo de las variantes (se declaran ANTES del append; este
   bloque va al FINAL, así que estas reglas ganan) */
.dash-card-lock { background: var(--surface2); box-shadow: var(--sombra-sm); }
.dash-num-lock svg { color: var(--muted2); }

.dash-num { font-weight: 600; letter-spacing: -.01em; }
.dash-label { color: var(--muted); }

/* Hero índigo: se conserva el índigo, pulido con leve degradado y glow */
.dash-card-hero {
  background: linear-gradient(180deg, color-mix(in srgb, var(--acento) 88%, #ffffff), var(--acento));
  border-color: var(--acento);
  border-radius: var(--radio-panel);
  box-shadow: 0 1px 2px rgba(17,20,26,.06), 0 16px 38px -16px rgba(79,70,229,.5);
}
.dash-card-hero .dash-num { font-weight: 800; }

/* Drill-down: cajitas de estadística + chips + tabla */
.det-stats > div {
  background: var(--card-grad);
  border-color: var(--line);
  border-radius: var(--radio-card);
  box-shadow: var(--sombra-sm);
}
.det-k { font-weight: 600; letter-spacing: -.01em; }
.det-tabla th { background: var(--surface2); color: var(--muted); }
.det-chip {
  border-radius: 999px;
  background: var(--surface2);
  border-color: var(--line);
  color: var(--muted);
  font-weight: 600;
}
.det-chip.pago-g { color: var(--acento); background: var(--acento-weak); border-color: var(--acento-bd); }
.det-chip.pend  { color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent); border-color: color-mix(in srgb, var(--warn) 30%, var(--line)); }

/* ===== C · DETALLES DE LA SEMANA (día / resumen) ===== */
/* ==========================================================================
   NOCTA OS - PREMIUM CLARO · C. DETALLES DE LA SEMANA
   ========================================================================== */

/* Tarjeta de día (edición): relieve bento */
.dia-card {
  background: var(--card-grad);
  border-color: var(--line);
  border-radius: var(--radio-card);
  box-shadow: var(--sombra-md);
}
/* "Hoy": el filo pasa de negro a índigo (acento siempre índigo) */
.dia-card.dia-hoy {
  border-color: var(--acento-bd);
  box-shadow: var(--sombra-md), 0 0 0 1px var(--acento-weak) inset;
}

/* Resumen desplegable por día: nested, se mantiene gris frío pero redondo */
.res-det {
  background: var(--surface2);
  border-color: var(--line);
  border-radius: var(--radio-card);
  box-shadow: var(--sombra-sm);
}
.res-det > summary { font-weight: 600; letter-spacing: -.01em; transition: background .14s ease; }

/* ===== D · CUMPLEAÑOS + CALENDARIO (unificado, deduplicado) ===== */
/* ==========================================================================
   NOCTA OS - PREMIUM CLARO · D. CUMPLEAÑOS + CALENDARIO
   UNIFICA barrido Embajadores + barrido Reportes/Detalles.
   .cumple-card y .cal-det aparecían en ambos con distinta sombra:
   se dejan UNA vez con --sombra-md (relieve bento, coherente con la sección).
   ========================================================================== */

/* Tarjeta de próximo cumpleaños */
.cumple-card {
  background: var(--card-grad);
  border-color: var(--line);
  border-radius: var(--radio-card);
  box-shadow: var(--sombra-md);
}

/* Detalle del día seleccionado */
.cal-det {
  background: var(--card-grad);
  border-color: var(--line);
  border-radius: var(--radio-card);
  box-shadow: var(--sombra-md);
}

/* Grilla del calendario: base + hoy + seleccionado (marcadores a índigo) */
.cal-cell { border-color: var(--line); border-radius: var(--radio-btn); }
.cal-today { border-color: var(--acento-bd); }
.cal-sel { border-color: var(--acento); box-shadow: inset 0 0 0 1px var(--acento); }

/* Celda con cumpleaños (interactiva): hover con acento índigo */
.cal-hasbday { transition: border-color .18s ease, box-shadow .18s ease; }
.cal-hasbday:hover { border-color: var(--acento); box-shadow: var(--sombra-sm); }

/* Registro de cumpleaños: tarjeta */
.cpl-card {
  background: var(--card-grad);
  border-color: var(--line);
  border-radius: var(--radio-card);
  box-shadow: var(--sombra-sm);
}

/* ===== E · CAJA + BARRA / INVENTARIO ===== */
/* ==========================================================================
   NOCTA OS - PREMIUM CLARO · E. CAJA + BARRA/INVENTARIO
   ========================================================================== */

/* CAJA: tarjeta de cierre plegable (clickeable) */
.caj-detalle {
  background: var(--card-grad);
  border-color: var(--line);
  border-radius: var(--radio-card);
  box-shadow: var(--sombra-md);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.caj-detalle:hover { border-color: var(--line-hover); box-shadow: var(--sombra-lg); }

/* CAJA: cajas internas recesivas (mantienen surface2, solo suben el radio) */
.caj-calc { border-radius: var(--radio-card); }
.caj-prop-total { border-radius: var(--radio-card); }
.caj-msg { border-radius: var(--radio-card); }

/* BARRA: tarjeta del picker (clickeable). NO se usa el shorthand border-color
   para no pisar el filo de etapa (border-left de .be-borde-*): el hover eleva
   solo top/right/bottom. */
.barra-pick {
  background: var(--card-grad);
  border-radius: var(--radio-card);
  box-shadow: var(--sombra-md);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.barra-pick:hover {
  border-top-color: var(--line-hover);
  border-right-color: var(--line-hover);
  border-bottom-color: var(--line-hover);
  box-shadow: var(--sombra-lg);
  transform: translateY(-2px);
}

/* BARRA: botones-tarjeta de acción del flujo (clickeables).
   .acc-final conserva su tinte por mayor especificidad. */
.barra-menu-acc button {
  background: var(--card-grad);
  border-radius: var(--radio-card);
  box-shadow: var(--sombra-md);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.barra-menu-acc button:hover {
  border-color: var(--line-hover);
  box-shadow: var(--sombra-lg);
  transform: translateY(-2px);
}

/* BARRA: franja de resumen recesiva (mantiene surface2, sube el radio) */
.barra-resumen-mini { border-radius: var(--radio-card); }

/* ===== F · PUERTA + PULSERAS/COVERS + VIP + LISTAS + PREVIAS + logo ===== */
/* ==========================================================================
   NOCTA OS - PREMIUM CLARO · F. PUERTA / PULSERAS / VIP / LISTAS / PREVIAS
   NO toca .btn-ok/.btn-bad, contador, escáner ni canvas de tarjeta VIP.
   ========================================================================== */

/* PUERTA */
.pt-switch {
  border-color: var(--line);
  border-radius: var(--radio-btn);
  background: var(--card-grad);
  box-shadow: var(--sombra-sm);
}
.pt-marca { border-color: var(--line); border-radius: var(--radio-card); }
.pt-vip { border-radius: var(--radio-card); box-shadow: var(--sombra-sm); }
.pt-info, .pt-promo, .pt-promo-ok, .pt-promo-no { border-radius: var(--radio-btn); }

/* PULSERAS Y COVERS */
.pc-persona {
  background: var(--card-grad);
  border-color: var(--line);
  border-radius: var(--radio-card);
  box-shadow: var(--sombra-md);
}
.pc-vip { border-radius: var(--radio-card); }
.pc-cant { border-radius: var(--radio-btn); }
.pc-modo {
  border-color: var(--line);
  border-radius: var(--radio-btn);
  box-shadow: var(--sombra-sm);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.pc-modo:hover { border-color: var(--line-hover); }
.pc-modo.on { border-color: var(--acento); box-shadow: 0 1px 2px rgba(17,20,26,.06), 0 8px 20px -12px rgba(79,70,229,.55); }
.pc-cta {
  border-radius: var(--radio-card);
  box-shadow: 0 1px 2px rgba(17,20,26,.06), 0 10px 24px -12px rgba(79,70,229,.55);
  transition: box-shadow .18s ease, opacity .18s ease;
}
.pc-cta:hover { box-shadow: 0 2px 4px rgba(17,20,26,.08), 0 14px 30px -12px rgba(79,70,229,.6); }

/* PREVIAS (registro) */
.prevadm-stats > div {
  background: var(--card-grad);
  border-color: var(--line);
  border-radius: var(--radio-card);
  box-shadow: var(--sombra-md);
}
.prevadm-stats b { letter-spacing: -.01em; font-variant-numeric: tabular-nums; }

/* LISTAS */
.lst-card {
  background: var(--card-grad);
  border-color: var(--line);
  border-radius: var(--radio-card);
  box-shadow: var(--sombra-md);
}
.lst-tabla-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radio-card);
  box-shadow: var(--sombra-md);
  background: var(--card);
}
.lst-kpis .k { letter-spacing: -.01em; }

/* CONFIG · logos por local (mantiene su fondo oscuro para logos claros) */
.logo-prev { border-color: var(--line); box-shadow: var(--sombra-sm); }

/* ===== G · RR.HH. + TURNOS + MANTENCIONES + COMENTARIOS + CONFIG ===== */
/* ==========================================================================
   NOCTA OS - PREMIUM CLARO · G. RR.HH. / TURNOS / MANTENCIONES / COMENTARIOS / CONFIG
   En .com-item y .ev-card NO se usa border-color: se conserva el filo
   izquierdo por tipo/estado.
   ========================================================================== */

/* Comentarios: cada comentario recibido pasa a tarjeta con relieve */
.com-item {
  background: var(--card-grad);
  border-radius: var(--radio-card);
  box-shadow: var(--sombra-md);
}

/* Turnos: tarjeta-noche de la agenda (compartida). Se respetan .ev-hoy y .ev-sel */
.ev-card {
  background: var(--card-grad);
  box-shadow: var(--sombra-md);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.ev-card.ev-click:hover { box-shadow: var(--sombra-lg); transform: translateY(-2px); }

/* Banner "Turno abierto": leve relieve y radio del sistema */
.ev-banner { border-radius: var(--radio-card); box-shadow: var(--sombra-sm); }

/* Mantenciones: tarjeta de requerimiento y de boleta */
.mant-item {
  background: var(--card-grad);
  border-radius: var(--radio-card);
  box-shadow: var(--sombra-md);
}

/* RR.HH. · Asistencia: reforzar SOLO el color del borde de la grilla */
.asis-tabla th, .asis-tabla td { border-color: var(--line2); }

/* Configuración · Modo de pruebas: escenarios que 'levantan'.
   NO se toca border-color en :hover para conservar el filo ámbar del
   escenario estrella (.pr-esc-estrella, línea 418). */
.pr-esc {
  box-shadow: var(--sombra-sm);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.pr-esc:hover { box-shadow: var(--sombra-md); transform: translateY(-2px); }

/* ==========================================================================
   NOCTA OS - LISTAS · ESTADÍSTICAS (hero oscuro con medidor + tarjetas)
   ========================================================================== */
.lstx-hero { background: var(--card-grad, var(--card)); border: 1px solid var(--line); border-radius: 22px; padding: 20px 20px 22px; color: var(--text); box-shadow: var(--sombra-md, var(--sombra)); margin-bottom: 4px; }
.lstx-htop { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.lstx-htit { font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.lstx-hev { font-size: 12px; color: var(--muted2, var(--muted)); margin-top: 2px; }
.lstx-hdots { color: var(--muted2, var(--muted)); font-size: 20px; letter-spacing: 2px; }
.lstx-gwrap { position: relative; height: 132px; margin-top: 14px; }
.lstx-corner { position: absolute; top: 6px; z-index: 1; }
.lstx-corner.l { left: 0; text-align: left; }
.lstx-corner.r { right: 0; text-align: right; }
.lstx-corner .n { font-size: 24px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.lstx-corner .l { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.lstx-gauge { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 220px; height: 128px; }
.lstx-gauge svg { position: absolute; inset: 0; }
.lstx-gc { position: absolute; left: 0; right: 0; bottom: 2px; text-align: center; }
.lstx-gc .gl { font-size: 11.5px; color: var(--muted); letter-spacing: .02em; }
.lstx-gc .gn { font-size: 50px; font-weight: 600; letter-spacing: -.04em; line-height: 1; margin-top: 3px; font-variant-numeric: tabular-nums; }
.lstx-foot { display: grid; grid-template-columns: repeat(3,1fr); margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.lstx-hs { display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; }
.lstx-hs + .lstx-hs { border-left: 1px solid var(--line); }
.lstx-hs .v { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; display: flex; align-items: center; justify-content: center; gap: 6px; }
.lstx-hs .k { font-size: 11px; color: var(--muted); }
.lstx-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.lstx-sect { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted2, var(--muted)); font-weight: 600; margin: 22px 2px 10px; }
.lstx-lcard { background: var(--card-grad, var(--card)); border: 1px solid var(--line); border-radius: 16px; padding: 15px 16px; margin-bottom: 10px; box-shadow: var(--sombra-md, var(--sombra)); }
.lstx-lctop { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.lstx-lnom { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.lstx-lcorte { font-size: 12px; color: var(--muted); }
.lstx-ltot { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.lstx-lmid { display: flex; align-items: baseline; gap: 6px; margin: 10px 0 8px; }
.lstx-lpct { font-size: 30px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.lstx-lpct .u { font-size: 16px; color: var(--muted); }
.lstx-lsub { font-size: 12px; color: var(--muted); margin-left: auto; }
.lstx-bar { height: 9px; border-radius: 6px; background: rgba(17,20,26,.07); overflow: hidden; }
.lstx-bar > i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg,#4f46e5,#8b8ff5); }
.lstx-legend { display: flex; gap: 16px; margin-top: 9px; font-size: 11.5px; color: var(--muted); }
.lstx-legend b { color: var(--text); font-variant-numeric: tabular-nums; }
.lstx-rk { background: var(--card-grad, var(--card)); border: 1px solid var(--line); border-radius: 16px; padding: 6px 4px; box-shadow: var(--sombra-md, var(--sombra)); }
.lstx-rkrow { display: flex; align-items: center; gap: 12px; padding: 11px 13px; }
.lstx-rkrow + .lstx-rkrow { border-top: 1px solid var(--line); }
.lstx-rkpos { width: 22px; height: 22px; flex: none; border-radius: 7px; background: var(--acento-weak, rgba(79,70,229,.09)); color: var(--acento); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.lstx-rknom { font-size: 14.5px; font-weight: 500; }
.lstx-rkn { margin-left: auto; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.lstx-rkn span { font-size: 12px; color: var(--muted); font-weight: 400; }


/* Aviso de RUTs malos al pegar una lista (app principal): muestra QUIÉNES para corregirlos */
.li-bulk-mal { margin-top: 8px; font-size: 13px; line-height: 1.5; color: var(--text); background: color-mix(in srgb, var(--warn) 9%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 32%, var(--line)); border-radius: 10px; padding: 10px 12px; }
.li-bulk-mal b { color: var(--warn); }


/* Botón "Forzar actualización" en el menú lateral */
.drawer-actualizar { display: block; width: 100%; margin-top: 10px; padding: 11px; border: 1px solid var(--acento-bd, rgba(79,70,229,.18)); background: var(--acento-weak, rgba(79,70,229,.09)); color: var(--acento); border-radius: 10px; font-weight: 600; font-size: 14px; cursor: pointer; }
.drawer-actualizar:hover { background: color-mix(in srgb, var(--acento) 16%, transparent); }


/* ==========================================================================
   PULSERAS Y COVERS · botones de acción como TARJETAS premium (ícono + texto)
   Reemplaza el look morado lleno por tarjeta clara ordenada (va al final → gana).
   ========================================================================== */
.pc-cta { -webkit-appearance: none; appearance: none; display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 14px 16px; margin-bottom: 10px; border-radius: var(--radio-card, 14px); border: 1px solid var(--line);
  background: var(--card-grad, var(--card)); color: var(--text); font-size: 15px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3;
  box-shadow: var(--sombra-md, var(--sombra)); cursor: pointer; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.pc-cta:hover { opacity: 1; border-color: var(--line-hover); box-shadow: var(--sombra-lg); transform: translateY(-2px); }
.pc-cta-ico { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--acento-weak, rgba(79,70,229,.09)); color: var(--acento-ico, var(--acento)); border: 1px solid var(--acento-bd, rgba(79,70,229,.18)); }
.pc-cta-ico svg { width: 21px; height: 21px; }
/* la acción PRINCIPAL (dar covers): ícono lleno índigo para destacar sin gritar */
.pc-cta-main .pc-cta-ico { background: var(--acento); color: #fff; border-color: var(--acento); }
.pc-cta-txt { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.pc-cta-txt b { font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--text); }
.pc-cta-sub { font-size: 12.5px; color: var(--muted); font-weight: 400; opacity: 1; letter-spacing: 0; }
.pc-cta-arrow { flex: 0 0 auto; color: var(--muted2, var(--muted)); display: inline-flex; transition: transform .18s ease; }
.pc-cta-arrow svg { width: 18px; height: 18px; }
details.pc-directo[open] > summary.pc-cta { border-bottom-left-radius: var(--radio-card, 14px); border-bottom-right-radius: var(--radio-card, 14px); }
details.pc-directo[open] > summary.pc-cta .pc-cta-chev { transform: rotate(180deg); }


/* ====== CAZA DE DISEÑO VIEJO — bloques del comité ====== */

/* iconos-botones-inline (Embajadores/Barra/RRHH/Caja) — dimensiona los SVG que reemplazan emojis dentro de botones e íconos inline */
.small-btn svg{width:15px;height:15px;vertical-align:-2px}
.mant-b svg{width:15px;height:15px;vertical-align:-2px}
.priv-sum{display:flex;align-items:center;gap:8px}
.priv-sum svg{width:16px;height:16px;color:var(--muted);flex:none}
.auto-box span svg{width:15px;height:15px;vertical-align:-2px;color:var(--muted)}
.chev{display:inline-flex;transition:transform .15s}
.chev svg,.grupo-chev svg{width:14px;height:14px;display:block}

/* landings-chip-icono (Mantenciones + Pulseras/Covers + Cumpleaños) — convierte el emoji gigante en el chip 42x42 con acento, igual que las area-card del inicio. OJO: aplica a las 3 landings porque comparten .mant-cat-ic; requiere que los 3 render pasen SVG (ver ediciones E-MANT, E-PC, E-CUM) */
.mant-cat-ic{width:42px;height:42px;display:grid;place-items:center;border-radius:12px;background:var(--acento-weak);color:var(--acento);border:1px solid var(--acento-bd);font-size:0;line-height:0}
.mant-cat-ic svg{width:22px;height:22px}
.mant-cat-t{font-weight:600}

/* tabs-listas-sobrias (scoped .lst-tabs) — pastilla sobria en vez de bloque índigo lleno, SIN tocar el .pt-switch global que usa Puerta */
.lst-tabs{background:var(--surface2);padding:4px;gap:6px}
.lst-tabs button{border-radius:8px;font-size:14px;padding:9px;color:var(--muted)}
.lst-tabs button.activo{background:var(--card-grad);color:var(--text);font-weight:600;box-shadow:var(--sombra-sm)}

/* acciones-barra-chip (flujo de Barra) — mete chip de ícono a Ingreso extra / Traspaso / Conteo final; el chip lleno índigo va solo en la acción principal (.acc-final) */
.barra-menu-acc button{flex-direction:row;align-items:center;gap:12px}
.bma-txt{display:flex;flex-direction:column;gap:2px}
.bma-chip{flex:0 0 42px;width:42px;height:42px;display:grid;place-items:center;border-radius:12px;background:var(--acento-weak);color:var(--acento);border:1px solid var(--acento-bd)}
.bma-chip svg{width:20px;height:20px}
.barra-menu-acc .acc-final .bma-chip{background:var(--acento);color:#fff;border-color:var(--acento)}

/* previa-card-icono (Previas admin) — chip de ícono para el título de cada previa (clase nueva, no colisiona con .prevadm-*) */
.prev-ic{flex:0 0 auto;width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:var(--acento-weak);color:var(--acento);border:1px solid var(--acento-bd)}
.prev-ic svg{width:18px;height:18px}

/* pesos-tipograficos (global) — baja el peso gritón a la escala premium (600); al ir al final del archivo gana por orden a las reglas viejas */
.top-titulo{text-transform:none;font-weight:600;letter-spacing:-.01em}
.small-btn.ev-iniciar{font-weight:600}
/* "cambiar" junto a la marca en el título superior (cambia de sub-marca) */
.top-cambiar{font-size:12px;font-weight:500;letter-spacing:0;text-transform:none;color:var(--acento);cursor:pointer;text-decoration:underline;margin-left:8px;vertical-align:middle;white-space:nowrap}
.pc-modo{font-weight:600}
.mant-gtit{font-weight:600}
.mant-urg,.mant-b.primary-ghost{font-weight:600}

/* svg-en-titulos-grupo-y-h3 (Mantenciones/Pulseras/Boletas) — dimensiona los SVG que reemplazan emojis en encabezados de grupo (.mant-gtit) y en los h3 de sección; el SVG hereda el color de estado con currentColor, no lo pisa */
.mant-gtit svg{width:16px;height:16px;vertical-align:-3px}
.panel-box h3 svg{width:18px;height:18px;vertical-align:-3px}


/* Fix: el <summary> de "Registrar entrega directa" debe ir horizontal (ícono izq + texto der),
   igual que el botón de arriba. La regla vieja summary.pc-cta{display:block} lo apilaba;
   esta va al final y con misma especificidad → gana. */
summary.pc-cta { display: flex; align-items: center; gap: 14px; list-style: none; }
summary.pc-cta::-webkit-details-marker { display: none; }


/* Visor de imagen (historias/capturas) con botón cerrar — Revisión manual */
.foto-ov { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.86); display: flex; align-items: center; justify-content: center; padding: 20px; }
.foto-ov img { max-width: 100%; max-height: 88vh; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.foto-x { position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); right: 14px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.14); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.foto-x:hover { background: rgba(255,255,255,.24); }
a.story-thumb { cursor: pointer; }


/* Mantenciones: color de la sección "Cotización" (esperando precio+fecha) */
.mant-gtit.g-cot { color: var(--muted); }

/* ═══════ dashboard-profesional (2026-08-25) — deltas, sparklines y jerarquía ejecutiva ═══════
   Bloque append-only y reversible: da el acabado "clase mundial" a Reporte del local y Reportes
   de embajadores sin tocar el sistema (claro premium, índigo único). */
.dash-delta { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.dash-delta.up { color: #067647; background: rgba(6,118,71,.09); }
.dash-delta.down { color: #b42318; background: rgba(180,35,24,.08); }
.dash-delta.flat { color: var(--muted); background: var(--surface2); }
.dash-card-hero .dash-delta.up { color: #d7ffe9; background: rgba(255,255,255,.16); }
.dash-card-hero .dash-delta.down { color: #ffe0dc; background: rgba(255,255,255,.16); }
.dash-card-hero .dash-delta.flat { color: rgba(255,255,255,.85); background: rgba(255,255,255,.14); }
.dash-vs { font-size: 11.5px; color: var(--muted); }
.dash-card-hero .dash-vs { color: rgba(255,255,255,.75); }
.spark { display: block; width: 100%; height: 34px; margin-top: 6px; }
.spark polyline { fill: none; stroke: var(--acento); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.spark .spark-area { fill: color-mix(in srgb, var(--acento) 10%, transparent); stroke: none; }
.spark .spark-dot { fill: var(--acento); }
.eyebrow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 22px 0 10px; display: flex; align-items: center; gap: 8px; }
.eyebrow::after { content: ''; flex: 1; height: 1px; background: var(--line); }
/* mini-barras apiladas (desglose por día en Reportes) */
.mb-dia { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.mb-dia:last-child { border-bottom: none; }
.mb-fecha { flex: 0 0 96px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mb-track { flex: 1; display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--surface2); }
.mb-ok { background: #12b76a; } .mb-bad { background: #f04438; } .mb-warn { background: #f79009; }
.mb-tot { flex: 0 0 auto; font-variant-numeric: tabular-nums; font-weight: 600; min-width: 70px; text-align: right; }
.mb-tot .muted { font-weight: 400; }
/* tarjetas de resumen ejecutivo (Reportes de embajadores) */
.rep-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.rep-kpi { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px 14px; box-shadow: var(--sombra); }
.rep-kpi .k-l { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.rep-kpi .k-n { font-size: 27px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 6px; line-height: 1.1; }
.rep-kpi .k-s { font-size: 12px; color: var(--muted); margin-top: 4px; }
.rep-lead { font-size: 14.5px; line-height: 1.55; margin: 0 0 14px; }
.rep-lead b { font-weight: 650; }
/* barra de % dentro de tablas (rankings) */
.pctbar { display: inline-flex; align-items: center; gap: 8px; min-width: 130px; }
.pctbar .pb-track { flex: 1; height: 6px; border-radius: 3px; background: var(--surface2); overflow: hidden; }
.pctbar .pb-fill { height: 100%; border-radius: 3px; background: var(--acento); }
.pctbar.pb-ok .pb-fill { background: #12b76a; } .pctbar.pb-bad .pb-fill { background: #f04438; } .pctbar.pb-warn .pb-fill { background: #f79009; }
.pctbar .pb-num { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; min-width: 40px; text-align: right; }
/* pulido general de las tarjetas del dashboard */
.dash-card { box-shadow: var(--sombra); }
.dash-num { letter-spacing: -.02em; }
.dash-insight { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); margin-top: 14px; font-size: 13px; box-shadow: var(--sombra); }
.dash-insight .ins { display: flex; align-items: baseline; gap: 6px; }
.dash-insight .ins b { font-variant-numeric: tabular-nums; font-weight: 650; }
.dash-insight .ins .muted { font-size: 12px; }
.dash-delta-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* estructura ejecutiva del dashboard: héroes lado a lado + secciones */
#dash-grid.dash-grid { display: block; }
.dash-heroes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .dash-heroes { grid-template-columns: 1fr; } }
.dash-heroes .dash-card-hero { grid-column: auto; align-items: flex-start; text-align: left; }
.dash-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.mini-stack { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--surface2); width: 100%; margin-top: 2px; }
.mini-stack span { display: block; min-width: 2px; }
.mini-prog { height: 5px; border-radius: 3px; background: var(--surface2); overflow: hidden; width: 100%; margin-top: 2px; }
.mini-prog span { display: block; height: 100%; border-radius: 3px; }
/* (el chip ▲▼ y el "vs" van en línea; las barras de 100% de ancho saltan solas a su propia línea) */
/* sparklines dentro de los héroes índigo */
.dash-card-hero .spark polyline { stroke: rgba(255,255,255,.9); }
.dash-card-hero .spark .spark-area { fill: rgba(255,255,255,.14); }
.dash-card-hero .spark .spark-dot { fill: #ffffff; }
/* resumen ejecutivo de Reportes */
.rep-ejecutivo { display: block; margin-bottom: var(--sp-5); }
.rep-ejecutivo .eyebrow { margin-top: 18px; }
.rev-fila { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.rev-fila:last-child { border-bottom: none; }
.rev-chip { flex: none; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; letter-spacing: .02em; }
.rev-chip.of { color: var(--acento); background: var(--acento-weak); }
.rev-chip.tn { color: var(--muted); background: var(--surface2); }
.rev-txt { flex: 1; min-width: 0; }
.rev-res { font-variant-numeric: tabular-nums; font-size: 12.5px; }
/* podio top 5 */
.rep-top-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 26px; }
@media (max-width: 640px) { .rep-top-grid { grid-template-columns: 1fr; } }
.rep-top-grid h3 { margin: 0 0 8px; }
.rep-top-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.rep-top-row:last-child { border-bottom: none; }
.rep-top-pos { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--surface2); color: var(--muted); font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.rep-top-quien { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* tarjetas de alerta (rachas) */
.rep-alerta-card { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--line); border-left-width: 3px; border-radius: 12px; background: var(--card); margin-bottom: 8px; }
.rep-avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--surface2); color: var(--muted); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.rep-alerta-txt { flex: 1; min-width: 0; }
.rep-alerta-dato { text-align: right; flex: none; }
.mant-foto-link { cursor: pointer; }
/* propina en efectivo: doble conteo (denominaciones + áreas) */
.pe-det { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; margin-top: 8px; }
@media (max-width: 560px) { .pe-det { grid-template-columns: 1fr; } }
.pe-col-t { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 6px; }
.pe-fila { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.pe-den { flex: 0 0 88px; font-size: 13px; font-variant-numeric: tabular-nums; }
.pe-cant { width: 74px; text-align: right; }
.pe-monto { max-width: 130px; text-align: right; }
.pe-sub { flex: 1; text-align: right; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.pe-tot { display: flex; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; font-size: 13.5px; }
.pe-tot b { font-variant-numeric: tabular-nums; }
.pe-cuadre { margin-top: 8px; font-size: 13.5px; }
.caj-pe-campos.bloqueado { opacity: .45; pointer-events: none; }

/* ════════════════════════════════════════════════════════════════════
   CAPA PULIDO (comité 2026-08-26 + referencia de Vicente) — reversible.
   Una escala tipográfica, números redondeados estilo referencia (ui-rounded
   en iOS), labels unificados, formularios en columna con montos destacados.
   ════════════════════════════════════════════════════════════════════ */
:root { --fs-ui:13px; --fs-small:12.5px; --fs-cap:11px; --ls-cap:.08em; --fs-sec:16px; --ls-sec:-.014em;
  --num-xl:38px; --num-lg:30px; --num-md:26px; --ls-num:-.02em; --w-num:620;
  --f-display: ui-rounded, -apple-system, system-ui, "Segoe UI", Roboto, sans-serif; }
/* Jerarquía: los títulos de sección mandan */
.panel-box h3, .seccion-head, .caj-sub-cab b { font-size:var(--fs-sec); font-weight:620; letter-spacing:var(--ls-sec); }
/* Números: UNA receta, con la redondez de la referencia (iPhone) */
.card .num, .dash-num, .det-k, .lst-kpis .k, .rep-kpi .k-n, .ev-num, .ev-monto, .mant-precio, .pre-stat .pre-n, .cumple-fecha, .lstx-ltot,
.caj-linea b, .caj-calc b, .pe-tot b, .pe-sub, .mny {
  font-family:var(--f-display); font-variant-numeric:tabular-nums; letter-spacing:var(--ls-num); }
.card .num, .det-k, .lst-kpis .k, .rep-kpi .k-n { font-size:var(--num-md); font-weight:var(--w-num); }
.dash-num { font-weight:var(--w-num); }
.landing-titulo, .top-titulo { font-family:var(--f-display); }
/* Labels uppercase: una sola voz */
.dash-label, .drawer-group, .eyebrow, .rep-kpi .k-l, .pe-col-t, .det-tabla th, .lst-tabla th, .cred-rotulo, .mant-urg-lbl {
  font-size:var(--fs-cap); font-weight:600; letter-spacing:var(--ls-cap); text-transform:uppercase; }
th { font-size:var(--fs-cap); font-weight:600; letter-spacing:var(--ls-cap); text-transform:uppercase; color:var(--muted); }
/* Labels de formulario: mismo tamaño, mismo aire */
.cajf, .form-col label, .amb-grid label, .cpl-edit label { font-size:var(--fs-small); font-weight:500; }
.cajf { display:flex; flex-direction:column; gap:6px; }
/* Metadatos terciarios retroceden; párrafos no corren kilómetros */
.dash-sub, .dash-vs, .amb-hint, .mant-meta { color:var(--muted); opacity:.85; }
p.muted, .manual-subcopy { max-width:62ch; line-height:1.5; }
.dash-cards, .dash-heroes { gap:12px; }
/* ── CIERRE DE CAJA (pedido Vicente): montos a TODO EL ANCHO, uno bajo otro,
      con recuadro levemente teñido — intuitivo y ordenado ── */
#tab-caja .panel-box.destacado .form-row { grid-template-columns:1fr; gap:10px; }
.mny { width:100%; font-size:17px; font-weight:600; text-align:right; padding:12px 14px; border-radius:12px;
  background:color-mix(in srgb, var(--acento) 5%, var(--card)); border:1px solid color-mix(in srgb, var(--acento) 22%, var(--line)); }
.mny:focus { background:color-mix(in srgb, var(--acento) 8%, var(--card)); }
.pe-monto.mny { font-size:15px; padding:8px 10px; }
.pe-cant { font-family:var(--f-display); font-variant-numeric:tabular-nums; text-align:right; }
/* ── MENÚ ☰ (pedido Vicente): separaciones entre Embajadores / Local / Listas ── */
.drawer-group { border-top:1px solid var(--line); margin-top:10px; padding-top:12px; }
.drawer-body > .drawer-group:first-of-type, #drawer-body > .drawer-group:first-of-type { border-top:none; margin-top:4px; }
.drawer-item + .drawer-group, button + .drawer-group { border-top:1px solid var(--line); }

/* ════════════════════════════════════════════════════════════════════
   CAPA TEMA NOCHE (comité 2026-08-26) — 100% bajo [data-theme=dark].
   Negro azulado profundo que no encandila. Reversible borrando el bloque.
   ════════════════════════════════════════════════════════════════════ */
:root[data-theme="dark"] { color-scheme:dark;
  --bg:#0b0d12; --card:#12151c; --card2:#171b24; --card-grad:linear-gradient(180deg,#171b24,#12151c);
  --surface2:#1a1e28; --text:#e9ebf1; --muted:#9aa2b2; --muted2:#667082;
  --line:rgba(231,236,255,.08); --line2:rgba(231,236,255,.15); --line-hover:rgba(231,236,255,.18);
  --primary:#e9ebf1; --primary-text:#0b0d12;
  --acento:#6e76f0; --acento-text:#fff; --acento-weak:rgba(110,118,240,.14); --acento-bd:rgba(110,118,240,.30); --acento-ico:#9aa0f9;
  --ok:#4ade80; --bad:#f87171; --warn:#fbbf24;
  --sombra:none; --sombra-sm:none;
  --sombra-md:0 0 0 1px rgba(255,255,255,.03), 0 10px 28px -18px rgba(0,0,0,.6);
  --sombra-lg:0 0 0 1px rgba(255,255,255,.04), 0 18px 44px -20px rgba(0,0,0,.75); }
[data-theme="dark"] body.inicio-skin { background:radial-gradient(120% 55% at 50% -6%, rgba(110,118,240,.10), transparent 58%), #0b0d12; }
[data-theme="dark"] body.inicio-skin header { background:transparent; border-bottom-color:rgba(231,236,255,.06); }
[data-theme="dark"] #landing { --l-card:#12151c; --l-card2:#171b24; --l-line:rgba(231,236,255,.08); --l-line2:rgba(231,236,255,.15);
  --l-tx:#e9ebf1; --l-mut:#9aa2b2; --l-mut2:#667082; --l-ac-soft:rgba(110,118,240,.14); --l-ac-bd:rgba(110,118,240,.30); --l-ac-ico:#9aa0f9;
  --l-shadow:0 0 0 1px rgba(255,255,255,.03), 0 10px 28px -18px rgba(0,0,0,.6);
  --l-shadow-hover:0 0 0 1px rgba(255,255,255,.05), 0 18px 44px -18px rgba(0,0,0,.75); color:#e9ebf1; }
[data-theme="dark"] .area-badge { background:rgba(231,236,255,.06); }
[data-theme="dark"] #landing .area-volver { background:rgba(231,236,255,.03); }
[data-theme="dark"] header { background:#12151c; border-bottom:1px solid rgba(231,236,255,.08); box-shadow:none; }
[data-theme="dark"] .top-titulo { color:#e9ebf1; }
[data-theme="dark"] .btn-menu { background:#12151c; border-color:rgba(231,236,255,.10); color:#e9ebf1; }
[data-theme="dark"] .btn-menu:hover { background:#1a1e28; }
[data-theme="dark"] #tabs button { color:#9aa2b2; }
[data-theme="dark"] #tabs button:hover:not(.active) { color:#e9ebf1; background:rgba(231,236,255,.05); }
[data-theme="dark"] #tabs button.active { background:rgba(110,118,240,.16); color:#9aa0f9; border-color:rgba(110,118,240,.30); }
[data-theme="dark"] .drawer { background:#12151c; border-right-color:rgba(231,236,255,.08); box-shadow:0 24px 60px -20px rgba(0,0,0,.7); }
[data-theme="dark"] .drawer-overlay { background:rgba(0,0,0,.6); }
[data-theme="dark"] .drawer-head { border-bottom-color:rgba(231,236,255,.06); }
[data-theme="dark"] .drawer-foot { border-top-color:rgba(231,236,255,.08); }
[data-theme="dark"] .drawer-logo, [data-theme="dark"] .drawer-ctx, [data-theme="dark"] .drawer-item, [data-theme="dark"] .drawer-user { color:#e9ebf1; }
[data-theme="dark"] .drawer-x, [data-theme="dark"] .drawer-group, [data-theme="dark"] .drawer-ico { color:#9aa2b2; }
[data-theme="dark"] .drawer-item:hover { background:rgba(231,236,255,.05); }
[data-theme="dark"] .drawer-item.activa { background:rgba(110,118,240,.16); color:#9aa0f9; }
[data-theme="dark"] .drawer-salir { border-color:rgba(231,236,255,.12); color:#e9ebf1; background:transparent; }
[data-theme="dark"] .drawer-salir:hover { background:rgba(248,113,113,.10); border-color:#f87171; color:#f87171; }
[data-theme="dark"] .drawer-actualizar { background:rgba(110,118,240,.14); color:#9aa0f9; border-color:rgba(110,118,240,.30); }
[data-theme="dark"] .dash-delta.up { color:#4ade80; background:rgba(74,222,128,.12); }
[data-theme="dark"] .dash-delta.down { color:#f87171; background:rgba(248,113,113,.12); }
[data-theme="dark"] .dash-delta.flat { color:#9aa2b2; background:#1a1e28; }
[data-theme="dark"] .dash-card-hero { background:linear-gradient(180deg, color-mix(in srgb, var(--acento) 92%, #000), var(--acento)); box-shadow:0 0 0 1px rgba(110,118,240,.4), 0 16px 38px -18px rgba(0,0,0,.7); }
[data-theme="dark"] button.primary, [data-theme="dark"] .pc-cta { box-shadow:0 0 0 1px rgba(110,118,240,.35), 0 8px 22px -12px rgba(0,0,0,.6); }
[data-theme="dark"] .lstx-bar { background:rgba(231,236,255,.10); }
[data-theme="dark"] .pre-stat.dudas .pre-n { color:var(--warn); }
[data-theme="dark"] .rap-toggle.on { color:#4ade80; }
[data-theme="dark"] .brand-dot, [data-theme="dark"] .lstx-dot { box-shadow:0 0 0 1px rgba(255,255,255,.14); }
[data-theme="dark"] .mny { background:color-mix(in srgb, var(--acento) 9%, var(--card)); border-color:rgba(110,118,240,.28); }
[data-theme="dark"] .caj-calc { background:var(--surface2); }
.mini-prog .pb-ok { background:#12b76a; } .mini-prog .pb-warn { background:#f79009; } .mini-prog .pb-bad { background:#f04438; }
/* selector de tema en el ☰ */
.drawer-tema { display:flex; align-items:center; gap:10px; margin:4px 0 10px; }
.drawer-tema-btns { display:flex; gap:4px; background:var(--surface2); border-radius:999px; padding:3px; }
.drawer-tema-btns button { border:none; background:transparent; color:var(--muted); font-size:12.5px; font-weight:600; padding:5px 12px; border-radius:999px; cursor:pointer; }
.drawer-tema-btns button.on { background:var(--acento); color:#fff; }
/* ── SIMETRÍA de tarjetas del reporte (feedback Vicente 2026-08-26) ──
   Zonas fijas: etiqueta (altura reservada p/ 1-2 líneas) → número SIEMPRE pegado a ella
   → chips/barras → texto chico anclado al FONDO. Los números y los pies quedan
   alineados entre tarjetas vecinas aunque el contenido difiera. */
.dash-card { gap:6px; }
.dash-cards .dash-label { min-height:30px; display:flex; align-items:flex-end; }
.dash-num { margin-top:2px; }
.dash-sub { margin-top:auto; padding-top:8px; }
.dash-heroes .dash-num { margin-top:4px; }
.dash-delta-row { align-content:flex-start; }
/* detalle del reporte en VENTANA flotante (con ✕), en vez de pintarse abajo donde nadie lo ve */
.dash-ov { position:fixed; inset:0; z-index:120; background:rgba(10,12,18,.45); display:flex; align-items:flex-end; justify-content:center; }
.dash-modal { background:var(--card); width:100%; max-width:680px; max-height:88vh; overflow:auto; border-radius:18px 18px 0 0; border:1px solid var(--line); box-shadow:var(--sombra-lg, 0 24px 60px rgba(0,0,0,.3)); -webkit-overflow-scrolling:touch; }
@media (min-width:640px) { .dash-ov { align-items:center; padding:24px; } .dash-modal { border-radius:18px; } }
.dash-modal .panel-box { border:none; box-shadow:none; margin:0; border-radius:0; }
.dash-modal .dash-det-head { position:sticky; top:0; background:var(--card); padding-top:4px; z-index:2; }
[data-theme="dark"] .dash-ov { background:rgba(0,0,0,.62); }
/* tipo de marca (Local / Evento) al crear una marca */
.tipo-marca { margin-top:14px; padding-top:14px; border-top:1px solid var(--line); }
.tipo-op { display:flex; align-items:flex-start; gap:10px; padding:11px 13px; border:1px solid var(--line); border-radius:12px; margin-bottom:8px; cursor:pointer; }
.tipo-op:has(input:checked) { border-color:var(--acento); background:var(--acento-weak); }
.tipo-op input { margin-top:3px; accent-color:var(--acento); }
.tipo-op span { display:flex; flex-direction:column; gap:2px; font-size:13.5px; }
.tipo-op .muted { font-size:12.5px; }
/* Mesas VIP */
.mv-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(104px, 1fr)); gap:10px; margin-top:12px; }
.mv-mesa { display:flex; flex-direction:column; gap:3px; align-items:flex-start; text-align:left; padding:11px 12px; border-radius:14px; border:1px solid var(--line); background:var(--card); cursor:pointer; min-height:78px; }
.mv-mesa.libre { border-style:dashed; color:var(--muted); }
.mv-mesa.reservada { border-color:var(--warn); background:color-mix(in srgb, var(--warn) 8%, var(--card)); }
.mv-mesa.pagada { border-color:var(--ok); background:color-mix(in srgb, var(--ok) 10%, var(--card)); }
.mv-num { font-family:var(--f-display); font-size:20px; font-weight:620; letter-spacing:-.02em; }
.mv-nom { font-size:12.5px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:100%; }
.mv-plata { font-size:11.5px; color:var(--muted); font-variant-numeric:tabular-nums; }
.mv-leyenda { display:flex; align-items:center; gap:6px; font-size:12px; margin-top:12px; flex-wrap:wrap; }
.mv-pt { width:10px; height:10px; border-radius:3px; border:1px solid var(--line); display:inline-block; }
.mv-pt.reservada { border-color:var(--warn); background:color-mix(in srgb, var(--warn) 30%, transparent); }
.mv-pt.pagada { border-color:var(--ok); background:color-mix(in srgb, var(--ok) 30%, transparent); }
.mv-layout { margin-top:10px; font-size:13px; }
.mv-abono { border:1px solid var(--line); border-radius:12px; padding:10px 12px; margin-top:8px; display:flex; flex-direction:column; gap:8px; }
/* filas de la planilla de estimación / cierre real */
.ev-fila { display:flex; align-items:center; gap:8px; padding:6px 0; flex-wrap:wrap; }
.ev-fila .ev-det { flex:1 1 150px; min-width:120px; }
.ev-fila .ev-cant { width:64px; text-align:right; }
.ev-fila .ev-x { color:var(--muted); font-size:13px; }
.ev-fila .ev-precio { width:120px; }
.ev-fila .ev-sub { min-width:96px; text-align:right; font-weight:600; font-variant-numeric:tabular-nums; font-family:var(--f-display); }
.ev-chk { display:inline-flex; align-items:center; gap:5px; font-size:12px; color:var(--muted); white-space:nowrap; }
.ev-x-btn { border:none; background:transparent; color:var(--muted); cursor:pointer; font-size:15px; padding:4px 6px; }
.ev-x-btn:hover { color:var(--bad); }
.ev-fila .ev-transf { width:96px; }
/* planillas de evento en el teléfono: cada línea legible, con etiquetas */
@media (max-width: 640px) {
  .ev-fila { display:grid; grid-template-columns:1fr auto; gap:6px 8px; border-bottom:1px solid var(--line); padding:10px 0; }
  .ev-fila .ev-det { grid-column:1; }
  .ev-fila .ev-x-btn { grid-column:2; grid-row:1; align-self:start; }
  .ev-fila .ev-cant, .ev-fila .ev-precio, .ev-fila .ev-transf { grid-column:1; width:100%; }
  .ev-fila .ev-x { display:none; }
  .ev-fila .ev-sub { grid-column:1 / -1; text-align:right; font-size:15px; }
  .ev-fila .ev-chk { grid-column:1 / -1; }
}
/* Aviso del ambiente de PRUEBAS (staging): imposible confundirlo con la app real */
.banner-entorno { background:#f59e0b; color:#1c1206; text-align:center; padding:7px 12px; font-size:12.5px; font-weight:600; letter-spacing:.01em; position:sticky; top:0; z-index:60; }
body.es-pruebas { box-shadow: inset 0 0 0 3px #f59e0b; }
body.es-pruebas header { border-bottom-color:#f59e0b; }

/* ---------- Elegir el EVENTO al entrar (marcas tipo evento) ---------- */
/* Separador de ancho completo dentro de la grilla del inicio ("Próximos" / "Anteriores"). */
.landing-grid .ev-sep { grid-column: 1 / -1; font-size: 12px; font-weight: 650; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted); margin: 6px 2px 0; }
/* La tarjeta de crear va en punteado: se distingue de los eventos que ya existen. */
.landing-grid .area-card.ev-nuevo { border-style: dashed; }
.landing-grid .area-card.ev-nuevo .area-icon svg { opacity: .8; }
/* La ficha del evento usa los campos del resto de la app; el textarea hereda el mismo trazo. */
.dash-modal .cajf textarea { width: 100%; font: inherit; color: inherit; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; resize: vertical; }
.dash-modal .cajf textarea:focus { outline: none; border-color: var(--acento); }
