/* Pantallas de acceso Bufins — tarjeta dividida (panel de progreso + formulario).
   Se apoya en style.css (fondo animado, .input-group, .btn-primary). */
body { overflow-y:auto; }
.container { height:auto; min-height:100vh; }

.acc-card { position:relative; width:660px; max-width:100%; min-height:520px; display:grid; grid-template-columns:230px 1fr; border-radius:24px; overflow:hidden; background:#fff; box-shadow:0 25px 70px rgba(22,9,51,.4), 0 0 80px rgba(88,58,255,.15), 0 0 40px rgba(1,225,215,.1); animation:cardEntrance .6s cubic-bezier(.34,1.56,.64,1); font-family:'Poppins',sans-serif; }
.acc-card--ancha { width:860px; }

/* ---------- Panel izquierdo ---------- */
.acc-side { background:linear-gradient(160deg,#160933 0%,#2a1670 60%,#583AFF 140%); padding:30px 26px; display:flex; flex-direction:column; gap:28px; color:#fff; }
.acc-eyebrow { font-size:11px; font-weight:600; letter-spacing:2px; color:#01E1D7; text-transform:uppercase; }
.acc-stepper { display:flex; flex-direction:column; }
.acc-step { display:flex; gap:12px; position:relative; }
.acc-step-dot { display:flex; flex-direction:column; align-items:center; }
.acc-step-circle { width:26px; height:26px; border-radius:50%; border:2px solid rgba(255,255,255,.3); display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:600; color:#b9b1e0; flex-shrink:0; }
.acc-step-line { width:2px; height:30px; background:rgba(255,255,255,.18); }
.acc-step-text { padding-top:2px; padding-bottom:6px; min-width:0; }
.acc-step-title { font-size:13.5px; font-weight:600; color:#b9b1e0; line-height:1.3; }
.acc-step-sub { font-size:12px; color:#b9b1e0; line-height:1.3; }
.acc-step--done .acc-step-circle { background:#01E1D7; border-color:#01E1D7; color:#160933; font-size:12px; }
.acc-step--done .acc-step-line { background:#01E1D7; }
.acc-step--done .acc-step-title { color:#fff; }
.acc-step--active .acc-step-circle { border-color:#fff; background:transparent; color:#fff; }
.acc-step--active .acc-step-title { color:#fff; }
.acc-step--error .acc-step-circle { background:#ef4444; border-color:#ef4444; color:#fff; }
.acc-step--error .acc-step-title { color:#fff; }
.acc-step--error .acc-step-sub { color:#fca5a5; }

.acc-side-foot { margin-top:auto; }
.acc-user { display:flex; align-items:center; gap:10px; background:rgba(255,255,255,.08); border-radius:12px; padding:10px 12px; }
.acc-user-avatar { width:30px; height:30px; border-radius:50%; background:#583AFF; display:flex; align-items:center; justify-content:center; font-size:13px; flex-shrink:0; }
.acc-user-txt { min-width:0; }
.acc-user-lbl { font-size:11px; color:#b9b1e0; line-height:1.3; }
.acc-user-mail { font-size:12.5px; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.acc-side-link { display:inline-block; margin-top:10px; font-size:12px; color:#fff; opacity:.85; text-decoration:none; }
.acc-side-link:hover { opacity:1; color:#fff; text-decoration:underline; }
.acc-site-tag { font-size:10.5px; letter-spacing:1.5px; color:#b9b1e0; margin-bottom:8px; }

/* ---------- Panel derecho ---------- */
.acc-main { background:rgba(255,255,255,.98); padding:28px 34px 18px; display:flex; flex-direction:column; min-width:0; position:relative; }
.acc-header { display:flex; align-items:center; justify-content:space-between; }
.acc-logo { height:30px; }
.acc-lang { display:inline-flex; gap:2px; }
.acc-lang a { font-size:12px; padding:3px 9px; border-radius:12px; color:#583AFF; text-decoration:none; font-weight:400; transition:background .18s,color .18s; }
.acc-lang a:hover { background:#583AFF; color:#fff; }
.acc-lang a.active { background:#01E1D7; color:#fff; font-weight:500; }
.acc-body { flex:1; display:flex; flex-direction:column; }
.acc-body form { position:relative; z-index:1; }
.acc-title { margin:26px 0 6px; font-size:21px; font-weight:700; color:#160933; line-height:1.25; }
.acc-desc { font-size:13px; line-height:1.55; color:#6b7280; margin-bottom:20px; }
.acc-main .input-group { margin-bottom:12px; }
.acc-main .input-icon { width:42px; height:42px; font-size:16px; }
.acc-main .input-wrapper { min-width:0; }
.acc-main .input-wrapper label { font-size:11.2px; }
.acc-main .input-field { font-size:14.5px; }
.acc-main .btn { height:46px; margin-top:6px; font-size:14.7px; }
.acc-main .btn-primary i { font-size:.9rem; }
.acc-main .btn-primary.loading, .acc-btn-secondary.loading { opacity:.75; pointer-events:none; }
.acc-main .btn-primary.acc-off { opacity:.55; }
.acc-main .input-wrapper { position:relative; }
.pwd-toggle { position:absolute; right:-6px; top:50%; transform:translateY(-50%); background:none; border:none; padding:0 6px; cursor:pointer; color:#9ca3af; font-size:1rem; }
.pwd-toggle:hover { color:#583AFF; }
.acc-forgot { text-align:right; margin:-2px 0 16px; }
.acc-forgot a { font-size:12.5px; font-weight:500; color:#583AFF; text-decoration:none; }
.acc-forgot a:hover { color:#3d24bb; }
.acc-forgot a i, .acc-link i { margin-right:4px; }

.acc-btn-secondary { display:flex; align-items:center; justify-content:center; gap:8px; width:100%; height:40px; margin-top:10px; border-radius:12px; border:1px solid #e3e6f0; background:#fff; color:#583AFF; font-family:'Poppins',sans-serif; font-size:13px; font-weight:600; cursor:pointer; text-decoration:none; transition:background .2s; }
.acc-btn-secondary:hover { background:#f5f3ff; color:#583AFF; }
.acc-btn-secondary:disabled { opacity:.6; cursor:wait; }
.acc-main a.btn { text-decoration:none; display:flex; }

.acc-footer { margin-top:auto; padding-top:16px; display:flex; justify-content:space-between; align-items:center; gap:10px; }
.acc-link { font-size:12px; color:#583AFF; text-decoration:none; font-weight:500; background:none; border:none; padding:0; cursor:pointer; font-family:'Poppins',sans-serif; }
.acc-link:hover { color:#3d24bb; }
.acc-copy { font-size:10.9px; font-weight:500; color:#94a3b8; letter-spacing:1px; margin-left:auto; white-space:nowrap; }

/* Pantallas de estado */
.acc-state { margin:34px 0 24px; display:flex; flex-direction:column; gap:12px; align-items:flex-start; }
.acc-state-icon { width:60px; height:60px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:26px; color:#fff; }
.acc-state-icon--info { background:linear-gradient(135deg,#4338ca,#6d28d9); box-shadow:0 4px 20px rgba(99,102,241,.35); }
.acc-state-icon--success { background:linear-gradient(135deg,#059669,#10b981); box-shadow:0 4px 20px rgba(16,185,129,.35); }
.acc-state-icon--error { background:linear-gradient(135deg,#dc2626,#ef4444); box-shadow:0 4px 20px rgba(220,38,38,.35); }
.acc-state-icon--passkey { background:#f5f3ff; border:2px solid #e4ddff; color:#583AFF; box-shadow:none; }
.acc-state h1 { margin:0; font-size:21px; font-weight:700; color:#160933; }
.acc-state p { margin:0; font-size:13px; line-height:1.6; color:#6b7280; }
.acc-state p .fa-check-circle { color:#10b981; margin-right:5px; }
.acc-note { font-size:11.8px; color:#94a3b8; margin-top:12px; line-height:1.5; }

/* Medidor de fuerza */
.strength-bar { height:4px; background:#e5e7eb; border-radius:4px; margin-top:6px; overflow:hidden; }
.strength-fill { height:100%; width:0%; border-radius:4px; transition:width .3s, background .3s; }
.strength-label { font-size:11.7px; color:#9ca3af; margin-top:3px; min-height:14px; }

/* OTP de 6 casillas */
.acc-otp { position:relative; display:flex; gap:8px; width:max-content; max-width:100%; margin-bottom:14px; }
.acc-otp-box { width:44px; height:54px; border-radius:12px; border:2px solid #e3e6f0; background:#f8fafc; display:flex; align-items:center; justify-content:center; font-size:21px; font-weight:600; color:#160933; transition:all .15s; }
.acc-otp-box:nth-child(3) { margin-right:10px; }
.acc-otp-box.filled { background:#fff; border-color:#c7bfff; }
.acc-otp.focused .acc-otp-box.current { background:#fff; border-color:#583AFF; box-shadow:0 0 0 4px rgba(88,58,255,.15); }
.acc-otp input { position:absolute; inset:0; width:100%; height:100%; opacity:0; border:none; outline:none; background:transparent; font-size:16px; cursor:text; }

/* Temporizador TOTP */
.acc-timer { display:flex; align-items:center; gap:8px; font-size:12px; color:#6b7280; margin-bottom:16px; }
.acc-timer svg { flex-shrink:0; }
.acc-timer b { color:#160933; }
.acc-timer .ring-bg { stroke:#e5e7eb; }
.acc-timer .ring-fg { stroke:#583AFF; transition:stroke-dashoffset .3s linear, stroke .3s; }
.acc-timer.low .ring-fg { stroke:#f59e0b; }

/* Configurar 2FA */
.acc-2fa-grid { display:grid; grid-template-columns:180px 1fr; gap:26px; align-items:start; }
.acc-qr { width:180px; height:180px; border:1px solid #e3e6f0; border-radius:12px; background:#fff; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.acc-qr img { width:100%; height:100%; image-rendering:pixelated; padding:8px; }
.acc-qr-hint { font-size:11.8px; color:#6b7280; text-align:center; margin:10px 0 6px; line-height:1.4; }
.acc-secret { font-family:Consolas,monospace; font-size:12.5px; word-break:break-all; text-align:center; background:#f3f4f6; border-radius:8px; padding:8px 10px; color:#160933; user-select:all; }
.acc-steps { list-style:none; margin:0 0 16px; padding:0; }
.acc-steps li { display:flex; gap:10px; font-size:12.8px; line-height:1.5; color:#4b5563; margin-bottom:10px; }
.acc-steps li span { width:20px; height:20px; border-radius:50%; background:#f5f3ff; color:#583AFF; font-size:11px; font-weight:600; display:flex; align-items:center; justify-content:center; flex-shrink:0; margin-top:1px; }

/* ---------- Responsive ---------- */
@media (max-width:720px) {
    .container { padding:12px; align-items:flex-start; }
    .acc-card, .acc-card--ancha { width:100%; grid-template-columns:1fr; min-height:0; }
    .acc-side { padding:16px 20px; gap:12px; }
    .acc-stepper { flex-direction:row; justify-content:space-between; }
    .acc-step { flex-direction:column; align-items:center; gap:4px; flex:1; text-align:center; }
    .acc-step-dot { flex-direction:row; width:100%; align-items:center; }
    .acc-step-line { display:none; }
    .acc-step-text { padding:0; }
    .acc-step-title { font-size:11.5px; }
    .acc-step-sub { display:none; }
    .acc-side-foot { display:none; }
    .acc-main { padding:22px 20px 16px; }
    .acc-2fa-grid { grid-template-columns:1fr; gap:14px; }
    .acc-qr { margin:0 auto; }
    .acc-otp-box { width:40px; height:50px; }
}

/* Errores del servidor sobre los campos */
.acc-errors { list-style:none; margin:0 0 14px; padding:10px 12px; background:#fef2f2; border:1px solid #fecaca; border-radius:12px; }
.acc-errors li { font-size:12.5px; color:#b91c1c; line-height:1.5; }
.acc-errors li i { margin-right:6px; }

/* Casilla «agregar passkey» en la verificación */
.acc-check { display:flex; gap:10px; align-items:flex-start; margin:10px 0 0; padding:10px 12px; border:1px solid #e4ddff; background:#f5f3ff; border-radius:12px; cursor:pointer; font-size:12.8px; color:#4b5563; line-height:1.4; }
.acc-check input { margin-top:3px; accent-color:#583AFF; flex-shrink:0; }
.acc-check i { color:#583AFF; margin-right:6px; }
.acc-check small { display:block; font-size:11.5px; color:#6b7280; margin-top:2px; }
