/* ============================================================
   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 {
  /* Modo claro */
  --bg: #fafafa;
  --card: #ffffff;
  --surface2: #f4f4f5;
  --text: #18181b;
  --muted: #71717a;
  --line: #e4e4e7;
  --primary: #18181b;        /* el "acento" es el propio negro */
  --primary-text: #ffffff;
  --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;      /* en oscuro, el acento es el blanco */
    --primary-text: #0a0a0b;
    --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;
  --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;
  --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(--muted); 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: 22px; flex-wrap: wrap; position: sticky; top: 0; z-index: 10; }
.logo { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
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); }

/* ---------- Landing de áreas ---------- */
#landing { max-width: 980px; margin: 0 auto; padding: 40px 22px; }
.landing-titulo { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 6px; }
.landing-sub { font-size: 14px; margin: 0 0 28px; max-width: 620px; }
.landing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.area-card { border: 1px solid var(--line); border-radius: 14px; padding: 22px 20px; background: var(--card); min-height: 130px; display: flex; flex-direction: column; gap: 6px; transition: border-color .12s, transform .12s, box-shadow .12s; }
.area-card.abierta { cursor: pointer; }
.area-card.abierta:hover { border-color: var(--text); transform: translateY(-2px); box-shadow: var(--sombra); }
.area-card.bloqueada { opacity: .5; }
.area-icon { font-size: 30px; line-height: 1; }
.area-nombre { font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.area-desc { font-size: 13px; line-height: 1.4; }
.area-lock { font-size: 14px; }
.area-bloq { font-size: 12px; margin-top: auto; }
.area-badge { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; background: var(--surface2); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 1px 8px; font-weight: 500; }
/* Ramas (Embajadores / Local) */
.rama-card { border: 1px solid var(--line); border-radius: 16px; padding: 34px 28px; background: var(--card); min-height: 180px; display: flex; flex-direction: column; justify-content: center; gap: 10px; cursor: pointer; transition: border-color .12s, transform .12s, box-shadow .12s; }
.rama-card:hover { border-color: var(--text); transform: translateY(-2px); box-shadow: var(--sombra); }
.rama-icon { font-size: 46px; line-height: 1; }
.rama-nombre { font-size: 24px; font-weight: 650; letter-spacing: -.01em; }
.rama-desc { font-size: 14px; line-height: 1.45; }
.rama-mini { min-height: 0; padding: 18px 24px; }
.rama-mini .rama-icon { font-size: 26px; } .rama-mini .rama-nombre { font-size: 17px; }
.area-volver { justify-content: center; background: var(--surface2); }
.area-volver .area-icon { font-size: 22px; }
.marca-card { min-height: 90px; 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 14px; }
.landing-ctx { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; background: var(--surface2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 16px; }
.landing-ctx a { color: var(--muted); cursor: pointer; text-decoration: underline; font-size: 13px; }
.construccion h2 { margin: 0 0 8px; font-size: 20px; }
.construccion p { max-width: 640px; line-height: 1.5; }

/* ---------- Controles ---------- */
.toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; background: var(--card); padding: 12px 16px; border-radius: 10px; border: 1px solid var(--line); }
.toolbar label { font-size: 13.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
input, select, textarea { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; background: var(--card); color: var(--text); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--muted); }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
button { padding: 8px 14px; border: 1px solid var(--line); background: var(--card); border-radius: 8px; cursor: pointer; font-size: 13.5px; color: var(--text); transition: background .12s, border-color .12s; }
button:hover { background: var(--surface2); }
button.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); font-weight: 500; }
button.primary:hover { opacity: .9; background: var(--primary); }
button:disabled { opacity: .5; cursor: wait; }
.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: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; min-width: 150px; 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: 10px; padding: 18px; margin-bottom: 16px; box-shadow: var(--sombra); position: relative; }
.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)); }
.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: 8px; }
.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; }

/* ---------- 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); }
.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: 4px 9px; font-size: 12px; }
.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: #6aa9ff; }
.com-item.com-cliente { border-left-color: #ffb454; }
.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: #d68910; 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-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(--ink); 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-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; }

/* ---------- 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; }
.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: sticky; top: 0; z-index: 50; 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); }

/* 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(--primary); 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; }
.pt-card { border-radius: 12px; }
.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(--primary); color: var(--primary-text); font-weight: 600; }

/* 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; }
.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: 8px 12px; }
  #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: 10px; }
  .card { min-width: calc(50% - 5px); 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; }
}
