/* Milonga · Correo — estilos del prototipo.
   Regla: aquí no hay colores sueltos. Todo sale de tokens.css (var(--…)) o de mezclas de esos tokens. */

:root {
  color-scheme: light;
  --tinte: color-mix(in srgb, var(--accent) 8%, var(--surface));
  --tinte-fuerte: color-mix(in srgb, var(--accent) 16%, var(--surface));
  --hilo: color-mix(in srgb, var(--on-progress) 26%, transparent);
  --hilo-suave: color-mix(in srgb, var(--on-progress) 14%, transparent);
  --lateral: 232px;
}
[data-tema="oscuro"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/24px var(--font-sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
button, select, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
svg { display: block; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
#vista:focus { outline: none; }

.oculto {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.saltar {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: var(--radius-md);
  background: var(--text); color: var(--bg); font-weight: 600; text-decoration: none;
}
.saltar:focus { top: 12px; }

/* ───────── Iconos ───────── */
.ico {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}

/* ───────── Cinta de prototipo ───────── */
.cinta {
  padding: 4px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .06em;
  text-align: center; text-transform: uppercase;
}

/* ───────── Armazón ───────── */
.app {
  display: grid;
  grid-template-columns: var(--lateral) minmax(0, 1fr);
  min-height: 0;
}

.lateral {
  display: flex; flex-direction: column; gap: 28px;
  min-height: 0; overflow-y: auto;
  padding: 22px 14px 18px;
  background: var(--surface);
  border-right: 1px solid var(--border);
}

.marca {
  display: flex; align-items: center; gap: 10px;
  padding: 0 8px; color: var(--text); text-decoration: none;
}
.marca-sello { width: 34px; height: 34px; color: var(--accent); flex: none; transition: color var(--base) var(--ease); }
.marca-texto { display: flex; flex-direction: column; }
.marca-nombre { font: 600 22px/24px var(--font-display); letter-spacing: -.01em; }
.marca-sub { font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
.marca-movil { display: none; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius-md);
  color: var(--text-muted); font-size: 15px; font-weight: 500; text-decoration: none;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a[aria-current="page"] { background: var(--tinte); color: var(--text); font-weight: 600; }
.nav a[aria-current="page"] .ico { color: var(--accent); }
.nav a[aria-current="page"]::before {
  content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--accent);
}

.nivel-mini {
  margin-top: auto;
  display: grid; gap: 4px;
  padding: 14px; border-radius: var(--radius-lg);
  border: 1px solid var(--border); background: var(--bg);
  color: var(--text); text-decoration: none;
  transition: border-color var(--fast) var(--ease);
}
.nivel-mini:hover { border-color: var(--border-input); }
.nivel-mini .nm-rotulo { font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.nivel-mini strong { font: 600 19px/24px var(--font-display); }
.nivel-mini .barra-tejido { height: 8px; margin-top: 4px; }

.cuerpo { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; min-height: 0; }

.barra {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.barra-izq, .barra-der { display: flex; align-items: center; gap: 10px; min-width: 0; }

.segmento {
  display: inline-flex; flex: none; gap: 2px; padding: 3px;
  border: 1px solid var(--border); border-radius: var(--radius-pill);
  background: var(--surface-2);
}
.segmento button {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 34px; padding: 0 14px;
  border: 0; border-radius: var(--radius-pill); background: transparent;
  color: var(--text-muted); font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.segmento button:hover { color: var(--text); }
.segmento button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-card); }
.punto { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.punto-nacional { background: var(--accent-nacional); }
.punto-internacional { background: var(--accent-internacional); }

.selector { min-width: 0; display: block; }
.selector select {
  appearance: none; -webkit-appearance: none;
  max-width: 100%; min-height: 40px; padding: 0 34px 0 14px;
  border: 1px solid var(--border-input); border-radius: var(--radius-pill);
  background-color: var(--surface);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
    linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 19px) 52%, calc(100% - 14px) 52%;
  background-size: 5px 5px; background-repeat: no-repeat;
  font-size: 14px; font-weight: 500; text-overflow: ellipsis;
}

.conmutador {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 8px 0 12px;
  border: 1px solid var(--border); border-radius: var(--radius-pill);
  background: var(--surface); color: var(--text-muted);
  font-size: 14px; font-weight: 500; white-space: nowrap;
}
.conmutador[aria-checked="true"] { color: var(--text); }
.interruptor-pista {
  position: relative; width: 36px; height: 22px; flex: none;
  border-radius: var(--radius-pill); background: var(--border-input);
  transition: background var(--base) var(--ease);
}
.interruptor-perilla {
  position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--surface);
  transition: transform var(--base) var(--ease);
}
[aria-checked="true"] > .interruptor-pista { background: var(--accent); }
[aria-checked="true"] > .interruptor-pista .interruptor-perilla { transform: translateX(14px); background: var(--on-accent); }

.btn-ico {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
  border: 1px solid var(--border); border-radius: 50%;
  background: var(--surface); color: var(--text-muted); text-decoration: none;
  transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.btn-ico:hover { color: var(--text); border-color: var(--border-input); }
.ico-luna { display: none; }
[data-tema="oscuro"] .ico-sol { display: none; }
[data-tema="oscuro"] .ico-luna { display: block; }

.avatar-caja { position: relative; }
.avatar {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid var(--tinte-fuerte); border-radius: 50%;
  background: var(--tinte); color: var(--accent);
}
.menu-flotante {
  position: absolute; right: 0; top: 48px; z-index: 30;
  min-width: 220px; padding: 8px;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface); box-shadow: var(--shadow-pop);
}
.menu-flotante[hidden] { display: none; }
.menu-titulo { padding: 8px 12px 6px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.menu-flotante a { display: block; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 15px; text-decoration: none; }
.menu-flotante a:hover { background: var(--surface-2); }

#vista { min-width: 0; overflow-y: auto; overflow-x: hidden; padding: 32px 32px 72px; scroll-behavior: smooth; }
.pagina { max-width: 1240px; margin: 0 auto; }
.pagina-cab { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.pagina-cab h1 { font: 600 34px/40px var(--font-display); letter-spacing: -.015em; }
.sin-js { padding: 24px; }

/* ───────── Piezas comunes ───────── */
.rotulo {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-muted);
}
.rotulo .ico { width: 16px; height: 16px; color: var(--accent); }
.tenue { color: var(--text-muted); }
.nota { font-size: 13px; line-height: 19px; color: var(--text-muted); }
.fuerte { font-weight: 600; }

.tarjeta {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow-card);
}
.tarjeta h2 { font: 600 22px/28px var(--font-display); letter-spacing: -.01em; }

.seccion-cab { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.seccion-cab h2 { font: 600 22px/28px var(--font-display); letter-spacing: -.01em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px;
  border: 1px solid transparent; border-radius: var(--radius-pill);
  background: var(--accent); color: var(--on-accent);
  font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: transform var(--fast) var(--ease), filter var(--fast) var(--ease), background var(--base) var(--ease);
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(1px); }
.btn .ico { width: 18px; height: 18px; }
.btn.sec { background: var(--surface); color: var(--text); border-color: var(--border-input); }
.btn.sec:hover { filter: none; background: var(--surface-2); }
.btn.peq { min-height: 36px; padding: 0 14px; font-size: 14px; }

.enlace { color: var(--accent); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.enlace:hover { text-decoration-thickness: 2px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 2px 10px; border-radius: var(--radius-pill);
  background: var(--surface-2); color: var(--text);
  font-size: 12px; line-height: 18px; font-weight: 600; white-space: nowrap;
}
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); }
.chip.encendido::before, .chip.enviada::before { background: var(--success); }
.chip.apagado, .chip.borrador { color: var(--text-muted); }
.chip.apagado::before, .chip.borrador::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--border-input); }
.chip.programada::before { background: var(--accent); }
.chip.enviando::before { background: var(--warning); }
.chip.nuevo { background: var(--accent); color: var(--on-accent); }
.chip.nuevo::before { display: none; }
.chip.rindiendo {
  background-color: var(--progress); color: var(--on-progress);
  background-image: repeating-linear-gradient(45deg, var(--hilo-suave) 0 2px, transparent 2px 6px);
}
.chip.rindiendo::before { background: var(--on-progress); }
.chip.muestra { background: transparent; color: var(--text-muted); box-shadow: inset 0 0 0 1px var(--border); font-weight: 500; }
.chip.muestra::before { display: none; }

/* Textura de tejido: solo en barras de progreso, rachas y el chip «Rindiendo». */
.tejido, .barra-tejido > span {
  background-color: var(--progress);
  background-image:
    repeating-linear-gradient(45deg, var(--hilo) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(-45deg, var(--hilo-suave) 0 2px, transparent 2px 7px);
}
.barra-tejido {
  display: block; height: 14px; overflow: hidden;
  border-radius: var(--radius-pill); background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border);
}
.barra-tejido > span { display: block; height: 100%; min-width: 10px; border-radius: var(--radius-pill); transform-origin: left center; }

.barra-fina { display: block; height: 6px; overflow: hidden; border-radius: var(--radius-pill); background: var(--surface-2); }
.barra-fina > span { display: block; height: 100%; min-width: 4px; border-radius: var(--radius-pill); background: var(--text-muted); transform-origin: left center; }
.barra-fina.acento > span { background: var(--accent); }
.barra-fina.n-bien > span { background: var(--success); }
.barra-fina.n-regular > span { background: var(--warning); }
.barra-fina.n-mal > span { background: var(--danger); }

.anillo { display: block; }
.anillo-fondo { fill: none; stroke: var(--surface-2); stroke-width: 10; }
.anillo-valor { fill: none; stroke: var(--accent); stroke-width: 10; stroke-linecap: round; transition: stroke var(--base) var(--ease); }
.anillo.oro .anillo-valor { stroke: var(--progress); }

.tabla-caja { overflow-x: auto; margin: 0 -8px; -webkit-overflow-scrolling: touch; }
.tabla { width: 100%; min-width: 540px; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.tabla th {
  padding: 8px; text-align: right; white-space: nowrap;
  font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted);
}
.tabla td { padding: 11px 8px; text-align: right; border-top: 1px solid var(--border); white-space: nowrap; }
.tabla th:first-child, .tabla td:first-child, .tabla th.izq, .tabla td.izq { text-align: left; }
.tabla td.nombre { white-space: normal; min-width: 200px; font-weight: 500; }
.tabla tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.tabla .mini { display: block; font-size: 12px; line-height: 16px; font-weight: 400; color: var(--text-muted); }

/* ───────── Inicio ───────── */
.aviso-calma {
  display: none; align-items: center; gap: 10px;
  margin-bottom: 20px; padding: 10px 16px;
  border: 1px dashed var(--border-input); border-radius: var(--radius-md);
  font-size: 14px; color: var(--text-muted);
}
[data-calma="si"] .aviso-calma { display: flex; }
[data-calma="si"] .juego { display: none !important; }

.rejilla-inicio { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.rejilla-inicio > * { grid-column: 1 / -1; min-width: 0; }
.rejilla-inicio > .hero, .rejilla-inicio > .mision, .rejilla-inicio > .ultimas { grid-column: span 7; }
.rejilla-inicio > .nivel, .rejilla-inicio > .marea, .rejilla-inicio > .proximos { grid-column: span 5; }

/* Venta del correo */
.hero {
  display: flex; flex-direction: column;
  padding: 28px;
  background:
    radial-gradient(120% 130% at 100% 0%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 62%),
    var(--surface);
}
.cifra-grande {
  margin: 10px 0 8px;
  font: 600 clamp(40px, 5vw, 66px)/1.04 var(--font-display);
  letter-spacing: -.025em; overflow-wrap: anywhere;
}
.hero-comp { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 15px; color: var(--text-muted); }
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; }
.delta .ico { width: 16px; height: 16px; stroke-width: 2.2; }
.delta.sube { color: var(--success); }
.delta.baja { color: var(--danger); }
.hero-pie { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 20px 28px; margin-top: auto; padding-top: 28px; }
.datos { display: flex; flex-wrap: wrap; gap: 14px 30px; }
.datos dt { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.datos dd { font-size: 20px; line-height: 28px; font-weight: 600; }
.mini-barras { display: flex; align-items: flex-end; gap: 8px; }
.mb { display: grid; gap: 5px; justify-items: center; width: 26px; }
.mb-col { display: flex; align-items: flex-end; width: 100%; height: 56px; }
.mb-b { display: block; width: 100%; min-height: 4px; border-radius: 6px 6px 2px 2px; background: color-mix(in srgb, var(--accent) 24%, var(--surface-2)); transform-origin: center bottom; }
.mb.actual .mb-b { background: var(--accent); }
.mb-m { font-size: 11px; line-height: 14px; color: var(--text-muted); }
.mb.actual .mb-m { color: var(--text); font-weight: 600; }

/* Nivel de la tienda */
.nivel { display: flex; flex-direction: column; padding: 28px; }
.nivel-cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.nivel-nombre { margin-top: 6px; font: 600 clamp(30px, 3.4vw, 40px)/1.1 var(--font-display) !important; letter-spacing: -.02em; }
.olas { width: 84px; height: auto; flex: none; fill: none; stroke: var(--border); stroke-width: 2.2; stroke-linecap: round; }
.olas .on { stroke: var(--accent); }
.nivel-pasos {
  position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 22px 0 14px; padding: 0; list-style: none;
}
.nivel-pasos::before { content: ""; position: absolute; left: 8.33%; right: 8.33%; top: 6px; height: 2px; background: var(--border); }
.nivel-pasos li { position: relative; display: grid; gap: 7px; justify-items: center; font-size: 11.5px; line-height: 14px; color: var(--text-muted); text-align: center; }
.np-punto { width: 14px; height: 14px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2px var(--border-input); }
.nivel-pasos .hecho .np-punto { background: var(--progress); box-shadow: none; }
.nivel-pasos .actual .np-punto { background: var(--surface); box-shadow: inset 0 0 0 4px var(--progress), 0 0 0 4px color-mix(in srgb, var(--progress) 22%, transparent); }
.nivel-pasos .actual { color: var(--text); font-weight: 700; }
.nivel-falta { margin-top: 10px; font-size: 15px; }
.nivel .nota { margin-top: auto; padding-top: 14px; }

/* Misión de la semana */
.mision {
  display: flex; flex-direction: column; gap: 14px;
  padding: 28px;
  border-color: color-mix(in srgb, var(--accent) 34%, var(--border));
  background:
    linear-gradient(160deg, var(--tinte-fuerte), var(--tinte) 46%, var(--surface));
}
.mision h2 { font-size: 27px; line-height: 32px; }
.mision-texto { max-width: 56ch; font-size: 16px; }
.mision-barras { display: grid; gap: 12px; margin-top: 4px; }
.mbar-cab { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; font-size: 14px; line-height: 20px; }
.mbar-cab strong { font-weight: 700; }
.mision .barra-fina { height: 8px; background: color-mix(in srgb, var(--text) 9%, transparent); }
.mision-pie { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 20px; margin-top: 6px; }
.mision-valor { font-size: 14px; }
.mision-valor strong { display: block; font: 600 30px/34px var(--font-display); letter-spacing: -.02em; }
.mision.cumplida { background: var(--surface); border-color: var(--border); }

/* Marea de la lista */
.marea { display: flex; flex-direction: column; padding: 28px; }
.marea-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.marea-cuerpo { display: flex; align-items: center; gap: 26px; margin-top: 18px; }
.marea-anillo { position: relative; width: 136px; height: 136px; flex: none; }
.marea-centro { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; }
.marea-centro strong { font: 600 42px/44px var(--font-display); letter-spacing: -.02em; }
.marea-centro span { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--text-muted); }
.marea-lista { flex: 1; min-width: 0; display: grid; gap: 12px; padding: 0; list-style: none; }
.marea-lista li { display: grid; gap: 5px; }
.ml-cab { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; line-height: 20px; }
.ml-cab strong { font-weight: 700; }
.ml-meta { font-size: 12px; line-height: 16px; color: var(--text-muted); }
.racha { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 18px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.racha-num { font-size: 15px; font-weight: 600; }
.racha-num strong { font: 600 30px/32px var(--font-display); letter-spacing: -.02em; margin-right: 4px; }
.racha-cuadros { display: flex; gap: 4px; padding: 0; list-style: none; }
.racha-cuadros li { width: 13px; height: 22px; border-radius: 4px; }
.racha-cuadros .rota { background: transparent; box-shadow: inset 0 0 0 1.5px var(--border-input); }

/* Ruta de arranque */
.ruta { padding: 0; }
.ruta-cab {
  display: flex; align-items: center; gap: 16px; width: 100%;
  padding: 18px 24px; border: 0; border-radius: var(--radius-lg);
  background: transparent; text-align: left;
}
.ruta-cab .anillo { flex: none; }
.ruta-cab .anillo-fondo, .ruta-cab .anillo-valor { stroke-width: 14; }
.ruta-titulo { flex: 1; min-width: 0; display: grid; }
.ruta-titulo strong { font: 600 20px/26px var(--font-display); }
.ruta-titulo span { font-size: 14px; color: var(--text-muted); }
.ruta-cab .chevron { color: var(--text-muted); transition: transform var(--base) var(--ease); }
.ruta-cab[aria-expanded="false"] .chevron { transform: rotate(-90deg); }
.ruta-pasos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; margin: 0; padding: 0 24px 16px; list-style: none; counter-reset: paso; }
.ruta-pasos[hidden] { display: none; }
.ruta-pasos li { counter-increment: paso; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 0; border-top: 1px solid var(--border); }
.paso-marca {
  display: inline-grid; place-items: center; width: 26px; height: 26px; flex: none;
  border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--border-input);
  font-size: 12px; font-weight: 700; color: var(--text-muted);
}
.paso-marca::before { content: counter(paso); }
.hecho > .paso-marca { background: var(--success); color: var(--surface); box-shadow: none; }
.hecho > .paso-marca::before { content: none; }
.paso-marca .ico { width: 15px; height: 15px; stroke-width: 2.4; }
.paso-texto { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; }
.hecho > .paso-texto { font-weight: 400; color: var(--text-muted); }
.paso-texto small { display: block; font-size: 12px; line-height: 16px; font-weight: 400; color: var(--text-muted); }

/* Tablero de escenarios */
.tablero { padding: 28px; }
.fichas { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 12px; }
.ficha-esc {
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
  padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); color: var(--text); text-decoration: none;
  transition: transform var(--base) var(--ease), border-color var(--base) var(--ease), box-shadow var(--base) var(--ease);
}
.ficha-esc:hover { transform: translateY(-2px); border-color: var(--border-input); box-shadow: var(--shadow-card); }
.ficha-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.ico-caja { display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 11px; background: var(--surface-2); color: var(--text); }
.ficha-nombre { font-size: 14px; line-height: 19px; font-weight: 600; min-height: 38px; }
.ficha-venta { font: 600 25px/30px var(--font-display); letter-spacing: -.015em; }
.ficha-pie { font-size: 12.5px; line-height: 17px; color: var(--text-muted); }
.ficha-esc.est-rindiendo .ico-caja { background: var(--progress); color: var(--on-progress); }
.ficha-esc.est-apagado { background: transparent; border-style: dashed; }
.ficha-esc.est-apagado .ficha-venta, .ficha-esc.est-nuevo .ficha-venta { color: var(--text-muted); }
.ficha-esc.est-nuevo { background: var(--tinte); border-color: color-mix(in srgb, var(--accent) 34%, var(--border)); }
.ficha-esc.est-nuevo .ico-caja { background: var(--surface); color: var(--accent); }

