/* public/assets/styles/byu-ui.css
   RONDA R6l Parte 0 — Sistema de diseño BYU, copiado íntegro de
   docs/referencia-ui/maquetas/mock.css (CEO, solo lectura — NO editar ese
   archivo). Mismos tokens, mismas clases de componentes, misma estructura.

   Diferencias deliberadas frente a mock.css (instrucción explícita R6l):
     1. Tipografía: Poppins → Montserrat (R10-D: fuentes propias en /assets/fonts,
        @font-face en byu-app.css y fuentes.css; fallback system-ui/sans-serif).
     2. Sin @font-face de Poppins (archivos locales del entorno de la
        maqueta, no aplicables aquí).
     3. La regla html,body de mock.css fija width:390px;height:844px;
        overflow:hidden (el marco de la maqueta/simulador de móvil). Aquí
        NO se fija ancho/alto/overflow — eso rompería el layout real de la
        app. Solo se porta background/color/font-family/font-size/
        line-height/antialiasing, aplicado a body.

   Paridad pantalla a pantalla: tests/e2e/paridad-maquetas.spec.js compara
   getComputedStyle de estas clases contra las 18 plantillas NN-*.tpl.html.
   No copiar aquí datos de ejemplo de las plantillas — solo estructura y
   tokens (ver README.md de la carpeta de maquetas).
*/

:root {
  --bg: #1A130F; --card: #281F18; --card2: #33281F; --border: #42352B; --text: #FCF6EE; --muted: #B39C8A;
  --accent: #FA7C1E; --accent-dark: #E06000; --ok: #FA7C1E; --white: #FFFFFF; --crema: #FDF3E5; --marron: #6A3B24;
  --r: 16px; --r-lg: 24px;
}

.light, .light body,
[data-theme="light"], [data-theme="light"] body {
  --bg: #FCF6EE; --card: #F5E8D6; --card2: #EEDCC3; --border: #E2CDAE; --text: #3D261A; --muted: #8B6E55;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
}

/* ── Simulador de pantalla (usado por los tests de paridad al renderizar
   las plantillas NN-*.tpl.html a 390×844; no se usa como contenedor de
   las páginas reales, que ya tienen su propio layout). ── */
.phone { position: relative; width: 390px; height: 844px; overflow: hidden; background: var(--bg); }
.statusbar { height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; font-size: 13px; font-weight: 600; color: var(--text); }
.statusbar .r { display: flex; gap: 6px; align-items: center; }
.statusbar .batt { width: 22px; height: 11px; border: 1.5px solid var(--text); border-radius: 3px; position: relative; }
.statusbar .batt:after { content: ""; position: absolute; left: 1px; top: 1px; bottom: 1px; width: 70%; background: var(--text); border-radius: 1px; }
.content { position: absolute; top: 44px; left: 0; right: 0; bottom: 0; overflow: hidden; }
.scroll { padding: 0 16px 120px; }

/* ── Tipografía ── */
.h1 { font-size: 28px; font-weight: 700; letter-spacing: -.3px; }
.h2 { font-size: 20px; font-weight: 700; }
.h3 { font-size: 16px; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.xs { font-size: 11px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); font-weight: 600; }

/* ── Layout ── */
.card { background: var(--card); border-radius: var(--r); padding: 16px; }
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; }
.gap8 { gap: 8px; } .gap12 { gap: 12px; } .gap16 { gap: 16px; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }

