/* Login / Auth — GestorPass v2 — Sin scroll */

html, body { height: 100%; overflow: hidden; }

.auth-page {
    height: 100vh;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* ═══════════════════════════════════════════════
   PANEL IZQUIERDO
   ═══════════════════════════════════════════════ */
.auth-panel-left {
    background: linear-gradient(155deg, #05011a 0%, #0d0630 40%, #120a3a 70%, #0a1628 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 2rem;
    position: relative;
    overflow: hidden;
    height: 100%;
}

#cipher-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.85;
    pointer-events: none;
}

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    z-index: 1;
    width: 100%;
    gap: 0;
}

/* Logo — más grande */
.auth-brand-logo {
    width: 130px;
    height: 130px;
    border-radius: 32px;
    background: rgba(255,255,255,0.07);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-bottom: .9rem;
    box-shadow: 0 12px 50px rgba(99,102,241,0.4), 0 2px 8px rgba(0,0,0,0.5);
    animation: logoPulse 4s ease-in-out infinite;
    flex-shrink: 0;
    padding: 8px;
}
@keyframes logoPulse {
    0%,100% { box-shadow: 0 12px 50px rgba(99,102,241,0.40),0 2px 8px rgba(0,0,0,.5); }
    50%      { box-shadow: 0 12px 65px rgba(99,102,241,0.70),0 2px 8px rgba(0,0,0,.5); }
}
.auth-brand-logo img {
    width: 140px;
    height: 140px;
    object-fit: contain;
    filter: drop-shadow(0 2px 12px rgba(99,102,241,0.6));
}

.auth-brand-name {
    font-size: 1.7rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.03em;
    margin: 0 0 .25rem;
}
.auth-brand-tagline {
    font-size: .82rem;
    color: rgba(255,255,255,0.65);
    margin: 0 0 .6rem;
    max-width: 280px;
    line-height: 1.5;
}

/* Badge "Protección activa" */
.auth-security-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 30px;
    padding: .28rem .85rem;
    font-size: .7rem;
    font-weight: 600;
    color: rgba(255,255,255,0.78);
    letter-spacing: .03em;
    margin-bottom: .75rem;
    animation: badgePulse 2.5s ease-in-out infinite;
}
.auth-security-badge i { color: #4ade80; }
@keyframes badgePulse {
    0%,100% { opacity: .82; }
    50%      { opacity: 1; }
}

/* Features grid — compacto */
.auth-features {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    width: 100%;
    max-width: 340px;
    text-align: left;
}
.auth-feature {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .5rem .7rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    transition: background .2s;
}
.auth-feature:hover { background: rgba(255,255,255,0.08); }
.auth-feature-title {
    font-size: .76rem;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    margin-bottom: .1rem;
}
.auth-feature-sub {
    font-size: .67rem;
    color: rgba(255,255,255,0.44);
    line-height: 1.35;
}
.auth-feature-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(99,102,241,0.22);
    border: 1px solid rgba(99,102,241,0.38);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: .82rem;
    color: #a5b4fc;
    box-shadow: 0 0 10px rgba(99,102,241,0.28);
}

/* ── Temas: fondo panel ─────────────────────── */
[data-theme="dark"]  .auth-panel-left { background: linear-gradient(155deg,#0b1120 0%,#1a1040 50%,#2d1b69 100%); }
[data-theme="blue"]  .auth-panel-left { background: linear-gradient(155deg,#071628 0%,#0c3050 50%,#0c4a6e 100%); }
[data-theme="green"] .auth-panel-left { background: linear-gradient(155deg,#041c14 0%,#064e3b 50%,#047857 100%); }

/* Iconos de features adaptados */
[data-theme="blue"]  .auth-feature-icon { background:rgba(14,165,233,.2); border-color:rgba(14,165,233,.38); color:#7dd3fc; box-shadow:0 0 10px rgba(14,165,233,.28); }
[data-theme="green"] .auth-feature-icon { background:rgba(5,150,105,.2); border-color:rgba(5,150,105,.38); color:#6ee7b7; box-shadow:0 0 10px rgba(5,150,105,.28); }
[data-theme="dark"]  .auth-feature-icon { background:rgba(139,92,246,.22); border-color:rgba(139,92,246,.38); color:#c4b5fd; box-shadow:0 0 10px rgba(139,92,246,.28); }

/* Logo pulse adaptado */
[data-theme="blue"]  .auth-brand-logo { animation: logoPulseBlue 4s ease-in-out infinite; }
[data-theme="green"] .auth-brand-logo { animation: logoPulseGreen 4s ease-in-out infinite; }
@keyframes logoPulseBlue  { 0%,100%{box-shadow:0 12px 50px rgba(14,165,233,.4),0 2px 8px rgba(0,0,0,.5)} 50%{box-shadow:0 12px 65px rgba(14,165,233,.7),0 2px 8px rgba(0,0,0,.5)} }
@keyframes logoPulseGreen { 0%,100%{box-shadow:0 12px 50px rgba(5,150,105,.4),0 2px 8px rgba(0,0,0,.5)} 50%{box-shadow:0 12px 65px rgba(5,150,105,.7),0 2px 8px rgba(0,0,0,.5)} }

/* ═══════════════════════════════════════════════
   PANEL DERECHO
   ═══════════════════════════════════════════════ */
.auth-panel-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 2rem;
    background: var(--color-surface);
    position: relative;
    height: 100%;
    overflow: hidden;
}
.auth-form-container {
    width: 100%;
    max-width: 390px;
}
.auth-form-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text);
    margin: 0 0 .25rem;
    letter-spacing: -.03em;
}
.auth-form-subtitle {
    font-size: .82rem;
    color: var(--color-text-muted);
    margin: 0 0 1.25rem;
    line-height: 1.5;
}
.auth-form .btn-block {
    padding: 12px;
    font-size: .92rem;
    border-radius: var(--radius-md);
}
.auth-form .form-group { margin-bottom: .9rem; }
.auth-form .form-group:last-of-type { margin-bottom: 1.1rem; }
.otp-field .input { letter-spacing: .3em; font-size: 1.2rem; text-align: center; font-weight: 700; }
.auth-link {
    display: block;
    text-align: center;
    margin-top: .85rem;
    font-size: .82rem;
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
    transition: opacity var(--transition);
}
.auth-link:hover { opacity: .75; }

/* Selector de tema */
.auth-theme-switcher {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}
.auth-theme-switcher .menu-trigger {
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text-muted);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}
.auth-theme-switcher .menu-trigger:hover { background: var(--color-bg); }
.auth-theme-switcher .menu-dropdown { right: 0; }

/* Alertas compactas */
.alert { margin-bottom: .75rem; padding: .55rem .85rem; font-size: .82rem; }

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (max-width: 900px) {
    html, body { overflow: auto; }
    .auth-page { grid-template-columns: 1fr; height: auto; min-height: 100vh; }
    .auth-panel-left { display: none; }
    .auth-panel-right { min-height: 100vh; height: auto; padding: 2rem 1.5rem; overflow: auto; }
}
@media (max-width: 480px) {
    .auth-panel-right { padding: 1.5rem 1rem; }
    .auth-form-title { font-size: 1.3rem; }
}