/* Próximos 7 días */
.proximos, .ultimas { padding: 28px; }
.agenda { display: grid; gap: 0; padding: 0; list-style: none; }
.agenda li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--border); }
.agenda li:first-child { border-top: 0; padding-top: 0; }
.fecha-bloque { display: grid; justify-items: center; width: 50px; flex: none; padding: 6px 0; border-radius: var(--radius-md); background: var(--surface-2); }
.fecha-bloque span { font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.fecha-bloque strong { font: 600 21px/24px var(--font-display); }
.agenda-cuerpo { flex: 1; min-width: 0; }
.agenda-cuerpo a { display: block; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.agenda-cuerpo a:hover { text-decoration: underline; text-underline-offset: 3px; }
.agenda-cuerpo span { display: block; font-size: 13px; line-height: 18px; color: var(--text-muted); }
.vacio { display: grid; gap: 12px; justify-items: start; padding: 4px 0 8px; color: var(--text-muted); }
.proximos .nota { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.en-curso { color: var(--warning); font-weight: 600; }

/* Récords: sellos «hecho a mano» */
.records { padding: 28px; }
.sellos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 28px; padding: 0; list-style: none; }
.record { display: flex; align-items: center; gap: 18px; min-width: 0; }
.sello { width: 112px; height: 112px; flex: none; }
.sello-0 { transform: rotate(-7deg); }
.sello-1 { transform: rotate(4deg); }
.sello-2 { transform: rotate(-3deg); }
.sello-borde { fill: none; stroke: var(--progress); stroke-width: 1.8; stroke-dasharray: 3.2 3.2; }
.sello-interior { fill: color-mix(in srgb, var(--progress) 9%, transparent); stroke: var(--progress); stroke-width: 1.2; }
.sello-arco { fill: var(--text-muted); font: 700 8.6px var(--font-sans); letter-spacing: .08em; }
.sello-valor { fill: var(--text); font: 600 17px var(--font-display); }
.sello-pie { fill: var(--text-muted); font: 600 7.6px var(--font-sans); letter-spacing: .06em; text-transform: uppercase; }
.record-titulo { font-weight: 600; }
.record p + p { font-size: 14px; line-height: 20px; }

/* Pantallas que llegan en la siguiente entrega */
.construccion { display: grid; gap: 14px; justify-items: start; max-width: 720px; padding: 36px; }
.construccion .sello { width: 96px; height: 96px; transform: rotate(-6deg); }
.construccion h2 { font-size: 28px; line-height: 34px; }
.construccion ul { display: grid; gap: 8px; padding: 0; list-style: none; }
.construccion li { display: flex; gap: 10px; align-items: flex-start; }
.construccion li .ico { margin-top: 2px; color: var(--accent); }

/* ───────── Avisos propios ───────── */
.avisos { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: grid; gap: 8px; justify-items: end; pointer-events: none; }
.aviso {
  display: flex; align-items: center; gap: 12px; max-width: min(440px, calc(100vw - 32px));
  padding: 12px 12px 12px 16px; border-radius: var(--radius-md);
  background: var(--text); color: var(--bg); box-shadow: var(--shadow-pop);
  font-size: 14px; line-height: 20px; pointer-events: auto;
}
.aviso-btn { flex: none; padding: 4px 10px; border: 1px solid currentColor; border-radius: var(--radius-pill); background: transparent; color: inherit; font-size: 13px; font-weight: 600; }
.aviso-x { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none; border: 0; border-radius: 50%; background: transparent; color: inherit; }
.aviso-x .ico { width: 16px; height: 16px; }
.aviso :focus-visible { outline-color: var(--bg); }

/* ───────── Movimiento (sobrio; solo al entrar a una pantalla) ───────── */
@media (prefers-reduced-motion: no-preference) {
  .entrando .rejilla-inicio > *, .entrando .construccion { animation: subir .5s var(--ease) both; }
  .entrando .rejilla-inicio > :nth-child(2) { animation-delay: 40ms; }
  .entrando .rejilla-inicio > :nth-child(3) { animation-delay: 80ms; }
  .entrando .rejilla-inicio > :nth-child(4) { animation-delay: 120ms; }
  .entrando .rejilla-inicio > :nth-child(n+5) { animation-delay: 160ms; }
  .entrando .anillo-valor { animation: anillo 1s var(--ease) .15s both; }
  .entrando .barra-tejido > span, .entrando .barra-fina > span { animation: crecer .9s var(--ease) .2s both; }
  .entrando .mb-b { animation: alzar .7s var(--ease) .2s both; }
  .aviso { animation: subir .28s var(--ease) both; }
  @keyframes subir { from { opacity: 0; transform: translateY(10px); } }
  @keyframes anillo { from { stroke-dashoffset: var(--c); } }
  @keyframes crecer { from { transform: scaleX(0); } }
  @keyframes alzar { from { transform: scaleY(0); } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ───────── Anchos ───────── */
@media (max-width: 1240px) {
  .rejilla-inicio > .hero, .rejilla-inicio > .nivel, .rejilla-inicio > .mision,
  .rejilla-inicio > .marea, .rejilla-inicio > .proximos, .rejilla-inicio > .ultimas { grid-column: 1 / -1; }
}
@media (min-width: 1080px) and (max-width: 1240px) {
  .rejilla-inicio > .hero, .rejilla-inicio > .mision { grid-column: span 7; }
  .rejilla-inicio > .nivel, .rejilla-inicio > .marea { grid-column: span 5; }
  .marea-cuerpo { flex-direction: column; align-items: stretch; }
  .marea-anillo { align-self: center; }
  .sellos { grid-template-columns: 1fr; }
  .olas { display: none; }
}

@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); }

  .lateral {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    flex-direction: row; gap: 0; overflow: visible;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    border-right: 0; border-top: 1px solid var(--border);
  }
  .lateral > .marca, .lateral > .nivel-mini { display: none; }
  .nav { flex: 1; flex-direction: row; gap: 0; }
  .nav li { flex: 1 1 0; min-width: 0; }
  .nav a { flex-direction: column; gap: 3px; padding: 7px 0 5px; border-radius: 10px; font-size: 10.5px; line-height: 13px; letter-spacing: -.01em; }
  .nav a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav a[aria-current="page"]::before { left: 30%; right: 30%; top: -7px; bottom: auto; width: auto; height: 3px; border-radius: 0 0 3px 3px; }

  .barra { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "marca der" "izq izq"; gap: 10px 12px; padding: 10px 16px 12px; }
  .marca-movil { grid-area: marca; display: flex; align-items: baseline; gap: 8px; padding: 0; }
  .barra-izq { grid-area: izq; gap: 8px; }
  .barra-der { grid-area: der; gap: 8px; }
  .segmento button { padding: 0 11px; font-size: 13px; }
  .selector { flex: 1 1 0; }
  .selector select { width: 100%; padding-left: 12px; font-size: 13px; }
  .conmutador { padding: 0 8px 0 10px; }
  .conmutador-texto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

  #vista { padding: 20px 16px 104px; }
  .pagina-cab { margin-bottom: 18px; }
  .pagina-cab h1 { font-size: 28px; line-height: 34px; }

  .rejilla-inicio { gap: 14px; }
  .tarjeta, .hero, .nivel, .mision, .marea, .tablero, .proximos, .ultimas, .records, .construccion { padding: 20px; }
  .ruta { padding: 0; }
  .ruta-cab { padding: 16px 20px; }
  .ruta-pasos { grid-template-columns: minmax(0, 1fr); padding: 0 20px 12px; }
  .np-nombre { display: none; }
  .nivel-pasos { margin-bottom: 16px; }
  .olas { width: 68px; }
  .mision h2 { font-size: 23px; line-height: 28px; }
  .mision-pie .btn { width: 100%; white-space: normal; text-align: center; padding: 10px 18px; }
  .fichas { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ficha-esc { padding: 14px; }
  .ficha-venta { font-size: 21px; line-height: 26px; }
  .sellos { grid-template-columns: minmax(0, 1fr); }
  .sello { width: 96px; height: 96px; }
  .avisos { left: 16px; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); justify-items: stretch; }
  .aviso { max-width: none; }
}
@media (max-width: 460px) {
  .marea-cuerpo { flex-direction: column; align-items: stretch; gap: 20px; }
  .marea-anillo { align-self: center; }
  .ficha-cab { flex-direction: column; align-items: flex-start; }
}

/* ═════════════════════════════════════════════════════════════════════
   Pantallas: Escenarios, Campañas, Editor, Clientas, Pop-up, Resultados, Ajustes
   ═════════════════════════════════════════════════════════════════════ */

/* ───────── Piezas comunes de las pantallas ───────── */
.fila { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.migas a { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--text-muted); text-decoration: none; }
.migas a:hover { color: var(--text); }
.migas .ico { width: 16px; height: 16px; }
.pagina-cab .nota { margin-top: 4px; max-width: 70ch; }
.pagina > .tarjeta, .pagina > .grupo, .pagina > .dos-col, .pagina > .tira, .pagina > .comp, .pagina > .receta-aviso { margin-bottom: 20px; }
.tarjeta h3 { font: 600 18px/24px var(--font-display); letter-spacing: -.005em; }
.tarjeta h3 a { text-decoration: none; }
.tarjeta h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.tarjeta h2 + .nota { margin-top: 4px; }

.interruptor { display: inline-grid; place-items: center; flex: none; margin: -6px -6px -6px auto; padding: 6px; border: 0; border-radius: var(--radius-pill); background: transparent; }
.interruptor .interruptor-pista { width: 44px; height: 26px; }
.interruptor .interruptor-perilla { width: 20px; height: 20px; }
.interruptor[aria-checked="true"] .interruptor-pista .interruptor-perilla { transform: translateX(18px); }

.campo { display: grid; gap: 6px; min-width: 0; margin-top: 14px; }
.campo-rot { font-size: 13px; line-height: 18px; font-weight: 600; }
.ctl {
  width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--border-input); border-radius: var(--radius-md);
  background-color: var(--surface); color: var(--text); font-size: 15px; line-height: 22px;
}
textarea.ctl { resize: vertical; }
select.ctl {
  appearance: none; -webkit-appearance: none; padding-right: 34px; text-overflow: ellipsis;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 19px) 52%, calc(100% - 14px) 52%; background-size: 5px 5px; background-repeat: no-repeat;
}
.ctl:disabled { background-color: var(--surface-2); color: var(--text-muted); }
.ctl::placeholder { color: var(--text-muted); opacity: 1; }
.ayuda { font-size: 12.5px; line-height: 17px; color: var(--text-muted); }
.fila-campos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.casilla { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; font-size: 15px; line-height: 22px; }
.casilla input, .opcion input { width: 20px; height: 20px; flex: none; margin: 1px 0 0; accent-color: var(--accent); }
.casilla small { display: block; font-size: 12.5px; line-height: 17px; color: var(--text-muted); }
.casilla.apagada { color: var(--text-muted); }
.opciones-fila { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.opcion { display: flex; align-items: center; gap: 8px; flex: 1 1 140px; padding: 10px 14px; border: 1px solid var(--border-input); border-radius: var(--radius-md); font-size: 15px; font-weight: 600; }
.opcion input { margin: 0; }
.opcion:has(input:checked) { border-color: var(--accent); background: var(--tinte); box-shadow: inset 0 0 0 1px var(--accent); }

.btn:disabled { background: var(--surface-2); color: var(--text-muted); border-color: var(--border); cursor: not-allowed; filter: none; transform: none; }
.btn-ico:disabled { opacity: .45; cursor: not-allowed; }
.btn-ico.peligro:hover { color: var(--danger); border-color: var(--danger); }
button.btn-ico { padding: 0; }

.pastilla { display: inline-flex; padding: 3px 12px; border-radius: var(--radius-pill); background: var(--text); color: var(--bg); font-size: 13px; line-height: 20px; font-weight: 600; }
.ficha { display: inline-block; padding: 0 7px; border-radius: 6px; background: var(--tinte-fuerte); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); color: var(--text); font-family: var(--font-sans); font-size: .86em; font-weight: 600; letter-spacing: 0; }
.lista-salidas { display: grid; gap: 10px; margin-top: 12px; padding: 0; list-style: none; font-size: 15px; line-height: 21px; }
.lista-salidas li { display: flex; align-items: flex-start; gap: 10px; }
.lista-salidas .ico { width: 18px; height: 18px; margin-top: 2px; color: var(--text-muted); }
.lista-simple { display: grid; gap: 6px; margin-top: 10px; padding-left: 18px; font-size: 15px; line-height: 21px; }
.dos-col { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.dos-col.parejo { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: stretch; }
.lado, .lado-izq { display: grid; gap: 20px; min-width: 0; }
.lado .tarjeta h2 { font-size: 19px; line-height: 24px; }
.lado .btn { margin-top: 12px; }
.tira { padding: 18px 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); gap: 14px 44px; }
.datos .dd-nota { max-width: 22ch; font-size: 13px; line-height: 18px; font-weight: 400; color: var(--text-muted); }
.cifra-media { margin-top: 12px; font: 600 34px/40px var(--font-display); letter-spacing: -.02em; }

