/* ============================================================
   LOGIN — Academia SIBEMAR
   Diseño basado en el panel administrativo de SIBEMAR
   ============================================================ */

.login-body {
    margin: 0;
    height: 100vh;
    overflow: hidden;
    font-family: var(--fuente, 'Poppins', sans-serif);
    background:
        linear-gradient(135deg, rgba(11, 31, 58, 0.88), rgba(30, 95, 168, 0.85)),
        url('https://images.unsplash.com/photo-1631217868264-e5b90bb7e133?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #1f2733;
    box-sizing: border-box;
}

/* ============================================
   WRAPPER
   ============================================ */
.login-wrapper {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* ============================================
   CARD
   ============================================ */
.login-card {
    width: 100%;
    background: #ffffff;
    border-radius: 18px;
    padding: 40px 34px 32px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    animation: loginEntrada 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-sizing: border-box;
}

@keyframes loginEntrada {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Logo ---------- */
.login-card__logo {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.login-card__logo img {
    width: 70px;
    height: 70px;
    object-fit: contain;
}

/* ---------- Títulos ---------- */
.login-card__titulo {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: #0b1f3a;
    margin: 0 0 6px;
}

.login-card__subtitulo {
    text-align: center;
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0 0 26px;
}

/* ============================================
   ERROR / ÉXITO
   ============================================ */
.login-error {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 0.83rem;
    margin-bottom: 18px;
    animation: shake 0.4s ease;
}

.login-error i {
    font-size: 1rem;
    flex-shrink: 0;
}

.login-error--exito {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
    animation: none;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* ============================================
   FORMULARIO
   ============================================ */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-campo {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-campo label {
    font-size: 0.8rem;
    color: #4a5568;
    font-weight: 500;
}

/* ---------- CAJA ÚNICA DEL INPUT ---------- */
.login-campo__input {
    position: relative;
    display: flex;
    align-items: center;
    background: #f4f6f9;
    border: 1.5px solid transparent;
    border-radius: 10px;
    padding: 0 14px;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.login-campo__input:focus-within {
    background: #ffffff;
    border-color: #1e5fa8;
    box-shadow: 0 0 0 4px rgba(30, 95, 168, 0.12);
}

.login-campo__input>i:first-child {
    color: #9aa3b0;
    font-size: 0.95rem;
    margin-right: 10px;
    width: 16px;
    text-align: center;
}

/* ---------- INPUT INTERNO: SIN BORDES NI FONDOS ---------- */
.login-campo__input input {
    flex: 1;
    width: 100%;
    border: none;
    outline: none;
    box-shadow: none;
    background: transparent;
    padding: 14px 0;
    font-family: inherit;
    font-size: 0.92rem;
    color: #1f2733;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.login-campo__input input:focus,
.login-campo__input input:active,
.login-campo__input input:focus-visible {
    border: none;
    outline: none;
    box-shadow: none;
    background: transparent;
}

/* Quita el fondo amarillo del autofill de Chrome */
.login-campo__input input:-webkit-autofill,
.login-campo__input input:-webkit-autofill:hover,
.login-campo__input input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px transparent inset;
    -webkit-text-fill-color: #1f2733;
    transition: background-color 5000s ease-in-out 0s;
}

.login-campo__input input::placeholder {
    color: #9aa3b0;
}

.login-campo__toggle {
    background: none;
    border: none;
    color: #9aa3b0;
    cursor: pointer;
    padding: 6px;
    font-size: 0.95rem;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
}

.login-campo__toggle:hover {
    color: #1e5fa8;
    background: rgba(30, 95, 168, 0.08);
}

/* ============================================
   BOTÓN LOGIN
   ============================================ */
.btn-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #1e5fa8, #143a66);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 6px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: 0 8px 20px rgba(30, 95, 168, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(30, 95, 168, 0.4);
    filter: brightness(1.05);
}

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

.btn-login i {
    font-size: 0.9rem;
}

/* ============================================
   VOLVER AL SITIO
   ============================================ */
.login-volver {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    font-size: 0.82rem;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s ease;
    width: 100%;
    padding-top: 16px;
    border-top: 1px solid #e2e6ec;
}

.login-volver:hover {
    color: #1e5fa8;
}

.login-volver i {
    font-size: 0.78rem;
    transition: transform 0.2s ease;
}

.login-volver:hover i {
    transform: translateX(-3px);
}

/* ============================================
   FOOTER
   ============================================ */
.login-footer {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    margin: 0;
}

/* ============================================
   RESPONSIVE — Ancho (móvil vertical)
   ============================================ */
@media (max-width: 480px) {
    .login-card {
        padding: 30px 22px 24px;
        border-radius: 14px;
    }

    .login-card__logo img {
        width: 58px;
        height: 58px;
    }

    .login-card__titulo {
        font-size: 1.3rem;
    }

    .login-campo__input input {
        padding: 13px 0;
    }

    .btn-login {
        padding: 13px;
        font-size: 0.9rem;
    }
}

/* ============================================
   RESPONSIVE — Altura (pantallas bajas)
   ============================================ */
@media (max-height: 750px) {
    .login-body {
        overflow-y: auto;
        height: auto;
        min-height: 100vh;
        padding: 15px;
    }

    .login-card {
        padding: 28px 30px 24px;
    }

    .login-card__logo {
        margin-bottom: 12px;
    }

    .login-card__logo img {
        width: 55px;
        height: 55px;
    }

    .login-card__titulo {
        font-size: 1.3rem;
    }

    .login-card__subtitulo {
        margin-bottom: 20px;
    }

    .login-campo__input input {
        padding: 12px 0;
    }

    .btn-login {
        padding: 12px;
    }
}