/* ============================================
   LOGIN PAGE STYLES - Sistema Escolar Ecuador
   ============================================ */

/* Variables CSS */
:root {
    --primary-color: #4e73df;
    --primary-dark: #3a5bc7;
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --danger-color: #e74a3b;
    --warning-color: #f6c23e;
    --info-color: #36b9cc;
    
    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-blue: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    --gradient-purple: linear-gradient(135deg, #5e72e4 0%, #825ee4 100%);
    
    /* Sombras */
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    
    /* Transiciones */
    --transition-base: all 0.3s ease;
}

/* Reset y configuración global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    background: #f8f9fc;
}

/* ============================================
   PARTICLES BACKGROUND
   ============================================ */

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    background: var(--gradient-primary);
}

/* ============================================
   LOGIN CONTAINER
   ============================================ */

.login-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    z-index: 10;
}

/* ============================================
   LEFT SIDE - INFO SECTION
   ============================================ */

.left-side {
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.left-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

.info-content {
    position: relative;
    z-index: 2;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.logo-section {
    animation: fadeInUp 0.8s ease;
}

.logo-section i {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.features {
    animation: fadeInUp 1s ease 0.2s both;
}

.feature-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    transition: var(--transition-base);
}

.feature-item:hover {
    transform: translateX(10px);
    color: #fff;
}

.feature-item i {
    font-size: 24px;
    margin-right: 15px;
    color: #1cc88a;
}

/* ============================================
   RIGHT SIDE - FORM SECTION
   ============================================ */

.right-side {
    background: #f8f9fc;
    padding: 30px;
}

.login-form-wrapper {
    width: 100%;
    max-width: 500px;
    animation: fadeInRight 0.8s ease;
}

.mobile-logo {
    animation: fadeInDown 0.8s ease;
}

/* ============================================
   LOGIN CARD
   ============================================ */

.login-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    animation: fadeInUp 1s ease 0.3s both;
}

.login-card .card-body {
    background: white;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

.form-label {
    color: #5a5c69;
    font-size: 14px;
    margin-bottom: 8px;
}

.form-control {
    border-radius: 8px;
    border: 1px solid #d1d3e2;
    padding: 12px 15px;
    font-size: 15px;
    transition: var(--transition-base);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.input-group-text {
    border-radius: 8px 0 0 8px;
    background: #f8f9fc;
    border: 1px solid #d1d3e2;
    border-right: none;
}

.input-group .form-control {
    border-radius: 0;
}

.input-group .btn {
    border-radius: 0 8px 8px 0;
}

/* Toggle Password Button */
#togglePassword {
    background: #f8f9fc;
    border: 1px solid #d1d3e2;
    cursor: pointer;
    transition: var(--transition-base);
}

#togglePassword:hover {
    background: #eaecf4;
}

#togglePassword i {
    transition: var(--transition-base);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 500;
    font-size: 15px;
    transition: var(--transition-base);
    border: none;
}

.btn-primary {
    background: var(--gradient-blue);
    color: white;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition-base);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Loading State */
.btn-primary.loading {
    pointer-events: none;
    opacity: 0.8;
}

/* Quick Access Buttons */
.quick-access {
    padding: 12px 8px;
    border: 2px solid #e3e6f0;
    background: white;
    color: #5a5c69;
    transition: var(--transition-base);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.quick-access i {
    font-size: 20px;
    margin-bottom: 3px;
}

.quick-access:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #f8f9fc;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.quick-access:active {
    transform: translateY(0);
}

/* ============================================
   FORM CHECK (Checkbox)
   ============================================ */

.form-check-input {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid #d1d3e2;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    cursor: pointer;
    user-select: none;
    font-size: 14px;
}

/* ============================================
   DIVIDER
   ============================================ */

.divider {
    position: relative;
    text-align: center;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e3e6f0;
}

.divider-text {
    position: relative;
    display: inline-block;
    padding: 0 20px;
    background: white;
    font-size: 13px;
    font-weight: 500;
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
    border-radius: 8px;
    border: none;
    padding: 15px 20px;
    font-size: 14px;
    animation: slideInDown 0.5s ease;
}

.alert-danger {
    background: rgba(231, 74, 59, 0.1);
    color: #e74a3b;
    border-left: 4px solid #e74a3b;
}

.alert-success {
    background: rgba(28, 200, 138, 0.1);
    color: #1cc88a;
    border-left: 4px solid #1cc88a;
}

.alert i {
    font-size: 16px;
}

/* ============================================
   LINKS
   ============================================ */

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-base);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablets */
@media (max-width: 991px) {
    .info-content {
        padding: 40px;
    }
    
    .feature-item {
        font-size: 14px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .right-side {
        padding: 20px;
    }
    
    .login-card .card-body {
        padding: 30px !important;
    }
    
    .mobile-logo {
        margin-bottom: 30px;
    }
    
    .quick-access {
        padding: 10px 5px;
        font-size: 12px;
    }
    
    .quick-access i {
        font-size: 18px;
    }
}

@media (max-width: 576px) {
    .login-card .card-body {
        padding: 25px !important;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    h2 {
        font-size: 24px;
    }
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ============================================
   UTILITIES
   ============================================ */

.text-white-50 {
    color: rgba(255, 255, 255, 0.5) !important;
}

.fw-semibold {
    font-weight: 600 !important;
}

/* Focus visible para accesibilidad */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Preloader (opcional) */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.preloader.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    #particles-js,
    .left-side {
        display: none;
    }
    
    .login-container {
        min-height: auto;
    }
}