/* ═══════════════════════════════════════════════════════════════════════
   MI APP EN PLAY STORE — by Rubik Labs
   Design system · firma IT: Security · Compliance · Publishing · Ownership · Technology
   Paleta extraída del logo oficial. Light por defecto + dark.
   ═══════════════════════════════════════════════════════════════════════ */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/assets/fonts/inter-var.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"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/assets/fonts/inter-var-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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: "Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/plex-mono-400.woff2") format("woff2"); }
@font-face { font-family: "Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/plex-mono-500.woff2") format("woff2"); }

/* ── Tokens ─────────────────────────────────────────────────────────── */
:root, [data-theme="light"] {
  /* Marca (logo) */
  --brand-blue:  #0048EB; --brand-blue-2: #0084FD; --brand-cyan: #00B9FE;
  --brand-green: #019C5A; --brand-yellow: #FDD803; --brand-orange: #FE870F; --brand-red: #FC2627;
  --brand-graphite: #4F4E4E;

  --bg-primary:    #FFFFFF;
  --bg-secondary:  #F5F6F8;
  --bg-tertiary:   #ECEEF2;
  --surface:       #FFFFFF;
  --surface-2:     #FAFBFC;
  --text-primary:  #0A0C10;
  --text-secondary:#3C404A;
  --text-muted:    #676C78;
  --line:          #E3E6EB;
  --line-strong:   #CDD2DA;
  --border:        #D9DCE2;
  --accent:        #0048EB;   /* texto / links / íconos */
  --accent-hover:  #003AC0;
  --accent-bg:     #0048EB;   /* fondo de botones (texto blanco ≥ 4.5:1) */
  --accent-bg-hover:#003AC0;
  --accent-soft:   #EAF0FF;
  --accent-text:   #FFFFFF;
  --ink:           #0A0C10;   /* panel oscuro institucional */
  --ink-text:      #F2F4F7;
  --danger:        #C62828;
  --danger-soft:   #FDECEC;
  --success:       #0A7A45;
  --success-soft:  #E7F6EE;
  --warning:       #8F5500;
  --warning-soft:  #FFF4E0;
  --shadow:        rgba(10, 12, 16, .08);
  --shadow-lg:     0 24px 60px -24px rgba(10, 12, 16, .25), 0 2px 6px rgba(10, 12, 16, .04);
  --glass:         rgba(255, 255, 255, .72);
  --glass-line:    rgba(255, 255, 255, .7);
  --topbar-h:      68px;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg-primary:    #07090D;
  --bg-secondary:  #0B0E13;
  --bg-tertiary:   #121620;
  --surface:       #0E1117;
  --surface-2:     #11151C;
  --text-primary:  #EEF0F4;
  --text-secondary:#B4B9C4;
  --text-muted:    #8C92A0;
  --line:          #1C212B;
  --line-strong:   #2A303C;
  --border:        #262C37;
  --accent:        #4D86FF;
  --accent-hover:  #6B9BFF;
  --accent-bg:     #2D63F0;
  --accent-bg-hover:#3068F0;
  --accent-soft:   #111C33;
  --accent-text:   #FFFFFF;
  --ink:           #F2F4F7;
  --ink-text:      #0A0C10;
  --danger:        #FF6B6B;
  --danger-soft:   #2A1214;
  --success:       #3DD68C;
  --success-soft:  #0D2219;
  --warning:       #F0A030;
  --warning-soft:  #2A1D08;
  --shadow:        rgba(0, 0, 0, .5);
  --shadow-lg:     0 24px 60px -24px rgba(0, 0, 0, .8), 0 2px 6px rgba(0, 0, 0, .4);
  --glass:         rgba(14, 17, 23, .72);
  --glass-line:    rgba(255, 255, 255, .08);
  color-scheme: dark;
}

/* ── Base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
input, textarea, select, [contenteditable="true"] { -webkit-user-select: text; user-select: text; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px; line-height: 1.6; font-feature-settings: "cv11", "ss01", "tnum" 0;
  background: var(--bg-primary); color: var(--text-primary);
  min-height: 100vh; overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  transition: background-color .25s ease, color .25s ease;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
button { cursor: pointer; font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; color: var(--text-primary); }
h1 { font-size: 28px; } h2 { font-size: 22px; } h3 { font-size: 18px; } h4 { font-size: 15px; }
p { margin: 0; }
.mono { font-family: "Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace; font-feature-settings: "zero" 1; }
.label, .eyebrow { font-family: "Plex Mono", ui-monospace, monospace; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.muted { color: var(--text-muted); }
.accent { color: var(--accent); }
.tnum { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
svg.lucide { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 1.75; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding-left: 1.5rem; padding-right: 1.5rem; }

/* Franja de marca (colores del logo) */
.brand-stripe { height: 3px; background: linear-gradient(90deg, var(--brand-blue) 0 25%, var(--brand-green) 25% 50%, var(--brand-yellow) 50% 75%, var(--brand-red) 75% 100%); }

/* ── Topbar (liquid glass sutil) ─────────────────────────────────────── */
.topbar { position: sticky; top: 0; z-index: 100; background: var(--bg-primary); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .topbar { background: var(--glass); -webkit-backdrop-filter: saturate(170%) blur(18px); backdrop-filter: saturate(170%) blur(18px); }
}
.topbar-inner { display: flex; align-items: center; gap: 1.5rem; height: var(--topbar-h); }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--text-primary); min-width: 0; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; flex-shrink: 0; }
.brand-mark img { width: 24px; height: 24px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-text strong { font-size: 15px; font-weight: 650; letter-spacing: -.015em; white-space: nowrap; }
.brand-text small { font-family: "Plex Mono", monospace; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.nav-desktop { display: flex; gap: .25rem; margin-left: auto; }
.nav-desktop a { padding: .5rem .75rem; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--text-secondary); text-decoration: none; }
.nav-desktop a:hover { color: var(--text-primary); background: var(--bg-secondary); }
.topbar-actions { display: flex; align-items: center; gap: .5rem; }
.icon-btn { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text-primary); display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { border-color: var(--line-strong); }
[data-theme="light"] .only-dark, [data-theme="dark"] .only-light { display: none; }
.user-chip { display: flex; align-items: center; gap: .5rem; padding: .25rem .5rem .25rem .25rem; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 500; }
.user-chip .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 13px; }

