/* =====================================================
   LOGIN CSS — Estilos modernos para el login
   ===================================================== */

:root {
    --primary: #1a3a52;
    --secondary: #2a5a8a;
    --accent: #3a7ac8;
    --light: #f8f9fa;
    --dark: #212529;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    overflow: hidden;
}

/* ─── FONDO ANIMADO ─── */
.login-bg {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.login-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 58, 82, 0.95) 0%, rgba(42, 90, 138, 0.95) 100%);
}

.login-stars {
    position: absolute;
    inset: 0;
    opacity: 0.3;
}

/* ─── CONTAINER ─── */
.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    padding: 20px;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── CARD ─── */
.login-card {
    background: white;
    border-radius: 12px;
    padding: 40px 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.6s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ─── LOGO ─── */
.login-logo {
    text-align: center;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-logo img {
    height: 140px;
    width: 140px;
    object-fit: contain;
    max-width: 100%;
    background-color: var(--primary);
    padding: 2px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(26, 58, 82, 0.2);
}

/* ─── TÍTULO ─── */
.login-titulo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    margin-top: 20px;
    margin-bottom: 8px;
}

.login-subtitulo {
    text-align: center;
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 30px;
}

/* ─── ALERTS ─── */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}

.alert-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert i {
    font-size: 16px;
    flex-shrink: 0;
}

/* ─── FORM GROUP ─── */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-group label i {
    color: var(--accent);
}

/* ─── INPUT ─── */
.form-group input {
    padding: 12px 14px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.form-group input:focus {
    outline: none;
    background-color: white;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(58, 122, 200, 0.1);
}

.form-group input::placeholder {
    color: #adb5bd;
}

/* ─── INPUT PASSWORD WRAPPER ─── */
.input-password-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-password-wrap input {
    width: 100%;
    padding-right: 40px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 18px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password:hover {
    color: var(--accent);
}

/* ─── BUTTONS ─── */
.btn {
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 58, 82, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-full {
    width: 100%;
}

/* ─── FOOTER ─── */
.login-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    color: #6c757d;
}

.login-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 480px) {
    .login-container {
        padding: 15px;
    }

    .login-card {
        padding: 30px 20px;
    }

    .login-titulo {
        font-size: 20px;
    }

    .btn {
        padding: 10px 14px;
        font-size: 13px;
    }
}
