﻿:root {
    --primary-color: #D47206;
    --secondary-color: #D47206;
    --accent-color: #D47206;
    --bg-light: #f5f7fa;
    --bg-dark: #e4e8f0;
    --card-bg: white;
    --border-color: #e1e5eb;
    --input-bg: #f8fafc;
    --hover-color: #b85e05;
    --text-dark: #1a1a2e;
    --text-gray: #4a5568;
    --orange-dark: #8B4513; /* Naranja casi negro para "Olvidé mi contraseña" */
}

/* Estilos específicos para el login - Versión adaptativa */
.login-container {
    min-height: calc(100vh - 180px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .5rem 1rem;
    background: linear-gradient(135deg, var(--bg-light, #f5f7fa) 0%, var(--bg-dark, #e4e8f0) 100%);
    font-family: var(--font-family, 'Montserrat', sans-serif);
}

.login-card {
    background: var(--card-bg, white);
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
    padding: 2.5rem;
    border-top: 5px solid var(--primary-color, #D47206);
    position: relative;
    overflow: hidden;
}

    .login-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 5px;
        background: linear-gradient(90deg, var(--primary-color, #D47206), var(--secondary-color, #D47206), var(--accent-color, #D47206));
    }

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.login-escudo {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.login-brand {
    text-align: left;
}

.login-brand-1 {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--text-dark, #1a1a2e);
    line-height: 1.2;
}

.login-brand-2 {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-gray, #4a5568);
    opacity: 0.9;
}

/* Alertas */
.alert-login {
    border-radius: 10px;
    border: none;
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* Formulario */
.login-form {
    margin-bottom: 1.5rem;
}

.form-group-login {
    margin-bottom: 1.5rem;
}

.form-label-login {
    display: block;
    font-weight: 600;
    color: var(--text-dark, #1a1a2e);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    text-align: center; /* ← Centrado */
}

.input-group-login {
    position: relative;
}

.form-control-login {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid var(--border-color, #e1e5eb);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background-color: var(--input-bg, #f8fafc);
    color: var(--text-dark, #1a1a2e);
    text-align: center; /* ← Texto centrado dentro del input */
}

    .form-control-login:focus {
        outline: none;
        border-color: var(--secondary-color, #D47206);
        box-shadow: 0 0 0 3px rgba(212, 114, 6, 0.1);
        background-color: white;
    }

    .form-control-login::placeholder {
        color: #a0aec0;
        font-weight: 400;
        text-align: center; /* ← Placeholder centrado */
    }

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray, #4a5568); /* ← Gris, no naranja */
    font-size: 1.1rem;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    transition: color 0.3s ease;
}

    .password-toggle:hover {
        color: var(--secondary-color, #D47206);
    }

/* Opciones */
.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.form-check-login {
    display: flex;
    align-items: center;
}

.form-check-input-login {
    margin-right: 0.5rem;
    width: 1.1em;
    height: 1.1em;
    border: 2px solid #cbd5e0;
    border-radius: 4px;
    cursor: pointer;
}

    .form-check-input-login:checked {
        background-color: var(--secondary-color, #D47206);
        border-color: var(--secondary-color, #D47206);
    }

.form-check-label-login {
    color: var(--text-gray, #4a5568);
    cursor: pointer;
    font-weight: 500;
}

.forgot-password-link {
    color: var(--orange-dark, #8B4513); /* ← Naranja casi negro */
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

    .forgot-password-link:hover {
        color: var(--primary-color, #D47206); /* ← Al hover se aclara un poco */
        text-decoration: underline;
    }

/* Botón de submit */
.btn-login-submit {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color, #D47206) 0%, var(--secondary-color, #D47206) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.5rem;
}

    .btn-login-submit:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(212, 114, 6, 0.2);
        background: linear-gradient(135deg, var(--hover-color, #b85e05) 0%, var(--hover-color, #b85e05) 100%);
    }

    .btn-login-submit:active {
        transform: translateY(0);
    }

/* Footer del login */
.login-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color, #e1e5eb);
    text-align: center;
}

.login-help {
    color: var(--text-gray, #4a5568);
    font-size: 0.85rem;
    margin-bottom: 0;
}

.login-help-link {
    color: var(--secondary-color, #D47206);
    text-decoration: none;
    font-weight: 600;
}

    .login-help-link:hover {
        text-decoration: underline;
    }

/* Responsive */
@media (max-width: 576px) {
    .login-card {
        padding: 2rem 1.5rem;
        margin: 0 1rem;
    }

    .login-logo {
        flex-direction: column;
        gap: 0.5rem;
    }

    .login-brand {
        text-align: center;
    }

    .login-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .forgot-password-link {
        align-self: flex-end;
    }
}
