/* ============================================================
   LOGIN GRS — Réplica del diseño App Android (Compose)
   Paleta: BrandDark #071A30, Surface #0C2442, Gold #BFA76F
   ============================================================ */

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

:root {
    --gold: #B4914C;
    --gold-hover: #CFAE6D;
    --bg-dark: #071A30;
    --bg-surface: #0C2442;
    --bg-surface2: #112D52;
    --glass: #0C2442;
    --glass-border: rgba(207,174,109,.18);
    --text: #ffffff;
    --text-muted: #8C9DB7;
    --error: #D95555;
    --ok: #4A9E6A;
    --warning: #D4A843;
    --gold-12: rgba(191,167,111,.12);
    --gold-15: rgba(191,167,111,.15);
    --gold-40: rgba(191,167,111,.40);
    --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; outline: none; -webkit-tap-highlight-color: transparent; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
    -webkit-font-smoothing: antialiased;
}

/* ---------- Fondo: glow dorado lateral (como BrandBackground de la app) ---------- */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.bg-photo { display: none; }
.bg-veil { position: absolute; inset: 0; background: var(--bg-dark); }
.orb {
    position: absolute; border-radius: 50%; filter: blur(120px);
    mix-blend-mode: screen; will-change: transform;
}
.o1 {
    width: 600px; height: 600px; top: -100px; left: -250px;
    background: radial-gradient(circle, rgba(191,167,111,.25), transparent 70%);
    opacity: .6;
}
.o2 { display: none; }
.o3 { display: none; }
.particles { display: none; }

/* Menos movimiento */
@media (prefers-reduced-motion: reduce) {
    .orb { animation: none !important; }
}

/* ---------- Tarjeta de login ---------- */
.login-card {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 400px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 36px 28px 28px;
    box-shadow: 0 20px 50px rgba(0,0,0,.5);
    animation: cardIn .5s cubic-bezier(.2,.8,.2,1);
    overflow: hidden;
    transition: transform .5s ease, opacity .5s ease;
}
.login-card.done { transform: scale(0.96); opacity: 0; }
.login-card::before { display: none; }