/* ── Chips / botones ── */
.chip { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; background: var(--card2); font-size: 13px; font-weight: 600; }
.chip.on { background: var(--accent); color: #1A130F; }
.chip.soft { background: rgba(250,124,30,.16); color: var(--accent); }
.btn { display: flex; align-items: center; justify-content: center; height: 52px; border-radius: 14px; font-weight: 700; font-size: 16px; letter-spacing: .3px; }
.btn.primary { background: var(--accent); color: #1A130F; text-transform: uppercase; }
.btn.ghost { background: var(--card); color: var(--text); }
.btn.white { background: var(--white); color: var(--accent-dark); text-transform: uppercase; }
.btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.textlinks { display: flex; justify-content: center; gap: 0; margin-top: 12px; font-size: 14px; font-weight: 600; }
.textlinks span { padding: 0 18px; }
.textlinks span+span { border-left: 1px solid var(--border); }
.footer { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 16px 24px; background: linear-gradient(to top, var(--bg) 70%, rgba(26,19,15,0)); }

/* ── Navegación inferior ── */
.tabbar { position: absolute; left: 0; right: 0; bottom: 0; height: 78px; background: #140E0B; border-top: 1px solid var(--border); display: flex; justify-content: space-around; align-items: flex-start; padding: 10px 6px 0; }
.tab { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600; color: var(--muted); width: 72px; text-align: center; }
.tab.on { color: var(--accent); }
.tab svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── Miniaturas de ejercicio ── */
.thumb { width: 56px; height: 56px; border-radius: 10px; background: #F7F1E8; display: flex; align-items: center; justify-content: center; flex: none; overflow: hidden; }
.thumb svg { width: 40px; height: 40px; stroke: #6A3B24; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.thumb.sm { width: 44px; height: 44px; border-radius: 8px; } .thumb.sm svg { width: 30px; height: 30px; }
.ex-row { display: flex; align-items: center; gap: 14px; background: var(--card); border-radius: var(--r); padding: 16px; min-height: 92px; }
.ex-row .name { font-size: 17px; font-weight: 600; line-height: 1.25; }
.ex-row .meta { font-size: 14px; color: var(--muted); margin-top: 4px; }

/* ── Filas de series ── */
.set { display: flex; align-items: center; gap: 10px; height: 62px; border-radius: 8px; background: var(--card); padding: 0 14px 0 14px; margin-top: 10px; }
.set .ck { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border); flex: none; display: flex; align-items: center; justify-content: center; }
.set .n { width: 20px; font-weight: 600; text-align: center; }
.set .box { width: 72px; height: 44px; border-radius: 10px; background: var(--card2); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; }
.set .lab { font-size: 12px; font-weight: 700; color: var(--muted); width: 34px; }
.set.done { background: var(--accent); color: #1A130F; }
.set.done .ck { border-color: #1A130F; background: #1A130F; color: var(--accent); }
.set.done .box { background: rgba(26,19,15,.18); color: #1A130F; }
.set.done .lab { color: #1A130F; }
.set .box.ghost { color: var(--muted); font-weight: 500; }
.set .lab.btn-lab { color: var(--accent); text-decoration: underline dotted; }
.exh { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.exh .chev { width: 20px; color: var(--muted); text-align: center; }
.exh .t { flex: 1; }
.exh .t .name { font-size: 19px; font-weight: 600; line-height: 1.2; }
.exh .t .st { font-size: 14px; color: var(--muted); margin-top: 3px; }
.exh .t .st.ok { color: var(--accent); }
.ico { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.ico svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.addset { height: 50px; border-radius: 8px; background: var(--card); display: flex; align-items: center; justify-content: center; font-weight: 600; margin-top: 10px; }

/* ── Hero / cabecera de ficha ── */
.hero { height: 150px; background: linear-gradient(160deg, #3A2416, #6A3B24 60%, #2A1A10); position: relative; }
.hero .nav { position: absolute; top: 8px; left: 12px; right: 12px; display: flex; justify-content: space-between; color: #fff; }
.hero .nav svg { width: 26px; height: 26px; stroke: #fff; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.titlecard { background: var(--bg); border-radius: 24px 24px 0 0; margin-top: -24px; position: relative; padding: 20px 16px 8px; display: flex; justify-content: space-between; align-items: flex-start; }
.titlecard .day { font-size: 38px; font-weight: 700; letter-spacing: -.5px; line-height: 1; }
.body-svg { width: 64px; height: 92px; }
.pill { display: inline-block; padding: 7px 14px; border-radius: 999px; background: rgba(250,124,30,.16); color: var(--accent); font-size: 16px; font-weight: 600; margin-top: 10px; }
.kv { display: flex; background: var(--card); border-radius: var(--r); padding: 14px 16px; margin-top: 12px; }
.kv>div { flex: 1; }
.kv>div+div { border-left: 1px solid var(--border); padding-left: 16px; }
.kv .k { font-size: 13px; color: var(--muted); }
.kv .v { font-size: 18px; font-weight: 700; margin-top: 2px; display: flex; align-items: center; gap: 8px; }
.kv .v svg { width: 16px; height: 16px; stroke: var(--accent); fill: none; stroke-width: 2; }
.stats { display: flex; gap: 8px; margin-top: 12px; }
.stat { flex: 1; background: var(--card); border-radius: 14px; padding: 12px 6px; text-align: center; }
.stat .v { font-size: 22px; font-weight: 700; }
.stat .k { font-size: 10px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.tabs2 { display: flex; margin: 8px 0 0; }
.tabs2 div { flex: 1; text-align: center; padding: 16px 0 12px; font-weight: 700; letter-spacing: .5px; color: var(--muted); position: relative; }
.tabs2 div.on { color: var(--text); }
.tabs2 div.on:after { content: ""; position: absolute; left: 50%; bottom: 0; width: 110px; height: 3px; background: var(--accent); transform: translateX(-50%); border-radius: 2px; }
.tabs2 div+div { border-left: 1px solid var(--border); }

/* ── Hojas / modales ── */
.sheet { position: absolute; left: 0; right: 0; bottom: 0; background: #231A14; border-radius: 24px 24px 0 0; padding: 20px 16px 110px; }
.dim { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.handle { width: 40px; height: 4px; border-radius: 2px; background: var(--border); margin: 0 auto 14px; }
.input { height: 52px; border-radius: 14px; background: var(--card); display: flex; align-items: center; padding: 0 16px; color: var(--muted); }
.input svg { width: 22px; height: 22px; stroke: var(--muted); fill: none; stroke-width: 2; flex: none; }
.seg { display: flex; background: var(--card); border-radius: 14px; padding: 4px; }
.seg div { flex: 1; text-align: center; padding: 10px; border-radius: 11px; font-weight: 700; color: var(--muted); }
.seg div.on { background: var(--accent); color: #1A130F; }
.hdr { display: flex; align-items: center; gap: 12px; padding: 8px 16px 12px; }
.hdr .back svg { width: 26px; height: 26px; stroke: var(--text); fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.kbd { position: absolute; left: 0; right: 0; bottom: 0; background: #120D0A; padding: 10px 8px 14px; display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.kbd div, .kbd > button { height: 54px; border-radius: 12px; background: #2C221B; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 600; }
.kbd .next { grid-row: span 2; height: auto; background: var(--accent); color: #1A130F; font-size: 16px; font-weight: 700; }
.menu { position: absolute; background: #3A2E25; border-radius: 14px; padding: 8px 0; width: 230px; box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.menu div { padding: 12px 18px; font-size: 15px; }
.menu div.danger { color: #F0624D; }
.menu:before { content: ""; position: absolute; top: -8px; right: 18px; border: 8px solid transparent; border-top: 0; border-bottom-color: #3A2E25; }

/* ── Carrusel de cierre / compartir ── */
.carousel { display: flex; gap: 12px; margin: 0 -16px; padding: 0 16px; overflow: hidden; }
.ccard { flex: none; width: 318px; height: 400px; background: var(--card); border-radius: 24px; padding: 22px 20px; position: relative; display: flex; flex-direction: column; }
.ccard .foot { position: absolute; left: 20px; right: 20px; bottom: 18px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.ccard .foot b { color: var(--text); display: flex; align-items: center; gap: 8px; }
.logo { width: 22px; height: 22px; border-radius: 6px; background: var(--accent); display: inline-block; }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 14px; }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--border); display: block; }
.dots i.on { width: 22px; background: var(--accent); }
.share { display: flex; justify-content: space-between; margin-top: 14px; }
.share div { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); width: 72px; }
.share i { width: 54px; height: 54px; border-radius: 50%; background: var(--card); display: flex; align-items: center; justify-content: center; }
.share i svg { width: 24px; height: 24px; stroke: var(--text); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.share i.wa { background: #25D366; } .share i.wa svg { stroke: #0b3d1f; }

/* ── Calendario / progreso ── */
.cal { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; text-align: center; }
.cal .dow { font-size: 11px; color: var(--muted); font-weight: 600; padding: 6px 0; }
.cal .d { height: 46px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; gap: 3px; }
.cal .d i { width: 5px; height: 5px; border-radius: 50%; background: var(--border); display: block; }
.cal .d i.done { background: var(--accent); }
.cal .d i.plan { background: var(--muted); }
.cal .d i.extra { background: #F0624D; }
.cal .d.today { background: var(--accent); color: #1A130F; }
.cal .d.today i { background: #1A130F; }
.cal .d.out { color: var(--border); }
.ring { width: 44px; height: 44px; }
.bar { height: 8px; border-radius: 4px; background: var(--card2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }
.anno { position: absolute; background: #FA7C1E; color: #1A130F; font-size: 11px; font-weight: 700; border-radius: 999px; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 3px rgba(26,19,15,.9); }
.list { background: var(--card); border-radius: var(--r); overflow: hidden; }
.list .li { display: flex; align-items: center; justify-content: space-between; padding: 15px 16px; border-top: 1px solid var(--border); font-weight: 500; }
.list .li:first-child { border-top: 0; }
.list .li .r { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.list .li .r svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.avatar { width: 72px; height: 72px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; color: #1A130F; }
.hex { width: 150px; height: 150px; }
.grid6 { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.g { background: var(--card); border-radius: 12px; padding: 10px; text-align: center; }
.g .v { font-size: 18px; font-weight: 700; }
.g .k { font-size: 11px; color: var(--muted); }

/* ── Variante de simulador en claro (.phone.light), usada por los tests de
   paridad al renderizar la plantilla 18-previa-light.tpl.html. ── */
.phone.light { color: var(--text); background: var(--bg); }
.phone.light .thumb { background: #fff; }
.phone.light .tabbar { background: #F5E8D6; }
.phone.light .footer { background: linear-gradient(to top, #FCF6EE 70%, rgba(252,246,238,0)); }
.phone.light .hero { background: linear-gradient(160deg, #E2CDAE, #C98A5A 60%, #F5E8D6); }
.phone.light .btn.primary, .phone.light .chip.on { color: #fff; }

/* ── R9-B — equivalentes interactivos y tema claro de la app real ──
   Diferencias deliberadas frente a mock.css (documentadas en
   docs/RONDAS/DESVIACIONES.md, R9-B):
     4. Los componentes que en la maqueta son <div>/<span> de adorno son en
        la app <button> (accesibles por teclado): mismas medidas.
     5. mock.css solo define variante clara para .phone.light; en la app el
        tema claro va por [data-theme="light"] en <html>, con los mismos
        valores. Hoja, menú y teclado (fijos en oscuro en mock.css) usan
        en claro los tokens claros.
*/
button.chip, button.btn, button.addset, button.ico, .textlinks > button, .menu > button, .share > button, .tabs2 > button, .kbd > button, .list > button.li {
  font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: inherit;
}
button.chip { background: var(--card2); font-size: 13px; font-weight: 600; }
button.chip.on { background: var(--accent); color: #1A130F; }
button.chip.soft { background: rgba(250,124,30,.16); color: var(--accent); }
button.btn.primary { background: var(--accent); color: #1A130F; }
button.btn.ghost { background: var(--card); color: var(--text); }
button.btn.white { background: var(--white); color: var(--accent-dark); }
button.btn { font-weight: 700; font-size: 16px; width: 100%; }
button.addset { background: var(--card); font-weight: 600; width: 100%; }
.textlinks > button { padding: 0 18px; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.textlinks > button svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.textlinks > :not(.hidden) ~ :not(.hidden) { border-left: 1px solid var(--border); }
.menu > button { display: block; width: 100%; text-align: left; padding: 12px 18px; font-size: 15px; }
.menu > button.danger { color: #F0624D; }
.list > button.li { width: 100%; font-weight: 500; border-top: 1px solid var(--border); }
.list > button.li:first-child { border-top: 0; }
.list > a.li { color: inherit; text-decoration: none; }
.list > .li.hidden { display: none; }
.seg > button { flex: 1; text-align: center; padding: 10px; border-radius: 11px; font: inherit; font-weight: 700; color: var(--muted); background: none; border: 0; cursor: pointer; }
.seg > button.on { background: var(--accent); color: #1A130F; }
.kbd > button { background: #2C221B; font-size: 24px; font-weight: 600; }
.kbd > button.next { background: var(--accent); color: #1A130F; font-size: 16px; font-weight: 700; }
.hero .nav button { display: flex; color: #fff; }
.tabs2 > button { flex: 1; text-align: center; padding: 16px 0 12px; font-weight: 700; letter-spacing: .5px; color: var(--muted); position: relative; }
.tabs2 > button.on { color: var(--text); }
.tabs2 > button.on:after { content: ""; position: absolute; left: 50%; bottom: 0; width: 110px; height: 3px; background: var(--accent); transform: translateX(-50%); border-radius: 2px; }
.tabs2 > button + button { border-left: 1px solid var(--border); }

[data-theme="light"] .thumb { background: #fff; }
[data-theme="light"] .tabbar { background: #F5E8D6; }
[data-theme="light"] .footer { background: linear-gradient(to top, #FCF6EE 70%, rgba(252,246,238,0)); }
[data-theme="light"] .hero { background: linear-gradient(160deg, #E2CDAE, #C98A5A 60%, #F5E8D6); }
[data-theme="light"] .btn.primary, [data-theme="light"] .chip.on { color: #fff; }
[data-theme="light"] .titlecard { background: var(--bg); }
[data-theme="light"] .sheet { background: var(--bg); }
[data-theme="light"] .menu { background: #fff; box-shadow: 0 12px 30px rgba(61,38,26,.18); }
[data-theme="light"] .menu:before { border-bottom-color: #fff; }
[data-theme="light"] .kbd { background: var(--card2); }
[data-theme="light"] .kbd div, [data-theme="light"] .kbd > button { background: #fff; }
[data-theme="light"] .kbd .next { background: var(--accent); color: #fff; }
