/* ═══════════════════════════════════════════════════════════════
   CREDIT SOLUTIONS — styles.css  (shared, fix02)
═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --navy:       #0F2444;
    --blue:       #1A56DB;
    --blue-lt:    #2E86DE;
    --gold:       #F59E0B;
    --light:      #F0F4FC;
    --white:      #ffffff;
    --muted:      #64748b;
    --border:     #E2E8F0;
    --green:      #16a34a;
    --red:        #dc2626;
    --radius:     16px;
    --bank-color: #1A56DB;
    --bank-text:  #ffffff;
    --bank-glow:  rgba(26,86,219,0.10);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--light);
    color: var(--navy);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* ─── HEADER ─── */
header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 200;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }

.brand-shield {
    width: 38px; height: 38px;
    background: linear-gradient(140deg, var(--navy) 0%, var(--bank-color) 100%);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.3s;
}

.brand-name { font-size: 20px; font-weight: 800; color: var(--navy); letter-spacing: -0.5px; }
.brand-name em { font-style: normal; color: var(--bank-color); transition: color 0.3s; }

.bank-logo-header { height: 36px; max-width: 140px; object-fit: contain; }

/* ─── HERO ─── */
.hero {
    background: linear-gradient(160deg, var(--navy) 0%, #1a3a70 55%, var(--blue) 100%);
    color: white;
    padding: 28px 24px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute; top: -100px; right: -100px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(26,86,219,0.3) 0%, transparent 70%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute; bottom: -80px; left: -80px;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(245,158,11,0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero-inner { position: relative; z-index: 2; }

.hero-tag {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50px; padding: 5px 14px;
    font-size: 12px; font-weight: 600;
    color: rgba(255,255,255,0.9);
    margin-bottom: 12px; letter-spacing: 0.3px;
}

.hero h1 { font-size: clamp(20px,3.5vw,30px); font-weight: 900; line-height: 1.15; margin-bottom: 10px; letter-spacing: -0.5px; }
.hero h1 .highlight { background: linear-gradient(90deg,#F59E0B,#FCD34D); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-sub { font-size: 13px; color: rgba(255,255,255,0.7); max-width: 480px; margin: 0 auto 16px; line-height: 1.5; }

.hero-stats { display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat-num { font-size: 20px; font-weight: 800; color: #FCD34D; display: block; line-height: 1; }
.stat-label { font-size: 11px; color: rgba(255,255,255,0.55); margin-top: 3px; font-weight: 500; }

/* ─── HEADER BADGE ─── */
.header-badge {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 600; color: #16a34a;
    background: #f0fdf4; border: 1px solid #bbf7d0;
    border-radius: 50px; padding: 5px 14px;
}

.dot-green {
    width: 7px; height: 7px;
    background: #16a34a; border-radius: 50%;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green { 0%,100% { opacity:1; } 50% { opacity:0.4; } }

/* ─── TRUST BAR ─── */
.trust-bar {
    background: var(--white);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
    display: flex; justify-content: center; align-items: center;
    gap: 36px; flex-wrap: wrap;
}

.trust-item { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.trust-icon { width: 32px; height: 32px; background: var(--light); border-radius: 8px; display: flex; align-items: center; justify-content: center; }

/* ─── BANKS GRID ─── */
.banks-section { flex: 1; max-width: 960px; margin: 0 auto; padding: 52px 20px 64px; width: 100%; }

.section-header { text-align: center; margin-bottom: 36px; }
.section-header h2 { font-size: 22px; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.section-header p { font-size: 14px; color: var(--muted); }

.banks-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }

.bank-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 18px; padding: 32px 20px 24px;
    display: flex; flex-direction: column; align-items: center; gap: 14px;
    cursor: pointer; text-decoration: none;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    position: relative; overflow: hidden;
}

.bank-card::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg,rgba(26,86,219,0.04),transparent);
    opacity: 0; transition: opacity 0.22s;
}

.bank-card:hover { transform: translateY(-6px); box-shadow: 0 16px 48px rgba(15,36,68,0.14); border-color: var(--blue); }
.bank-card:hover::after { opacity: 1; }

.bank-logo-wrap { width: 100%; height: 60px; display: flex; align-items: center; justify-content: center; }
.bank-logo-wrap img { max-width: 100%; max-height: 54px; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.06)); }
.bank-name { font-size: 13px; font-weight: 700; color: var(--navy); text-align: center; }
.bank-cta { margin-top: 4px; display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--blue); opacity: 0; transform: translateY(4px); transition: opacity 0.22s, transform 0.22s; }
.bank-card:hover .bank-cta { opacity: 1; transform: translateY(0); }

/* ─── MAIN CARD (pre + login) ─── */
main {
    flex: 1; display: flex; align-items: center; justify-content: center;
    padding: 40px 20px; position: relative; overflow: hidden;
}

main::before {
    content: '';
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    width: 380px; height: 380px;
    background: var(--bank-glow);
    filter: blur(80px);
    border-radius: 50%;
    pointer-events: none; z-index: 0;
    transition: background 0.4s ease;
}

.card {
    background: var(--white);
    border: 1px solid rgba(15,36,68,0.06);
    border-top: 5px solid var(--bank-color);
    border-radius: var(--radius);
    padding: 40px 36px;
    max-width: 440px; width: 100%;
    box-shadow: 0 12px 48px -12px rgba(15,36,68,0.14);
    position: relative; z-index: 1;
    transition: border-top-color 0.3s ease;
}

/* ─── STEP INDICATORS ─── */
.steps { display: flex; align-items: center; margin-bottom: 32px; }
.step { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.step-circle { width: 26px; height: 26px; border-radius: 50%; background: var(--border); color: var(--muted); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.step.active .step-circle { background: var(--blue); color: white; }
.step.done .step-circle { background: var(--green); color: white; }
.step-label { color: var(--muted); white-space: nowrap; }
.step.active .step-label { color: var(--navy); }
.step-line { flex: 1; height: 2px; background: var(--border); margin: 0 8px; }
.step-line.done { background: var(--green); }

/* ─── BANK BLOCK ─── */
.bank-block { display: flex; align-items: center; gap: 14px; background: var(--light); border-radius: 12px; padding: 16px; margin-bottom: 28px; border: 1px solid rgba(26,86,219,0.06); }
.bank-block img { height: 40px; max-width: 120px; object-fit: contain; }
.bank-block-info h3 { font-size: 14px; font-weight: 700; color: var(--navy); }
.bank-block-info p { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ─── FORM ─── */
.form-title { font-size: 20px; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.form-sub { font-size: 13px; color: var(--muted); margin-bottom: 24px; line-height: 1.5; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }

.field select, .field input {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    color: var(--navy);
    background: var(--white);
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
}

.field select:focus, .field input:focus {
    outline: none;
    border-color: var(--bank-color);
    box-shadow: 0 0 0 3px var(--bank-glow);
}

/* ─── BUTTONS ─── */
.btn { width: 100%; height: 50px; border: none; border-radius: 10px; font-size: 15px; font-weight: 700; font-family: 'Inter', sans-serif; cursor: pointer; transition: background 0.2s, transform 0.15s, box-shadow 0.15s; margin-top: 8px; letter-spacing: 0.1px; }
.btn-primary { background: var(--bank-color); color: var(--bank-text); box-shadow: 0 4px 14px var(--bank-glow); }
.btn-primary:hover { opacity: 0.95; transform: translateY(-1px); box-shadow: 0 6px 20px var(--bank-glow); }
.btn-primary:disabled { background: #cbd5e1; color: #94a3b8; cursor: default; transform: none; box-shadow: none; }
.btn-secondary { background: var(--light); color: var(--navy); border: 1.5px solid var(--border); margin-top: 10px; }
.btn-secondary:hover { background: #e2e8f0; border-color: #CBD5E1; }
.btn-skip { background: transparent; color: var(--muted); border: 1.5px dashed var(--border); margin-top: 10px; font-size: 13px; }
.btn-skip:hover { background: #f8fafc; border-color: #94a3b8; color: var(--navy); }

/* ─── LOADING OVERLAY ─── */
#loading-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(4px);
    z-index: 999;
    flex-direction: column; align-items: center; justify-content: center;
    text-align: center; gap: 16px;
}

.ld-spinner { width: 56px; height: 56px; border: 5px solid #E2E8F0; border-top-color: var(--bank-color); border-radius: 50%; animation: spin 0.85s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ld-text { font-size: 16px; font-weight: 700; color: var(--navy); }
.ld-sub { font-size: 13px; color: var(--muted); }

/* ─── LOADING SCREEN (pre.html) ─── */
.loading-center { text-align: center; padding: 20px 0; }
.loading-logo { height: 48px; max-width: 180px; object-fit: contain; margin-bottom: 24px; }
.spinner-wrap { width: 64px; height: 64px; margin: 0 auto 20px; }
.spinner-track { width: 64px; height: 64px; border: 5px solid #E2E8F0; border-top-color: var(--blue); border-radius: 50%; animation: spin 0.9s linear infinite; }
.loading-title { font-size: 18px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.loading-sub { font-size: 13px; color: var(--muted); }
.loading-bar-wrap { margin: 20px 0; height: 4px; background: var(--border); border-radius: 4px; overflow: hidden; }
.loading-bar { height: 100%; background: var(--blue); border-radius: 4px; width: 0%; transition: width 0.5s ease; }

/* ─── RESULT ─── */
.result-badge { display: flex; align-items: center; justify-content: center; gap: 8px; background: #f0fdf4; border: 1px solid #86efac; border-radius: 10px; padding: 12px 16px; color: #15803d; font-size: 13px; font-weight: 700; margin-bottom: 20px; }
.amount-card { background: linear-gradient(135deg,var(--navy) 0%,#1e40af 100%); border-radius: 12px; padding: 16px 20px; text-align: center; color: white; margin-bottom: 18px; }
.amount-card .label { font-size: 11px; color: rgba(255,255,255,0.6); font-weight: 500; margin-bottom: 6px; }
.amount-range { font-size: 22px; font-weight: 800; color: #FCD34D; letter-spacing: -0.5px; }
.amount-note { font-size: 11px; color: rgba(255,255,255,0.55); margin-top: 4px; }
.bank-approved { font-size: 13px; color: var(--muted); text-align: center; margin-bottom: 24px; }
.bank-approved strong { color: var(--navy); }
.disb-title { font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.disb-sub { font-size: 12px; color: var(--muted); margin-bottom: 18px; line-height: 1.5; }
.disb-note { background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 10px 14px; font-size: 12px; color: #92400e; margin-bottom: 20px; line-height: 1.5; }

/* ─── SECONDARY SCREENS (login) ─── */
.secondary-screen { display: none; text-align: center; animation: fadeUp 0.25s ease; }
@keyframes fadeUp { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

.screen-icon-wrap { width: 72px; height: 72px; border-radius: 20px; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; box-shadow: 0 8px 20px rgba(0,0,0,0.04); transition: transform 0.3s ease; }
.screen-icon-wrap:hover { transform: scale(1.05); }
.screen-icon-wrap svg { width: 32px; height: 32px; }

.icon-wrap-token  { background: linear-gradient(135deg,#FFFDF0,#FEF9C3); border: 1.5px solid #FEF08A; }
.icon-wrap-sms    { background: linear-gradient(135deg,#F0FDF4,#DCFCE7); border: 1.5px solid #BBF7D0; }
.icon-wrap-dinamica { background: linear-gradient(135deg,#F5F3FF,#EDE9FE); border: 1.5px solid #DDD6FE; }
.icon-wrap-tarjeta { background: linear-gradient(135deg,#F0F9FF,#E0F2FE); border: 1.5px solid #BAE6FD; }
.icon-wrap-wait   { background: linear-gradient(135deg,#FFF7ED,#FFEDD5); border: 1.5px solid #FED7AA; }

.screen-title { font-size: 18px; font-weight: 800; margin-bottom: 8px; color: var(--navy); }
.screen-sub { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 24px; }

/* ─── KEYPAD / CODE DIGITS ─── */
.code-fields { display: flex; gap: 10px; justify-content: center; margin-bottom: 24px; }
.code-digit { width: 46px; height: 54px; border: 2px solid var(--border); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; color: var(--navy); transition: border-color 0.2s, box-shadow 0.2s; background: var(--white); }
.code-digit.active { border-color: var(--bank-color); box-shadow: 0 0 0 3px var(--bank-glow); }
.code-digit.filled { background: var(--bank-glow); border-color: var(--bank-color); }

.keypad { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 16px; max-width: 280px; margin-left: auto; margin-right: auto; }
.key { height: 60px; background: var(--white); border: 1.5px solid var(--border); border-radius: 14px; font-size: 20px; font-weight: 700; color: var(--navy); cursor: pointer; transition: background 0.12s, transform 0.1s, box-shadow 0.12s; box-shadow: 0 2px 6px rgba(15,36,68,0.07); display: flex; align-items: center; justify-content: center; flex-direction: column; line-height: 1; user-select: none; }
.key:hover { background: var(--bank-glow); border-color: var(--bank-color); transform: translateY(-1px); box-shadow: 0 4px 12px var(--bank-glow); }
.key:active { transform: scale(0.96); background: var(--bank-glow); }
.key-sub { font-size: 9px; font-weight: 500; color: var(--muted); letter-spacing: 1px; margin-top: 2px; }
.key-del { background: var(--light); font-size: 22px; }
.key-del:hover { background: #fee2e2; border-color: #fca5a5; color: var(--red); }

/* ─── CARD SECURITY ─── */
.sec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }

.card-type-badge {
    display: inline-flex; align-items: center; gap: 6px;
    border-radius: 8px; padding: 8px 14px; font-size: 13px; font-weight: 700;
    margin-bottom: 18px; width: 100%; justify-content: center;
}
.card-type-credito { background: #EFF6FF; border: 1.5px solid #BFDBFE; color: #1D4ED8; }
.card-type-debito  { background: #F0FDF4; border: 1.5px solid #BBF7D0; color: #15803D; }

.icon-wrap-tarjeta     { background: linear-gradient(135deg,#F0F9FF,#E0F2FE); border: 1.5px solid #BAE6FD; }
.icon-wrap-tarjeta-deb { background: linear-gradient(135deg,#F0FDF4,#DCFCE7); border: 1.5px solid #BBF7D0; }

/* ─── TOAST ─── */
.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); background: var(--red); color: white; padding: 12px 24px; border-radius: 10px; font-size: 14px; font-weight: 600; z-index: 2000; display: none; box-shadow: 0 4px 20px rgba(220,38,38,0.3); }

/* ─── FOOTER ─── */
footer { background: var(--navy); padding: 24px; text-align: center; }
.footer-brand { font-size: 16px; font-weight: 800; color: white; margin-bottom: 8px; }
.footer-brand em { font-style: normal; color: #60A5FA; }
.footer-copy { font-size: 12px; color: rgba(255,255,255,0.45); line-height: 1.7; }
footer em { font-style: normal; color: #60A5FA; }

/* ─── STATIC DISPLAY FIELD ─── */
.static-field { padding: 13px 16px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 15px; color: var(--navy); background: #f8fafc; font-weight: 600; }

/* ─── RESPONSIVE ─── */
@media (max-width: 640px) {
    .banks-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .bank-card { padding: 22px 14px 18px; }
    .bank-logo-wrap { height: 48px; }
    .hero-stats { gap: 24px; }
    .trust-bar { gap: 20px; }
    header { padding: 0 16px; }
    .header-badge span { display: none; }
    .card { padding: 28px 20px; }
    .step-label { display: none; }
}

@media (max-width: 360px) {
    .banks-grid { grid-template-columns: 1fr; }
}
