/* === ESTILOS ESPECÍFICOS LOGIN === */
/* Paleta de colores terracota:
   - Header: Terracota #C67854
   - Sidebar: Marrón terracota #8B6B5C
   - Botones del menú: Beige/dorado #D9A574 con hover #C89465
   - Botón cerrar sesión: Terracota rojizo #B85C4A con hover #A64C3A
   - Fondo principal: Beige claro #F5E6D3
   - Botón guardar cambios: Verde terracota #9FB18F
   - Botones de acción negativa: Terracota rojizo #B85C4A
*/

@import url('https://fonts.cdnfonts.com/css/feather-bold');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Feather Bold', 'Arial', 'Helvetica', sans-serif;
    background-color: #F5E6D3 !important;
    color: #4A4A4A;
}

/* === HEADER === */
.navbar {
    background-color: #C67854 !important;
    background: linear-gradient(135deg, #C67854 0%, #B56744 100%) !important;
    padding: 20px 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo .circle {
    width: 50px;
    height: 50px;
    background-color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-size: 40px;
    font-weight: 900;
    color: #C67854;
}

.logo h1 {
    color: #FFFFFF;
    font-size: 48px !important;
    font-weight: 900;
    letter-spacing: 3px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    margin: 0;
}

.btn-regresar {
    background: transparent !important;
    color: #FFFFFF !important;
    border: 2px solid #FFFFFF !important;
    padding: 12px 24px;
    font-weight: bold;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-left: auto;
    border-radius: 8px;
}

.btn-regresar:hover {
    color: #F5E6D3 !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    text-decoration: none;
    transform: translateX(-3px);
}

.contenido {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px 60px 20px;
    flex-direction: column;
    background-color: #F5E6D3;
    min-height: calc(100vh - 90px);
}

.titulo-form {
    text-align: center;
    color: #8B6B5C;
    margin-bottom: 40px;
    margin-top: 0;
    padding-top: 10px;
    font-size: 20px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    width: 100%;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    font-family: 'Feather Bold', 'Arial', 'Helvetica', sans-serif;
}

.login-box {
    background-color: #FFFFFF;
    padding: 50px 40px;
    border-radius: 16px;
    border: 2px solid #D9A574;
    box-shadow: 0 8px 32px rgba(139, 107, 92, 0.2);
    width: 600px;
    max-width: 95%;
    text-align: left;
    position: relative;
    overflow: visible;
}

.login-box h2 {
    text-align: center;
    color: #8B6B5C;
    margin-bottom: 30px;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* === ALERTAS === */
.alert, .alert-success, .alert-error {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-weight: 600;
    border-left: 4px solid;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.alert-success {
    background: linear-gradient(135deg, #9FB18F, #8AA17A);
    color: #FFFFFF;
    border-left: 4px solid #8AA17A;
}

.alert-error {
    background-color: #FFEBEE;
    color: #8B3A2E;
    border-left: 4px solid #B85C4A;
    border-left-color: #B85C4A;
}

/* Buttons: sizes and variants */
.btn-ingresar,
.btn-primary {
    padding: 18px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 18px;
    text-align: center;
    background: linear-gradient(135deg, #9FB18F 0%, #8DAA7E 100%);
    color: #FFFFFF;
    border: none;
}

/* === INFORMACIÓN DE CORREOS === */
.email-info {
    background: linear-gradient(135deg, #F5E6D3, #E8D4C0);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 2px solid #D9A574;
}

.email-info p {
    margin: 8px 0;
    font-size: 14px;
    color: #4A4A4A;
}

.email-info p:first-child {
    font-weight: 900;
    color: #8B6B5C;
    margin-bottom: 12px;
}

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

.form-group {
    position: relative;
}

.login-box label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: #4A4A4A;
    font-size: 16px;
}

.form-input {
    width: 100%;
    padding: 18px 20px;
    border: 2px solid #D9A574;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #FAFAFA;
    color: #4A4A4A;
    font-weight: 500;
}

.form-input:focus {
    border-color: #C67854;
    outline: none;
    box-shadow: 0 0 0 4px rgba(198, 120, 84, 0.2);
    background-color: #FFFFFF;
    transform: translateY(-2px);
}

.form-input:hover {
    border-color: #C89465;
    background-color: #FFFFFF;
}

.form-input.error {
    border-color: #B85C4A;
    background-color: #FFEBEE;
}

.error-message {
    color: #B85C4A;
    font-size: 14px;
    margin-top: 6px;
    display: block;
    font-weight: 600;
}

/* === CHECKBOX === */
.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    font-weight: 500 !important;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto !important;
    margin: 0 !important;
    transform: scale(1.2);
}

/* === BOTÓN === */
.btn-ingresar {
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 4px 16px rgba(139, 107, 92, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-ingresar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-ingresar:hover::before {
    left: 100%;
}

.btn-ingresar:hover {
    background: linear-gradient(135deg, #8DAA7E 0%, #7E976F 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(139, 107, 92, 0.4);
}

/* Botón negativo para acciones destructivas (cancelar/eliminar) */
.btn-negative {
    padding: 14px 18px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    text-align: center;
    background: linear-gradient(135deg, #B85C4A 0%, #A64C3A 100%);
    color: #FFFFFF;
    border: none;
}

.btn-negative:hover {
    background: linear-gradient(135deg, #A64C3A 0%, #8F3F30 100%);
    transform: translateY(-2px);
}

/* === FOOTER === */
.footer {
    background-color: #2C2C2C;
    color: #F5E6D3;
    padding: 15px 20px;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.footer-text {
    font-size: 13px;
    margin-bottom: 5px;
    color: #D9A574;
    font-weight: 500;
}

.footer-email {
    color: #F5E6D3;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
}

.footer-email:hover {
    color: #D9A574;
    text-decoration: underline;
}

/* Forzar ocultamiento del enlace de salto si un script lo inyecta */
.skip-link {
    display: none !important;
}

/* Override: footer no fijo en vistas públicas (Login) */
.public-layout .footer,
.public-layout footer {
    position: static !important;
}

/* === ENLACES === */
.form-links {
    text-align: center;
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.olvide, .register-link {
    color: #8B6B5C;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 8px;
}

.olvide:hover, .register-link:hover {
    color: #C67854;
    background-color: #F5E6D3;
    text-decoration: none;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .navbar {
        padding: 16px 20px;
        flex-direction: row;
    }

    .logo h1 {
        font-size: 36px;
        letter-spacing: 2px;
    }

    .logo .circle {
        width: 40px;
        height: 40px;
        font-size: 32px;
    }

    .btn-regresar {
        padding: 10px 16px;
        font-size: 14px;
    }

    .contenido {
        padding: 20px 16px;
    }

    .titulo-form {
        font-size: 28px;
    }
    
    .login-box {
        padding: 30px 24px;
        width: 95%;
    }
    
    .login-box h2 {
        font-size: 28px;
    }
    
    .email-info {
        padding: 16px;
    }
}

/* === ACCESIBILIDAD === */
.btn-regresar:focus,
.btn-ingresar:focus,
.olvide:focus,
.register-link:focus,
.footer-email:focus {
    outline: 3px solid #D9A574;
    outline-offset: 2px;
}

/* 
=== MODO OSCURO PARA VISTA LOGIN === */
[data-theme="dark"] body {
    background: #0B1220 !important;
    color: #E5E7EB !important;
}

[data-theme="dark"] .login-container {
    background: #0B1220 !important;
}

[data-theme="dark"] .login-form {
    background: #1F2937 !important;
    border-color: #374151 !important;
}

[data-theme="dark"] .form-title {
    color: #E5E7EB !important;
}

[data-theme="dark"] label {
    color: #E5E7EB !important;
}

[data-theme="dark"] input {
    background: #374151 !important;
    color: #E5E7EB !important;
    border-color: #4B5563 !important;
}

/* === ALTO CONTRASTE === */
[data-theme="high-contrast"] body {
    background: #000000 !important;
    color: #FFFF00 !important;
}

[data-theme="high-contrast"] .login-form {
    background: #000000 !important;
    border: 3px solid #FFFFFF !important;
}

[data-theme="high-contrast"] .form-title {
    color: #FFFF00 !important;
    font-weight: 900 !important;
}

[data-theme="high-contrast"] label {
    color: #FFFF00 !important;
    font-weight: 900 !important;
}

[data-theme="high-contrast"] input {
    background: #000000 !important;
    color: #FFFF00 !important;
    border: 3px solid #FFFFFF !important;
}

/* === ESCALA DE GRISES === */
[data-grayscale="true"] body {
    filter: grayscale(100%) !important;
    -webkit-filter: grayscale(100%) !important;
}
