@media (max-width: 1024px) {
    .login-card {
        max-width: 380px;
    }
    .login-body {
        padding: 2rem 1.2rem;
    }
}

@media (max-width: 768px) {
    .login-card {
        max-width: 98vw;
        margin: 1rem auto;
        border-radius: 12px;
    }
    .login-body {
        padding: 1.2rem 0.5rem;
    }
    .login-header {
        padding: 1.5rem 0.8rem 1rem;
    }
}

/**
 * Auth Styles - COPROCENVA Sistema de Servicios Integrados
 * Estilos para formularios de autenticación (login, recuperar contraseña, etc.)
 * Mantiene exactamente los mismos estilos existentes
 */

:root {
    --primary-color: #386c37;
    --primary-dark: #3d8b5f;
    --secondary-color: #86a93d;
    --light-green: #a8d5aa;
    --very-light-green: #e8f5e8;
    --light-color: #e0f7fa;
    --white: #ffffff;
    --shadow: rgba(0, 0, 0, 0.15);
    --gradient-bg: linear-gradient(135deg, #86a93d 0%, #ffffff 100%);
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: var(--gradient-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px var(--shadow);
    overflow: hidden;
    width: 100%;
    max-width: 450px;
    position: relative;
    animation: slideInUp 0.8s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 3rem 2rem 2rem;
    text-align: center;
    position: relative;
}

.login-header::before {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 20px solid var(--primary-color);
}

.brand-logo {
    margin-bottom: 1rem;
}

.brand-logo h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.brand-logo .material-icons {
    font-size: 2.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.login-subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-top: 0.5rem;
}

.login-body {
    padding: 2.5rem 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-control {
    border: 2px solid #e3e6f0;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f8f9fc;
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(134, 169, 61, 0.25);
    background-color: white;
}

.input-group-text {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
    border-radius: 12px 0 0 12px;
}

.btn-login {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    color: white;
    width: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(134, 169, 61, 0.4);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-login:active {
    transform: translateY(0);
}

.btn-toggle-password {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
    border-radius: 0 12px 12px 0;
}

.btn-toggle-password:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.forgot-password-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
}

.forgot-password-link:hover {
    color: var(--primary-color);
    text-decoration: none;
    transform: translateY(-1px);
}

.forgot-password-link:focus {
    color: var(--primary-color);
    text-decoration: none;
    outline: 2px solid rgba(134, 169, 61, 0.3);
    outline-offset: 2px;
    border-radius: 4px;
}

.alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    animation: fadeInDown 0.5s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-danger {
    background-color: rgba(231, 74, 59, 0.1);
    color: #e74a3b;
    border-left: 4px solid #e74a3b;
}

.alert-success {
    background-color: rgba(134, 169, 61, 0.1);
    color: var(--secondary-color);
    border-left: 4px solid var(--secondary-color);
}

.demo-users {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e3e6f0;
}

.demo-users .card {
    border: 2px solid #e3e6f0;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.demo-users .card:hover {
    border-color: var(--secondary-color);
    background-color: rgba(134, 169, 61, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(134, 169, 61, 0.2);
}

.demo-users .card-body {
    padding: 1rem;
}

.is-invalid {
    border-color: #e74a3b !important;
    box-shadow: 0 0 0 0.2rem rgba(231, 74, 59, 0.25) !important;
}

.invalid-feedback {
    color: #e74a3b;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.loading .spinner-border {
    display: inline-block !important;
}

.loading .btn-text {
    opacity: 0.7;
}

.spinner-border {
    display: none;
    width: 1rem;
    height: 1rem;
}

@media (max-width: 576px) {
    .login-card {
        margin: 1rem;
        border-radius: 15px;
    }
    
    .login-header {
        padding: 2rem 1.5rem 1.5rem;
    }
    
    .login-body {
        padding: 2rem 1.5rem;
    }
    
    .brand-logo h2 {
        font-size: 1.8rem;
    }
}

/* Estilos específicos para logo y título */
.logo-container {
    margin-bottom: 1rem;
}

.auth-logo {
    height: 60px;
    width: auto;
    margin-bottom: 1rem;
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 0.5rem;
}

/* Estilos adicionales para otros formularios de auth */
.auth-container {
    background: var(--gradient-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px var(--shadow);
    overflow: hidden;
    width: 100%;
    max-width: 500px;
    position: relative;
    animation: slideInUp 0.8s ease-out;
}

.auth-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 3rem 2rem 2rem;
    text-align: center;
    position: relative;
}

.auth-body {
    padding: 2.5rem 2rem;
}

.auth-header::before {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 20px solid var(--primary-color);
}

.btn-auth {
    background: linear-gradient(135deg, #386c37, #86a93d);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    color: white;
    width: 100%;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(56, 108, 55, 0.4);
    background: linear-gradient(135deg, #2d5129, #386c37);
    color: white;
}

.btn-secondary-auth {
    background: transparent;
    border: 2px solid var(--secondary-color);
    border-radius: 12px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    color: var(--secondary-color);
    width: 100%;
    transition: all 0.3s ease;
}

.btn-secondary-auth:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
}

/* Estilos específicos para botones de registro */
.btn-primary,
button.btn-primary,
#btnEnviarCodigo {
    background: linear-gradient(135deg, #386c37, #86a93d) !important;
    border-color: #386c37 !important;
    color: white !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
button.btn-primary:hover,
button.btn-primary:focus,
button.btn-primary:active,
#btnEnviarCodigo:hover,
#btnEnviarCodigo:focus,
#btnEnviarCodigo:active {
    background: linear-gradient(135deg, #2d5129, #386c37) !important;
    border-color: #2d5129 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(56, 108, 55, 0.4);
}

/* Estilos para enlaces de navegación de autenticación */
.text-center a.text-decoration-none,
.auth-body a.text-decoration-none {
    color: #386c37 !important;
    transition: all 0.3s ease;
}

.text-center a.text-decoration-none:hover,
.auth-body a.text-decoration-none:hover {
    color: #2d5129 !important;
    text-decoration: underline !important;
}

.text-center a.fw-bold,
.auth-body a.fw-bold {
    color: #386c37 !important;
    font-weight: 700 !important;
}

.text-center a.fw-bold:hover,
.auth-body a.fw-bold:hover {
    color: #2d5129 !important;
    text-decoration: underline !important;
}