/* Imagen de relleno con textura de macramé (no hay fotos en el prototipo) */
.foto {
  background-color: color-mix(in srgb, var(--accent) 14%, var(--surface-2));
  background-image:
    repeating-linear-gradient(45deg, color-mix(in srgb, var(--accent) 20%, transparent) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(-45deg, color-mix(in srgb, var(--accent) 14%, transparent) 0 1px, transparent 1px 9px);
}

/* ───────── Escenarios ───────── */
.grupo-cab { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 8px 0 14px; }
.grupo-cab h2 { font: 600 22px/28px var(--font-display); letter-spacing: -.01em; }
.grupo + .grupo { margin-top: 12px; }
.recetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.receta { display: flex; flex-direction: column; gap: 8px; padding: 20px; transition: border-color var(--base) var(--ease); }
.receta:hover { border-color: var(--border-input); }
.receta-cab { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.receta-resumen { font-size: 15px; line-height: 21px; }
.receta-tiempos { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 18px; color: var(--text-muted); }
.receta-tiempos .ico { width: 16px; height: 16px; margin-top: 1px; }
.receta-aviso { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: var(--radius-md); background: color-mix(in srgb, var(--warning) 11%, var(--surface)); font-size: 13px; line-height: 18px; }
.receta-aviso .ico { width: 16px; height: 16px; margin-top: 1px; color: var(--warning); }
.receta-aviso.suelto { padding: 12px 16px; font-size: 14px; line-height: 20px; }
.receta-pie { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); }
.receta-pie > div { display: grid; }
.receta-pie .der { text-align: right; }
.receta-venta { font: 600 24px/28px var(--font-display); letter-spacing: -.015em; }
.receta-vol { font-size: 18px; line-height: 28px; font-weight: 600; }
.receta.est-rindiendo .ico-caja { background: var(--progress); color: var(--on-progress); }
.receta.est-apagado { background: transparent; border-style: dashed; box-shadow: none; }
.receta.est-nuevo { background: var(--tinte); border-color: color-mix(in srgb, var(--accent) 34%, var(--border)); }
.receta.est-nuevo .ico-caja { background: var(--surface); color: var(--accent); }
.confirmar { display: grid; gap: 12px; margin-top: auto; padding: 14px; border-radius: var(--radius-md); background: var(--tinte-fuerte); font-size: 15px; line-height: 21px; }

.alcance { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 24px; }
.alcance.por-encender { background: var(--tinte); border-color: color-mix(in srgb, var(--accent) 34%, var(--border)); }
.alcance .confirmar { flex: 1; margin: 0; padding: 0; background: transparent; font-size: 17px; }
.alcance-titulo { margin: 4px 0; font: 500 24px/30px var(--font-display); letter-spacing: -.01em; }
.alcance-titulo strong { font-weight: 600; }

.linea-tiempo { position: relative; display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.linea-tiempo::before { content: ""; position: absolute; left: 17px; top: 18px; bottom: 18px; width: 2px; background: var(--border); }
.lt-paso { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; align-items: start; }
.lt-nodo { position: relative; z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--border-input); color: var(--text-muted); }
.lt-nodo .ico { width: 18px; height: 18px; }
.lt-inicio .lt-nodo { background: var(--accent); box-shadow: none; color: var(--on-accent); }
.lt-nodo.num { background: var(--text); box-shadow: none; color: var(--bg); font-size: 14px; font-weight: 700; }
.lt-espera .lt-nodo { width: 28px; height: 28px; margin: 0 4px; box-shadow: inset 0 0 0 1.5px var(--border); }
.lt-espera .lt-nodo .ico { width: 15px; height: 15px; }
.lt-cuerpo { min-width: 0; padding-top: 6px; }
.lt-espera .lt-cuerpo { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-top: 2px; }
.lt-titulo { margin-top: 2px; font: 600 21px/27px var(--font-display); letter-spacing: -.01em; }
.salida { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: var(--radius-pill); box-shadow: inset 0 0 0 1px var(--border-input); font-size: 12.5px; line-height: 20px; }
.salida .ico { width: 14px; height: 14px; color: var(--text-muted); }
.correo-caja { display: grid; gap: 10px; min-width: 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg); }
.cc-cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cc-nombre { font-weight: 600; }
.cc-pie { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 14px; line-height: 20px; color: var(--text-muted); }
.lt-correo.apagado .correo-caja { background: transparent; border-style: dashed; }
.lt-correo.apagado .cc-nombre { color: var(--text-muted); }
.lt-correo.apagado .lt-nodo.num { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--border-input); color: var(--text-muted); }
.lt-fin .lt-nodo { background: var(--surface-2); box-shadow: none; }
.ventana { display: flex; align-items: center; gap: 12px; margin: 12px 0 8px; }
.ventana strong { font: 600 26px/30px var(--font-display); }
.ventana-linea { flex: 1; height: 8px; border-radius: var(--radius-pill); background: var(--accent); }