/* ── Botones ────────────────────────────────────────────────────────── */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: 0 1.1rem; border-radius: 10px; border: 1px solid transparent; font-weight: 600; font-size: 14px; letter-spacing: -.005em; text-decoration: none; white-space: nowrap; transition: transform .1s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease; }
.btn:active { transform: scale(.97); }
.btn-lg { min-height: 52px; padding: 0 1.4rem; font-size: 15px; border-radius: 12px; }
.btn-primary { background: var(--accent-bg); color: var(--accent-text); box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 8px 20px -10px var(--accent-bg); }
.btn-primary:hover { background: var(--accent-bg-hover); }
.btn-secondary { background: var(--surface); color: var(--text-primary); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--text-muted); }
.btn-ghost { background: transparent; color: var(--text-primary); border-color: transparent; }
.btn-ghost:hover { background: var(--bg-secondary); }
.btn-ink { background: var(--ink); color: var(--ink-text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn .spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }

/* Ripple (skill 31) */
.ripple-wave { position: absolute; border-radius: 50%; background: currentColor; opacity: .18; transform: scale(0); animation: ripple .6s ease-out; pointer-events: none; }
.btn-primary .ripple-wave, .btn-ink .ripple-wave, .btn-danger .ripple-wave { background: #fff; opacity: .35; }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }

/* ── Chips / estados ─────────────────────────────────────────────────── */
.status-chip { display: inline-flex; align-items: center; gap: .55rem; padding: .35rem .75rem .35rem .6rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-family: "Plex Mono", monospace; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-secondary); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); flex-shrink: 0; }
.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .55rem; border-radius: 6px; font-family: "Plex Mono", monospace; font-size: 12px; font-weight: 500; letter-spacing: .04em; background: var(--bg-tertiary); color: var(--text-secondary); }
.badge-accent { background: var(--accent-soft); color: var(--accent); }
.badge-success { background: var(--success-soft); color: var(--success); }

/* ── Vista + transiciones (skill 52) ─────────────────────────────────── */
#app { min-height: calc(100vh - var(--topbar-h)); }
.vista-in { animation: vistaIn .32s cubic-bezier(.2,.7,.2,1); }
.vista-out { animation: vistaOut .16s ease forwards; }
@keyframes vistaIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes vistaOut { to { opacity: 0; transform: translateY(-4px); } }
.page { padding-top: 2.5rem; padding-bottom: 4rem; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-bottom: 1.5rem; margin-bottom: 2rem; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: 28px; }
.page-head p { color: var(--text-secondary); margin-top: .35rem; }

