/* Banana DISC — estilos compartidos (tokens + componentes + app + PDF) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* Banana DISC — componentes. Todo color sale de tokens.css. */
.bn, .bn * { box-sizing: border-box; }
.bn { font-family: var(--font-sans); font-size: 14px; line-height: 22px; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }

/* Eyebrow */
.bn-eyebrow { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }

/* Tarjeta */
.bn-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: var(--space-6); position: relative; overflow: hidden; }
.bn-card__title { font-size: 18px; line-height: 26px; font-weight: 600; margin: 0 0 4px; }
.bn-card__text { color: var(--ink-2); margin: 0; }
@media (max-width: 600px) { .bn-card { padding: var(--space-4); } }

/* Franja arcoíris (solo tema Orgullo) */
.bn-rainbow { display: none; height: 4px; background: linear-gradient(90deg, var(--rainbow-1) 0 16.66%, var(--rainbow-2) 0 33.33%, var(--rainbow-3) 0 50%, var(--rainbow-4) 0 66.66%, var(--rainbow-5) 0 83.33%, var(--rainbow-6) 0); }
[data-theme="pride"] .bn-rainbow { display: block; }
[data-theme="pride"] .bn-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--rainbow-1) 0 16.66%, var(--rainbow-2) 0 33.33%, var(--rainbow-3) 0 50%, var(--rainbow-4) 0 66.66%, var(--rainbow-5) 0 83.33%, var(--rainbow-6) 0); }

/* Botones */
.bn-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--control-h); padding: 0 18px; border-radius: var(--radius-field); border: 1px solid transparent; font-family: inherit; font-size: 14px; font-weight: 600; line-height: 20px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: filter .15s, background .15s; }
.bn-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 4px var(--accent); }
.bn-btn--primary { background: var(--banana); color: var(--on-banana); }
.bn-btn--primary:hover { filter: brightness(.96); }
.bn-btn--secondary { background: var(--petroleo); color: var(--on-petroleo); }
.bn-btn--secondary:hover { filter: brightness(1.1); }
.bn-btn--tertiary { background: transparent; color: var(--ink); border-color: var(--field-line); }
.bn-btn--tertiary:hover { background: var(--accent-soft); }
.bn-btn--whatsapp { background: var(--whatsapp); color: #ffffff; }
.bn-btn[disabled] { opacity: .45; cursor: not-allowed; filter: none; }
.bn-btn--block { width: 100%; }

/* Campos */
.bn-field { display: flex; flex-direction: column; gap: 6px; }
.bn-label { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ink); }
.bn-input { height: var(--field-h); width: 100%; padding: 0 14px; border: 1px solid var(--field-line); border-radius: var(--radius-field); background: var(--surface); color: var(--ink); font-family: inherit; font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s; }
.bn-input::placeholder { color: var(--ink-3); }
.bn-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.bn-input--error { border-color: var(--danger); }
.bn-help { font-size: 12px; line-height: 18px; color: var(--ink-2); }
.bn-error { font-size: 12px; line-height: 18px; color: var(--danger); font-weight: 500; }

/* Chips */
.bn-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bn-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 12px; font-weight: 500; }
.bn-chip--accent { background: var(--accent-soft); border-color: transparent; color: var(--ink); }

/* Pestañas */
.bn-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.bn-tab { appearance: none; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 10px 14px; font-family: inherit; font-size: 14px; font-weight: 500; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.bn-tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* Opciones (selección como tarjeta) */
.bn-options { display: flex; flex-direction: column; gap: 8px; }
.bn-option { display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px; border: 1px solid var(--field-line); border-radius: var(--radius-field); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.bn-option:hover { border-color: var(--accent); }
.bn-option input { position: absolute; opacity: 0; pointer-events: none; }
.bn-option__dot { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; border-radius: 50%; border: 2px solid var(--field-line); background: var(--surface); }
.bn-option[aria-checked="true"], .bn-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.bn-option[aria-checked="true"] .bn-option__dot, .bn-option:has(input:checked) .bn-option__dot { border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--surface); background: var(--accent); }
.bn-option:focus-within { box-shadow: 0 0 0 3px var(--accent-soft); }

/* Progreso */
.bn-progress { display: flex; flex-direction: column; gap: 6px; }
.bn-progress__meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); }
.bn-progress__track { height: 4px; border-radius: var(--radius-pill); background: var(--line); overflow: hidden; }
.bn-progress__fill { height: 100%; border-radius: var(--radius-pill); background: var(--accent); transition: width .3s ease; }