/* Prioridad del catálogo: primera versión · siguiente · más adelante */
.prio { display: inline-flex; align-items: center; align-self: flex-start; padding: 1px 9px; border-radius: var(--radius-pill); font-size: 11.5px; line-height: 18px; font-weight: 600; white-space: nowrap; }
.prio.p1 { background: var(--text); color: var(--bg); }
.prio.p2 { box-shadow: inset 0 0 0 1px var(--border-input); color: var(--text); }
.prio.p3 { box-shadow: inset 0 0 0 1px var(--border); color: var(--text-muted); }
.ficha-esc .prio { margin-top: 8px; }
/* Lo nuevo que no es de la primera versión va en tono neutro: el color queda para lo que se enciende primero. */
.ficha-esc.est-nuevo.pr-2, .ficha-esc.est-nuevo.pr-3, .receta.est-nuevo.pr-2, .receta.est-nuevo.pr-3 { background: transparent; border-color: var(--border); border-style: dashed; box-shadow: none; }
.est-nuevo.pr-2 .ico-caja, .est-nuevo.pr-3 .ico-caja { background: var(--surface-2); color: var(--text-muted); }
.pr-2 .chip.nuevo, .pr-3 .chip.nuevo { background: var(--surface-2); color: var(--text); }
.leyenda-prio { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; margin: -8px 0 20px; font-size: 13px; line-height: 20px; color: var(--text-muted); }
.leyenda-prio > span { display: inline-flex; align-items: center; gap: 8px; }