/* ═══ HOME ═══════════════════════════════════════════════════════════ */
.hero { position: relative; padding: 4.5rem 0 3.5rem; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px; opacity: .55;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 20% 20%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 70% 60% at 20% 20%, #000 20%, transparent 75%); }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 3.5rem; align-items: center; }
.display { font-size: clamp(40px, 6.2vw, 76px); line-height: .98; letter-spacing: -.045em; font-weight: 700; margin: 1.5rem 0 1.4rem; }
.display .accent { color: var(--accent); }
.lead { font-size: 18px; line-height: 1.6; color: var(--text-secondary); max-width: 34em; }
.lead strong { color: var(--text-primary); font-weight: 600; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.hero-facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0; margin: 2.5rem 0 0; border-top: 1px solid var(--line); }
.hero-facts > div { padding: 1rem 2rem 0 0; margin-right: 2rem; border-right: 1px solid var(--line); }
.hero-facts > div:last-child { border-right: 0; margin-right: 0; }
.hero-facts dt { font-family: "Plex Mono", monospace; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.hero-facts dd { margin: .25rem 0 0; font-weight: 600; font-size: 15px; }
.hero-facts dd .big { font-size: 22px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hero-facts dd small { font-weight: 500; color: var(--text-muted); font-size: 13px; }

.hero-visual { position: relative; }
.frame { position: relative; margin: 0; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-lg); aspect-ratio: 4 / 5; background: var(--bg-tertiary); }
.frame img { width: 100%; height: 100%; object-fit: cover; }
[data-theme="dark"] .frame img { filter: brightness(.86) contrast(1.05); }
.brackets::after { content: ""; position: absolute; inset: 14px; pointer-events: none;
  background:
    linear-gradient(var(--brand-blue), var(--brand-blue)) top left / 18px 2px no-repeat,
    linear-gradient(var(--brand-blue), var(--brand-blue)) top left / 2px 18px no-repeat,
    linear-gradient(var(--brand-blue), var(--brand-blue)) bottom right / 18px 2px no-repeat,
    linear-gradient(var(--brand-blue), var(--brand-blue)) bottom right / 2px 18px no-repeat; }

.glass { background: var(--surface); border: 1px solid var(--line); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .glass { background: var(--glass); border-color: var(--glass-line); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
}
.console { position: absolute; left: -2.5rem; bottom: 2rem; width: min(320px, 90%); border-radius: 14px; padding: 1rem 1.1rem; box-shadow: var(--shadow-lg); }
.console-head { display: flex; justify-content: space-between; font-size: 12px; letter-spacing: .08em; color: var(--text-muted); padding-bottom: .6rem; margin-bottom: .5rem; border-bottom: 1px solid var(--line); }
.console-steps { list-style: none; margin: 0; padding: 0; position: relative; }
.console-steps li { display: flex; align-items: center; gap: .65rem; padding: .32rem 0; font-size: 13px; color: var(--text-secondary); }
.console-steps li .n { font-family: "Plex Mono", monospace; font-size: 12px; color: var(--text-muted); width: 1.6em; }
.console-steps li .tick { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex-shrink: 0; }
.console-steps li.fin { color: var(--text-primary); font-weight: 600; }
.console-steps li.fin .tick { border-color: var(--success); background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.console-scan { position: absolute; left: 0; right: 0; height: 28px; top: 0; background: linear-gradient(180deg, transparent, var(--accent-soft), transparent); opacity: .7; animation: scan 4.5s ease-in-out infinite; pointer-events: none; border-radius: 6px; }
@keyframes scan { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(190px); } }

/* Secciones */
.section { padding: 5.5rem 0; border-top: 1px solid var(--line); }
.section-alt { background: var(--bg-secondary); }
.sec-head { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 3rem; margin-bottom: 3rem; align-items: end; }
.sec-index { font-family: "Plex Mono", monospace; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.sec-index::before { content: ""; width: 24px; height: 1px; background: var(--accent); }
.sec-title { font-size: clamp(28px, 3.4vw, 42px); letter-spacing: -.035em; line-height: 1.08; font-weight: 700; }
.sec-desc { font-size: 17px; color: var(--text-secondary); max-width: 40em; }

/* Pilares: franja con divisores, no cards */
.pillars { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); }
.pillar { padding: 1.75rem 1.5rem 2rem 0; border-right: 1px solid var(--line); margin-right: 1.5rem; }
.pillar:last-child { border-right: 0; margin-right: 0; }
.pillar .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2.5rem; }
.pillar .top .mono { font-size: 12px; color: var(--text-muted); letter-spacing: .08em; }
.pillar .top svg { width: 22px; height: 22px; color: var(--accent); }
.pillar h3 { font-size: 17px; margin-bottom: .45rem; letter-spacing: -.01em; }
.pillar p { font-size: 14px; color: var(--text-secondary); line-height: 1.55; }

/* Incluye */
.includes { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4rem; }
.includes-aside { position: sticky; top: calc(var(--topbar-h) + 2rem); align-self: start; }
.check-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.check-list li { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: .5rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.check-list .ic { width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.check-list .ic svg { width: 16px; height: 16px; stroke-width: 2.25; }
.check-list h4 { font-size: 16px; margin-bottom: .2rem; }
.check-list p { font-size: 14px; color: var(--text-secondary); }

/* Proceso: timeline */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); position: relative; counter-reset: paso; }
.timeline::before { content: ""; position: absolute; top: 19px; left: 19px; right: 19px; height: 2px; background: linear-gradient(90deg, var(--accent), var(--brand-cyan) 55%, var(--success)); opacity: .9; }
.timeline li { position: relative; padding-right: 1rem; }
.timeline .node { position: relative; width: 40px; height: 40px; border-radius: 12px; background: var(--surface); border: 1.5px solid var(--accent); display: grid; place-items: center; color: var(--accent); margin-bottom: 1.1rem; }
.timeline li:last-child .node { border-color: var(--success); background: var(--success); color: #fff; }
.timeline .node svg { width: 18px; height: 18px; }
.timeline .paso { font-family: "Plex Mono", monospace; font-size: 12px; letter-spacing: .08em; color: var(--text-muted); }
.timeline h4 { font-size: 15px; margin: .2rem 0 .35rem; letter-spacing: -.01em; }
.timeline p { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.special-states { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 3rem; }
.state-note { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 1rem; padding: 1.25rem; border: 1px solid var(--line); border-left: 3px solid var(--warning); border-radius: 12px; background: var(--surface); }
.state-note.id { border-left-color: var(--brand-red); }
.state-note .ic { width: 44px; height: 44px; border-radius: 10px; background: var(--warning-soft); color: var(--warning); display: grid; place-items: center; }
.state-note.id .ic { background: var(--danger-soft); color: var(--danger); }
.state-note h4 { margin-bottom: .25rem; }
.state-note p { font-size: 14px; color: var(--text-secondary); }

/* Split con imagen (seguridad / titularidad) */
.split { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 4rem; align-items: center; }
.split.reverse { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.split.reverse .split-media { order: -1; }
.split-media .frame { aspect-ratio: 3 / 2; }
.spec-list { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line-strong); }
.spec-list li { padding: 1.1rem 1rem 1.1rem 0; border-bottom: 1px solid var(--line); }
.spec-list li:nth-child(odd) { border-right: 1px solid var(--line); }
.spec-list li:nth-child(even) { padding-left: 1.25rem; }
.spec-list .k { display: flex; align-items: center; gap: .5rem; font-weight: 600; font-size: 15px; margin-bottom: .2rem; }
.spec-list .k svg { color: var(--accent); }
.spec-list .v { font-size: 13px; color: var(--text-secondary); }
.spec-foot { margin-top: 1.25rem; font-family: "Plex Mono", monospace; font-size: 12px; letter-spacing: .06em; color: var(--text-muted); }

/* Precio: estilo "ledger" financiero */
.pricing { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 4rem; align-items: start; }
.ledger { border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface); overflow: hidden; box-shadow: var(--shadow-lg); }
.ledger-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.ledger-row { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 1.5rem; border-bottom: 1px dashed var(--line); font-size: 15px; }
.ledger-row span:last-child { font-family: "Plex Mono", monospace; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ledger-row.sub { color: var(--text-secondary); font-size: 14px; }
.ledger-total { display: flex; justify-content: space-between; align-items: baseline; padding: 1.5rem; border-top: 1px solid var(--line-strong); }
.ledger-total .amount { font-size: 44px; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1; }
.ledger-total .amount small { font-size: 16px; font-weight: 600; color: var(--text-muted); letter-spacing: 0; margin-left: .35rem; }
.ledger-foot { padding: 0 1.5rem 1.5rem; }
.ledger-foot .notes { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }

/* FAQ */
.faq { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.25rem 0; font-weight: 600; font-size: 16px; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { transition: transform .2s ease; color: var(--text-muted); }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq details p { padding: 0 3rem 1.4rem 0; color: var(--text-secondary); }

/* CTA final */
.cta-band { position: relative; overflow: hidden; border-radius: 20px; padding: 3.5rem; background: #0A0C10; color: #F2F4F7; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: center; }
[data-theme="dark"] .cta-band { background: #10141C; border: 1px solid var(--line); }
.cta-band::after { content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(0,72,235,.55), transparent 70%); pointer-events: none; }
.cta-band h2 { color: #fff; font-size: clamp(26px, 3vw, 36px); letter-spacing: -.03em; }
.cta-band p { color: #B4B9C4; margin-top: .5rem; }
.cta-band .btn-primary { position: relative; z-index: 1; background: #fff; color: #0A0C10; box-shadow: none; }
.cta-band .btn-primary:hover { background: #E8ECF3; }
.cta-band .btn-primary .ripple-wave { background: #0A0C10; opacity: .15; }

/* Footer del sitio */
.site-footer { border-top: 1px solid var(--line); padding: 3.5rem 0 2rem; background: var(--bg-primary); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 2rem; }
.footer-grid h4 { font-family: "Plex Mono", monospace; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: .9rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.footer-grid a { color: var(--text-secondary); text-decoration: none; font-size: 14px; }
.footer-grid a:hover { color: var(--text-primary); }
.footer-grid address { font-style: normal; font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-muted); }
.footer-legal { font-size: 12px; color: var(--text-muted); margin-top: .75rem; max-width: 42em; }

/* ═══ AUTH ═══════════════════════════════════════════════════════════ */
.auth { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); min-height: calc(100vh - var(--topbar-h)); }
.auth-aside { position: relative; overflow: hidden; background: #0A0C10; color: #E8EBF0; padding: 3.5rem; display: flex; flex-direction: column; justify-content: space-between; }
[data-theme="dark"] .auth-aside { background: #0B0E14; border-right: 1px solid var(--line); }
.auth-aside::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 48px 48px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%); mask-image: linear-gradient(180deg, #000, transparent 85%); }
.auth-aside::after { content: ""; position: absolute; left: -120px; bottom: -120px; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(0,72,235,.45), transparent 70%); }
.auth-aside > * { position: relative; z-index: 1; }
.auth-aside .eyebrow { color: #8C92A0; }
.auth-aside h2 { color: #fff; font-size: clamp(28px, 2.8vw, 38px); letter-spacing: -.035em; line-height: 1.1; margin: 1rem 0; }
.auth-aside p { color: #B4B9C4; max-width: 28em; }
.auth-points { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: .9rem; }
.auth-points li { display: flex; gap: .75rem; align-items: flex-start; font-size: 14px; color: #D6DAE2; }
.auth-points svg { color: #6B9BFF; margin-top: 2px; }
.auth-foot { font-family: "Plex Mono", monospace; font-size: 12px; letter-spacing: .08em; color: #8C92A0; display: flex; gap: 1rem; flex-wrap: wrap; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 3rem 1.5rem; background: var(--bg-primary); }
.auth-card { width: 100%; max-width: 440px; }
.auth-card h1 { font-size: 28px; letter-spacing: -.03em; margin: .5rem 0 .4rem; }
.auth-card .sub { color: var(--text-secondary); margin-bottom: 2rem; }
.auth-alt { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: 14px; color: var(--text-secondary); text-align: center; }

/* Formularios */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.1rem; }
.field.full { grid-column: 1 / -1; }
.field label, .field .label { font-family: "Plex Mono", monospace; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.field label .req { color: var(--danger); }
.input { position: relative; }
.input input, .field select, .field textarea { width: 100%; height: 48px; padding: 0 .95rem; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-primary); font-size: 15px; font-family: inherit; transition: border-color .15s ease, box-shadow .15s ease; }
.input.has-icon input { padding-left: 2.6rem; }
.input.has-toggle input { padding-right: 3rem; }
.input > svg { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.input input:hover { border-color: var(--line-strong); }
.input input:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field.invalid input { border-color: var(--danger); }
.field.invalid input:focus { box-shadow: 0 0 0 4px var(--danger-soft); }
.field .error { font-size: 13px; color: var(--danger); min-height: 0; }
.field .hint { font-size: 13px; color: var(--text-muted); }
.toggle-pass { position: absolute; right: 2px; top: 2px; width: 44px; height: 44px; border: 0; background: none; color: var(--text-muted); display: grid; place-items: center; border-radius: 8px; }
.toggle-pass:hover { color: var(--text-primary); }
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: .2rem; }
.strength span { height: 4px; border-radius: 2px; background: var(--bg-tertiary); transition: background-color .2s ease; }
.strength[data-nivel="1"] span:nth-child(-n+1) { background: var(--danger); }
.strength[data-nivel="2"] span:nth-child(-n+2) { background: var(--brand-orange); }
.strength[data-nivel="3"] span:nth-child(-n+3) { background: var(--brand-blue-2); }
.strength[data-nivel="4"] span { background: var(--success); }
.check { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: .75rem; align-items: start; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 10px; margin-bottom: .75rem; background: var(--surface-2); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); cursor: pointer; }
.check span { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.check span strong { color: var(--text-primary); }
.check.invalid { border-color: var(--danger); background: var(--danger-soft); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.alert { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: .75rem; padding: 1rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font-size: 14px; color: var(--text-secondary); margin-bottom: 1.25rem; }
.alert svg { margin-top: 2px; }
.alert-warning { border-color: color-mix(in srgb, var(--warning) 35%, transparent); background: var(--warning-soft); }
.alert-warning svg { color: var(--warning); }
.alert-danger { border-color: color-mix(in srgb, var(--danger) 35%, transparent); background: var(--danger-soft); }
.alert-danger svg { color: var(--danger); }
.alert-success { border-color: color-mix(in srgb, var(--success) 35%, transparent); background: var(--success-soft); }
.alert-success svg { color: var(--success); }
.alert strong { color: var(--text-primary); }
.alert .acciones { margin-top: .6rem; }

/* Estados (resultado / vacío / error) */
.estado { text-align: center; padding: 1rem 0; }
.estado .icono { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 1.25rem; display: grid; place-items: center; }
.estado .icono svg { width: 28px; height: 28px; }
.estado.ok .icono { background: var(--success-soft); color: var(--success); }
.estado.error .icono { background: var(--danger-soft); color: var(--danger); }
.estado.info .icono { background: var(--accent-soft); color: var(--accent); }
.estado.cargando .icono { background: var(--bg-secondary); color: var(--accent); }
.estado.cargando .icono svg { animation: spin 1s linear infinite; }
.estado h1, .estado h2 { font-size: 22px; margin-bottom: .5rem; }
.estado p { color: var(--text-secondary); margin: 0 auto 1.5rem; max-width: 30em; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { border: 1px dashed var(--line-strong); border-radius: 16px; padding: 3rem 1.5rem; text-align: center; background: var(--surface-2); }
.empty-state .icono { width: 56px; height: 56px; border-radius: 14px; margin: 0 auto 1rem; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.empty-state h3 { margin-bottom: .4rem; }
.empty-state p { color: var(--text-secondary); max-width: 32em; margin: 0 auto 1.5rem; }

/* ═══ DOCUMENTOS LEGALES ═══════════════════════════════════════════════ */
.doc { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 4rem; }
.doc-toc { position: sticky; top: calc(var(--topbar-h) + 2rem); align-self: start; }
.doc-toc ol { list-style: none; margin: .75rem 0 0; padding: 0; border-left: 1px solid var(--line); }
.doc-toc a { display: block; padding: .35rem 0 .35rem 1rem; margin-left: -1px; border-left: 1px solid transparent; font-size: 13px; color: var(--text-secondary); text-decoration: none; }
.doc-toc a:hover { color: var(--text-primary); border-left-color: var(--accent); }
.doc-meta { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.prose { max-width: 46em; }
.prose h2 { font-size: 19px; margin: 2.25rem 0 .75rem; padding-top: 1rem; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--topbar-h) + 1rem); }
.prose h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.prose p { color: var(--text-secondary); margin: 0 0 .9rem; }
.prose ul { margin: 0 0 1rem; padding-left: 1.2rem; color: var(--text-secondary); }
.prose li { margin-bottom: .45rem; }
.prose strong { color: var(--text-primary); }

/* ═══ DASHBOARDS ═════════════════════════════════════════════════════ */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); margin-bottom: 2rem; }
.kpi { padding: 1.4rem 1.5rem; border-right: 1px solid var(--line); }
.kpi:last-child { border-right: 0; }
.kpi .v { font-size: 32px; font-weight: 700; letter-spacing: -.035em; font-variant-numeric: tabular-nums; margin-top: .4rem; line-height: 1.1; }
.kpi .d { font-size: 13px; color: var(--text-muted); margin-top: .2rem; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 1.5rem; }
.panel { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 1.5rem; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.info-rows { display: grid; gap: 0; }
.info-rows > div { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.info-rows > div:last-child { border-bottom: 0; }
.info-rows span:first-child { color: var(--text-muted); }
.info-rows span:last-child { font-weight: 500; text-align: right; overflow-wrap: anywhere; }

/* ═══ OVERLAYS ═══════════════════════════════════════════════════════ */
/* Modal (skill 02): 90vh máx, footer fijo, bottom-sheet en mobile */
.modal-wrapper { position: fixed; inset: 0; z-index: 1000; background: rgba(6, 8, 12, .55); display: flex; align-items: center; justify-content: center; padding: 1rem; animation: fadeIn .18s ease; }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { .modal-wrapper { -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); } }
.modal { background: var(--bg-primary); border: 1px solid var(--line); border-radius: 16px; width: 100%; max-width: 620px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: modalIn .24s cubic-bezier(.2,.7,.2,1); }
.modal:focus { outline: none; }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--line); }
.modal-header h3 { font-size: 17px; }
.modal-body { flex: 1; overflow-y: auto; padding: 1.5rem; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--line); display: flex; gap: .75rem; justify-content: flex-end; background: var(--bg-primary); border-radius: 0 0 16px 16px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.985); } }

/* Toast */
.toast-host { position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%); z-index: 9999; display: grid; gap: .5rem; width: max-content; max-width: calc(100% - 2rem); pointer-events: none; }
.toast { display: flex; align-items: center; gap: .6rem; padding: .8rem 1.1rem; border-radius: 12px; font-size: 14px; font-weight: 500; color: #fff; box-shadow: 0 12px 32px -8px rgba(0,0,0,.35); animation: toastIn .25s cubic-bezier(.2,.7,.2,1); }
.toast svg { width: 18px; height: 18px; }
.toast-error { background: #B42318; } .toast-success { background: #067647; } .toast-warning { background: #93370D; } .toast-info { background: #0A0C10; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

/* Footer nav mobile (skill 03/31) + hoja "Ver más" */
.app-footer-nav { display: none; }
.sheet-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.sheet-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .45rem; min-height: 88px; padding: .75rem .5rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--text-primary); text-decoration: none; font-size: 13px; font-weight: 500; text-align: center; position: relative; overflow: hidden; }
.sheet-item svg { width: 22px; height: 22px; color: var(--accent); }
.sheet-item.danger svg { color: var(--danger); }
.sheet-sep { grid-column: 1 / -1; margin: .75rem 0 .25rem; }

/* Splash 8 s (skill 02/09) — una vez por sesión */
#splash { position: fixed; inset: 0; z-index: 10000; display: none; align-items: center; justify-content: center; background: #F7F8FA; transition: opacity .5s ease; }
html.splash-on #splash { display: flex; }
html.splash-on body { overflow: hidden; }
#splash .splash-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
#splash::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(247,248,250,.35), rgba(247,248,250,.85)); }
.splash-card { position: relative; z-index: 1; text-align: center; padding: 2rem; }
.splash-card .brand-mark { width: 88px; height: 88px; border-radius: 24px; margin: 0 auto 1.5rem; box-shadow: 0 20px 50px -20px rgba(0,72,235,.45); }
.splash-card .brand-mark img { width: 58px; height: 58px; }
.splash-card h1 { font-size: 28px; color: #0A0C10; letter-spacing: -.03em; }
.splash-card p { font-family: "Plex Mono", monospace; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #4F4E4E; margin: .5rem 0 2rem; }
.splash-bar { width: 220px; height: 3px; margin: 0 auto; border-radius: 2px; background: rgba(10,12,16,.12); overflow: hidden; }
.splash-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand-blue), var(--brand-cyan)); }
html.splash-on .splash-bar i { animation: splashBar 8s linear forwards; }
@keyframes splashBar { to { width: 100%; } }
.splash-legal { position: absolute; bottom: calc(1.5rem + env(safe-area-inset-bottom)); left: 0; right: 0; z-index: 1; text-align: center; font-family: "Plex Mono", monospace; font-size: 12px; letter-spacing: .1em; color: #676C78; }

/* Pull-to-refresh (skill 52) */
.ptr { position: fixed; top: 0; left: 50%; z-index: 150; width: 40px; height: 40px; margin-left: -20px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); color: var(--accent); display: grid; place-items: center; transform: translateY(-60px); transition: transform .2s ease; pointer-events: none; }
.ptr.cargando svg { animation: spin .8s linear infinite; }

.noscript { text-align: center; padding: 2rem; }

/* ═══ RESPONSIVE ═════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .nav-desktop { display: none; }
  .topbar-inner > .topbar-actions { margin-left: auto; }
  .hero-grid, .includes, .split, .split.reverse, .pricing, .sec-head, .dash-grid { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .split.reverse .split-media { order: 0; }
  .includes-aside { position: static; }
  .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pillar { margin-right: 0; padding: 1.5rem 1.25rem 1.5rem 0; border-bottom: 1px solid var(--line); }
  .pillar:nth-child(2n) { border-right: 0; padding-left: 1.25rem; }
  .timeline { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .timeline::before { top: 0; bottom: 0; left: 19px; right: auto; width: 2px; height: auto; background: linear-gradient(180deg, var(--accent), var(--brand-cyan) 55%, var(--success)); }
  .timeline li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 1rem; padding: 0 0 1.5rem; }
  .timeline .node { margin-bottom: 0; }
  .frame { aspect-ratio: 16 / 11; }
  .console { left: 1rem; bottom: 1rem; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-aside { padding: 2.5rem 1.5rem; }
  .auth-aside .auth-points, .auth-aside .auth-foot { display: none; }
  .doc { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .doc-toc { position: static; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi:nth-child(2) { border-right: 0; }
  .kpi:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  :root { --topbar-h: 60px; }
  .container { padding-left: 1rem; padding-right: 1rem; }
  body { font-size: 15px; }
  .brand-text small { display: none; }
  .topbar-actions .hide-mobile { display: none; }
  .hero { padding: 2.5rem 0 2.5rem; }
  .display { margin: 1.1rem 0 1rem; }
  .lead { font-size: 16px; }
  .hero-ctas .btn { flex: 1 1 auto; }
  .hero-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-facts > div { padding-right: .75rem; margin-right: .75rem; }
  .hero-facts dd { font-size: 13px; }
  .hero-facts dd .big { font-size: 18px; }
  .console { position: relative; left: auto; bottom: auto; width: 100%; margin-top: -3rem; margin-left: auto; margin-right: auto; max-width: calc(100% - 2rem); }
  .hero .brackets::after { display: none; }
  .section { padding: 3.5rem 0; }
  .sec-head { margin-bottom: 2rem; gap: 1rem; }
  .pillars { grid-template-columns: minmax(0, 1fr); }
  .pillar, .pillar:nth-child(2n) { border-right: 0; padding: 1.25rem 0; }
  .pillar .top { margin-bottom: 1rem; }
  .special-states { grid-template-columns: minmax(0, 1fr); }
  .spec-list { grid-template-columns: minmax(0, 1fr); }
  .spec-list li:nth-child(odd) { border-right: 0; }
  .spec-list li:nth-child(even) { padding-left: 0; }
  .ledger-total .amount { font-size: 38px; }
  .faq details p { padding-right: 0; }
  .cta-band { grid-template-columns: minmax(0, 1fr); padding: 2rem 1.5rem; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .auth-main { padding: 2rem 1rem 3rem; align-items: flex-start; }
  .auth-aside h2 { font-size: 26px; }
  .page { padding-top: 1.5rem; padding-bottom: 3rem; }
  .kpi .v { font-size: 26px; }

  /* Footer nativo mobile */
  .app-footer-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 999; height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--bg-primary); border-top: 1px solid var(--line); }
  @supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { .app-footer-nav { background: var(--glass); -webkit-backdrop-filter: saturate(170%) blur(18px); backdrop-filter: saturate(170%) blur(18px); } }
  .app-footer-nav a, .app-footer-nav button { flex: 1; min-width: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none; font-size: 12px; font-weight: 500; color: var(--text-muted); text-decoration: none; position: relative; overflow: hidden; }
  .app-footer-nav svg { width: 22px; height: 22px; }
  .app-footer-nav .active { color: var(--accent); }
  .app-footer-nav .active::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; border-radius: 0 0 2px 2px; background: var(--accent); }
  body.con-footer-nav { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .toast-host { bottom: calc(80px + env(safe-area-inset-bottom)); }

  .modal-wrapper { align-items: flex-end; padding: 0; }
  .modal { max-width: 100%; border-radius: 20px 20px 0 0; max-height: 90vh; animation: sheetIn .28s cubic-bezier(.2,.7,.2,1); }
  .modal-footer { border-radius: 0; padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
  .modal-footer .btn { flex: 1; }
  @keyframes sheetIn { from { transform: translateY(100%); } }
}

/* Micro-interacciones táctiles (skill 52) */
@media (hover: none) { .btn:hover { filter: none; } }
.clickeable:active, .sheet-item:active { transform: scale(.97); }

/* Modo app instalada (notch / safe areas) */
.modo-app .topbar { padding-top: env(safe-area-inset-top); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  html.splash-on .splash-bar i { animation: none; width: 100%; }
}

/* ═══ FASE 3 · PAGOS, SOLICITUDES Y PANEL ADMIN ═══════════════════════ */
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-ink { background: var(--ink); color: var(--ink-text); }
.hint-line { display: flex; gap: .6rem; align-items: flex-start; font-size: 13px; color: var(--text-muted); line-height: 1.55; }
.hint-line svg { width: 16px; height: 16px; margin-top: 2px; color: var(--text-muted); }
.hint-line a { font-weight: 600; }

/* Sub-navegación (tabs) del panel admin */
.subnav { display: flex; gap: .25rem; padding: .3rem; margin: -.5rem 0 2rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { display: inline-flex; align-items: center; gap: .45rem; min-height: 40px; padding: 0 .95rem; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--text-secondary); text-decoration: none; white-space: nowrap; }
.subnav a svg { width: 16px; height: 16px; }
.subnav a:hover { color: var(--text-primary); }
.subnav a.active { background: var(--surface); color: var(--text-primary); box-shadow: 0 1px 2px var(--shadow), 0 0 0 1px var(--line); }
.subnav a.active svg { color: var(--accent); }

/* Checkout: orden de servicio asimétrica */
.checkout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2rem; align-items: start; }
.checkout-side { position: sticky; top: calc(var(--topbar-h) + 1.5rem); }
.checkout .ledger { box-shadow: none; }
.orden-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; margin-top: 1.25rem; background: var(--surface); }
.orden-meta > div { padding: .9rem 1.1rem; border-right: 1px solid var(--line); min-width: 0; }
.orden-meta > div:last-child { border-right: 0; }
.orden-meta dt { font-family: "Plex Mono", monospace; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.orden-meta dd { margin: .2rem 0 0; font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.pay-btn { margin-top: .5rem; }
.pay-legal { margin-top: 1rem; display: grid; gap: .6rem; }
.stripe-mark { display: inline-flex; align-items: center; gap: .4rem; font-family: "Plex Mono", monospace; font-size: 12px; letter-spacing: .06em; color: var(--text-muted); }

/* Solicitud del cliente */
.sol-card { border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface); overflow: hidden; }
.sol-card + .sol-card { margin-top: 1.25rem; }
.sol-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.sol-num { font-family: "Plex Mono", monospace; font-size: 22px; font-weight: 500; letter-spacing: .02em; color: var(--text-primary); line-height: 1.1; }
.sol-sub { font-size: 13px; color: var(--text-muted); margin-top: .3rem; }
.sol-body { padding: 1.25rem 1.5rem 1.5rem; }
.steps { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.steps li { height: 6px; border-radius: 3px; background: var(--bg-tertiary); }
.steps li.hecho { background: var(--success); }
.steps li.actual { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.steps-label { display: flex; justify-content: space-between; gap: 1rem; font-size: 13px; color: var(--text-secondary); margin: -.6rem 0 1.25rem; }
.steps-label strong { color: var(--text-primary); }
.hist { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.hist li { position: relative; padding: 0 0 1rem 1.1rem; }
.hist li:last-child { padding-bottom: 0; }
.hist li::before { content: ""; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.hist li.cancelada::before { border-color: var(--danger); }
.hist h4 { font-size: 14px; }
.hist p { font-size: 13px; color: var(--text-secondary); margin-top: .15rem; }
.hist time { font-family: "Plex Mono", monospace; font-size: 12px; color: var(--text-muted); }
.next-step { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: .9rem; align-items: start; padding: 1rem 1.1rem; margin-top: 1.25rem; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: 12px; background: var(--accent-soft); }
.next-step .ic { width: 40px; height: 40px; border-radius: 10px; background: var(--surface); color: var(--accent); display: grid; place-items: center; }
.next-step h4 { font-size: 15px; }
.next-step p { font-size: 13px; color: var(--text-secondary); margin-top: .2rem; }
.avisos { list-style: none; margin: 0; padding: 0; }
.avisos li { padding: .8rem 0; border-bottom: 1px solid var(--line); }
.avisos li:last-child { border-bottom: 0; padding-bottom: 0; }
.avisos li:first-child { padding-top: 0; }
.avisos h4 { font-size: 14px; display: flex; gap: .5rem; align-items: center; }
.avisos h4 .dot { width: 7px; height: 7px; box-shadow: none; background: var(--accent); }
.avisos p { font-size: 13px; color: var(--text-secondary); margin-top: .15rem; }
.avisos time { font-family: "Plex Mono", monospace; font-size: 12px; color: var(--text-muted); }

/* Listados admin: tabla en desktop, cards en mobile (skill 50) */
.filtros { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.25rem; }
.filtros .input { flex: 1 1 260px; }
.filtros select { height: 48px; padding: 0 2.2rem 0 .9rem; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-primary); font: inherit; font-size: 14px; flex: 0 1 220px; }
.filtros select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.chip-f { display: inline-flex; align-items: center; gap: .4rem; min-height: 36px; padding: 0 .8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-secondary); font-size: 13px; font-weight: 500; cursor: pointer; }
.chip-f b { font-family: "Plex Mono", monospace; font-weight: 500; color: var(--text-muted); }
.chip-f.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.tabla-wrap { border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; background: var(--surface); }
.tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabla th { text-align: left; font-family: "Plex Mono", monospace; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); padding: .8rem 1rem; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.tabla td { padding: .85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla .num { font-family: "Plex Mono", monospace; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabla .quien strong { display: block; font-weight: 600; }
.tabla .quien span { font-size: 13px; color: var(--text-muted); }
.admin-cards { display: none; flex-direction: column; gap: .75rem; }
.a-card { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 1rem 1.1rem; }
.a-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; }
.a-card-top strong { display: block; font-size: 15px; }
.a-card-top span.sub { font-size: 13px; color: var(--text-muted); }
.a-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem 1rem; margin: .9rem 0 0; padding-top: .9rem; border-top: 1px dashed var(--line); }
.a-card dt { font-family: "Plex Mono", monospace; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.a-card dd { margin: .1rem 0 0; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.a-card .acciones { display: flex; gap: .5rem; margin-top: .9rem; }
.a-card .acciones .btn { flex: 1; }
.paginacion { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1rem; font-size: 13px; color: var(--text-muted); }
.paginacion > div { display: flex; gap: .5rem; }
.obs { display: block; font-size: 12px; color: var(--warning); margin-top: .2rem; }
.ult-sol { list-style: none; margin: 0; padding: 0; }
.ult-sol li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.ult-sol li:last-child { border-bottom: 0; }
.ult-sol .n { font-family: "Plex Mono", monospace; font-weight: 500; }
.ult-sol .c { font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ult-sol .c small { display: block; color: var(--text-muted); font-size: 12px; }

/* Credenciales de Stripe */
.cred-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 1.5rem; align-items: start; }
.cred-status { list-style: none; margin: 0; padding: 0; }
.cred-status li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: .75rem; align-items: center; padding: .8rem 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.cred-status li:last-child { border-bottom: 0; }
.cred-status .ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--bg-secondary); color: var(--text-muted); }
.cred-status .ic svg { width: 15px; height: 15px; }
.cred-status li.ok .ic { background: var(--success-soft); color: var(--success); }
.cred-status .v { font-family: "Plex Mono", monospace; font-size: 13px; color: var(--text-secondary); }
.copy-field { display: flex; gap: .5rem; align-items: stretch; }
.copy-field code { flex: 1; min-width: 0; display: flex; align-items: center; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font-family: "Plex Mono", monospace; font-size: 13px; overflow-wrap: anywhere; -webkit-user-select: all; user-select: all; }
.eventos-lista { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }
.field textarea { height: auto; min-height: 96px; padding: .75rem .95rem; line-height: 1.5; resize: vertical; }

/* Resultado del pago */
.resultado { max-width: 560px; margin: 2rem auto 0; }
.resultado .estado { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); padding: 2.5rem 1.5rem; }
.resultado .sol-num { font-size: 28px; margin: .25rem 0 1rem; }
.resultado .acciones { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.progreso-espera { height: 3px; width: 180px; margin: 0 auto 1.5rem; border-radius: 2px; background: var(--bg-tertiary); overflow: hidden; }
.progreso-espera i { display: block; height: 100%; width: 40%; background: var(--accent); animation: espera 1.2s ease-in-out infinite; }
@keyframes espera { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* Formularios de página (arrepentimiento) */
.form-page { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 3rem; align-items: start; }
.form-page aside .prose { font-size: 15px; }
.codigo-grande { font-family: "Plex Mono", monospace; font-size: 26px; font-weight: 500; letter-spacing: .06em; padding: .8rem 1.2rem; border: 1px dashed var(--line-strong); border-radius: 12px; display: inline-block; margin: .5rem 0 1.25rem; -webkit-user-select: all; user-select: all; }

@media (max-width: 1024px) {
  .checkout, .cred-grid, .form-page { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .checkout-side { position: static; }
}
@media (max-width: 768px) {
  .admin-tabla { display: none; }
  .admin-cards { display: flex; }
  .orden-meta { grid-template-columns: minmax(0, 1fr); }
  .orden-meta > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .orden-meta > div:last-child { border-bottom: 0; }
  .filtros select { flex: 1 1 100%; }
  .subnav { width: 100%; margin-top: -.25rem; }
  .subnav a { flex: 1; justify-content: center; }
  .sol-head, .sol-body { padding-left: 1.1rem; padding-right: 1.1rem; }
  .steps-label { flex-direction: column; gap: .2rem; }
  .ult-sol li { grid-template-columns: minmax(0, 1fr) auto; }
  .ult-sol .n { grid-column: 1 / -1; }
  .copy-field { flex-direction: column; }
}

/* ═══ FASE 4 · FORMULARIO ADAPTATIVO Y DOCUMENTACIÓN CIFRADA ═════════ */
.doc-layout { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 2rem; align-items: start; }
.doc-aside { position: sticky; top: calc(var(--topbar-h) + 1.5rem); }
.tipo-pregunta h2 { font-size: 22px; margin: .5rem 0 1.25rem; letter-spacing: -.02em; }
.tipo-opciones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.tipo-op { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: .35rem 1rem; align-items: start; text-align: left; padding: 1.25rem; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); color: var(--text-primary); transition: border-color .15s ease, box-shadow .15s ease; }
.tipo-op:hover:not(:disabled) { border-color: var(--text-muted); }
.tipo-op .ic { grid-row: span 3; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-secondary); color: var(--text-secondary); }
.tipo-op .t { font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.tipo-op .d { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.tipo-op .req-mini { font-family: "Plex Mono", monospace; font-size: 12px; letter-spacing: .04em; color: var(--text-muted); margin-top: .35rem; }
.tipo-op.activo { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tipo-op.activo .ic { background: var(--accent-soft); color: var(--accent); }
.tipo-op.activo::after { content: ""; position: absolute; top: 1rem; right: 1rem; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tipo-op:disabled { opacity: .45; cursor: not-allowed; }
.doc-sec { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 1.5rem; margin-bottom: 1.25rem; }
.doc-sec > header { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 1rem; align-items: start; padding-bottom: 1.1rem; margin-bottom: 1.25rem; border-bottom: 1px dashed var(--line); }
.doc-sec > header .ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.doc-sec > header p { font-size: 14px; color: var(--text-secondary); margin-top: .25rem; }
.field-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.field-top .badge svg { width: 13px; height: 13px; }
.field select:disabled, .input input:disabled { background: var(--bg-secondary); color: var(--text-secondary); cursor: not-allowed; }
.field.observado .input input, .field.observado select, .field.observado .uploader { border-color: var(--danger); }
.obs-box { display: flex; gap: .5rem; align-items: flex-start; padding: .6rem .75rem; border-radius: 8px; background: var(--danger-soft); color: var(--danger); font-size: 13px; font-weight: 500; }
.obs-box svg { width: 16px; height: 16px; margin-top: 1px; }
.uploader { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: .9rem 1rem; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--surface-2); }
.uploader.cargado { border-style: solid; border-color: color-mix(in srgb, var(--success) 35%, var(--line)); background: var(--surface); }
.up-prev { width: 64px; height: 48px; border-radius: 8px; background: var(--bg-tertiary); display: grid; place-items: center; overflow: hidden; color: var(--text-muted); }
.up-prev img { width: 100%; height: 100%; object-fit: cover; }
.uploader.cargado .up-prev { color: var(--success); background: var(--success-soft); }
.up-info { min-width: 0; display: grid; gap: .3rem; }
.up-estado { font-size: 13px; color: var(--text-secondary); overflow-wrap: anywhere; }
.up-estado strong { color: var(--text-primary); font-weight: 600; }
.ok-txt { display: inline-flex; align-items: center; gap: .25rem; color: var(--success); font-weight: 600; }
.ok-txt svg { width: 13px; height: 13px; }
.up-bar { height: 4px; border-radius: 2px; background: var(--bg-tertiary); overflow: hidden; }
.up-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .15s linear; }
.up-btn { white-space: nowrap; cursor: pointer; }
.doc-acciones { display: flex; justify-content: flex-end; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.prog-bar { height: 6px; border-radius: 3px; background: var(--bg-tertiary); overflow: hidden; margin-bottom: 1rem; }
.prog-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--success)); transition: width .3s ease; }
.req-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; max-height: 50vh; overflow-y: auto; }
.req-list li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: .5rem; align-items: start; font-size: 14px; color: var(--text-secondary); }
.req-list li svg { width: 16px; height: 16px; margin-top: 3px; color: var(--text-muted); }
.req-list li.obs svg, .req-list li.obs .link-btn { color: var(--danger); }
.req-list li.ok svg { color: var(--success); }
.req-list .link-btn { text-align: left; font-weight: 500; text-decoration: none; color: var(--text-primary); }
.req-list .link-btn:hover { text-decoration: underline; }
.seg-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.seg-list li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: .6rem; font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.seg-list svg { width: 16px; height: 16px; margin-top: 2px; color: var(--accent); }
.paso2 { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.doc-avance { font-family: "Plex Mono", monospace; font-size: 12px !important; letter-spacing: .03em; }

@media (max-width: 1024px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr); }
  .doc-aside { position: static; }
  .req-list { max-height: none; }
}
@media (max-width: 768px) {
  .tipo-opciones { grid-template-columns: minmax(0, 1fr); }
  .doc-sec { padding: 1.1rem; }
  .uploader { grid-template-columns: 52px minmax(0, 1fr); }
  .up-prev { width: 52px; height: 42px; }
  .up-btn { grid-column: 1 / -1; }
  .doc-acciones .btn { flex: 1 1 100%; }
}