/* Aviso */
.bn-notice { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius-field); background: var(--notice-bg); border: 1px solid var(--notice-line); color: var(--ink); font-size: 13px; line-height: 20px; }

/* Encabezado */
.bn-header { background: var(--header-bg); border-bottom: 1px solid var(--line); }
.bn-header__in { height: var(--header-h); max-width: 1120px; margin: 0 auto; padding: 0 var(--space-4); display: flex; align-items: center; gap: 14px; }
.bn-header__logo { height: 34px; width: auto; display: block; }
.bn-header__logo--dark { display: none; }
[data-theme="dark"] .bn-header__logo--light { display: none; }
[data-theme="dark"] .bn-header__logo--dark { display: block; }
.bn-header__sep { width: 1px; height: 28px; background: var(--line); }
.bn-header__app { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; color: var(--ink); }
.bn-header__icon { width: 32px; height: 32px; display: block; }
@media (max-width: 420px) { .bn-header__logo { height: 28px; } .bn-header__app span { display: none; } }

/* Selector de tema (botón flotante) */
.bn-fab { position: fixed; right: 16px; bottom: 16px; width: 48px; height: 48px; border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--surface); color: var(--accent); box-shadow: var(--shadow-float); display: grid; place-items: center; cursor: pointer; z-index: 50; }
.bn-fab svg { width: 22px; height: 22px; }
.bn-theme-menu { position: fixed; right: 16px; bottom: 74px; min-width: 180px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-float); z-index: 50; }
.bn-theme-menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: 8px; background: none; color: var(--ink); font-family: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.bn-theme-menu button:hover { background: var(--accent-soft); }
.bn-theme-menu button[aria-checked="true"] { font-weight: 600; color: var(--accent); }
.bn-swatch { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--field-line); flex-shrink: 0; }

/* Banana DISC — tokens (copia de tokens.json del sistema) */
:root, [data-theme="light"], [data-theme="pride"] {
  --bg: #f4f4f2; --header-bg: #ffffff; --surface: #ffffff; --line: #e6e5e2; --field-line: #d6d5d2;
  --ink: #2b2926; --ink-2: #5b5853; --ink-3: #8a8780;
  --banana: #f7b731; --on-banana: #2b2926; --petroleo: #14595c; --on-petroleo: #ffffff;
  --accent: #14595c; --accent-soft: #dcedec;
  --notice-bg: #fdf3dc; --notice-line: #fbdfa5; --whatsapp: #2a8c8c; --danger: #b42318;
  --shadow-card: 0 1px 2px rgba(43,41,38,0.04), 0 4px 16px rgba(43,41,38,0.05);
  --shadow-float: 0 6px 20px rgba(43,41,38,0.18);
}
[data-theme="dark"] {
  --bg: #08282b; --header-bg: #0d3236; --surface: #113c41; --line: #1d4a4f; --field-line: #2a5a5f;
  --ink: #f4f4f2; --ink-2: #c3d4d3; --ink-3: #93b2b0;
  --petroleo: #1f6e72; --accent: #f7b731; --accent-soft: #1e5156;
  --notice-bg: #3a3a1f; --notice-line: #6b5a22; --danger: #ff8a7a;
  --shadow-card: 0 1px 2px rgba(0,0,0,0.25), 0 6px 18px rgba(0,0,0,0.20);
  --shadow-float: 0 6px 20px rgba(0,0,0,0.45);
}
:root {
  --rainbow-1: #e40303; --rainbow-2: #ff8c00; --rainbow-3: #ffed00; --rainbow-4: #008026; --rainbow-5: #004dff; --rainbow-6: #750787;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px; --space-8: 32px;
  --radius-field: 10px; --radius-icon: 12px; --radius-card: 16px; --radius-pill: 999px;
  --control-h: 42px; --field-h: 44px; --header-h: 64px; --content-w: 720px;
  --font-sans: Poppins, system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ===== App: base ===== */
html, body { margin: 0; }
body.bn { min-height: 100vh; }
[hidden] { display: none !important; }
.bn a { color: var(--accent); }
.bn h1, .bn h2, .bn h3 { margin: 0; font-weight: 600; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 720px; margin: 0 auto; padding: 0 16px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }
.muted { color: var(--ink-2); }
.small { font-size: 12px; line-height: 18px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--ink); display: grid; place-items: center; font-size: 13px; font-weight: 600; flex-shrink: 0; }
.avatar--lg { width: 64px; height: 64px; font-size: 20px; }
.bn-header__in--wide { max-width: 1200px; padding: 0 24px; }
.bn-header__right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.bn-btn--sm { height: 36px; padding: 0 14px; font-size: 13px; }
.bn-btn--lg { height: 48px; font-size: 15px; }
select.bn-input { appearance: auto; }

