/* login.css */
body.login-page {
    background: #2e1e12;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 10px;
}

.login-card {
    background: #3b2a1f;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,0,0,0.4);
    padding: 30px 25px;
    text-align: center;
    border: 1px solid #a68f5a;
}

.login-header .logo-image {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
}

.login-header h1 {
    font-size: 1.5em;
    color: #f5f5f5;
    margin: 0px 0 0px;
}

.login-header p {
    font-size: 1em;
    color: #d1c4aa;
    margin-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
    color: #e6d3a3;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: #2b1b11;
    border: 1px solid #a68f5a;
    border-radius: 8px;
    overflow: hidden;
}

.input-group i {
    margin: 0 10px;
    color: #d4b97a;
}

.input-group input {
    flex: 1;
    border: none;
    padding: 10px;
    outline: none;
    font-size: 1em;
    background: transparent;
    color: #fff;
}

.toggle-password {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    color: #d4b97a;
}

/* BOTÓN MODERNO */
/* CSS específico para el botón de Iniciar Sesión */

.login-form .btn-primary {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 12px;
    background: linear-gradient(135deg, #D4AF37 0%, #B8860B 100%) !important;
    border: none;
    color: #2c3e50 !important;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-family: inherit;
    text-shadow: none;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

/* Efecto de brillo que se desliza */
.login-form .btn-primary::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 ease;
}

/* Efectos hover */
.login-form .btn-primary:hover {
    background: linear-gradient(135deg, #B8860B 0%, #9A7209 100%) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

.login-form .btn-primary:hover::before {
    left: 100%;
}

/* Efecto al hacer clic */
.login-form .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

/* Estado de carga (cuando se está procesando) */
.login-form .btn-primary.loading {
    pointer-events: none;
    position: relative;
}

.login-form .btn-primary.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Animación de rotación para el loading */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Estado deshabilitado */
.login-form .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.login-form .btn-primary:disabled:hover {
    background: linear-gradient(135deg, #D4AF37 0%, #B8860B 100%) !important;
    color: #2c3e50 !important;
    transform: none;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}


.alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 8px;
    font-size: 0.95em;
}

.alert-error {
    background-color: #5c1b1b;
    color: #ffcdd2;
    border: 1px solid #ef9a9a;
}

.alert-success {
    background-color: #204020;
    color: #c8e6c9;
    border: 1px solid #81c784;
}

.login-footer {
    margin-top: 10px;
}

.login-footer a {
    color: #e0c97c;
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

.demo-credentials {
    background: #2c1f16;
    margin-top: 25px;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #a68f5a;
    text-align: left;
    font-size: 0.9em;
    color: #eee;
}

.demo-credentials h3 {
    margin-bottom: 10px;
    color: #e0c97c;
}

.demo-user {
    margin-bottom: 10px;
    cursor: pointer;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: #3b2a1f;
    padding: 20px;
    border-radius: 10px;
    width: 100%;
    max-width: 420px;
    position: relative;
    color: #fff;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #a68f5a;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.modal-header h3 {
    color: #f5f5f5;
    margin: 0;
}

.modal-header .close {
    background: none;
    border: none;
    font-size: 1.2em;
    color: #d4b97a;
    cursor: pointer;
}

.modal-body p {
    color: #e6d3a3;
    margin-bottom: 10px;
}

/* RESPONSIVE */
@media (max-width: 480px) {
    .login-card {
        padding: 20px 15px;
    }

    .login-header h1 {
        font-size: 1.6em;
    }

    .form-group input {
        font-size: 0.95em;
    }

    .alert {
        font-size: 0.9em;
    }

    .demo-credentials {
        font-size: 0.85em;
    }
}
