/* Divisual Campaign · sistema visual (lienzo aprobado por Juanpe, 27-10-2026).
   Fondo negro, superficies grises, texto claro, acento amarillo Divisual. Poppins en títulos, Inter Tight en el resto.
   Las fuentes se sirven desde este mismo servidor (/static/fonts, licencia OFL): ninguna página carga nada de terceros. */

/* ---------- fuentes ---------- */
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 400; font-display: swap; src: url('/static/fonts/inter-tight-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 400; font-display: swap; src: url('/static/fonts/inter-tight-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 500; font-display: swap; src: url('/static/fonts/inter-tight-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 500; font-display: swap; src: url('/static/fonts/inter-tight-latin-ext-500-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 600; font-display: swap; src: url('/static/fonts/inter-tight-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 600; font-display: swap; src: url('/static/fonts/inter-tight-latin-ext-600-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url('/static/fonts/poppins-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url('/static/fonts/poppins-latin-ext-500-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('/static/fonts/poppins-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('/static/fonts/poppins-latin-ext-600-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- variables ---------- */
:root {
  color-scheme: dark;
  /* fondos y superficies */
  --bg: #0B0B0B;
  --side: #111111;
  --surface: #151515;
  --surface-2: #1A1A1A;
  --surface-3: #111111;
  --raised: #1F1F1F;
  --raised-2: #262626;
  --field: #0F0F0F;
  --track: #232323;
  /* bordes */
  --line: #262626;
  --line-soft: #1F1F1F;
  --line-side: #222222;
  --line-strong: #3A3A3A;
  --line-field: #666666;
  --line-dashed: #8F8F8F;
  /* texto */
  --text: #F5F5F5;
  --text-2: #C9C9C9;
  --text-3: #D4D4D4;
  --text-4: #E5E5E5;
  --muted: #A3A3A3;
  --placeholder: #8F8F8F;
  /* acento */
  --accent: #FAC51A;
  --accent-hover: #FFD95C;
  --on-accent: #111111;
  /* estados: fondo de píldora / texto */
  --ok-bg: #142B1E; --ok: #8EF5B6; --ok-dot: #53F995; --ok-soft: #121A15; --ok-line: #1F3A2A;
  --warn-bg: #1A1608; --warn: #F2D58A; --warn-line: #4A3B0B; --warn-text: #D6D0BC;
  --info-bg: #0F1E33; --info: #9CC3FF;
  --err-bg: #2A1414; --err: #FFB4A8; --err-line: #7A2E28; --err-soft-line: #3A2220;
  --neutral-bg: #1F1F1F; --neutral: #C9C9C9;
  /* radios */
  --r-sm: 8px; --r: 10px; --r-md: 12px; --r-lg: 14px; --r-xl: 16px; --r-2xl: 20px; --pill: 999px;
  /* tipografía */
  --font: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Poppins', 'Inter Tight', system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --tap: 44px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.45; }
h1, h2, h3 { margin: 0; font-family: var(--font-head); font-weight: 600; }
h1 { font-size: 32px; line-height: 1.15; letter-spacing: -0.6px; }
h2 { font-size: 19px; line-height: 1.3; }
h3 { font-size: 16px; }
p { margin: 0; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
code { font-family: var(--mono); font-size: .92em; color: var(--text-4); }
pre { margin: 0; white-space: pre-wrap; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; color: var(--text-3); }
strong { font-weight: 600; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.ok { color: var(--ok); }
.warn { color: var(--warn); }
.err { color: var(--err); }
.grow { flex: 1 1 200px; min-width: 0; }
.w50 { width: 50%; }

/* ---------- estructura del panel ---------- */
.app { min-height: 100vh; display: flex; align-items: stretch; }
.side { flex: 0 0 248px; width: 248px; padding: 28px 18px; background: var(--side); border-right: 1px solid var(--line-side); display: flex; flex-direction: column; gap: 28px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand img { width: 36px; height: 36px; object-fit: contain; }
.brand span { display: flex; flex-direction: column; }
.brand b { font-family: var(--font-head); font-weight: 600; font-size: 16px; letter-spacing: -0.2px; }
.brand small { font-size: 12px; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: var(--tap); padding: 0 12px; border-radius: var(--r); color: var(--text-2); text-decoration: none; }
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a[aria-current="page"] { background: var(--raised); color: var(--text); font-weight: 500; }
.nav a[aria-current="page"] svg { stroke: var(--accent); }
.nav svg { flex: 0 0 18px; }
.nav-title { margin: 14px 12px 6px; font-size: 12px; color: var(--muted); }
.nav.minor a { min-height: 40px; font-size: 14px; }
.session { margin-top: auto; padding: 14px; border-radius: var(--r-md); background: #171717; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.session > span:first-child { font-size: 12px; color: var(--muted); }
.session strong { font-weight: 500; overflow-wrap: anywhere; }
.session button { align-self: flex-start; min-height: 32px; padding: 0; border: 0; background: none; color: var(--accent); font-size: 13px; font-weight: 400; }
.session button:hover { color: var(--accent-hover); background: none; border: 0; }
.main { flex: 1 1 auto; min-width: 0; padding: 28px 40px 56px; }
.page { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.focus .page { max-width: 1200px; }

/* barra superior de los pasos de campaña (sin menú lateral) */
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar-left img { width: 30px; height: 30px; object-fit: contain; }
.crumbs { font-size: 14px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; min-width: 0; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current] { color: var(--text); overflow-wrap: anywhere; }
.steps { margin: 0; padding: 0; list-style: none; display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.steps li { padding: 6px 12px; border-radius: var(--pill); background: var(--raised); color: var(--text-2); }
.steps li.here { background: var(--raised-2); color: var(--text); font-weight: 500; }
.steps li[aria-current] { background: var(--accent); color: var(--on-accent); font-weight: 600; }

/* cabecera de página */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-head > div:first-child { display: flex; flex-direction: column; gap: 6px; max-width: 600px; min-width: 0; }
.page-head p { font-size: 14px; color: var(--muted); }
.page-head .kicker { font-size: 13px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.actions.end { justify-content: flex-end; }
.actions.between { justify-content: space-between; }
.title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-width: 0; }
.title-row h1, .title-row h2 { overflow-wrap: anywhere; }

/* ---------- tarjetas ---------- */
.card { padding: 24px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card.tight { gap: 12px; }
.card.flush { padding: 8px 24px 16px; }
.card.danger-zone { border-color: var(--err-soft-line); }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.card-head > div:not(.actions):not(.title-row) { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.card-head > .actions { gap: 10px; }
.card-head .small { color: var(--muted); }
.sub { font-size: 13px; color: var(--muted); }
.panel { padding: 16px 18px; border-radius: var(--r-lg); background: var(--surface-3); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.box { padding: 14px 16px; border-radius: var(--r-md); background: var(--surface-2); display: flex; flex-direction: column; gap: 2px; }
.cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.cols > * { flex: 1 1 420px; min-width: 0; }
.cols > .wide { flex: 3 1 520px; }
.cols > .narrow { flex: 2 1 340px; }
.stack { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.stack-sm { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* cifras */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.stats.sm { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { padding: 22px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.stat.dashed { border-style: dashed; border-color: #4A4A4A; }
.stat.mini { padding: 18px 20px; border-radius: var(--r-lg); gap: 4px; }
.stat.mini b { font-weight: 600; overflow-wrap: anywhere; }
.stat.inline { padding: 18px 22px; flex-direction: row; justify-content: space-between; align-items: baseline; gap: 12px; }
.stat.inline > span:first-child { color: var(--text-2); }
.stat.inline strong { font-family: var(--font-head); font-size: 22px; }
.stat-label { font-size: 13px; color: var(--muted); }
.stat-value { font-family: var(--font-head); font-size: 34px; font-weight: 600; letter-spacing: -0.8px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat-value.md { font-size: 24px; letter-spacing: -0.3px; }
.stat-value small { font-family: var(--font); font-size: 14px; font-weight: 400; letter-spacing: 0; color: var(--text-2); }
.stat-foot { font-size: 13px; color: var(--muted); }
.stat-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.box .stat-value { font-size: 24px; letter-spacing: -0.3px; }
.big-number { font-family: var(--font-head); font-weight: 600; font-size: 56px; line-height: 1; letter-spacing: -1.6px; font-variant-numeric: tabular-nums; }
.big-number small { font-size: 22px; letter-spacing: -0.3px; color: var(--text-2); }
.hero { padding: 32px; border-radius: var(--r-2xl); background: var(--surface); border: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-end; justify-content: space-between; }
.hero > div { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hero .big-number { font-size: 64px; letter-spacing: -2px; }
.hero .big-number small { font-size: 28px; letter-spacing: -0.5px; }
.hero .right { text-align: right; gap: 6px; }
.hero .right b { font-family: var(--font-head); font-weight: 600; font-size: 22px; }

/* listas de datos */
.dl { margin: 0; display: grid; grid-template-columns: minmax(110px, 160px) minmax(0, 1fr); gap: 12px 16px; font-size: 14px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; overflow-wrap: anywhere; }
.dl.sum { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; }
.dl.sum dt { color: var(--text-2); }
.dl.sum dd { text-align: right; font-variant-numeric: tabular-nums; }
.dl.sum.top { padding-top: 14px; border-top: 1px solid var(--line); }

/* ---------- avisos ---------- */
.banner { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; padding: 20px 24px; border-radius: var(--r-xl); background: var(--warn-bg); border: 1px solid var(--warn-line); }
.banner > svg { flex: 0 0 28px; }
.banner > div { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.banner > div > span, .banner p { color: var(--warn-text); font-size: 14px; }
.banner form { margin: 0; }
.banner.err { background: #1E1010; border-color: var(--err-line); }
.banner.err > div > span, .banner.err p { color: #F0C9C2; }
.banner.ok { background: var(--ok-soft); border-color: var(--ok-line); }
.banner.ok > div > span, .banner.ok p { color: var(--text-2); }
.flash { padding: 14px 18px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
.flash.ok { background: var(--ok-soft); border-color: var(--ok-line); }
.flash.warn { background: var(--warn-bg); border-color: var(--warn-line); }
.flash.err { background: #1E1010; border-color: var(--err-line); }
.flash ul { margin: 0; padding-left: 20px; }
.flash form { margin-top: 4px; }
.strip { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--text-2); }
.strip svg { flex: 0 0 20px; }
.tip { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); background: var(--ok-soft); font-size: 13px; color: var(--text-2); }
.tip svg { flex: 0 0 18px; margin-top: 1px; }
.tip.plain { background: var(--surface-3); border: 1px solid var(--line); }
.tip.warn { background: var(--warn-bg); color: var(--warn-text); }
.tip form { margin-top: 8px; }

/* comprobaciones */
.checks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.checks.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.checks li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); background: var(--ok-soft); color: var(--text); }
.checks li.warn { background: var(--warn-bg); }
.checks li.err { background: var(--err-bg); }
.checks li svg { flex: 0 0 20px; margin-top: 1px; }
.checks li div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.checks li b { font-weight: 500; }
.checks li span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.checks li.err span { color: #F0C9C2; }

/* ---------- píldoras de estado ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 10px; border-radius: var(--pill); background: var(--neutral-bg); color: var(--neutral); font-size: 13px; font-weight: 500; line-height: 1.2; white-space: nowrap; text-decoration: none; vertical-align: middle; }
.badge.lg { min-height: 28px; padding: 0 12px; }
.badge.ok, .badge.s-sending, .badge.st-active, .badge.q-active { background: var(--ok-bg); color: var(--ok); }
.badge.warn, .badge.s-paused, .badge.st-pending, .badge.q-paused { background: var(--warn-bg); color: var(--warn); }
.badge.info, .badge.s-scheduled { background: var(--info-bg); color: var(--info); }
.badge.err, .badge.st-bounced, .badge.st-complained { background: var(--err-bg); color: var(--err); }
.badge.s-done { background: var(--neutral-bg); color: var(--text); }
.badge.s-draft, .badge.s-cancelled, .badge.st-unsubscribed, .badge.q-draft { background: var(--neutral-bg); color: var(--neutral); }
.badge.ok::before, .badge.s-sending::before, .badge.st-active::before, .badge.q-active::before { content: ''; flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--ok-dot); }
.badge.s-done::before { content: ''; flex: 0 0 12px; width: 12px; height: 7px; margin-top: -3px; border-left: 2px solid var(--ok-dot); border-bottom: 2px solid var(--ok-dot); transform: rotate(-45deg); }
.tag { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 12px; border-radius: var(--pill); border: 1px dashed var(--line-dashed); color: var(--text-3); font-size: 13px; font-weight: 500; }
.tag.solid { border: 0; background: var(--raised); color: var(--text-3); min-height: 24px; padding: 2px 8px; font-size: 12px; }
.chip-static { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: var(--r-sm); background: var(--raised); font-size: 13px; }

/* ---------- botones ---------- */
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 16px; border-radius: var(--r); border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: inherit; font-weight: 500; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; }
button:hover, .button:hover { background: var(--raised); color: var(--text); border-color: #4A4A4A; }
button.soft, .button.soft { background: var(--raised); }
button.soft:hover, .button.soft:hover { background: var(--raised-2); }
button.primary, .button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; padding: 0 20px; }
button.primary:hover, .button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
button.danger, .button.danger { background: var(--err-bg); border-color: var(--err-line); color: var(--err); font-weight: 600; }
button.danger:hover, .button.danger:hover { background: #351818; color: var(--err); }
button.link, .button.link { border: 0; background: none; color: var(--accent); padding: 0 6px; min-height: var(--tap); }
button.link:hover, .button.link:hover { background: none; color: var(--accent-hover); }
button.link.danger-text { color: var(--err); }
button.link.danger-text:hover { color: #FFD0C7; }
button.big, .button.big { min-height: 48px; border-radius: var(--r-md); padding: 0 22px; }
button.xl, .button.xl { min-height: 52px; border-radius: var(--r-md); font-size: 16px; padding: 0 24px; }
button.block, .button.block { width: 100%; }
button.dashed { border-style: dashed; border-color: #4A4A4A; min-height: 48px; border-radius: var(--r-md); }
button[disabled], button[disabled]:hover { opacity: .5; cursor: not-allowed; background: transparent; color: var(--text); border-color: var(--line); }
button.primary[disabled], button.primary[disabled]:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
a.button[aria-disabled="true"] { opacity: .5; pointer-events: none; }
form.inline { display: inline-flex; margin: 0; }

/* conmutador de vista previa */
.seg { display: inline-flex; padding: 3px; border-radius: var(--r); background: var(--field); border: 1px solid var(--line); }
.seg button { min-height: 36px; padding: 0 12px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text-2); font-size: 13px; font-weight: 400; }
.seg button:hover { background: var(--raised); }
.seg button.on { background: var(--raised-2); color: var(--text); font-weight: 500; }

/* ---------- formularios ---------- */
label { font-size: 14px; }
/* :where() deja la especificidad al mínimo: cualquier regla de un componente (.joined, .search, .login-card...) manda */
:where(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden])), :where(select, textarea) {
  width: 100%; min-height: var(--tap); padding: 0 12px; border-radius: var(--r); border: 1px solid var(--line-field); background: var(--field); color: var(--text); font: inherit; font-size: 15px; }
input::placeholder, textarea::placeholder { color: var(--placeholder); opacity: 1; }
:where(input, select, textarea):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[readonly] { color: var(--text-3); }
textarea { padding: 12px 14px; line-height: 1.5; resize: vertical; display: block; }
textarea.code { font-family: var(--mono); font-size: 13px; line-height: 1.6; color: var(--text-3); white-space: pre; overflow-wrap: normal; overflow-x: auto; padding: 16px; border-radius: var(--r-md); }
select { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23C9C9C9' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
select option { background: var(--surface); color: var(--text); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); flex: 0 0 auto; }
input[type=file] { font: inherit; font-size: 14px; color: var(--text-2); max-width: 100%; }
input[type=file]::file-selector-button { min-height: var(--tap); margin-right: 12px; padding: 0 16px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--raised); color: var(--text); font: inherit; font-weight: 500; cursor: pointer; }
input.title-input { min-height: 52px; padding: 0 14px; border-radius: var(--r-md); font-family: var(--font-head); font-weight: 600; font-size: 24px; letter-spacing: -0.4px; }
input.code-input { min-height: 60px; border-radius: var(--r-md); font-family: var(--font-head); font-weight: 600; font-size: 26px; letter-spacing: 10px; text-align: center; font-variant-numeric: tabular-nums; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .label { font-size: 14px; font-weight: 500; }
.field > label .muted { font-weight: 400; }
.field-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.field-top label { font-weight: 500; }
.hint { font-size: 13px; color: var(--muted); }
.fields { display: flex; flex-wrap: wrap; gap: 16px; }
.fields > .field { flex: 1 1 200px; }
.form { display: flex; flex-direction: column; gap: 18px; }
.form.tight { gap: 14px; }
.joined { display: flex; align-items: stretch; border-radius: var(--r); border: 1px solid var(--line-field); background: var(--field); overflow: hidden; }
.joined input:not([type=checkbox]):not([type=radio]) { border: 0; border-radius: 0; background: transparent; flex: 1 1 60px; min-width: 0; }
.joined > span { display: inline-flex; align-items: center; padding: 0 14px; background: var(--surface-2); color: var(--text-2); font-size: 14px; white-space: nowrap; }
.joined > button { flex: 0 0 46px; min-height: 46px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--text-2); }
.joined > button:hover { background: var(--raised); }
.joined:focus-within, .search:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.joined input:focus-visible, .search input:focus-visible { outline: none; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form > input:not([type=checkbox]):not([type=radio]), .inline-form > select { flex: 1 1 220px; width: auto; min-width: 0; }
td .inline-form { flex-wrap: nowrap; }
td .inline-form > input:not([type=checkbox]):not([type=radio]) { flex: 1 1 120px; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filters .field { flex: 1 1 200px; }
.filters .field.wide { flex: 2 1 280px; }
.filters .field > label { font-size: 13px; font-weight: 400; color: var(--muted); }
.search { display: flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 0 12px; border-radius: var(--r); border: 1px solid var(--line-field); background: var(--field); }
.search input:not([type=checkbox]) { border: 0; padding: 0; min-height: 42px; background: transparent; }
.search svg { flex: 0 0 18px; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
legend { padding: 0; margin-bottom: 10px; font-size: 14px; font-weight: 500; }
legend.muted { font-weight: 400; font-size: 13px; color: var(--muted); }

/* casillas en forma de botón */
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line-strong); cursor: pointer; font-size: 14px; }
.chip:hover { background: var(--surface-2); }
.chip:has(input:checked) { border-color: var(--accent); background: var(--raised); }
.chip:has(input:disabled) { border-style: dashed; border-color: #333333; background: #121212; color: var(--muted); cursor: default; }
.chip .n { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip .gone { color: var(--text-2); }
.rows { display: flex; flex-direction: column; gap: 8px; }
.rows .chip { display: flex; border: 0; background: var(--surface-2); }
.rows .chip:has(input:checked) { background: var(--surface-2); }
.rows .chip:has(input:disabled) { border: 1px dashed #333333; background: #121212; }
.check { display: flex; align-items: flex-start; gap: 12px; min-height: var(--tap); padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line-strong); cursor: pointer; }
.check input { margin-top: 1px; }
.check > span { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.check > span > b { font-weight: 600; }
.check > span > span { font-size: 13px; color: var(--muted); }
.check.plain { border: 0; padding: 0; min-height: var(--tap); align-items: center; }
.check.big { align-items: center; min-height: 48px; padding: 0 14px; }
.check.big > span { flex: 1 1 auto; }
.radio-card { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid #2A2A2A; cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--accent); }
.radio-card input { width: 20px; height: 20px; margin-top: 2px; }
.radio-card > span { display: flex; flex-direction: column; gap: 2px; }
.radio-card b { font-weight: 600; }
.radio-card small { font-size: 13px; color: var(--muted); }
.removable { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 4px 0 12px; border-radius: var(--pill); background: var(--raised); font-size: 14px; cursor: pointer; }
.removable input { width: 16px; height: 16px; }
.removable:has(input:not(:checked)) { text-decoration: line-through; color: var(--muted); }
.removable span { padding-right: 8px; }

/* ---------- tablas ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.mid { min-width: 480px; }
table.wide { min-width: 640px; }
table.xwide { min-width: 860px; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
th { padding: 10px 12px; color: var(--muted); font-weight: 500; border-bottom-color: var(--line); white-space: nowrap; }
table.top td { vertical-align: top; padding-top: 16px; padding-bottom: 16px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.dim { color: var(--text-2); }
td.date { color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
td.url { word-break: break-all; }
td.bad { color: var(--err); }
td.empty { color: var(--muted); padding: 20px 12px; }
td .cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
td .cell > a, td .cell > b { font-weight: 500; text-decoration: none; overflow-wrap: break-word; }
td .cell > span { font-size: 13px; color: var(--muted); overflow-wrap: break-word; }
td a.strong { font-weight: 600; color: var(--text); text-decoration: none; }
td a.strong:hover { color: var(--accent); }
td.act { text-align: right; white-space: nowrap; }
tr.gone td { color: var(--muted); }
tr.current td { background: var(--surface-2); }
table.log td { font-size: 13px; }
table.log td.nowrap { width: 1%; color: var(--text-2); }
table.log tr.warn td:last-child { color: var(--warn); }
table.log tr.error td:last-child { color: var(--err); }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.pager > div { display: flex; align-items: center; gap: 8px; }
.pager .now { font-size: 14px; color: var(--text-2); padding: 0 6px; }

/* barras */
.bar { height: 8px; min-width: 90px; border-radius: var(--pill); background: var(--track); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: var(--pill); background: var(--accent); }
.bar.big { height: 12px; }
.bar.grey span { background: #8F8F8F; }
.bar.green span { background: var(--ok-dot); }
.stacked { display: flex; height: 12px; border-radius: var(--pill); background: var(--track); overflow: hidden; }
.stacked span { display: block; height: 100%; }
.stacked .s-sent { background: var(--accent); }
.stacked .s-review { background: var(--warn); }
.stacked .s-failed { background: var(--err); }
.stacked .s-skipped { background: #8F8F8F; }
.meter { display: flex; flex-direction: column; gap: 8px; }
.meter-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.meter-head > span:first-child { font-weight: 500; }
.meter-head > span:last-child { font-size: 14px; font-variant-numeric: tabular-nums; }
.meter-track { position: relative; height: 12px; border-radius: var(--pill); background: var(--track); }
.meter-track > span { display: block; height: 12px; border-radius: var(--pill); background: var(--ok-dot); }
.meter-track.over > span { background: var(--err); }
.meter-track > i { position: absolute; top: -4px; left: 66.6%; width: 2px; height: 20px; background: var(--text); }
.meter-axis { position: relative; height: 16px; font-size: 12px; color: var(--muted); }
.meter-axis span { position: absolute; left: 66.6%; transform: translateX(-50%); white-space: nowrap; }

/* ---------- piezas sueltas ---------- */
.avatar { flex: 0 0 64px; width: 64px; height: 64px; border-radius: var(--pill); background: var(--raised); border: 1px solid #333333; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 600; font-size: 22px; color: var(--text); }
.avatar.sm { flex: 0 0 40px; width: 40px; height: 40px; font-size: 16px; color: var(--accent); border: 0; }
.person { display: flex; align-items: center; gap: 18px; min-width: 0; }
.page-head > div.person { flex-direction: row; align-items: center; gap: 18px; max-width: none; }
.person > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.person .email { color: var(--text-2); overflow-wrap: anywhere; }
.timeline { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.timeline li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.timeline li:last-child { border-bottom: 0; }
.timeline .dot { flex: 0 0 32px; width: 32px; height: 32px; border-radius: var(--pill); background: var(--raised); display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); }
.timeline .dot.click { color: var(--accent); }
.timeline .dot.good { color: var(--ok-dot); }
.timeline .dot.bad { color: var(--err); }
.timeline li > div { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.timeline li > div b { font-weight: 500; }
.timeline li > div span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.timeline time { flex: 0 0 auto; font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.people { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.people li { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.people li > div { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; }
.people li > div b { font-weight: 600; }
.people li > div span, .people li > span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.empty { padding: 28px 20px; border-radius: var(--r-md); border: 1px dashed var(--line-strong); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.empty b { font-weight: 500; }
.empty span { font-size: 14px; color: var(--muted); max-width: 380px; }
.empty .button.link { font-weight: 600; }
blockquote { margin: 0; padding: 12px 14px; border-radius: var(--r); background: var(--field); border: 1px solid var(--line); font-size: 14px; color: var(--text-4); overflow-wrap: anywhere; }
.codebox { overflow-x: auto; border-radius: var(--r-md); background: var(--field); border: 1px solid var(--line); }
.codebox textarea.code { border: 0; background: transparent; min-height: 0; }
.urlbox { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; min-height: var(--tap); padding: 0 14px; border-radius: var(--r); background: var(--field); border: 1px solid var(--line); font-size: 14px; overflow-wrap: anywhere; }
.subnav { flex: 0 1 200px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 24px; }
.subnav a { display: flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: var(--r-sm); color: var(--text-2); text-decoration: none; font-size: 14px; }
.subnav a:hover { background: var(--surface); color: var(--text); }
.with-subnav { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.with-subnav > .stack { flex: 999 1 520px; }
section[id], details[id] { scroll-margin-top: 24px; }
details.card { gap: 0; padding: 0; }
details.card > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 64px; padding: 0 24px; cursor: pointer; }
details.card > summary h2 { font-size: 19px; }
details.card > .inner { padding: 0 24px 24px; display: flex; flex-direction: column; gap: 14px; }
details.fold { border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-3); }
details.fold > summary { display: flex; align-items: center; min-height: 48px; padding: 0 16px; cursor: pointer; font-weight: 500; }
details.fold > .inner { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
summary { cursor: pointer; }
.tech { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.tech li { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 16px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface-3); }
.tech li > div { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tech li > div b { font-weight: 600; }
.tech li > div span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.mail-foot { padding: 16px 20px; border-radius: var(--r-md); background: #F4F4F4; color: #6B6B6B; font-size: 12px; line-height: 1.5; text-align: center; display: flex; flex-direction: column; gap: 6px; overflow-wrap: anywhere; }
.mail-foot u { color: #6B6B6B; }

/* bandeja de entrada simulada (editor) */
.inbox { border-radius: var(--r-lg); background: #FFFFFF; color: #1F1F1F; overflow: hidden; }
.inbox-row { display: flex; gap: 12px; padding: 14px 16px; }
.inbox-row.ghost { opacity: .55; }
.inbox-row.ghost + .inbox-row { border-top: 1px solid #ECECEC; }
.inbox-row.me { background: #F7F8FC; border-top: 1px solid #ECECEC; border-bottom: 1px solid #ECECEC; }
.inbox-row > i { flex: 0 0 36px; height: 36px; border-radius: var(--pill); background: #E3E3E3; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-family: var(--font-head); font-weight: 600; }
.inbox-row.me > i { background: #111111; color: var(--accent); }
.inbox-row > div { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.inbox-row.ghost > div { gap: 6px; padding-top: 4px; }
.inbox-row.ghost > div span { display: block; height: 10px; border-radius: 6px; background: #E3E3E3; }
.inbox-row.me .line1 { display: flex; justify-content: space-between; gap: 8px; }
.inbox-row.me b { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.inbox-row.me small { font-size: 12px; color: #5F6368; }
.inbox-row.me span { font-size: 13px; color: #5F6368; overflow-wrap: anywhere; }

/* recorrido de una secuencia */
.flow { display: flex; flex-direction: column; }
.flow-link { width: 2px; height: 20px; margin-left: 30px; background: var(--line-strong); }
.flow-wait { align-self: flex-start; margin-left: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--pill); background: var(--raised); font-size: 13px; color: var(--text-2); }
.flow-start { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r-lg); background: var(--warn-bg); border: 1px solid var(--warn-line); }
.flow-start > div { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.flow-start > div > span { font-size: 13px; color: var(--warn-text); }
.flow-start b { font-weight: 600; }
.flow-step { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid #2E2E2E; }
.flow-step > .ico { flex: 0 0 36px; width: 36px; height: 36px; border-radius: var(--r); background: var(--raised-2); display: inline-flex; align-items: center; justify-content: center; }
.flow-step > div { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.flow-step > div > span { font-size: 13px; color: var(--muted); }
.flow-step > div > a { font-weight: 600; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.flow-step > div > a:hover { color: var(--accent); }
.flow-step dl { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; }
.flow-step dl > div { display: flex; flex-direction: column; }
.flow-step dt { color: var(--muted); }
.flow-step dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.flow-end { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 18px; border-radius: var(--r-lg); background: var(--ok-soft); }
.flow-end > span:first-of-type { flex: 1 1 auto; font-weight: 500; }
.exit-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.exit-list li { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border-radius: var(--r-md); background: var(--surface-2); }
.exit-list li > span:first-of-type { flex: 1 1 auto; }
.seq-list { flex: 1 1 260px; max-width: 340px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.seq-list h2 { margin: 0 0 4px; font-family: var(--font); font-size: 14px; font-weight: 500; color: var(--muted); }
.seq-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--r-lg); background: var(--surface-3); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.seq-card:hover { color: var(--text); border-color: #4A4A4A; }
.seq-card[aria-current="page"] { background: var(--surface-2); border-color: var(--accent); }
.seq-card > div { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.seq-card b { font-weight: 600; overflow-wrap: anywhere; }
.seq-card > span { font-size: 13px; color: var(--muted); }
.seq-card .badge { min-height: 24px; font-size: 12px; }

/* listas en el inicio y gráfico de salud */
.cols-chart { display: flex; align-items: flex-end; gap: 2px; height: 140px; border-bottom: 1px solid var(--line); }
.cols-chart span { flex: 1; min-width: 4px; background: var(--accent); border-radius: 4px 4px 0 0; }
.cols-chart span:hover { background: var(--accent-hover); }
.cols-axis { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: -8px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.gallery figure { margin: 0; border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px; display: flex; flex-direction: column; gap: 8px; background: var(--surface-3); }
.gallery img { width: 100%; height: 140px; object-fit: contain; background: #FFFFFF; border-radius: var(--r-sm); }
.gallery figcaption { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.gallery figcaption input:not([type=checkbox]) { min-height: 36px; font-size: 13px; }
.rule { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.rule > select, .rule > input:not([type=checkbox]) { flex: 1 1 180px; width: auto; }
.qr { background: #FFFFFF; padding: 10px; border-radius: var(--r-sm); }

/* vista previa del email: ordenador / móvil */
.preview-block { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.preview-wrap { border-radius: var(--r-md); border: 1px solid var(--line); background: #F4F4F4; overflow: hidden; }
iframe.preview { width: 100%; height: 640px; border: 0; display: block; background: #FFFFFF; }
.preview-wrap.mobile { background: var(--surface-3); padding: 16px 0; }
.preview-wrap.mobile iframe.preview { width: 375px; max-width: 100%; height: 700px; display: block; margin: 0 auto; border: 8px solid var(--line); border-radius: 28px; }
.preview-block .actions a { font-size: 14px; }

/* ---------- acceso ---------- */
.login { min-height: 100vh; padding: 56px 24px; display: flex; flex-direction: column; align-items: center; gap: 40px; }
.login-brand { display: flex; align-items: center; gap: 14px; }
.login-brand img { width: 44px; height: 44px; object-fit: contain; }
.login-brand span { display: flex; flex-direction: column; }
.login-brand b { font-family: var(--font-head); font-weight: 600; font-size: 18px; letter-spacing: -0.2px; }
.login-brand small { font-size: 13px; color: var(--muted); }
.login form { width: 100%; max-width: 980px; display: flex; flex-direction: column; gap: 24px; align-items: center; }
.login .flash { width: 100%; max-width: 912px; }
.login-steps { width: 100%; display: flex; flex-wrap: wrap; justify-content: center; align-items: stretch; gap: 32px; }
.login-card { flex: 1 1 360px; max-width: 440px; min-width: 0; padding: 36px 32px; border-radius: var(--r-2xl); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 24px; }
.login-card h1, .login-card h2 { font-size: 26px; line-height: 1.2; letter-spacing: -0.4px; }
.login-card .lead { color: var(--text-2); }
.login-card input:not([type=checkbox]) { min-height: 48px; border-radius: var(--r-md); padding: 0 14px; }
.login-card .joined { border-radius: var(--r-md); }
.login-card .joined input:not([type=checkbox]) { min-height: 46px; }
.step-pill { align-self: flex-start; padding: 6px 12px; border-radius: var(--pill); background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 600; }
.login-arrow { flex: 0 0 auto; align-self: center; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--pill); border: 1px solid var(--line); color: var(--muted); }
.login-notes { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.login-foot { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); text-align: center; }
.login-foot svg { flex: 0 0 16px; }

/* ---------- páginas públicas (news.) ---------- */
.public { min-height: 100vh; max-width: 440px; margin: 0 auto; padding: 40px 24px 28px; display: flex; flex-direction: column; gap: 28px; line-height: 1.5; }
.public-logo { width: 44px; height: 44px; object-fit: contain; align-self: center; }
.public-head { display: flex; flex-direction: column; gap: 10px; text-align: center; }
.public-head h1 { font-size: 25px; line-height: 1.25; letter-spacing: -0.4px; overflow-wrap: anywhere; }
.public-head p { color: var(--text-2); }
.public-head p strong { color: var(--text); }
.public .form { gap: 14px; }
.public input:not([type=checkbox]):not([type=radio]) { min-height: 48px; border-radius: var(--r-md); padding: 0 14px; background: var(--surface); }
.public .consent { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid #2A2A2A; }
.public .consent input { width: 22px; height: 22px; margin-top: 1px; }
.public .consent label { font-size: 14px; line-height: 1.45; color: var(--text-4); }
.public .note { font-size: 13px; color: var(--muted); text-align: center; }
.public button.primary { min-height: 52px; border-radius: var(--r-lg); font-size: 16px; width: 100%; }
.public .cf-turnstile { min-height: 65px; }
.public-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line-side); font-size: 12px; line-height: 1.55; color: var(--muted); text-align: center; display: flex; flex-direction: column; gap: 6px; overflow-wrap: anywhere; }
.public .flash { text-align: left; }

/* ---------- filtros, barras de acción y enlaces fuertes ---------- */
a.strong { font-weight: 600; color: var(--text); text-decoration: none; overflow-wrap: break-word; }
a.strong:hover { color: var(--accent); }
.label { font-size: 14px; font-weight: 500; }
.filter { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line-strong); color: var(--text); font-size: 14px; font-weight: 500; text-decoration: none; }
.filter:hover { background: var(--surface-2); color: var(--text); }
.filter[aria-current] { background: var(--raised-2); border-color: var(--accent); }
.filter .n { font-size: 13px; color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr)); gap: 16px; }
.bottom-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 24px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); }
.bottom-bar > a { display: inline-flex; align-items: center; min-height: var(--tap); }
.confirm-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 28px; border-radius: var(--r-xl); background: var(--warn-bg); border: 1px solid var(--warn-line); }
.confirm-bar .when { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.confirm-bar input[type=datetime-local] { width: auto; }

/* ---------- equipo e invitaciones ---------- */
.person.sm { gap: 12px; min-width: 240px; }
td .actions { flex-wrap: nowrap; gap: 8px; }
td .cell > .badge { align-self: flex-start; }
.panel.ok-panel { background: var(--ok-soft); border-color: var(--ok-line); }
input.mono { font-family: var(--mono); font-size: 13px; }
input.code-sm { max-width: 200px; font-size: 18px; letter-spacing: 4px; font-variant-numeric: tabular-nums; }
.qr-box { display: flex; justify-content: center; }
.qr svg { display: block; width: 216px; height: 216px; }
code.secret { display: block; padding: 12px 14px; border-radius: var(--r); background: var(--field); border: 1px solid var(--line); font-size: 16px; letter-spacing: 1px; color: var(--text); overflow-wrap: anywhere; }
.login-card.next { opacity: .6; }

/* ---------- asistente de copy con IA ---------- */
.ia-box { border-color: var(--warn-line); }
.ia-box h2 { display: flex; align-items: center; gap: 10px; }
.ia-fields { gap: 16px; }
.ia-fields[disabled] { opacity: .55; }
.ia-fields[disabled] * { cursor: not-allowed; }
.ia-ocupado [data-ia-escribir], .ia-ocupado [data-ia-otra] { cursor: progress; }
.ia-result h3 { font-family: var(--font-head); font-size: 18px; font-weight: 600; }
.ia-edit { gap: 16px; }
.ia-edit textarea { min-height: 0; }
[data-ia-asuntos] .chip { min-height: 40px; padding: 8px 14px; }
[data-ia-asuntos] .chip:has(input:checked) { box-shadow: inset 0 0 0 1px var(--accent); background: var(--raised); }
.ia-preview iframe.preview { height: 760px; }
.ia-again { gap: 12px; }
.ia-again .choices button { min-height: 36px; padding: 0 12px; font-size: 13px; }
/* vídeo de YouTube: campo, botones y tarjeta (miniatura, título, fecha, duración y análisis) */
.ia-video .inline-form > button { flex: 0 0 auto; }
.ia-video-card { display: flex; gap: 16px; align-items: flex-start; padding: 14px; border-radius: var(--r-lg); background: var(--surface-3); border: 1px solid var(--line); }
.ia-video-thumb { flex: 0 0 192px; display: block; aspect-ratio: 16 / 9; border-radius: var(--r-sm); overflow: hidden; background: var(--raised); }
.ia-video-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ia-video-info { flex: 1 1 auto; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ia-video-info > b { font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.ia-video-analisis { font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.ia-video-analisis.ok { color: var(--ok); }
.ia-video-analisis.warn { color: var(--warn); }
.ia-video-puntos { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); }
.ia-video-info .check.plain { min-height: 36px; font-size: 14px; }
.ia-video-info .actions { gap: 8px; }
.ia-video-info .actions button { min-height: 36px; font-size: 13px; }
.ia-video-info .actions button.link { padding: 0 4px; }

/* ---------- pantallas estrechas (móvil) ---------- */
@media (max-width: 900px) {
  .app { flex-direction: column; }
  .side { position: static; height: auto; width: 100%; flex: 0 0 auto; padding: 14px 16px; gap: 12px; border-right: 0; border-bottom: 1px solid var(--line-side); flex-direction: row; flex-wrap: wrap; align-items: center; overflow: visible; }
  .brand img { width: 30px; height: 30px; }
  .nav { order: 3; flex: 1 1 100%; flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 2px; }
  .nav a { flex: 0 0 auto; white-space: nowrap; }
  .nav-title { display: none; }
  .nav.minor { order: 4; }
  .session { order: 2; margin: 0 0 0 auto; padding: 0; border: 0; background: none; flex-direction: row; align-items: center; gap: 10px; }
  .session > span:first-child { display: none; }
  .session strong { font-size: 13px; color: var(--text-2); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .session button { min-height: var(--tap); }
  .main { padding: 20px 16px 48px; }
  .subnav { position: static; flex: 1 1 100%; flex-direction: row; overflow-x: auto; }
  .subnav a { flex: 0 0 auto; white-space: nowrap; }
  .seq-list { max-width: none; }
  .hero { padding: 24px; }
  .hero .right { text-align: left; }
  .hero .big-number { font-size: 48px; }
  .big-number { font-size: 44px; }
}
@media (max-width: 560px) {
  h1 { font-size: 26px; }
  .card { padding: 18px; }
  .card.flush { padding: 4px 18px 12px; }
  .banner { padding: 16px 18px; }
  .login { padding: 32px 16px; gap: 28px; }
  .login-card { padding: 28px 20px; }
  .login-arrow { transform: rotate(90deg); }
  .qr svg { width: 200px; height: 200px; }
  .public { padding: 32px 24px 24px; }
  .dl { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .dl dd { margin-bottom: 10px; }
  .dl.sum { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; }
  .dl.sum dd { margin: 0; }
  .stat-value { font-size: 28px; }
  iframe.preview { height: 520px; }
  .ia-video-card { flex-direction: column; }
  .ia-video-thumb { flex: 0 0 auto; width: 100%; }
}