/* DISC dimension colors */
.dD { background: #c0392b; } .dI { background: #d4820a; } .dS { background: #1a7a4a; } .dC { background: #1a5ea8; }
.tD { color: #c0392b; } .tI { color: #a8650a; } .tS { color: #1a7a4a; } .tC { color: #1a5ea8; }
[data-theme="dark"] .tD { color: #ff8a7a; } [data-theme="dark"] .tI { color: #f7b731; }
[data-theme="dark"] .tS { color: #7fd1a2; } [data-theme="dark"] .tC { color: #8fbaf0; }

/* Bar chart */
.chart { display: flex; align-items: flex-end; justify-content: space-around; gap: 12px; padding-top: 16px; }
.chart__col { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.chart__bar { width: 40px; border-radius: 7px 7px 0 0; }
.chart__pct { font-weight: 600; font-size: 13px; }
.chart__lbl { font-weight: 600; font-size: 13px; }
.chart__name { font-size: 11px; color: var(--ink-2); }
.mini { display: flex; align-items: flex-end; gap: 4px; height: 28px; }
.mini span { width: 10px; border-radius: 3px 3px 0 0; }

/* Status banner */
.status { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: var(--radius-card); background: var(--accent-soft); border: 1px solid var(--accent); }
.status__check { width: 36px; height: 36px; border-radius: 50%; background: var(--petroleo); color: #fff; display: grid; place-items: center; flex-shrink: 0; }

/* Overlay */
.overlay { position: fixed; inset: 0; background: color-mix(in srgb, var(--bg) 88%, transparent); display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px; z-index: 100; }
.overlay.show { display: flex; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Theme menu */
.bn-theme-menu[hidden] { display: none; }
.bn-fab:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 4px var(--accent); }

/* ===== Test (candidato) ===== */
.test-main { padding: 18px 0 24px; display: flex; flex-direction: column; gap: 16px; }
.test-q { font-size: 18px; line-height: 26px; font-weight: 600; margin: 0; }
@media (min-width: 700px) { .test-q { font-size: 22px; line-height: 30px; } }
.opts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.test-bar { position: sticky; bottom: 0; background: var(--header-bg); border-top: 1px solid var(--line); padding: 12px 0 16px; margin-top: 8px; z-index: 5; }
.test-bar .wrap-narrow { display: flex; gap: 10px; }
.test-bar .bn-btn--primary { flex: 1; }
@media (min-width: 700px) { .test-bar .bn-btn--primary { flex: 0 0 auto; min-width: 180px; margin-left: auto; } }
.statement { padding: 18px 20px; }
.dots { display: flex; gap: 3px; } .dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--field-line); } .dots span.on { background: var(--accent); }
.pick { height: 44px; min-width: 76px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--field-line); background: var(--surface); color: var(--ink-2); font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.pick[aria-pressed="true"].mas { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.pick[aria-pressed="true"].menos { background: var(--notice-bg); border-color: #c99a2e; color: var(--ink); }
.word-row { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.word-row:last-child { border-bottom: 0; }
.word-row__t { flex: 1; font-size: 15px; font-weight: 500; }
.steps-list { display: flex; flex-direction: column; gap: 12px; }
.steps-list div { display: flex; gap: 12px; align-items: flex-start; line-height: 21px; }
.steps-list b { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.res-grid { display: flex; gap: 16px; flex-wrap: wrap; }
.res-grid > * { flex: 1 1 300px; min-width: 0; }

/* ===== Admin ===== */
.adm-tabs { background: var(--header-bg); border-bottom: 1px solid var(--line); }
.adm-tabs .bn-tabs { border-bottom: 0; }
.adm-main { padding: 28px 0 96px; display: flex; flex-direction: column; gap: 20px; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; padding: 12px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.tbl td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th:first-child, .tbl td:first-child { padding-left: 20px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 20px; text-align: right; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--accent); cursor: pointer; }
.empty { padding: 40px 20px; text-align: center; color: var(--ink-2); }
.split { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.split > .main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.split > .side { flex: 1 1 320px; display: flex; flex-direction: column; gap: 14px; }
.bn-option input[type="checkbox"] { position: static; opacity: 1; pointer-events: auto; width: 18px; height: 18px; margin: 0; accent-color: var(--petroleo); flex-shrink: 0; }
.hr { height: 1px; background: var(--line); }
.cards3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }

/* ===== PDF pages (siempre en claro) ===== */
.pdf-page { width: 794px; height: 1123px; box-sizing: border-box; padding: 44px 48px 36px; background: #ffffff; color: #2b2926; font-family: Poppins, system-ui, sans-serif; font-size: 12px; line-height: 18px; display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.pdf-page * { box-sizing: border-box; }
.pdf-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid #e6e5e2; }
.pdf-head__l { display: flex; align-items: center; gap: 12px; }
.pdf-head img.logo { height: 40px; width: auto; }
.pdf-head .sep { width: 1px; height: 28px; background: #e6e5e2; }
.pdf-head img.ico { width: 26px; height: 26px; }
.pdf-head .app { font-weight: 600; font-size: 13px; }
.pdf-head .meta { font-size: 11px; color: #5b5853; }
.pdf-eye { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #14595c; }
.pdf-eye--warn { color: #7a5a12; }
.pdf-box { border: 1px solid #e6e5e2; border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.pdf-soft { background: #f4f4f2; border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.pdf-chip { display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: 999px; background: #dcedec; font-weight: 600; font-size: 11.5px; }
.pdf-chip--line { background: none; border: 1px solid #e6e5e2; color: #5b5853; font-weight: 400; }
.pdf-row { display: flex; gap: 6px; flex-wrap: wrap; }
.pdf-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pdf-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pdf-p { margin: 0; font-size: 12.5px; line-height: 20px; }
.pdf-li { display: flex; gap: 8px; align-items: flex-start; }
.pdf-li i { width: 6px; height: 6px; border-radius: 50%; background: #14595c; margin-top: 6px; flex-shrink: 0; }
.pdf-li i.g { background: #8a8780; } .pdf-li i.y { background: #d4a12a; }
.pdf-chart { display: flex; align-items: flex-end; justify-content: space-around; }
.pdf-chart div { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.pdf-chart b { font-weight: 600; font-size: 11px; }
.pdf-chart span.bar { border-radius: 5px 5px 0 0; }
.pdf-foot { display: flex; justify-content: space-between; font-size: 10px; color: #5b5853; margin-top: auto; }
.pdf-note { margin: 0; font-size: 10.5px; line-height: 16px; color: #5b5853; }
.pdf-tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.pdf-tbl th { text-align: left; padding: 8px 6px; border-bottom: 1px solid #d6d5d2; font-weight: 600; color: #5b5853; }
.pdf-tbl td { padding: 8px 6px; border-bottom: 1px solid #ecebe8; }
.pdf-tbl .num { text-align: right; }
.pdf-meter { height: 8px; border-radius: 999px; background: #ecebe8; overflow: hidden; }
.pdf-meter span { display: block; height: 8px; border-radius: 999px; background: #14595c; }
.pdf-warn { background: #fdf3dc; border: 1px solid #fbdfa5; border-radius: 12px; padding: 12px 14px; font-size: 11.5px; line-height: 18px; }
