/* ==========================================================================
   AveriksPay - Estilos
   ========================================================================== */
:root {
    --navy-900: #0B1F3A;
    --navy-800: #12294A;
    --navy-700: #1B3A63;
    --teal-600: #0D9488;
    --teal-500: #14B8A6;
    --teal-300: #5EEAD4;
    --teal-50:  #ECFDF8;
    --slate-900: #0F172A;
    --slate-700: #334155;
    --slate-500: #64748B;
    --slate-300: #CBD5E1;
    --slate-200: #E2E8F0;
    --slate-100: #F1F5F9;
    --slate-50:  #F8FAFC;
    --white: #FFFFFF;
    --red-600: #DC2626;
    --red-50:  #FEF2F2;
    --amber-50: #FFFBEB;
    --amber-700: #B45309;
    --green-600: #16A34A;

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
    --shadow: 0 8px 24px rgba(15, 23, 42, .08);
    --shadow-lg: 0 24px 60px rgba(11, 31, 58, .18);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --container: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--slate-700);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--teal-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--slate-900); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.15rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--teal-500); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 24px; } }

.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--navy-900); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--teal-600); margin-bottom: .75rem; }
.lead { font-size: 1.15rem; color: var(--slate-500); max-width: 60ch; }
.accent { color: var(--teal-600); }
.note { font-size: .9rem; color: var(--slate-500); }