/* Reseñas */
.estrellas { display: inline-flex; gap: 2px; }
.estrella { width: 16px; height: 16px; fill: none; stroke: var(--progress); stroke-width: 1.6; stroke-linejoin: round; }
.estrella.llena { fill: var(--progress); }
.circuito { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.circuito li { display: grid; gap: 4px; align-content: start; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg); font-size: 14px; line-height: 20px; }
.circuito strong { font: 600 18px/24px var(--font-display); }
.circuito .cuando { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.circuito .desvio { border-style: dashed; border-color: var(--border-input); background: color-mix(in srgb, var(--warning) 9%, var(--surface)); }
.lt-desvio .lt-nodo { width: 28px; height: 28px; margin: 0 4px; box-shadow: inset 0 0 0 1.5px var(--warning); }
.lt-desvio .lt-nodo .ico { width: 15px; height: 15px; }
.lt-desvio .lt-cuerpo { padding-top: 0; }
.lt-cuerpo .desvio { padding: 10px 14px; border: 1px dashed var(--border-input); border-radius: var(--radius-md); background: color-mix(in srgb, var(--warning) 9%, var(--surface)); font-size: 14px; line-height: 20px; }
.pieza { display: grid; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.pieza-cab { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.pieza .segmento { justify-self: start; max-width: 100%; }
.pieza .segmento button { padding: 0 12px; }
.pieza-nota { margin-top: 14px; }
.em .em-resena { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); text-align: left; }
.em-resena .foto { display: block; aspect-ratio: 3 / 4; border-radius: 8px; }
.em .em-res-txt { display: grid; gap: 4px; justify-items: start; }
.em-cita { display: block; font: 500 16px/22px var(--font-display); }
.em-firma { display: block; font-size: 12px; line-height: 16px; color: var(--text-muted); }
@media (max-width: 1100px) { .circuito { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .circuito { grid-template-columns: minmax(0, 1fr); } }

/* ───────── Campañas ───────── */
.cal-cab { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.cal-cab h2 { min-width: 214px; text-align: center; }
.cal-leyenda { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.cal-caja { overflow-x: auto; border-radius: var(--radius-md); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; min-width: 720px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--border); }
.cal-sem { padding: 8px; background: var(--surface-2); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); text-align: center; }
.cal-dia { display: flex; flex-direction: column; gap: 4px; min-width: 0; min-height: 96px; padding: 6px; background: var(--surface); }
.cal-dia.fuera { background: var(--bg); }
.cal-num { display: grid; place-items: center; align-self: flex-start; min-width: 24px; height: 24px; border-radius: 50%; font-size: 13px; font-weight: 600; color: var(--text-muted); }
.cal-dia.hoy .cal-num { background: var(--accent); color: var(--on-accent); }
.cal-ev { display: block; overflow: hidden; padding: 3px 7px; border-left: 3px solid var(--text-muted); border-radius: 6px; background: var(--surface-2); color: var(--text); font-size: 12px; line-height: 16px; font-weight: 600; text-decoration: none; }
.cal-ev span { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.cal-ev:hover { box-shadow: inset 0 0 0 1px var(--border-input); }
.cal-ev.est-enviada { border-left-color: var(--success); }
.cal-ev.est-enviando { border-left-color: var(--warning); }
.cal-ev.est-programada { border-left-color: var(--accent); background: var(--tinte-fuerte); }
.cal-ev.est-borrador { border-left-style: dashed; border-left-color: var(--border-input); }
.camp-lista { display: grid; margin: 0; padding: 0; list-style: none; }
.camp-fila { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 14px; padding: 14px 0; border-top: 1px solid var(--border); }
.camp-fila:first-child { padding-top: 0; border-top: 0; }
.camp-cuerpo { display: grid; flex: 1 1 220px; min-width: 0; }
.camp-nombre { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.camp-nombre:hover { text-decoration: underline; text-underline-offset: 3px; }
.camp-res { display: grid; min-width: 92px; text-align: right; }
.camp-res strong { font: 600 20px/24px var(--font-display); }
.camp-acciones { display: flex; flex-wrap: wrap; gap: 8px; }

.comp { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 20px; align-items: start; }
.comp-izq { display: grid; gap: 20px; min-width: 0; }
.comp-der { position: sticky; top: 0; min-width: 0; }
.comp-bloque h2 { display: flex; align-items: center; gap: 10px; }
.comp-num { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--text); color: var(--bg); font: 700 14px/1 var(--font-sans); }
.comp-bloque > .btn.peq { margin-top: 10px; }
.comp-total { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 15px; }
.comp-total strong { margin-right: 6px; font: 600 28px/32px var(--font-display); letter-spacing: -.02em; }
.mini-correo { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 18px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg); }
.mini-previa { display: flex; align-items: center; flex: 1 1 200px; gap: 12px; min-width: 0; }
.mini-previa > div { min-width: 0; }
.mini-foto { width: 44px; height: 56px; flex: none; border-radius: 8px; }
.revisar-caja { border-color: color-mix(in srgb, var(--accent) 34%, var(--border)); }
.revisar { display: grid; gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; font-size: 15px; line-height: 21px; }
.revisar li { display: flex; gap: 10px; min-width: 0; }
.revisar li > span { min-width: 0; overflow-wrap: anywhere; }
.revisar .ico { width: 18px; height: 18px; margin-top: 2px; }
.revisar .ok .ico { color: var(--success); }
.revisar .ojo .ico { color: var(--warning); }
.revisar .falta { font-weight: 600; }
.revisar .falta .ico { color: var(--danger); }
.revisar + .nota { margin-top: 12px; }
.revisar-acciones { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.revisar-acciones .btn { flex: 1 1 auto; }
.revisar-caja .datos { margin-top: 18px; }

/* ───────── Editor de correo ───────── */
.pagina.editor { max-width: 1360px; }
.ed-barra { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 14px 20px; margin-bottom: 18px; }
.ed-titulo h1 { font: 600 28px/34px var(--font-display); letter-spacing: -.015em; }
.ed-controles { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.ed-estado { display: flex; align-items: center; gap: 6px; }
.ed-guardado { display: inline-flex; align-items: center; gap: 5px; margin-left: 4px; font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.ed-guardado .ico { width: 15px; height: 15px; }
.ed-guardado.ojo { color: var(--text); font-weight: 600; }
.ed-guardado.ojo .ico { color: var(--warning); }
.segmento .ico { width: 16px; height: 16px; }
.punto.listo { background: var(--success); }
.punto.falta { box-shadow: inset 0 0 0 2px var(--warning); }
.ed-cuerpo { display: grid; grid-template-columns: 224px minmax(0, 1fr) 296px; gap: 20px; align-items: start; }
.ed-paleta, .ed-props { position: sticky; top: 0; padding: 16px; }
.paleta { display: grid; gap: 4px; margin-top: 10px; }
.paleta-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 1px solid transparent; border-radius: var(--radius-md); background: transparent; font-size: 14px; line-height: 18px; font-weight: 600; text-align: left; transition: background var(--fast) var(--ease); }
.paleta-btn:hover { background: var(--surface-2); }
.paleta-btn > span:nth-child(2) { flex: 1; min-width: 0; }
.paleta-btn small { display: block; font-size: 11.5px; line-height: 15px; font-weight: 400; color: var(--text-muted); }
.paleta-btn > .ico { width: 16px; height: 16px; color: var(--text-muted); }
.paleta-btn .ico-caja { width: 32px; height: 32px; border-radius: 9px; }
.paleta-btn.fijo { color: var(--text-muted); }
.ed-centro { display: grid; gap: 12px; min-width: 0; }
.ed-asunto { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); font-size: 14px; line-height: 20px; }
.ed-asunto p { min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.ed-asunto .tenue { margin-right: 8px; font-weight: 400; }
.chip-btn { padding: 4px 12px; border: 1px solid var(--border-input); border-radius: var(--radius-pill); background: var(--surface); font-size: 13px; line-height: 20px; font-weight: 600; white-space: nowrap; }
.chip-btn[aria-pressed="true"] { border-color: var(--text); background: var(--text); color: var(--bg); }
.ed-lienzo { display: grid; justify-items: center; align-content: start; min-height: 440px; padding: 24px 12px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-2); }
.dispositivo { width: 100%; }
.dispositivo.celular { max-width: 392px; padding: 11px; border-radius: 36px; background: var(--text); }
.dispositivo.celular .em { border-radius: 26px; }
.dispositivo.escritorio { max-width: 640px; border-radius: var(--radius-md); box-shadow: var(--shadow-pop); }
.dispositivo.escritorio .em { border-radius: var(--radius-md); }
.em { display: grid; overflow: hidden; background: var(--surface); }
.bq { position: relative; display: block; width: 100%; padding: 12px 20px; border: 0; background: transparent; color: var(--text); text-align: center; outline-offset: -3px; }
.bq:hover { box-shadow: inset 0 0 0 1px var(--border-input); }
.bq.sel { box-shadow: inset 0 0 0 2px var(--accent); background: color-mix(in srgb, var(--accent) 5%, transparent); }
.bq.fijo { padding: 0; }
.bq > span { display: block; }
.em .bq-solo { position: absolute; top: 4px; right: 6px; display: inline-block; padding: 1px 8px; border-radius: var(--radius-pill); background: var(--text); color: var(--bg); font-size: 11px; line-height: 16px; font-weight: 600; }
.em .bq-solo.ojo { right: auto; left: 6px; background: var(--warning); color: var(--surface); }
.em-logo { display: block; padding: 16px 0 12px; font: 600 24px/28px var(--font-display); letter-spacing: -.01em; }
.em-franja { display: block; padding: 6px 12px; background: var(--accent); color: var(--on-accent); font-size: 12px; line-height: 16px; font-weight: 600; }
.em-titular { font: 600 26px/31px var(--font-display); letter-spacing: -.015em; overflow-wrap: anywhere; }
.em-texto { font-size: 15px; line-height: 22px; overflow-wrap: anywhere; }
.em .em-imagen { display: grid; place-items: center; height: 200px; border-radius: var(--radius-md); }
.em-imagen > span { max-width: 86%; padding: 3px 10px; border-radius: var(--radius-pill); background: var(--surface); font-size: 12px; line-height: 18px; }
.em .em-boton { display: inline-block; max-width: 100%; padding: 12px 26px; border-radius: var(--radius-pill); background: var(--accent); color: var(--on-accent); font-size: 15px; line-height: 20px; font-weight: 600; }
.em-rot { margin-bottom: 8px; font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.em .em-prods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.escritorio .em .em-prods.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.escritorio .em .em-prods.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.em .em-prod { display: grid; gap: 6px; text-align: left; }
.em-prod .foto { display: block; aspect-ratio: 3 / 4; border-radius: 10px; }
.em-pn { display: block; font-size: 13px; line-height: 18px; font-weight: 600; }
.em-linea { display: block; width: 46%; height: 8px; border-radius: var(--radius-pill); background: var(--surface-2); }
.em .em-set { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; }
.em-mas { font: 600 22px/1 var(--font-display); color: var(--text-muted); }
.em .em-cupon { display: grid; gap: 4px; padding: 16px; border: 1.5px dashed var(--border-input); border-radius: var(--radius-md); background: var(--tinte); }
.em-cupon .em-rot { margin: 0; }
.em-codigo { display: block; font: 700 24px/30px var(--font-mono); letter-spacing: .12em; overflow-wrap: anywhere; }
.em .em-mosaico { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 90px 90px; gap: 6px; margin-bottom: 10px; }
.em-mosaico .foto { display: block; border-radius: 8px; }
.em-mosaico .foto.a { grid-row: span 2; }
.em-mosaico + .em-rot { margin: 0; }
.em-sep { height: 1px; margin: 6px 0; background: var(--border); }
.em .em-pie { display: grid; gap: 4px; padding: 18px 20px; background: var(--surface-2); color: var(--text-muted); font-size: 11.5px; line-height: 16px; }
.em-pie strong { font: 600 16px/20px var(--font-display); color: var(--text); }
.ed-vacio { display: grid; gap: 10px; justify-items: center; align-content: center; max-width: 360px; padding: 24px; text-align: center; }
.ed-vacio .fila { justify-content: center; margin-top: 6px; }
.ed-props .rotulo { margin-bottom: 4px; }
.ed-props > .btn.peq { margin-top: 10px; }
.props-acciones { display: flex; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }

/* ───────── Clientas ───────── */
.audiencias { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 16px; }
.aud { display: flex; flex-direction: column; gap: 8px; padding: 20px; }
.aud-cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.aud-tam { font: 600 34px/38px var(--font-display); letter-spacing: -.02em; }
.aud-antes { color: var(--text); }
.aud-pie { margin-top: auto; padding-top: 10px; }
.aud-pie .nota { display: flex; align-items: center; gap: 6px; min-height: 36px; }
.aud-pie .ico { width: 15px; height: 15px; }
.constructor { margin-top: 28px; scroll-margin-top: 12px; }
.conds { display: grid; gap: 10px; margin: 18px 0 12px; padding: 0; list-style: none; }
.cond { display: grid; grid-template-columns: 36px minmax(0, 1.3fr) minmax(0, 1.1fr) minmax(0, 1fr) 40px; gap: 8px; align-items: center; }
.cond.fija { display: flex; gap: 10px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--surface-2); font-size: 14px; line-height: 20px; color: var(--text-muted); }
.cond.fija .ico { width: 16px; height: 16px; }
.cond-y { font-size: 13px; font-weight: 600; color: var(--text-muted); text-align: center; }
.cond-valor { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cond-valor span { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.cond > .btn-ico { grid-column: 5; }
.constructor-pie { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.aud-total strong { margin-right: 4px; font: 600 28px/32px var(--font-display); letter-spacing: -.02em; }

/* ───────── Pop-up ───────── */
.popup-rejilla { grid-template-columns: minmax(0, 1fr) 360px; }
.popup-previa { position: sticky; top: 0; display: grid; gap: 12px; justify-items: center; text-align: center; }
.telefono { width: 304px; max-width: 100%; padding: 10px; border-radius: 40px; background: var(--text); }
.tel-pantalla { position: relative; display: flex; flex-direction: column; height: 580px; overflow: hidden; border-radius: 30px; background: var(--bg); }
.tel-tienda { display: grid; gap: 10px; padding: 14px 12px; }
.tel-barra { display: flex; align-items: center; justify-content: space-between; }
.tel-barra .em-logo { padding: 0; font-size: 20px; }
.tel-menu { width: 20px; height: 12px; border-top: 2px solid var(--text); border-bottom: 2px solid var(--text); }
.tel-hero { display: block; height: 170px; border-radius: 14px; }
.tel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tel-grid .foto { display: block; height: 140px; border-radius: 12px; }
.tel-franja { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 8px; padding: 16px 16px 18px; border-top: 1px solid var(--border); border-radius: 20px 20px 0 0; background: var(--surface); box-shadow: var(--shadow-pop); text-align: left; }
.tel-franja strong { padding-right: 26px; font: 600 19px/24px var(--font-display); overflow-wrap: anywhere; }
.tf-texto { font-size: 13px; line-height: 18px; color: var(--text-muted); overflow-wrap: anywhere; }
.tf-campo { display: block; padding: 9px 12px; border: 1px solid var(--border-input); border-radius: 10px; font-size: 13px; line-height: 18px; color: var(--text-muted); }
.tf-boton { display: block; padding: 10px; border-radius: var(--radius-pill); background: var(--accent); color: var(--on-accent); font-size: 14px; line-height: 20px; font-weight: 600; text-align: center; }
.tf-x { position: absolute; top: 14px; right: 14px; color: var(--text-muted); }
.tf-x .ico { width: 16px; height: 16px; }

/* ───────── Resultados ───────── */
.tabla-res { min-width: 940px; }
.orden { display: inline-flex; align-items: center; gap: 4px; margin: -4px -6px; padding: 4px 6px; border: 0; border-radius: 6px; background: transparent; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; }
.orden:hover, .orden.activa { color: var(--text); }
.orden .ico { width: 14px; height: 14px; }
.orden .mini { display: inline; margin-left: 4px; letter-spacing: 0; text-transform: none; }
.tabla td a { font-weight: 600; text-decoration: none; }
.tabla td a:hover { text-decoration: underline; text-underline-offset: 3px; }
.tabla td.apertura { font-size: 12px; color: var(--text-muted); }
.sello-mini { display: inline-block; margin-left: 8px; padding: 0 8px; border: 1.5px dashed var(--progress); border-radius: var(--radius-pill); font-size: 11px; line-height: 17px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; transform: rotate(-3deg); }
.pie-tabla { margin-top: 14px; }
.salud { display: grid; gap: 18px; align-content: start; padding: 28px; }
.salud .seccion-cab { margin-bottom: 0; }
.salud-item { display: grid; gap: 6px; }
.umbral { position: relative; margin: 6px 40px 0 0; padding-bottom: 28px; }
.umbral-pista { display: block; height: 10px; overflow: hidden; border-radius: var(--radius-pill); background: var(--surface-2); }
.umbral-valor { display: block; height: 100%; min-width: 6px; border-radius: var(--radius-pill); background: var(--success); }
.umbral-valor.n-regular { background: var(--warning); }
.umbral-valor.n-mal { background: var(--danger); }
.umbral-marca { position: absolute; top: -4px; width: 2px; height: 18px; margin-left: -1px; background: var(--text); }
.umbral-marca span { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); font-size: 11.5px; line-height: 16px; font-weight: 600; white-space: nowrap; }
.umbral-marca.fin { background: var(--danger); }
.umbral-marca.fin span { left: auto; right: -40px; transform: none; }

/* ───────── Ajustes ───────── */
.ajustes-rejilla { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.ajustes-rejilla .tarjeta > .nota { margin-top: 8px; }
.muestra-caja { grid-column: 1 / -1; scroll-margin-top: 12px; }
.defs { display: grid; margin-top: 12px; }
.defs > div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 15px; line-height: 22px; }
.defs dt { color: var(--text-muted); }
.defs dd { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.contadores { display: flex; flex-wrap: wrap; gap: 16px 32px; margin: 16px 0 12px; }
.contador { display: grid; gap: 6px; }
.contador-fila { display: flex; align-items: center; gap: 10px; }
.contador-fila strong { min-width: 30px; font: 600 30px/34px var(--font-display); text-align: center; }
.muestra-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 16px; }

/* ───────── Movimiento y anchos de las pantallas ───────── */
@media (prefers-reduced-motion: no-preference) {
  .entrando .pagina > .tarjeta, .entrando .pagina > .grupo, .entrando .pagina > .dos-col,
  .entrando .pagina > .comp, .entrando .pagina > .tira, .entrando .ed-cuerpo, .entrando .ajustes-rejilla { animation: subir .45s var(--ease) both; }
}

@media (max-width: 1240px) {
  .ed-cuerpo { grid-template-columns: minmax(0, 1fr) 280px; }
  .ed-paleta { position: static; grid-column: 1 / -1; padding: 12px 14px; }
  .paleta { display: flex; gap: 8px; margin-top: 8px; padding-bottom: 4px; overflow-x: auto; }
  .paleta-btn { flex: none; width: auto; padding: 6px 12px 6px 6px; border-color: var(--border); white-space: nowrap; }
  .paleta-btn small, .paleta-btn > .ico { display: none; }
}
@media (max-width: 1100px) {
  .dos-col, .dos-col.parejo, .comp, .popup-rejilla { grid-template-columns: minmax(0, 1fr); }
  .comp-der, .popup-previa { position: static; }
}
@media (max-width: 760px) {
  .tira { padding: 16px 20px; gap: 12px 28px; }
  .ed-cuerpo, .ajustes-rejilla, .muestra-cols { grid-template-columns: minmax(0, 1fr); }
  .ed-props { position: static; }
  .ed-lienzo { padding: 14px 8px; }
  .ed-titulo h1 { font-size: 24px; line-height: 30px; }
  .recetas, .audiencias { grid-template-columns: minmax(0, 1fr); }
  .receta, .aud, .salud { padding: 20px; }
  .cal-cab h2 { flex: 1; min-width: 0; }
  .cal-leyenda { margin-left: 0; }
  .camp-acciones { width: 100%; }
  .cond { grid-template-columns: 36px minmax(0, 1fr) 40px; }
  .cond > .ctl, .cond > .cond-valor { grid-column: 2; }
  .cond > .btn-ico { grid-column: 3; grid-row: 1; }
  .alcance .btn, .constructor-pie .btn { width: 100%; }
  .pagina-cab > .btn, .pagina-cab > .fila { width: 100%; }
  .pagina-cab > .fila > .btn, .pagina-cab > .fila > .selector { flex: 1 1 auto; }
  .umbral-marca span { font-size: 11px; }
}
@media (max-width: 460px) {
  .fila-campos { grid-template-columns: minmax(0, 1fr); }
  .ed-controles .segmento button { padding: 0 10px; font-size: 13px; }
}

/* ═════════ Panel con datos reales: entrada, estados de carga y pantallas conectadas ═════════ */

/* Qué se ve según el modo: la cinta de prototipo solo en la demostración; la app solo con datos. */
.app[hidden], .entrada[hidden], .nivel-mini[hidden], .segmento button[hidden] { display: none; }
body:not([data-modo="demo"]) .cinta { display: none; }
body:not([data-modo="demo"]) { grid-template-rows: minmax(0, 1fr); }
.segmento.una { border-color: transparent; background: transparent; padding-left: 0; }
.segmento.una button[aria-pressed="true"] { background: transparent; box-shadow: none; padding-left: 0; cursor: default; }

/* Entrada */
.entrada { display: grid; place-items: center; min-height: 0; overflow-y: auto; padding: 32px 16px; }
.entrada-espera { color: var(--text-muted); }
.entrada-caja { display: grid; gap: 14px; width: 100%; max-width: 440px; padding: 36px; }
.entrada-caja .marca { margin: 0 0 6px; padding: 0; }
.entrada-caja h1 { font: 600 30px/36px var(--font-display); letter-spacing: -.015em; }
.entrada-form { display: grid; gap: 14px; margin-top: 4px; }
.entrada-form .btn { justify-content: center; }
.entrada-error, .entrada-aviso { color: var(--danger); font-size: 14px; line-height: 20px; }
.entrada-error[hidden] { display: none; }
.entrada-aviso { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-md); background: color-mix(in srgb, var(--danger) 9%, var(--surface)); }
.entrada-aviso .ico { width: 18px; height: 18px; margin-top: 1px; }
.entrada-personas { display: grid; gap: 8px; padding: 0; margin-top: 4px; list-style: none; }
.entrada-personas .btn { width: 100%; height: auto; min-height: 56px; padding: 10px 16px; justify-content: flex-start; gap: 12px; text-align: left; white-space: normal; }
.entrada-personas .btn span { display: grid; }
.entrada-personas small { font-size: 12px; line-height: 16px; font-weight: 400; color: var(--text-muted); }
.entrada-pie { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--border); }

/* Menú de la cuenta */
.menu-correo { padding: 0 12px 8px; font-size: 13px; line-height: 18px; color: var(--text-muted); overflow-wrap: anywhere; }
.menu-flotante button { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: var(--radius-sm); background: transparent; font-size: 15px; text-align: left; }
.menu-flotante button:hover { background: var(--surface-2); }

/* Cargando y error */
.estado-pantalla { display: grid; gap: 12px; justify-items: start; max-width: 720px; padding: 36px; color: var(--text-muted); }
.tarjeta .estado-pantalla { padding: 12px 0 4px; }
.estado-pantalla h2 { color: var(--text); }
.estado-pantalla.error > .ico { width: 28px; height: 28px; color: var(--danger); }
.giro { width: 26px; height: 26px; border: 2.5px solid var(--border); border-top-color: var(--accent); border-radius: 50%; }
@media (prefers-reduced-motion: no-preference) {
  .giro { animation: girar .8s linear infinite; }
  @keyframes girar { to { transform: rotate(360deg); } }
}

/* Marea: semana sin envíos (ni suma ni rompe la racha) */
.racha-cuadros .sin { background: var(--surface-2); }

/* Botones que se ven como enlace (abren algo dentro de la misma pantalla) */
button.enlace { padding: 0; border: 0; background: transparent; font-size: inherit; }
.interruptor:disabled { opacity: .5; cursor: not-allowed; }

/* Vista previa de un correo: marco aislado, ancho de celular */
.previa { display: grid; gap: 10px; }
.previa .seccion-cab { margin-bottom: 0; align-items: center; }
.previa-asunto { display: grid; gap: 2px; font-weight: 600; overflow-wrap: anywhere; }
.previa-marco { display: block; width: 100%; max-width: 420px; height: 640px; margin: 6px auto 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }

/* Clientas */
.buscador { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px 16px; margin-bottom: 16px; }
.buscador .campo { flex: 1 1 280px; max-width: 460px; }
.tabla-clientas td.nombre a { overflow-wrap: anywhere; }
.pie-lista { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 14px; }
.lista-eventos { display: grid; gap: 0; padding: 0; margin-top: 10px; list-style: none; font-size: 14px; line-height: 20px; }
.lista-eventos li { display: flex; gap: 14px; padding: 8px 0; border-top: 1px solid var(--border); }
.lista-eventos li:first-child { border-top: 0; }
.le-cuando { flex: none; width: 108px; color: var(--text-muted); }
.defs dd { text-align: right; overflow-wrap: anywhere; }
.defs dd .mini { display: block; font-size: 12px; line-height: 16px; color: var(--text-muted); }

/* Resultados: serie diaria */
.serie { display: flex; align-items: flex-end; gap: 2px; height: 140px; margin-top: 8px; padding-bottom: 1px; border-bottom: 1px solid var(--border); }
.sd { display: flex; align-items: flex-end; flex: 1 1 0; min-width: 2px; height: 100%; }
.sd-b { display: block; width: 100%; border-radius: 3px 3px 0 0; background: var(--accent); }
.sd-b.cero { background: var(--border); }
.sd:hover .sd-b { filter: brightness(1.15); }
.serie-eje { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; line-height: 16px; color: var(--text-muted); }
.serie-tabla { margin-top: 12px; font-size: 14px; }
.serie-tabla summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.serie-tabla .tabla-caja { max-height: 320px; overflow-y: auto; margin-top: 8px; }

@media (max-width: 760px) {
  .entrada-caja, .estado-pantalla { padding: 24px 20px; }
  .previa-marco { height: 520px; }
  .le-cuando { width: 92px; }
  .seccion-cab { flex-wrap: wrap; }
}

/* En el panel real «Próximos 7 días» (campañas) aún no existe: las últimas 36 horas ocupan todo el ancho. */
body[data-modo="real"] .rejilla-inicio > .ultimas { grid-column: 1 / -1; }
.entrada-personas .btn { border-radius: var(--radius-md); }
@media (max-width: 760px) {
  .buscador .segmento { max-width: 100%; overflow-x: auto; }
}
