/* ============================================================
   LOGIN — OFTALMOVISTA
   Estilos exclusivos de la pantalla de inicio de sesión
   ============================================================ */

html, body {
    height: 100%;
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ─── Escena de fondo ─── */
.scene {
    min-height: 100vh;
    background: #07162b;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
}

/* Orbes animados */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
}
.orb-1 {
    width: 560px; height: 560px;
    background: radial-gradient(circle, rgba(113,157,199,.22) 0%, transparent 70%);
    top: -160px; left: -180px;
    animation: drift 14s ease-in-out infinite alternate;
}
.orb-2 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(38,94,162,.55) 0%, transparent 70%);
    bottom: -120px; right: -100px;
    animation: drift 18s ease-in-out infinite alternate-reverse;
}
.orb-3 {
    width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(113,157,199,.12) 0%, transparent 70%);
    top: 55%; left: 60%;
    animation: drift 10s ease-in-out infinite alternate;
}

@keyframes drift {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(30px, 20px) scale(1.06); }
}

/* Grid sutil de fondo */
.scene::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(113,157,199,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(113,157,199,.04) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}

/* ─── Tarjeta principal ─── */
.login-card {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 940px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-radius: 24px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(113,157,199,.2),
        0 32px 80px rgba(0,0,0,.5),
        0 8px 24px rgba(0,0,0,.3);
}

/* ── Panel izquierdo: visual ── */
.card-visual {
    background: linear-gradient(160deg, #0c1f44 0%, #183270 40%, #265EA2 100%);
    padding: 3.25rem 2.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.card-visual::before {
    content: '';
    position: absolute;
    width: 340px; height: 340px;
    border-radius: 50%;
    border: 1px solid rgba(113,157,199,.18);
    top: -90px; right: -90px;
}
.card-visual::after {
    content: '';
    position: absolute;
    width: 200px; height: 200px;
    border-radius: 50%;
    border: 1px solid rgba(113,157,199,.1);
    bottom: 40px; left: -60px;
}

.visual-logo {
    width: 180px;
    height: auto;
    filter: brightness(0) invert(1);
    opacity: .95;
    display: block;
    margin-bottom: .25rem;
}

.visual-badge {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    background: rgba(113,157,199,.18);
    border: 1px solid rgba(113,157,199,.35);
    border-radius: 100px;
    padding: .3rem .85rem;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #719DC7;
    margin-bottom: 1.2rem;
    width: fit-content;
}
.visual-badge span.dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #719DC7;
    box-shadow: 0 0 7px #719DC7;
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50%       { opacity: .35; }
}

.visual-title {
    font-size: 1.65rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin-bottom: .75rem;
}
.visual-title em {
    font-style: normal;
    color: #719DC7;
}

.visual-desc {
    font-size: .82rem;
    color: rgba(255,255,255,.55);
    line-height: 1.75;
    margin-bottom: 2rem;
}

/* Stats decorativos */
.visual-stats {
    display: flex;
    gap: 1.25rem;
}
.stat-chip {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px;
    padding: .7rem 1rem;
    flex: 1;
}
.stat-chip .num {
    font-size: 1.2rem;
    font-weight: 700;
    color: #719DC7;
    line-height: 1;
    margin-bottom: .2rem;
}
.stat-chip .lbl {
    font-size: .67rem;
    font-weight: 500;
    color: rgba(255,255,255,.4);
    text-transform: uppercase;
    letter-spacing: .8px;
}

.visual-copy {
    font-size: .68rem;
    color: rgba(255,255,255,.25);
    margin-top: auto;
    padding-top: 1.5rem;
    position: relative;
    z-index: 1;
}
.visual-copy a { color: rgba(255,255,255,.45); text-decoration: none; font-weight: 600; }

/* ── Panel derecho: formulario ── */
.card-form {
    background: #fff;
    padding: 3.25rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-eyebrow {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #265EA2;
    margin-bottom: .5rem;
}

.form-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0d1e3a;
    margin-bottom: .35rem;
    letter-spacing: -.3px;
}

.form-sub {
    font-size: .82rem;
    color: #8d9eab;
    margin-bottom: 2.4rem;
    font-weight: 400;
}

/* ── Floating label inputs ── */
.fl-group {
    position: relative;
    margin-bottom: 1.4rem;
}

.fl-group .fl-input {
    width: 100%;
    border: 1.5px solid #e0e8f0;
    border-radius: 12px;
    padding: 1.1rem 1rem 0.45rem 3rem;
    font-size: .92rem;
    font-family: inherit;
    color: #0d1e3a;
    background: #f5f8fc;
    outline: none;
    transition: border-color .22s, box-shadow .22s, background .22s;
    appearance: none;
}

.fl-group .fl-input:focus {
    border-color: #265EA2;
    background: #fff;
    box-shadow: 0 0 0 3.5px rgba(38,94,162,.14);
}

.fl-group .fl-input.is-invalid {
    border-color: #dc3545;
}

.fl-group .fl-input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220,53,69,.14);
}

.fl-group .fl-label {
    position: absolute;
    left: 3rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: .9rem;
    color: #adb5bd;
    font-weight: 400;
    pointer-events: none;
    transition: all .2s ease;
    transform-origin: left top;
}

.fl-group .fl-input:focus ~ .fl-label,
.fl-group .fl-input:not(:placeholder-shown) ~ .fl-label {
    top: 0.7rem;
    transform: translateY(0) scale(.72);
    color: #265EA2;
    font-weight: 600;
}

.fl-group .fl-input.is-invalid ~ .fl-label { color: #dc3545; }
.fl-group .fl-input.is-invalid:focus ~ .fl-label { color: #dc3545; }

.fl-group .fl-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #b8c9d9;
    font-size: .85rem;
    pointer-events: none;
    transition: color .22s;
    z-index: 2;
}
.fl-group:focus-within .fl-icon { color: #265EA2; }

/* Botón ojo */
.fl-eye {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #b8c9d9;
    cursor: pointer;
    padding: .25rem;
    font-size: .85rem;
    transition: color .2s;
    z-index: 2;
}
.fl-eye:hover { color: #265EA2; }

.fl-input.has-eye { padding-right: 2.8rem; }

/* Error inline */
.field-error {
    font-size: .75rem;
    color: #dc3545;
    margin-top: .3rem;
    padding-left: 3rem;
}

/* ── Botón submit ── */
.btn-submit {
    width: 100%;
    padding: .95rem;
    border: none;
    border-radius: 12px;
    background: #265EA2;
    color: #fff;
    font-size: .88rem;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: .6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
    box-shadow: 0 4px 20px rgba(38,94,162,.35);
    margin-top: .4rem;
}

.btn-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.18) 60%, transparent 80%);
    transform: translateX(-100%);
    transition: transform .6s ease;
}

.btn-submit:hover::before { transform: translateX(100%); }

.btn-submit:hover {
    background: #1d4d8a;
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(38,94,162,.45), 0 0 0 1px rgba(113,157,199,.4);
}
.btn-submit:active { transform: translateY(0); }

.btn-submit .btn-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    position: relative;
    z-index: 1;
}

.btn-arrow {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    font-size: .75rem;
}
.btn-submit:hover .btn-arrow { background: rgba(255,255,255,.32); }

/* Divider */
.form-divider {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-top: 2rem;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #c6d4e1;
}
.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e8eef4;
}

/* ── Responsive ── */
@media (max-width: 767.98px) {
    .login-card {
        grid-template-columns: 1fr;
        border-radius: 20px;
    }
    .card-visual { display: none; }
    .card-form { padding: 2.5rem 1.75rem; }
}