@keyframes cardIn {
    from { opacity: 0; transform: translateY(20px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Brand / Logo ---------- */
.brand { text-align: center; margin-bottom: 28px; }
.logo { max-width: 200px; max-height: 100px; filter: drop-shadow(0 4px 14px rgba(0,0,0,.4)); }

.wordmark { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.wm-emblem {
    width: 62px; height: 62px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 800; letter-spacing: 1px; color: #000;
    background: linear-gradient(135deg, var(--gold), var(--gold-hover));
    box-shadow: 0 6px 18px rgba(191,167,111,.3);
}
.wm-name { font-size: 12px; font-weight: 700; letter-spacing: 3px; color: var(--gold); }

/* ---------- Pasos (steps) ---------- */
.step { display: none; }
.step.active { display: block; animation: stepIn .35s cubic-bezier(.2,.8,.2,1); }
@keyframes stepIn {
    from { opacity: 0; transform: translateX(18px); }
    to   { opacity: 1; transform: translateX(0); }
}
.step.active > * { animation: childUp .4s cubic-bezier(.2,.8,.2,1) both; }
.step.active > *:nth-child(2) { animation-delay: .05s; }
.step.active > *:nth-child(3) { animation-delay: .1s; }
.step.active > *:nth-child(4) { animation-delay: .15s; }
.step.active > *:nth-child(5) { animation-delay: .2s; }
@keyframes childUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.step-title {
    font-size: 22px; font-weight: 700; text-align: center; letter-spacing: -.3px;
}
.step-title span { color: var(--gold); }
.step-sub {
    text-align: center; color: var(--text-muted); font-size: 14px;
    margin: 6px 0 24px; line-height: 1.5;
}
.gold { color: var(--gold); font-weight: 600; }

/* ---------- Avatar (como BrandLogo de la app) ---------- */
.avatar {
    position: relative;
    width: 80px; height: 80px; border-radius: 50%;
    margin: 0 auto 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; font-weight: 700; color: #000;
    background: linear-gradient(135deg, var(--gold), var(--gold-hover));
    box-shadow: 0 6px 18px rgba(191,167,111,.3);
}
.avatar::after {
    content: "";
    position: absolute; inset: -4px;
    border-radius: 50%;
    border: 1.5px solid rgba(191,167,111,.35);
}

/* ---------- Campos (como BrandTextField de la app) ---------- */
.field { position: relative; margin-bottom: 14px; }
input[type=email], input[type=password], input[type=text], input[type=tel] {
    width: 100%;
    padding: 16px 18px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius);
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    transition: border-color .2s, background .2s, box-shadow .2s;
}
input:focus {
    border-color: var(--gold);
    background: rgba(255,255,255,.06);
    box-shadow: 0 0 0 3px var(--gold-12);
}
input::placeholder { color: var(--text-muted); }

.eye {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; color: var(--text-muted);
    padding: 8px 10px; opacity: .7; line-height: 1; transition: color .2s, opacity .2s;
}
.eye svg { width: 20px; height: 20px; display: block; }
.eye:hover { opacity: 1; color: var(--gold); }

.capslock {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    background: rgba(212,168,67,.1);
    border: 1px solid rgba(212,168,67,.3);
    color: var(--warning);
    border-radius: 10px;
    font-size: 12px;
    padding: 8px 12px;
    margin: -4px 0 12px;
    animation: stepIn .25s ease;
}
.capslock[hidden] { display: none; }

/* ---------- Botones (como GoldButton / GoldOutlineButton de la app) ---------- */
.btn {
    position: relative;
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #9E813F, #CFB070, #BFA76F);
    color: #071A30;
    font-weight: 700;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    transition: background .2s, transform .15s;
    margin-top: 6px;
    touch-action: manipulation;
    min-height: 50px;
    overflow: hidden;
}
.btn::after { display: none; }
.btn:hover:not(:disabled) { background: linear-gradient(135deg, #B08D45, #D9C98E, #CFB070); }
.btn:active:not(:disabled) { transform: scale(.985); }
.btn:disabled { opacity: .6; cursor: default; }

.btn-ghost {
    background: transparent;
    border: 1px solid var(--gold-40);
    color: var(--gold);
    margin-top: 12px;
}
.btn-ghost:hover:not(:disabled) { background: var(--gold-12); border-color: var(--gold); }

.spinner {
    position: absolute; top: 50%; left: 50%;
    width: 20px; height: 20px; margin: -10px 0 0 -10px;
    border: 2.5px solid rgba(0,0,0,.2);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Enlace crear cuenta (como GoldOutlineButton) */
.link-create {
    background: none; border: none; cursor: pointer;
    display: block; width: 100%; text-align: center;
    margin-top: 18px; padding: 10px 0 2px;
    font-size: 13px; color: var(--text-muted);
    border-top: 1px solid rgba(255,255,255,.06);
    font-family: inherit;
    transition: color .2s;
}
.link-create b { color: var(--gold); font-weight: 600; }
.link-create:hover { color: var(--text); }

/* ---------- Medidor de contraseña ---------- */
.pw-meter { display: flex; align-items: center; gap: 10px; margin: -4px 2px 12px; }
.pw-meter[hidden] { display: none; }
.pw-bar { flex: 1; height: 4px; border-radius: 4px; background: rgba(255,255,255,.06); overflow: hidden; }
.pw-bar span { display: block; height: 100%; border-radius: 4px; width: 0; transition: width .3s, background .3s; }
.pw-bar span.w { width: 33%; background: var(--error); }
.pw-bar span.m { width: 66%; background: var(--warning); }
.pw-bar span.s { width: 100%; background: var(--ok); }
.pw-label { font-size: 11px; font-weight: 600; min-width: 62px; text-align: right; }

/* ---------- Links de navegación ---------- */
.link-back, .link-resend {
    background: none; border: none; color: var(--text-muted);
    font-size: 13px; cursor: pointer; margin-top: 16px;
    display: block; width: 100%; text-align: center;
    font-family: inherit;
    transition: color .2s;
}
.link-back:hover, .link-resend:hover { color: var(--gold); }
.link-resend { color: var(--gold); font-weight: 600; margin-top: 4px; }

/* ---------- OTP ---------- */
.otp-icon {
    width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 14px;
    display: flex; align-items: center; justify-content: center; font-size: 26px;
    background: var(--gold-12); color: var(--gold);
    border: 1px solid rgba(191,167,111,.25);
}
.otp-inputs { display: flex; gap: 8px; justify-content: center; margin-bottom: 18px; }
.otp-inputs input {
    width: 46px; height: 56px; padding: 0; text-align: center;
    font-size: 22px; font-weight: 700; border-radius: 12px;
}
.otp-inputs input:focus { transform: translateY(-2px); }
.otp-inputs input.filled {
    border-color: var(--gold);
    background: rgba(191,167,111,.06);
}
.resend { text-align: center; margin-top: 14px; font-size: 12px; color: var(--text-muted); }

/* ---------- Toast ---------- */
.toast {
    max-height: 0; opacity: 0; overflow: hidden;
    background: rgba(217,85,85,.12);
    border: 1px solid rgba(217,85,85,.3);
    color: #fca5a5;
    border-radius: 12px;
    font-size: 13px;
    text-align: center;
    transition: max-height .3s, opacity .3s, margin .3s, padding .3s;
    margin-bottom: 0; padding: 0 12px;
}
.toast.show { max-height: 90px; opacity: 1; margin-bottom: 16px; padding: 12px; animation: shake .35s; }
@keyframes shake {
    0%,100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ---------- SSO ---------- */
.sso-notice {
    background: var(--gold-12);
    border: 1px solid rgba(191,167,111,.2);
    color: var(--text);
    padding: 12px 16px; border-radius: 12px; margin-bottom: 18px;
    font-size: 13px; text-align: center;
}
.sso-notice strong { color: var(--gold); }
.sso-avatar {
    width: 72px; height: 72px; border-radius: 50%;
    margin: 0 auto 16px; display: block;
    box-shadow: 0 0 0 2px rgba(191,167,111,.3), 0 6px 16px rgba(0,0,0,.4);
}
.sso-app-name { font-size: 17px; font-weight: 700; text-align: center; margin-bottom: 6px; }
.sso-permissions {
    text-align: left; background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.06); border-radius: 12px;
    padding: 14px 16px; margin: 18px 0; font-size: 13px; color: var(--text-muted);
}
.sso-permissions li { list-style: none; padding: 5px 0; display: flex; align-items: center; gap: 10px; }
.sso-permissions li::before { content: "✓"; color: var(--gold); font-weight: 700; }

/* ---------- Éxito ---------- */
.success-overlay {
    position: absolute; inset: 0; z-index: 20;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
    background: var(--bg-surface);
    border-radius: inherit;
    opacity: 0; pointer-events: none;
    transition: opacity .3s ease;
}
.success-overlay.show { opacity: 1; pointer-events: auto; }
.success-overlay svg { width: 80px; height: 80px; }
.success-overlay p { font-size: 17px; font-weight: 700; color: var(--gold); }
.ck-circle {
    stroke: var(--gold); stroke-width: 2.5;
    stroke-dasharray: 145; stroke-dashoffset: 145;
    transform-origin: center; transform: rotate(-90deg);
}
.ck-check {
    stroke: var(--gold); stroke-width: 4;
    stroke-linecap: round; stroke-linejoin: round;
    stroke-dasharray: 48; stroke-dashoffset: 48;
}
.success-overlay.show .ck-circle { animation: draw .5s ease-out forwards; }
.success-overlay.show .ck-check  { animation: draw .3s ease-out .4s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Footer ---------- */
.guard-badge {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    margin-top: 22px; font-size: 11px; color: var(--text-muted);
}
.guard-badge svg { width: 13px; height: 13px; color: var(--gold); flex-shrink: 0; }
.guard-badge b { color: var(--gold); font-weight: 600; }
.footer-links { margin-top: 6px; font-size: 11px; color: var(--text-muted); text-align: center; }
.footer-links a { color: var(--text-muted); text-decoration: none; transition: color .2s; margin: 0 5px; }
.footer-links a:hover { color: var(--gold); }

/* ---------- App approval step ---------- */
.app-pulse{position:relative;width:96px;height:96px;margin:4px auto 16px}
.app-core{position:absolute;inset:28px;display:flex;align-items:center;justify-content:center;background:var(--gold-12);border:1px solid rgba(191,167,111,.4);border-radius:50%}
.app-ring{position:absolute;inset:0;border-radius:50%;border:2px solid rgba(191,167,111,.4);animation:appPulse 1.9s ease-out infinite}
.app-ring.d2{animation-delay:.95s}
@keyframes appPulse{0%{transform:scale(.42);opacity:.8}80%{opacity:0}100%{transform:scale(1);opacity:0}}
.app-wait{color:var(--gold);font-size:13px;margin:0 0 12px;letter-spacing:.3px;text-align:center}
.app-dots i{font-style:normal;animation:appBlink 1.4s infinite both}
.app-dots i:nth-child(2){animation-delay:.2s}
.app-dots i:nth-child(3){animation-delay:.4s}
@keyframes appBlink{0%,100%{opacity:.2}50%{opacity:1}}
.app-msg{font-size:12px;min-height:16px;margin:8px 0 4px;color:var(--ok);text-align:center}
#app-resend{display:inline-block;margin:2px auto 8px}
.app-num{font-size:48px;font-weight:800;color:var(--gold);letter-spacing:4px;line-height:1;margin:6px auto 14px;text-align:center;text-shadow:0 2px 10px rgba(191,167,111,.2)}

/* ---------- Responsive ---------- */
@media (max-width: 430px) {
    body { align-items: center; }
    .login-card { padding: 28px 20px 22px; border-radius: 20px; }
    .logo { max-width: 160px; }
    .step-title { font-size: 20px; }
    .otp-inputs { gap: 6px; }
    .otp-inputs input { width: 42px; height: 52px; font-size: 20px; }
}
@media (max-width: 360px) {
    .otp-inputs input { width: 38px; height: 48px; font-size: 18px; }
}
@media (max-height: 640px) {
    body { align-items: center; }
}

/* Tema corporativo: títulos con serif como el sitio */
h1,h2,.auth-title,.card-title{font-family:"Source Serif 4",Georgia,serif;font-weight:600;letter-spacing:-.005em}
body{background:radial-gradient(1200px 520px at 85% -10%,rgba(180,145,76,.10),transparent 60%),var(--bg-dark)}

/* ============ Inicio de sesión corporativo (diseño dividido) ============ */
.corp-panel{display:none}
@media (min-width: 960px){
  body{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(440px,.85fr);align-items:stretch;justify-content:stretch;padding:0;min-height:100vh}
  .bg{display:none}
  .corp-panel{display:block;position:sticky;top:0;height:100vh;color:#fff;
    background:linear-gradient(90deg,rgba(6,22,42,.94) 0%,rgba(6,22,42,.82) 38%,rgba(6,22,42,.42) 72%,rgba(6,22,42,.25) 100%),linear-gradient(0deg,rgba(6,22,42,.85) 0%,rgba(6,22,42,0) 32%),url('/assets/login-oficina.jpg') 62% center/cover no-repeat}
  .corp-panel:after{content:"";position:absolute;top:0;right:0;width:1px;height:100%;background:linear-gradient(180deg,transparent,rgba(207,174,109,.55),transparent)}
  .corp-in{height:100%;display:flex;flex-direction:column;justify-content:space-between;padding:48px 64px 40px;max-width:720px}
  .corp-logo img{height:64px;width:auto;display:block}
  .corp-kicker{color:#CFAE6D;font-size:12px;font-weight:600;letter-spacing:.18em;text-transform:uppercase;margin-bottom:16px}
  .corp-copy h2{font-family:'Source Serif 4',Georgia,serif;font-weight:600;font-size:clamp(30px,3vw,44px);line-height:1.12;margin:0 0 18px;text-wrap:balance}
  .corp-copy>p{color:#c9d3e3;font-size:16px;line-height:1.65;max-width:520px;margin:0 0 30px}
  .corp-list{list-style:none;margin:0;padding:0;display:grid;gap:18px;max-width:520px}
  .corp-list li{position:relative;padding-left:34px}
  .corp-list li:before{content:"";position:absolute;left:0;top:3px;width:20px;height:20px;border:1px solid rgba(207,174,109,.7);border-radius:50%;background:radial-gradient(circle,#B4914C 0 4px,transparent 5px)}
  .corp-list b{display:block;font-weight:600;font-size:15px;margin-bottom:2px}
  .corp-list span{color:#aebbd0;font-size:14px}
  .corp-foot{display:flex;flex-wrap:wrap;align-items:center;gap:22px;font-size:13px;color:#aebbd0;border-top:1px solid rgba(255,255,255,.12);padding-top:22px}
  .corp-foot span{display:flex;align-items:center;gap:8px}.corp-foot svg{width:16px;height:16px;color:#CFAE6D}
  .corp-foot a{margin-left:auto;color:#CFAE6D;text-decoration:none}
  .corp-foot a:hover{color:#fff}
  .login-card{align-self:center;justify-self:center;margin:40px 32px;max-width:420px;border-radius:10px;
    background:#0C2442;border:1px solid rgba(207,174,109,.22);box-shadow:0 30px 70px rgba(0,0,0,.35)}
  body:after{content:"";position:fixed;inset:0 0 0 auto;width:42%;z-index:-1;background:radial-gradient(700px 400px at 70% 0%,rgba(180,145,76,.10),transparent 60%),#071A30}
}
.login-card{border-radius:10px}
.login-card .step-title{font-size:28px}
.login-card .btn-primary, .login-card button[type=submit]{border-radius:4px!important;letter-spacing:.02em}
.login-card input{border-radius:4px!important}
/* ============ Inicio de sesión corporativo v2 ============ */
@media (min-width: 960px){
  .corp-panel{position:sticky;overflow:hidden;background:#06162A}
  .corp-panel:before{content:"";position:absolute;inset:-4%;z-index:0;
    background:linear-gradient(90deg,rgba(6,22,42,.95) 0%,rgba(6,22,42,.84) 36%,rgba(6,22,42,.45) 70%,rgba(6,22,42,.28) 100%),linear-gradient(0deg,rgba(6,22,42,.9) 0%,rgba(6,22,42,0) 34%),url('/assets/login-oficina.jpg') 62% center/cover no-repeat;
    animation:corpDrift 38s ease-in-out infinite alternate;transform-origin:65% 50%}
  .corp-in{position:relative;z-index:1}
  .corp-top{display:flex;align-items:flex-start;justify-content:space-between;gap:24px}
  .corp-time{text-align:right;line-height:1.35;padding-top:6px}
  .corp-time b{display:block;font-family:'Source Serif 4',Georgia,serif;font-weight:500;font-size:22px;letter-spacing:.02em;color:#fff;font-variant-numeric:tabular-nums}
  .corp-time span{font-size:12.5px;color:#aebbd0;letter-spacing:.04em}
  .corp-kicker{display:flex;align-items:center;gap:14px}
  .corp-kicker i{display:block;height:1px;width:0;background:linear-gradient(90deg,#CFAE6D,rgba(207,174,109,0));animation:corpLine 1.4s cubic-bezier(.2,.8,.2,1) .6s forwards}
  .corp-copy h2 em{font-style:italic;color:#E2C68C}
  .corp-copy>*{opacity:0;transform:translateY(14px);animation:corpUp .9s cubic-bezier(.2,.8,.2,1) forwards}
  .corp-copy>*:nth-child(1){animation-delay:.15s}.corp-copy>*:nth-child(2){animation-delay:.3s}
  .corp-copy>*:nth-child(3){animation-delay:.45s}.corp-copy>*:nth-child(4){animation-delay:.6s}
  .corp-list li{padding:14px 0 14px 34px;border-top:1px solid rgba(255,255,255,.09)}
  .corp-list li:last-child{border-bottom:1px solid rgba(255,255,255,.09)}
  .corp-list{gap:0}
  .corp-list li:before{top:17px}
  .corp-sign{display:flex;align-items:center;gap:14px;font-size:12px;letter-spacing:.16em;text-transform:uppercase;color:#8fa1bc}
  .corp-rule{display:block;width:44px;height:1px;background:#B4914C}
  /* Tarjeta: acento dorado superior y brillo muy tenue */
  .login-card{border-top:2px solid #B4914C!important;background:linear-gradient(180deg,#0E2A4D 0%,#0C2442 40%)!important}
  .login-card:after{content:"";position:absolute;inset:-1px;border-radius:inherit;pointer-events:none;
    background:linear-gradient(115deg,transparent 40%,rgba(226,198,140,.08) 50%,transparent 60%) no-repeat;background-size:250% 100%;animation:corpSheen 7s ease-in-out 1.2s infinite}
}
@keyframes corpDrift{from{transform:scale(1) translate3d(0,0,0)}to{transform:scale(1.07) translate3d(-1.5%,-1%,0)}}
@keyframes corpUp{to{opacity:1;transform:none}}
@keyframes corpLine{to{width:72px}}
@keyframes corpSheen{0%,70%{background-position:150% 0}100%{background-position:-50% 0}}
@media (prefers-reduced-motion: reduce){
  .corp-panel:before,.login-card:after{animation:none}
  .corp-copy>*{opacity:1;transform:none;animation:none}.corp-kicker i{width:72px;animation:none}
}
/* ============ Inicio de sesión corporativo v3: formulario premium ============ */
.corp-time,.corp-sign{display:none!important}
/* Logo sólido y nítido (sin aspecto translúcido) */
.corp-logo img,.login-card .logo{opacity:1!important;filter:brightness(1.18) contrast(1.12) saturate(1.1) drop-shadow(0 2px 6px rgba(0,0,0,.55))!important}
@media (min-width: 960px){
  .corp-logo img{height:76px}
  .login-card{max-width:460px!important;width:100%;padding:46px 44px 34px!important;border-radius:6px!important;
    background:linear-gradient(180deg,#0F2B4F 0%,#0B2341 55%,#0A2040 100%)!important;
    border:1px solid rgba(207,174,109,.20)!important;border-top:3px solid #B4914C!important;
    box-shadow:0 1px 0 rgba(255,255,255,.05) inset,0 40px 90px rgba(0,0,0,.45),0 0 0 1px rgba(0,0,0,.2)!important}
  /* En escritorio el logo ya está en el panel: la tarjeta abre con un encabezado sobrio */
  .login-card .brand{display:none}
  .login-card .step{text-align:left}
  .login-card .step-title{font-size:32px!important;margin:0 0 8px!important;line-height:1.15}
  .login-card .step-title:before{content:"Acceso seguro";display:block;font-family:Inter,system-ui,sans-serif;font-size:11px;font-weight:600;letter-spacing:.2em;text-transform:uppercase;color:#CFAE6D;margin-bottom:14px}
  .login-card .step-sub{text-align:left;margin-bottom:28px!important;color:#aebbd0!important}
}
/* Campos */
.login-card .field{margin-bottom:16px}
.login-card .field input,.login-card input[type=email],.login-card input[type=password],.login-card input[type=text],.login-card input[type=tel]{
  height:54px;padding:0 16px!important;font-size:15.5px!important;color:#fff!important;
  background:rgba(255,255,255,.035)!important;border:1px solid rgba(255,255,255,.14)!important;border-radius:4px!important;
  transition:border-color .2s,box-shadow .2s,background .2s}
.login-card input[type=email]{padding-left:46px!important;background:rgba(255,255,255,.035) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23CFAE6D' stroke-width='1.6'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E") 16px center/18px no-repeat!important}
.login-card input[type=password]{padding-left:46px!important;background:rgba(255,255,255,.035) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23CFAE6D' stroke-width='1.6'%3E%3Crect x='4' y='10' width='16' height='11' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") 16px center/18px no-repeat!important}
.login-card input::placeholder{color:#7f90ab!important}
.login-card input:hover{border-color:rgba(255,255,255,.24)!important}
.login-card input:focus{border-color:#B4914C!important;box-shadow:0 0 0 4px rgba(180,145,76,.16)!important;background-color:rgba(255,255,255,.055)!important}
/* Botón principal: dorado sólido, sobrio */
.login-card .btn{height:54px;border-radius:4px!important;background:#B4914C!important;color:#0A1A2E!important;
  font-weight:600!important;font-size:14px!important;letter-spacing:.14em!important;text-transform:uppercase;
  box-shadow:0 10px 24px rgba(180,145,76,.22)!important;transition:background .2s,transform .15s,box-shadow .2s}
.login-card .btn .btn-label:after{content:"  →";letter-spacing:0}
.login-card .btn:hover:not(:disabled){background:#C6A35E!important;box-shadow:0 14px 30px rgba(180,145,76,.32)!important}
.login-card .btn-ghost{border-radius:4px!important}
/* Crear cuenta: separado por una línea fina */
.login-card .link-create{display:block;width:100%;margin-top:26px!important;padding-top:22px!important;border-top:1px solid rgba(255,255,255,.08)!important;color:#aebbd0!important;font-size:14px!important;text-align:center}
.login-card .link-create b{color:#CFAE6D!important;font-weight:600}
/* Pie de la tarjeta: sin indicadores técnicos */
#ping-bar{display:none!important}
.login-card .footer-links{margin-top:10px}
@media (min-width:960px){.login-card .step-title,.login-card .step-sub{text-align:left!important}}

/* ===================== Inicio de sesión corporativo v4 ===================== */
.lc-top,.lc-legal{display:none}
.corp-kicker{display:none!important}

/* ---------- Escritorio: foto + panel blanco ---------- */
@media (min-width: 960px){
  body{grid-template-columns:minmax(0,1.2fr) minmax(480px,.8fr)!important;background:#fff!important}
  body:after{display:none!important}
  .corp-copy h2{font-size:clamp(34px,3.2vw,48px)!important}
  .corp-panel:after{display:none}

  .login-card{
    align-self:stretch!important;justify-self:stretch!important;margin:0!important;max-width:none!important;width:auto!important;
    min-height:100vh;display:flex;flex-direction:column;justify-content:center;
    padding:96px clamp(40px,7vw,110px) 72px!important;border:0!important;border-radius:0!important;box-shadow:none!important;
    background:#FFFFFF!important;color:#0E1C30;position:relative;overflow:visible!important;animation:none!important}
  .login-card:before{display:block!important;content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:linear-gradient(180deg,#B4914C,#CFAE6D 40%,#0A2240 100%)}
  .login-card:after{display:none!important}
  .login-card>*:not(.lc-top):not(.lc-legal){width:100%;max-width:400px;margin-left:auto;margin-right:auto}
  .lc-top{display:flex;justify-content:space-between;align-items:center;position:absolute;top:32px;left:clamp(40px,7vw,110px);right:clamp(40px,7vw,110px);font-size:13.5px}
  .lc-top a{color:#5A6B85;text-decoration:none;display:inline-flex;align-items:center;gap:6px;transition:color .2s}
  .lc-top a:hover{color:#0A2240}.lc-top svg{width:16px;height:16px}
  .lc-help{border-bottom:1px solid #D9C69B}
  .lc-legal{display:block;position:absolute;bottom:26px;left:0;right:0;text-align:center;font-size:12px;color:#8A97AB}
  .login-card .brand{display:none!important}
}

/* ---------- Tipografía y componentes del formulario (claro) ---------- */
@media (min-width: 960px){
  .login-card .step{text-align:left!important}
  .login-card .step-title{color:#0A2240!important;font-family:'Source Serif 4',Georgia,serif!important;font-weight:600!important;font-size:36px!important;letter-spacing:-.01em;margin:0 0 10px!important;text-align:left!important}
  .login-card .step-title:before{content:"Portal de clientes";display:block;font-family:Inter,system-ui,sans-serif;font-size:11.5px;font-weight:600;letter-spacing:.22em;text-transform:uppercase;color:#9C7B3C;margin-bottom:18px}
  .login-card .step-title:after{content:"";display:block;width:48px;height:2px;background:#B4914C;margin-top:18px}
  .login-card .step-sub{color:#56657D!important;font-size:15px!important;text-align:left!important;margin-bottom:30px!important}
  .login-card .step-title span,.login-card .gold{color:#9C7B3C!important}

  .login-card .field input,.login-card input[type=email],.login-card input[type=password],.login-card input[type=text],.login-card input[type=tel],.login-card select{
    background-color:#FFFFFF!important;color:#0E1C30!important;border:1px solid #CDD5E1!important;border-radius:3px!important;height:54px}
  .login-card input[type=email]{background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239C7B3C' stroke-width='1.6'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E") 16px center/18px no-repeat!important}
  .login-card input[type=password]{background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239C7B3C' stroke-width='1.6'%3E%3Crect x='4' y='10' width='16' height='11' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") 16px center/18px no-repeat!important}
  .login-card input::placeholder{color:#8A97AB!important}
  .login-card input:hover,.login-card select:hover{border-color:#9FAEC4!important}
  .login-card input:focus,.login-card select:focus{border-color:#0A2240!important;box-shadow:0 0 0 4px rgba(10,34,64,.08)!important;background-color:#fff!important}
  .login-card #reg-country,.login-card #phone-country{background:#F4F6FA!important;color:#0A2240!important;border-color:#CDD5E1!important;border-radius:3px 0 0 3px!important}
  .login-card .otp-inputs input{background:#fff!important;color:#0A2240!important;border:1px solid #CDD5E1!important;border-radius:3px!important;font-family:'Source Serif 4',Georgia,serif}
  .login-card .otp-inputs input:focus{border-color:#0A2240!important}
  .login-card .eye{color:#7A8AA3!important}.login-card .capslock{color:#9C7B3C!important}

  .login-card .btn{background:#0A2240!important;color:#fff!important;border-radius:3px!important;height:56px;letter-spacing:.16em!important;font-size:13.5px!important;box-shadow:0 12px 26px rgba(10,34,64,.22)!important}
  .login-card .btn .btn-label:after{content:"  →";color:#CFAE6D}
  .login-card .btn:hover:not(:disabled){background:#12305A!important;box-shadow:0 16px 32px rgba(10,34,64,.28)!important}
  .login-card .btn-ghost{background:#fff!important;color:#0A2240!important;border:1px solid #0A2240!important;box-shadow:none!important}
  .login-card .btn-ghost .btn-label:after{content:""}
  .login-card .btn-ghost:hover:not(:disabled){background:#F4F6FA!important}
  .login-card .spinner{border-color:rgba(255,255,255,.35)!important;border-top-color:#fff!important}

  .login-card .link-create{border-top:1px solid #E3E8EF!important;color:#56657D!important}
  .login-card .link-create b{color:#0A2240!important;border-bottom:1px solid #B4914C}
  .login-card .link-back,.login-card .link-resend,.login-card .resend{color:#56657D!important}
  .login-card .link-back:hover,.login-card .link-resend:hover{color:#0A2240!important}
  .login-card .pw-bar{background:#E3E8EF!important}.login-card .pw-label{color:#56657D!important}
  .login-card .canal-tit{color:#56657D!important;text-align:left!important}
  .login-card .canal-opt{background:#fff!important;color:#0E1C30!important;border:1px solid #CDD5E1!important;border-radius:3px!important}
  .login-card .canal-opt:hover{border-color:#0A2240!important;background:#F7F9FC!important}
  .login-card .canal-ic{background:#F4EEDF!important;color:#9C7B3C!important;border-radius:3px!important}
  .login-card .canal-tx small{color:#6B7A90!important}.login-card .canal-go{color:#9C7B3C!important}
  .login-card .app-num{color:#0A2240!important;text-shadow:none!important;font-family:'Source Serif 4',Georgia,serif}
  .login-card .app-wait{color:#9C7B3C!important}.login-card .app-core{background:#F4EEDF!important;border-color:#CFAE6D!important}
  .login-card .app-ring{border-color:rgba(180,145,76,.55)!important}
  .login-card .otp-icon,.login-card .ck-circle{background:#F4EEDF!important;color:#9C7B3C!important}
  .login-card .sso-notice{background:#F4F6FA!important;color:#0A2240!important;border:1px solid #E3E8EF!important;border-radius:3px!important}
  .login-card .guard-badge,.login-card .guard-badge span{color:#7A8AA3!important}
  .login-card .footer-links,.login-card .footer-links a{color:#7A8AA3!important}
  .login-card .footer-links a:hover{color:#0A2240!important}
}

/* ---------- Móvil: encabezado marino con el logo y formulario blanco ---------- */
@media (max-width: 959px){
  body{background:#071A30!important;align-items:flex-start!important;padding:0!important}
  .bg{display:none}
  .login-card{max-width:none!important;width:100%;min-height:100vh;margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;padding:0 22px 40px!important;background:#fff!important;color:#0E1C30;animation:none!important}
  .login-card:after{display:none!important}
  .login-card .brand{margin:0 -22px 30px!important;padding:34px 22px 28px;background:linear-gradient(160deg,#0A2240,#071A30);border-bottom:3px solid #B4914C}
  .login-card .step-title{color:#0A2240!important;font-size:28px!important}
  .login-card .step-sub,.login-card .canal-tit{color:#56657D!important}
  .login-card input,.login-card select{background-color:#fff!important;color:#0E1C30!important;border:1px solid #CDD5E1!important}
  .login-card input[type=email]{background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239C7B3C' stroke-width='1.6'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E") 16px center/18px no-repeat!important}
  .login-card input[type=password]{background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239C7B3C' stroke-width='1.6'%3E%3Crect x='4' y='10' width='16' height='11' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") 16px center/18px no-repeat!important}
  .login-card .btn{background:#0A2240!important;color:#fff!important}
  .login-card .btn-ghost{background:#fff!important;color:#0A2240!important;border:1px solid #0A2240!important}
  .login-card .link-create{border-top-color:#E3E8EF!important;color:#56657D!important}.login-card .link-create b{color:#0A2240!important}
  .login-card .canal-opt{background:#fff!important;color:#0E1C30!important;border:1px solid #CDD5E1!important}
  .login-card .app-num{color:#0A2240!important;text-shadow:none!important}
  .login-card #reg-country,.login-card #phone-country{background:#F4F6FA!important;color:#0A2240!important}
  .login-card .otp-inputs input{background:#fff!important;color:#0A2240!important;border:1px solid #CDD5E1!important}
  .login-card .footer-links,.login-card .footer-links a,.login-card .guard-badge{color:#7A8AA3!important}
  .lc-legal{display:block;text-align:center;font-size:12px;color:#8A97AB;margin-top:18px}
}
@media (max-width:959px){.login-card .field input,.login-card .field select{border:1px solid #CDD5E1!important;background-color:#fff!important;color:#0E1C30!important;border-radius:3px!important}.login-card .field input:focus{border-color:#0A2240!important;box-shadow:0 0 0 4px rgba(10,34,64,.08)!important}}

/* Aviso legal bajo el formulario */
.login-card .lc-acepta{font-size:12.5px!important;line-height:1.6;color:#6B7A90!important;text-align:center;max-width:360px!important;margin:18px auto 0!important}
.login-card .lc-acepta a{color:#0A2240!important;margin:0!important;text-decoration:underline;text-decoration-color:#CFAE6D;text-underline-offset:3px}

/* Iconos reales de los canales para recibir el código */
.login-card .canal-ic.ic-mail,.canal-ic.ic-mail{background:linear-gradient(160deg,#3B8CFF 0%,#1A5FD8 100%)!important;color:#fff!important;border-radius:10px!important;flex:0 0 42px!important;height:42px!important;box-shadow:0 4px 10px rgba(26,95,216,.28)}
.login-card .canal-ic.ic-wa,.canal-ic.ic-wa{background:#25D366!important;color:#fff!important;border-radius:10px!important;flex:0 0 42px!important;height:42px!important;box-shadow:0 4px 10px rgba(37,211,102,.30)}
.login-card .canal-opt{padding:14px 16px!important;gap:14px!important}
.login-card .canal-tx b{color:#0A2240}

/* ---------- Bienvenida tras iniciar sesión (tema corporativo claro) ----------
   Antes el aviso usaba el fondo oscuro de la tarjeta antigua: quedaba un recuadro marino
   dentro de la tarjeta blanca y, al desvanecerse la tarjeta, el panel se veía vacío. */
.success-overlay { background: #ffffff; border-radius: inherit; }
.success-overlay p { color: #9C7B3C; font-family: 'Source Serif 4', Georgia, serif; font-size: 22px; font-weight: 600; letter-spacing: .2px; }
.success-overlay svg { width: 92px; height: 92px; }
.success-overlay .ck-circle, .success-overlay .ck-check { stroke: #BFA76F; fill: none !important; background: none !important; }
.success-overlay.show .ck-circle { animation: draw .45s ease-out forwards; }
.success-overlay.show .ck-check  { animation: draw .3s ease-out .35s forwards; }
.login-card.success { overflow: hidden; }
.login-card.done { opacity: 1; transform: none; }
