/**
 * Estilos para la vista de inicio de sesión
 *
 * @see views/auth/modern-login.php
 */

:root {
    --primary-color: #0d6efd;
    --primary-dark: #0b5ed7;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa;
    padding-top: 76px;
    /* Para compensar el navbar fixed */
}

.auth-container {
    width: 100%;
    max-width: 800px;
    max-height: calc(100vh - 30px);
    overflow-y: auto;
}

.auth-card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    overflow-y: auto;
}

/* Layout en dos columnas para pantallas grandes */
@media (min-width: 768px) {
    .auth-card {
        padding: 40px 60px;
    }

    .auth-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 40px;
        align-items: start;
        height: fit-content;
    }

    .auth-left {
        padding-right: 20px;
    }

    .auth-right {
        padding-left: 20px;
        border-left: 1px solid #e9ecef;
    }

    .logo-container {
        grid-column: 1 / -1;
        margin-bottom: 20px;
    }

    .section-header {
        grid-column: 1 / -1;
        margin-bottom: 20px;
    }

    /* Compactar elementos para PC */
    .logo {
        width: 240px;
        height: 72px;
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    .auth-title {
        font-size: 1.3rem;
        margin-bottom: 3px;
    }

    .auth-subtitle {
        font-size: 0.8rem;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 5px;
    }

    .section-description {
        font-size: 0.9rem;
    }
}

.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    width: 300px;
    height: 90px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.logo img {
    filter: none !important;
    opacity: 1 !important;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.auth-subtitle {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 0;
}

.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.section-description {
    color: var(--secondary-color);
    font-size: 1rem;
}

.form-floating>.form-control {
    border-radius: 12px;
    border: 2px solid #e9ecef;
    padding: 1rem 0.75rem;
    height: calc(3rem + 2px);
    transition: all 0.3s ease;
}

.form-text {
    font-size: 0.8rem;
    margin-bottom: 15px !important;
}

.divider {
    text-align: center;
    margin: 15px 0;
    position: relative;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

/* Compactar en pantallas grandes */
@media (min-width: 768px) {
    .form-text {
        font-size: 0.75rem;
        margin-bottom: 10px !important;
    }

    .divider {
        margin: 10px 0;
    }

    .auth-footer {
        margin-top: 15px;
        padding-top: 10px;
    }

    .footer-links {
        margin-top: 8px;
    }
}

.form-floating>.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.1);
}

.form-floating>label {
    padding: 1rem 0.75rem;
    color: var(--secondary-color);
}

.input-group-text {
    background: transparent;
    border: 2px solid #e9ecef;
    border-right: none;
    border-radius: 12px 0 0 12px;
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 12px 12px 0;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 1rem;
    height: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 110, 253, 0.4);
}

.btn-outline-secondary {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 600;
    height: 50px;
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-1px);
}

.test-users-panel {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border: 2px solid #e1bee7;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
}

.test-user-btn {
    background: white;
    border: 2px solid #ce93d8;
    border-radius: 10px;
    padding: 8px 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: block;
    width: 100%;
    text-align: left;
    margin-bottom: 8px;
}

.test-user-btn:last-child {
    margin-bottom: 0;
}

.test-user-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(106, 27, 154, 0.2);
    border-color: #9c27b0;
}

.test-user-name {
    font-weight: 600;
    color: #6a1b9a;
    font-size: 0.85rem;
}

.test-user-email {
    color: #7b1fa2;
    font-size: 0.75rem;
    opacity: 0.8;
}

.info-panel {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f8ff 100%);
    border: 1px solid #e3f2fd;
    border-radius: 12px;
    padding: 15px;
}

.info-panel h6 {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.info-panel ul li {
    font-size: 0.8rem;
    line-height: 1.4;
    margin-bottom: 6px;
}

.info-panel ul li:last-child {
    margin-bottom: 0;
}

.divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e9ecef;
}

.divider-text {
    background: white;
    padding: 0 15px;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.auth-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.footer-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--primary-color);
}

.alert {
    border-radius: 12px;
    border: none;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.alert-danger {
    background: linear-gradient(135deg, #ffe6e6 0%, #ffeded 100%);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    z-index: 10;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--success-color);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-size: 0.9rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 576px) {
    .auth-card {
        padding: 30px 20px;
        margin: 10px;
        border-radius: 15px;
    }

    .logo {
        width: 200px;
        height: 60px;
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .test-users-panel {
        padding: 15px;
    }
}

/* Modo alto contraste */
@media (prefers-contrast: high) {
    .auth-card {
        border: 2px solid var(--dark-color);
    }

    .form-floating>.form-control {
        border-width: 2px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