/* ---------- Botones ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    font: inherit; font-weight: 650; font-size: 1rem;
    padding: .75rem 1.35rem; border-radius: 999px; border: 1.5px solid transparent;
    cursor: pointer; text-decoration: none; transition: background .15s, color .15s, border-color .15s, transform .05s, box-shadow .15s;
    line-height: 1.2;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy-900); color: #fff; }
.btn-primary:hover { background: var(--navy-700); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--navy-900); border-color: var(--slate-300); }
.btn-ghost:hover { border-color: var(--navy-900); }
.btn-light { background: #fff; color: var(--navy-900); }
.btn-light:hover { background: var(--teal-50); }
.btn-sm { padding: .5rem 1rem; font-size: .92rem; }
.btn-lg { padding: .95rem 1.7rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .7; cursor: progress; }
.link-arrow { font-weight: 650; }
.link-arrow::after { content: " →"; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--slate-200); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--navy-900); font-size: 1.2rem; font-weight: 500; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand strong { font-weight: 800; }
.brand-mark { width: 32px; height: 32px; color: var(--navy-900); }
.brand-light { color: #fff; }
.brand-light .brand-mark { color: #fff; }

.main-nav { display: flex; align-items: center; gap: 1.75rem; }
.main-nav a:not(.btn) { color: var(--slate-700); font-weight: 550; }
.main-nav a:not(.btn)[aria-current="page"] { color: var(--navy-900); font-weight: 700; }
.main-nav a:not(.btn):hover { color: var(--navy-900); text-decoration: none; }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--navy-900); margin: 4px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }

@media (max-width: 767px) {
    .nav-toggle { display: block; }
    .main-nav {
        position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
        background: #fff; border-bottom: 1px solid var(--slate-200); padding: 8px 16px 16px; display: none;
    }
    .main-nav.open { display: flex; }
    .main-nav a:not(.btn) { padding: 12px 4px; border-bottom: 1px solid var(--slate-100); }
    .main-nav .btn { margin-top: 12px; }
    .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}

/* ---------- Hero ---------- */
.hero { background: radial-gradient(1200px 500px at 85% -10%, var(--teal-50), transparent 60%), linear-gradient(180deg, var(--slate-50), #fff); padding: 56px 0 72px; overflow: hidden; }
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.1fr .9fr; } .hero { padding: 88px 0 104px; } }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0; }
.trust-row { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 18px; font-size: .92rem; color: var(--slate-500); }
.trust-row li { display: inline-flex; align-items: center; gap: 6px; }
.trust-row svg { width: 18px; height: 18px; fill: none; stroke: var(--teal-600); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.hero-visual { display: flex; justify-content: center; }
.card-mock {
    width: 100%; max-width: 400px; background: linear-gradient(160deg, var(--navy-900), var(--navy-700));
    color: #fff; border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-lg); position: relative;
}
.card-mock::before { content: ""; position: absolute; inset: -40px -40px auto auto; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(94,234,212,.35), transparent 70%); pointer-events: none; }
.card-mock-head { display: flex; justify-content: space-between; align-items: center; font-size: .9rem; color: #B6C4D9; }
.pill { background: rgba(94,234,212,.15); color: var(--teal-300); font-weight: 650; font-size: .75rem; padding: 4px 10px; border-radius: 999px; }
.balance { font-size: 2.3rem; font-weight: 800; letter-spacing: -.02em; margin: 10px 0 20px; }
.balance small { font-size: 1.1rem; color: #B6C4D9; }
.currency-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.currency-list li { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 10px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 12px 14px; font-size: .95rem; }
.currency-list .flag { font-size: .75rem; font-weight: 800; background: rgba(255,255,255,.12); border-radius: 6px; padding: 4px 0; text-align: center; letter-spacing: .05em; }
.card-mock-foot { margin-top: 18px; font-size: .82rem; color: #B6C4D9; display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal-300); box-shadow: 0 0 0 4px rgba(94,234,212,.2); }

/* ---------- Secciones ---------- */
.section { padding: 72px 0; }
.section-tight { padding: 40px 0 72px; }
.section-alt { background: var(--slate-50); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 44px; }

.page-hero { background: linear-gradient(180deg, var(--slate-50), #fff); padding: 64px 0 24px; }
.page-hero-compact { padding: 48px 0 8px; }

.product-grid { display: grid; gap: 20px; }
@media (min-width: 768px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
.product-card { background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius); padding: 28px; transition: box-shadow .2s, transform .2s, border-color .2s; }
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--slate-300); }
.icon-badge, .product-detail-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--teal-50); display: grid; place-items: center; margin-bottom: 18px; }
.icon-badge svg, .product-detail-icon svg { width: 26px; height: 26px; fill: none; stroke: var(--teal-600); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.benefit-grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .benefit-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .benefit-grid { grid-template-columns: repeat(4, 1fr); } }
.benefit { background: #fff; border-radius: var(--radius); padding: 24px; border: 1px solid var(--slate-200); }
.benefit h3 { position: relative; padding-left: 18px; }
.benefit h3::before { content: ""; position: absolute; left: 0; top: .35em; width: 8px; height: 8px; border-radius: 2px; background: var(--teal-500); }
.benefit p { margin: 0; color: var(--slate-500); }

.cta-band { background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); color: #fff; border-radius: var(--radius-lg); padding: 40px 32px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #B6C4D9; margin: 0; }

.product-detail { display: grid; gap: 24px; }
@media (min-width: 768px) { .product-detail { grid-template-columns: 64px 1fr; gap: 32px; } }
.product-detail-icon { width: 64px; height: 64px; border-radius: 16px; }
.product-detail-icon svg { width: 32px; height: 32px; }
.two-col { display: grid; gap: 24px; margin: 8px 0 16px; }
@media (min-width: 768px) { .two-col { grid-template-columns: 1fr 1fr; } }

.check-list { list-style: none; padding: 0; margin: 0 0 1.5em; display: grid; gap: 10px; }
.check-list li { position: relative; padding-left: 30px; }
.check-list li::before {
    content: ""; position: absolute; left: 0; top: .2em; width: 20px; height: 20px; border-radius: 50%;
    background: var(--teal-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230D9488' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.steps { margin: 0 0 1.5em; padding-left: 1.3em; display: grid; gap: 8px; }
.steps li::marker { color: var(--teal-600); font-weight: 700; }

/* ---------- Formularios ---------- */
.form-layout { display: grid; gap: 32px; align-items: start; }
@media (min-width: 1024px) { .form-layout { grid-template-columns: minmax(0, 1fr) 320px; } }
.card { background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.form-card { padding: 24px; }
@media (min-width: 768px) { .form-card { padding: 36px; } }
.form-aside { background: var(--slate-50); border-radius: var(--radius); padding: 24px; border: 1px solid var(--slate-200); }

fieldset { border: 0; padding: 0; margin: 0 0 28px; min-width: 0; }
legend { font-size: 1.1rem; font-weight: 750; color: var(--slate-900); margin-bottom: 14px; padding: 0; }
.subsection { margin: 24px 0 14px; font-size: 1rem; color: var(--slate-900); }
.grid-2 { display: grid; gap: 16px 18px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } .field-full { grid-column: 1 / -1; } }
.field label { display: block; font-weight: 600; font-size: .92rem; color: var(--slate-900); margin-bottom: 6px; }
.field input, .field select {
    width: 100%; font: inherit; font-size: 1rem; color: var(--slate-900);
    padding: .7rem .85rem; border: 1.5px solid var(--slate-300); border-radius: var(--radius-sm); background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.field select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right .7rem center / 18px no-repeat; padding-right: 2.4rem; }
.field input:focus, .field select:focus { outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 4px rgba(20,184,166,.15); }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--red-600); }
.field-error { color: var(--red-600); font-size: .85rem; margin: 6px 0 0; min-height: 0; }
.field-error:empty { display: none; }
.field-help { font-size: .85rem; color: var(--slate-500); margin: 8px 0 0; width: 100%; }

.segmented { display: flex; flex-wrap: wrap; gap: 10px; }
.segmented legend { width: 100%; }
.segmented label { flex: 1 1 140px; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; text-align: center; padding: .85rem 1rem; border: 1.5px solid var(--slate-300); border-radius: var(--radius-sm); font-weight: 650; color: var(--slate-700); transition: all .15s; }
.segmented input:checked + span { border-color: var(--navy-900); background: var(--navy-900); color: #fff; }
.segmented input:focus-visible + span { outline: 3px solid var(--teal-500); outline-offset: 2px; }

.field-check { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; }
.field-check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--navy-900); flex-shrink: 0; }
.field-check label { font-size: .93rem; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-footnote { display: flex; gap: 8px; align-items: flex-start; justify-content: center; font-size: .85rem; color: var(--slate-500); margin: 14px 0 0; text-align: center; }
.form-footnote svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2; }

.alert { padding: 14px 16px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: .95rem; }
.alert-error { background: var(--red-50); color: #991B1B; border: 1px solid #FECACA; }
.alert-warning { background: var(--amber-50); color: var(--amber-700); border: 1px solid #FDE68A; }

.spinner { display: none; width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.success-card { padding: 48px 32px; text-align: center; }
.success-card:focus { outline: none; }
.success-icon { width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 50%; background: var(--teal-50); display: grid; place-items: center; }
.success-icon svg { width: 32px; height: 32px; fill: none; stroke: var(--teal-600); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Legales ---------- */
.legal { max-width: 820px; }
.legal h2 { font-size: 1.25rem; margin-top: 2em; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: .4em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #B6C4D9; padding: 56px 0 28px; margin-top: 0; font-size: .93rem; }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h3 { color: #fff; font-size: .95rem; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a:not(.brand) { color: #B6C4D9; }
.site-footer a:not(.brand):hover { color: #fff; }
.footer-tagline { margin-top: 12px; max-width: 34ch; }
.footer-legal { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 24px; font-size: .8rem; color: #8A9BB5; }
.footer-legal p { margin-bottom: .75em; }

/* ==========================================================================
   Chat widget
   ========================================================================== */
.chat-launcher {
    position: fixed; right: 20px; bottom: 20px; z-index: 90;
    width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer;
    background: var(--navy-900); color: #fff; box-shadow: var(--shadow-lg);
    display: grid; place-items: center; transition: transform .15s, background .15s;
}
.chat-launcher:hover { background: var(--navy-700); transform: scale(1.04); }
.chat-launcher svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.chat-panel {
    position: fixed; right: 20px; bottom: 92px; z-index: 91;
    width: min(380px, calc(100vw - 32px)); height: min(600px, calc(100vh - 120px));
    background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--slate-200);
    display: flex; flex-direction: column; overflow: hidden;
}
.chat-panel[hidden] { display: none; }
@media (max-width: 480px) {
    .chat-panel { right: 0; bottom: 0; width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
    .chat-launcher.is-open { display: none; }
}
.chat-head { background: var(--navy-900); color: #fff; padding: 14px 16px; display: flex; align-items: center; gap: 10px; }
.chat-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--teal-500); display: grid; place-items: center; font-weight: 800; color: var(--navy-900); flex-shrink: 0; }
.chat-title { flex: 1; min-width: 0; }
.chat-title strong { display: block; font-size: .98rem; }
.chat-title span { font-size: .78rem; color: #B6C4D9; }
.chat-icon-btn { background: none; border: 0; color: #B6C4D9; cursor: pointer; padding: 6px; border-radius: 8px; }
.chat-icon-btn:hover { color: #fff; background: rgba(255,255,255,.08); }
.chat-icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--slate-50); }
.chat-msg { max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: .93rem; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.chat-msg p { margin: 0 0 .5em; }
.chat-msg p:last-child { margin: 0; }
.chat-msg ul, .chat-msg ol { margin: .25em 0 .5em; padding-left: 1.2em; white-space: normal; }
.chat-msg.bot { align-self: flex-start; background: #fff; color: var(--slate-900); border: 1px solid var(--slate-200); border-bottom-left-radius: 4px; white-space: normal; }
.chat-msg.user { align-self: flex-end; background: var(--navy-900); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.error { align-self: center; background: var(--red-50); color: #991B1B; font-size: .85rem; }
.chat-typing { display: inline-flex; gap: 4px; padding: 14px; }
.chat-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--slate-300); animation: blink 1.2s infinite; }
.chat-typing span:nth-child(2) { animation-delay: .2s; }
.chat-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--slate-200); background: #fff; }
.chat-form textarea {
    flex: 1; resize: none; font: inherit; font-size: .95rem; padding: .6rem .8rem; max-height: 120px;
    border: 1.5px solid var(--slate-300); border-radius: 12px;
}
.chat-form textarea:focus { outline: none; border-color: var(--teal-500); }
.chat-send { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--navy-900); color: #fff; cursor: pointer; display: grid; place-items: center; flex-shrink: 0; align-self: flex-end; }
.chat-send[disabled] { opacity: .5; cursor: not-allowed; }
.chat-send svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chat-disclaimer { font-size: .72rem; color: var(--slate-500); text-align: center; padding: 0 12px 10px; background: #fff; margin: 0; }

/* ==========================================================================
   Login, panel y solicitudes
   ========================================================================== */
.alert-success { background: #F0FDF4; color: #166534; border: 1px solid #BBF7D0; }
.alert-info { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }
.flash-stack { padding-top: 16px; }
.flash-stack .alert { margin-bottom: 8px; }

/* Menú de usuario (sin JavaScript: <details>) */
.user-menu { position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 6px 10px 6px 6px; border-radius: 999px; border: 1.5px solid var(--slate-200); font-weight: 650; color: var(--navy-900); }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { border-color: var(--slate-300); }
.user-menu summary svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.user-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--navy-900); color: #fff; display: grid; place-items: center; font-size: .85rem; font-weight: 800; }
.user-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 6px; z-index: 60; }
.user-menu-panel a, .user-menu-panel button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 6px; color: var(--slate-700); font: inherit; font-weight: 550; background: none; border: 0; cursor: pointer; }
.user-menu-panel a:hover, .user-menu-panel button:hover { background: var(--slate-100); text-decoration: none; color: var(--navy-900); }
.user-menu-panel form { margin: 0; }
@media (max-width: 767px) {
    .user-menu { padding-top: 8px; }
    .user-menu summary { justify-content: flex-start; }
    .user-menu-panel { position: static; box-shadow: none; border: 0; padding: 4px 0 0; }
}

/* Login / auth */
.auth-section { background: linear-gradient(180deg, var(--slate-50), #fff); }
.auth-wrap { display: flex; justify-content: center; }
.auth-card { width: 100%; max-width: 440px; padding: 32px 24px; }
@media (min-width: 640px) { .auth-card { padding: 40px; } }
.auth-title { font-size: 1.75rem; margin-bottom: .25rem; }
.auth-sub { color: var(--slate-500); margin-bottom: 1.5rem; }
.auth-alt { text-align: center; margin: 1.25rem 0 0; font-size: .95rem; }
.stack { display: grid; gap: 16px; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.small-link { font-size: .85rem; font-weight: 600; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 84px; }
.password-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--teal-600); font: inherit; font-size: .85rem; font-weight: 650; cursor: pointer; padding: 6px 8px; border-radius: 6px; }
.password-toggle:hover { background: var(--slate-100); }

/* Indicador de seguridad */
.strength { margin-top: 8px; font-size: .82rem; color: var(--slate-500); display: grid; gap: 6px; }
.strength-bar { height: 6px; border-radius: 999px; background: var(--slate-200); overflow: hidden; }
.strength-bar i { display: block; height: 100%; width: 0; border-radius: 999px; transition: width .2s, background .2s; }
.strength.weak .strength-bar i { width: 25%; background: var(--red-600); }
.strength.fair .strength-bar i { width: 50%; background: #F59E0B; }
.strength.good .strength-bar i { width: 75%; background: var(--teal-500); }
.strength.strong .strength-bar i { width: 100%; background: var(--green-600); }
.strength.weak .strength-text { color: var(--red-600); }

/* Panel */
.panel-grid { display: grid; gap: 32px; align-items: start; }
@media (min-width: 1024px) { .panel-grid { grid-template-columns: minmax(0, 1fr) 320px; } }
.panel-title { font-size: 1.3rem; margin: 8px 0 16px; }
.panel-main > .panel-title ~ .panel-title { margin-top: 40px; }
.verify-banner { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.verify-banner form { margin: 0; }
.empty-state { border: 1.5px dashed var(--slate-300); border-radius: var(--radius); padding: 24px; text-align: center; color: var(--slate-500); }
.empty-state p { margin: 0; }
.app-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.app-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius); padding: 16px 18px; }
.app-item strong { display: block; color: var(--slate-900); }
.app-meta { display: block; font-size: .85rem; color: var(--slate-500); }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.badge-sm { font-size: .7rem; padding: 2px 8px; vertical-align: middle; }
.badge-pending { background: #FEF3C7; color: #92400E; }
.badge-info { background: #DBEAFE; color: #1E40AF; }
.badge-success { background: #DCFCE7; color: #166534; }
.badge-danger { background: #FEE2E2; color: #991B1B; }
.product-grid-panel { grid-template-columns: 1fr; }
@media (min-width: 640px) { .product-grid-panel { grid-template-columns: repeat(2, 1fr); } }
.product-card .btn { margin-top: 4px; }
.data-list { margin: 0 0 16px; display: grid; gap: 4px; }
.data-list dt { font-size: .8rem; color: var(--slate-500); font-weight: 600; margin-top: 8px; }
.data-list dd { margin: 0; color: var(--slate-900); font-weight: 550; overflow-wrap: anywhere; }
.data-list-inline { background: var(--slate-50); border: 1px solid var(--slate-200); border-radius: var(--radius-sm); padding: 4px 16px 14px; }
@media (min-width: 640px) { .data-list-inline { grid-template-columns: 180px 1fr; column-gap: 16px; } .data-list-inline dt, .data-list-inline dd { margin-top: 10px; } }
.back-link { display: block; width: fit-content; font-size: .9rem; font-weight: 600; margin-bottom: 16px; }
.field-label { font-weight: 600; font-size: .92rem; color: var(--slate-900); margin: 0 0 8px; }
.radio-row { display: flex; gap: 24px; }
.radio { display: inline-flex; align-items: center; gap: 8px; font-weight: 550; cursor: pointer; }
.radio input { width: 18px; height: 18px; accent-color: var(--navy-900); }
.form-section > .field + .field, .form-section > .field + .field-check { margin-top: 16px; }

/* Producto: tasas destacadas */
.rate-card { background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); }
.rate-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rate-head h2 { margin: 0; font-size: 1.4rem; }
.rate-sub { color: var(--slate-500); margin: 6px 0 20px; }
.rate-grid { display: grid; gap: 12px; }
@media (min-width: 640px) { .rate-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .rate-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.rate-item { background: var(--slate-50); border: 1px solid var(--slate-200); border-radius: var(--radius); padding: 18px; display: grid; gap: 4px; }
.rate-label { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--slate-500); }
.rate-value { font-size: 1.6rem; font-weight: 800; color: var(--navy-900); letter-spacing: -.02em; }
.rate-help { font-size: .82rem; color: var(--slate-500); }
.rate-cft { background: var(--navy-900); border-color: var(--navy-900); }
.rate-cft .rate-label, .rate-cft .rate-help { color: #B6C4D9; }
.rate-cft .rate-value { color: #fff; font-size: 2.3rem; }
.pill-muted { background: var(--slate-100); color: var(--slate-700); }
.pill-example { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255,255,255,.3); text-transform: uppercase; letter-spacing: .08em; }
.feature-grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .feature-grid { grid-template-columns: repeat(4, 1fr); } }

/* 404 */
.error-page { text-align: center; padding: 96px 0; }
.error-page .lead { margin: 0 auto 8px; }
.error-page .hero-actions { justify-content: center; }
.error-code { display: block; font-size: 6rem; font-weight: 800; line-height: 1; color: var(--teal-500); letter-spacing: -.04em; margin-bottom: 16px; }

/* ==========================================================================
   Onboarding Passport: pasos, perfil, identidad, movimientos y mensajes
   ========================================================================== */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.grid-3 { display: grid; gap: 16px 18px; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .span-2 { grid-column: span 2; } }
.grid-tight { gap: 12px; }
.beneficiary-row + .beneficiary-row { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--slate-200); }

.stepper { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; counter-reset: none; }
.stepper li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; position: relative; font-size: .85rem; color: var(--slate-500); }
.stepper li::before { content: ""; position: absolute; top: 16px; left: calc(-50% + 18px); right: calc(50% + 18px); height: 2px; background: var(--slate-200); }
.stepper li:first-child::before { display: none; }
.stepper li.is-done::before { background: var(--teal-500); }
.step-dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: #fff; border: 2px solid var(--slate-300); color: var(--slate-500); position: relative; z-index: 1; }
.stepper li.is-done .step-dot { background: var(--teal-500); border-color: var(--teal-500); color: #fff; }
.stepper li.is-done .step-label { color: var(--slate-900); font-weight: 600; }
.next-step { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding: 20px 22px; margin-bottom: 24px; border-color: var(--teal-500); background: var(--teal-50); }
.next-step p { margin: 4px 0 0; color: var(--slate-700); font-size: .93rem; }
.panel-aside { display: grid; gap: 16px; }
.quick-links { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.quick-links a { font-weight: 600; }
.nav-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal-500); }

.idv-status { display: flex; justify-content: space-between; align-items: center; padding-bottom: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--slate-200); font-weight: 600; color: var(--slate-900); }
.idv-steps { margin: 0 0 16px; padding-left: 1.3em; display: grid; gap: 10px; }
.idv-steps li::marker { color: var(--teal-600); font-weight: 700; }
.idv-privacy { display: flex; gap: 8px; align-items: flex-start; background: var(--slate-50); border-radius: var(--radius-sm); padding: 12px 14px; }
.idv-privacy svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; fill: none; stroke: var(--teal-600); stroke-width: 2; }
.idv-actions { margin: 16px 0 10px; }
.success-inline { text-align: center; padding: 12px 0; }

.balance-grid { display: grid; gap: 14px; margin-bottom: 24px; }
@media (min-width: 640px) { .balance-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }
.balance-card { background: linear-gradient(160deg, var(--navy-900), var(--navy-700)); color: #fff; border-radius: var(--radius); padding: 20px 22px; display: grid; gap: 6px; }
.balance-label { font-size: .85rem; color: #B6C4D9; }
.balance-value { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; }
.demo-box { padding: 18px 22px; margin-bottom: 28px; border-style: dashed; }
.demo-box summary { cursor: pointer; font-weight: 700; color: var(--slate-900); display: flex; gap: 10px; align-items: center; }
.demo-box[open] summary { margin-bottom: 12px; }
.scenario-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--slate-200); }
.scenario-form .note { margin: 0; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius); }
.tx-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tx-table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--slate-500); padding: 12px 16px; border-bottom: 1px solid var(--slate-200); background: var(--slate-50); }
.tx-table td { padding: 14px 16px; border-bottom: 1px solid var(--slate-100); vertical-align: top; }
.tx-table tr:last-child td { border-bottom: 0; }
.tx-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.amount-in { color: var(--green-600); font-weight: 700; }
.amount-out { color: var(--slate-900); font-weight: 700; }

.inbox { display: grid; gap: 24px; align-items: start; }
@media (min-width: 900px) { .inbox { grid-template-columns: 300px minmax(0, 1fr); } }
.inbox-list ul { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.inbox-item { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--slate-200); border-radius: var(--radius-sm); background: #fff; color: var(--slate-700); position: relative; }
.inbox-item:hover { border-color: var(--slate-300); text-decoration: none; }
.inbox-item.is-active { border-color: var(--navy-900); box-shadow: inset 3px 0 0 var(--navy-900); }
.inbox-item.is-unread .inbox-subject { font-weight: 800; color: var(--slate-900); }
.inbox-item .badge { position: absolute; top: 10px; right: 10px; }
.inbox-subject { font-weight: 600; color: var(--slate-900); padding-right: 56px; }
.inbox-meta { font-size: .8rem; color: var(--slate-500); }
.inbox-view { padding: 24px; min-height: 280px; }
.thread-title { font-size: 1.25rem; }
.thread { display: grid; gap: 12px; margin-bottom: 24px; }
.thread-msg { border-radius: var(--radius); padding: 14px 16px; max-width: 85%; }
.thread-msg header { font-size: .8rem; color: var(--slate-500); margin-bottom: 6px; }
.thread-msg p { margin: 0; white-space: normal; }
.thread-msg.from-team { background: var(--slate-50); border: 1px solid var(--slate-200); }
.thread-msg.from-client { background: var(--teal-50); border: 1px solid #99F6E4; margin-left: auto; }
.attachment { display: inline-block; margin-top: 8px; font-size: .88rem; font-weight: 600; }
.reply-form { border-top: 1px solid var(--slate-200); padding-top: 20px; }
textarea { width: 100%; font: inherit; font-size: 1rem; padding: .7rem .85rem; border: 1.5px solid var(--slate-300); border-radius: var(--radius-sm); resize: vertical; }
textarea:focus { outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 4px rgba(20,184,166,.15); }
input[type="file"] { font: inherit; font-size: .9rem; }
fieldset[disabled] input, fieldset[disabled] select { background: var(--slate-50); color: var(--slate-700); }

/* Espacio para que el botón flotante del chat no tape el texto legal del footer */
.site-footer { padding-bottom: 100px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
