/* ═══════════════════════════════════════════
   ASISTA SEGUROS — Login
   Paleta: Púrpura · Navy · Verde
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;600;700&family=Outfit:wght@300;400;500;600&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/material-design-iconic-font/2.2.0/material-design-iconic-font.min.css');

/* ── Variables de marca ── */
:root {
    --purpura:        #7B2FA0;
    --purpura-oscuro: #5A1F7A;
    --navy:           #1A2D6B;
    --navy-oscuro:    #111E4A;
    --verde:          #3DB54A;
    --verde-claro:    #5DD96A;
    --verde-muted:    rgba(61, 181, 74, 0.15);
    --fondo:          #0E1628;
    --panel-der:      #0B1120;
    --blanco-05:      rgba(255, 255, 255, 0.05);
    --blanco-10:      rgba(255, 255, 255, 0.10);
    --blanco-20:      rgba(255, 255, 255, 0.20);
    --blanco-40:      rgba(255, 255, 255, 0.40);
    --blanco-60:      rgba(255, 255, 255, 0.60);
}

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

/* ── Layout base ── */
body {
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    display: flex;
    overflow: hidden;
}

/* ═══════ PANEL IZQUIERDO ═══════ */
.panel-izq {
    width: 55%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem;
    overflow: hidden;
}

/* Gradiente de marca: púrpura → navy → verde */
.bg-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 60% at 10% 10%,  #7B2FA0 0%,  transparent 60%),
        radial-gradient(ellipse 60% 70% at 90% 90%,  #3DB54A 0%,  transparent 55%),
        radial-gradient(ellipse 80% 80% at 50% 50%,  #1A2D6B 0%,  transparent 100%);
    background-color: #0E1628;
}

/* Overlay de noise/textura sutil */
.bg-noise {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

/* Grid de puntos */
.bg-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.18) 1px, transparent 1px);
    background-size: 30px 30px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

/* Anillos decorativos */
.ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.08);
    right: -60px;
    top: 50%;
    transform: translateY(-50%);
    animation: ringPulse 7s ease-in-out infinite;
}
.ring-1 { width: 260px; height: 260px; animation-delay: 0s; }
.ring-2 { width: 380px; height: 380px; animation-delay: 1.5s; }
.ring-3 { width: 500px; height: 500px; animation-delay: 3s;   }

@keyframes ringPulse {
    0%, 100% { opacity: 0.4; transform: translateY(-50%) scale(1);    }
    50%       { opacity: 0.8; transform: translateY(-50%) scale(1.04); }
}

/* ── Logo área ── */
.logo-area {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-imagen {
    height: 52px;
    width: auto;
    filter: drop-shadow(0 0 16px rgba(61,181,74,0.5));
    margin-top: 0.2rem;
}

/* ── Copy central ── */
.copy-central {
    position: relative;
    z-index: 10;
    max-width: 400px;
}

.copy-central h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.2rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 1.1rem;
}

.copy-central h2 em {
    font-style: italic;
    background: linear-gradient(135deg, var(--verde-claro), var(--verde));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.copy-central p {
    color: rgba(255,255,255,0.45);
    font-size: 0.9rem;
    line-height: 1.75;
    font-weight: 300;
    max-width: 320px;
}

/* ── Stats ── */
.stats {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.stat-num {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.9rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.stat-label {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.25rem;
}

.stat-div {
    width: 1px;
    height: 32px;
    background: rgba(255,255,255,0.12);
}

/* ═══════ PANEL DERECHO ═══════ */
.panel-der {
    width: 45%;
    background: var(--panel-der);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    position: relative;
}

/* Borde sutil izquierdo */
.panel-der::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10%;
    height: 80%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(61,181,74,0.3), rgba(123,47,160,0.3), transparent);
}

/* ── Tarjeta del formulario ── */
.form-card {
    width: 100%;
    max-width: 360px;
    animation: fadeInRight 0.6s ease both;
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(24px); }
    to   { opacity: 1; transform: translateX(0);    }
}

/* ── Encabezado del form ── */
.form-header {
    margin-bottom: 2.2rem;
}

.form-header h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.9rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.3rem;
}

.form-header p {
    color: rgba(255,255,255,0.35);
    font-size: 0.82rem;
    font-weight: 300;
}

/* ── Alerta de error ── */
.alerta-error {
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.25);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0);    }
}

.alerta-error i { color: #f87171; font-size: 1rem; flex-shrink: 0; }
.alerta-error p { color: #fca5a5; font-size: 0.82rem; line-height: 1.4; }

/* ── Grupos de campo ── */
.field-group {
    margin-bottom: 1.3rem;
}

.field-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 0.55rem;
}

.field-wrap {
    position: relative;
}

.field-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.22);
    font-size: 1rem;
    pointer-events: none;
    transition: color 0.25s;
}

.field-wrap:focus-within .field-icon {
    color: var(--verde);
}

.field-input {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 10px;
    padding: 0.85rem 1rem 0.85rem 2.8rem;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.88rem;
    font-weight: 400;
    transition: all 0.25s ease;
    outline: none;
}

.field-input::placeholder {
    color: rgba(255,255,255,0.18);
}

.field-input:focus {
    background: rgba(61,181,74,0.06);
    border-color: var(--verde);
    box-shadow: 0 0 0 3px rgba(61,181,74,0.12);
}

/* Toggle de contraseña */
.btn-toggle-pass {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.22);
    cursor: pointer;
    font-size: 1rem;
    background: none;
    border: none;
    padding: 0;
    transition: color 0.25s;
    line-height: 1;
}

.btn-toggle-pass:hover {
    color: var(--verde);
}

/* ── Recordar ── */
.recordar-wrap {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.6rem;
}

.check-custom {
    width: 17px;
    height: 17px;
    border: 1.5px solid rgba(255,255,255,0.18);
    border-radius: 5px;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}

.check-custom:checked {
    background: var(--verde);
    border-color: var(--verde);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6l3 3 5-5' stroke='%23fff' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.recordar-label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.35);
    cursor: pointer;
    user-select: none;
}

/* ── Botón principal ── */
.btn-login {
    width: 100%;
    padding: 0.92rem;
    background: linear-gradient(135deg, var(--verde), #2a9e36);
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-login::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(61,181,74,0.35);
}

.btn-login:hover::after {
    opacity: 1;
}

.btn-login:active {
    transform: translateY(0);
}

/* ── Pill de seguridad ── */
.seguridad-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.4rem;
    padding: 0.6rem 0.9rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
}

.seguridad-pill i {
    color: var(--verde);
    font-size: 0.85rem;
}

.seguridad-pill span {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.25);
}

/* ── Footer ── */
.form-footer {
    margin-top: 1.6rem;
    text-align: center;
}

.form-footer p {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.2);
}

.form-footer a {
    color: rgba(61,181,74,0.65);
    text-decoration: none;
    transition: color 0.2s;
}

.form-footer a:hover {
    color: var(--verde);
}

/* ── Animaciones entrada panel izq ── */
.logo-area   { animation: fadeInLeft 0.6s ease 0.1s both; }
.copy-central{ animation: fadeInLeft 0.6s ease 0.2s both; }
.stats       { animation: fadeInLeft 0.6s ease 0.35s both; }

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0);     }
}

/* ── Responsive ── */
@media (max-width: 860px) {
    body { flex-direction: column; overflow-y: auto; }
    .panel-izq { width: 100%; padding: 2.5rem 2rem 2rem; }
    .panel-der { width: 100%; padding: 2rem; }
    .panel-der::before { display: none; }
    .ring { display: none; }
    .copy-central h2 { font-size: 2.2rem; }
}
