/* ===================================
   LOGIN PAGE - DASHBOARD THEME
   Design: Glassmorphism + Dark Background
   Colors: Matching dashboard.css
   =================================== */

:root {
  --bg-main: #0e1320;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-glow: rgba(59, 130, 246, 0.35);
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    
    /* Fondo más claro y elegante */
    background: linear-gradient(
                    135deg, 
                    rgba(25, 35, 55, 0.75), 
                    rgba(30, 45, 70, 0.70), 
                    rgba(40, 60, 90, 0.75)
                ),
                url('../img/loginback.jpg') 
                center/cover no-repeat fixed;
}

/* Efecto de partículas flotantes con colores del dashboard */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(96, 165, 250, 0.06) 0%, transparent 50%);
    animation: particleFloat 15s ease-in-out infinite;
    pointer-events: none;
}

@keyframes particleFloat {
    0%, 100% { transform: translateY(0px); opacity: 0.6; }
    50% { transform: translateY(-20px); opacity: 0.9; }
}

/* ===================================
   LOGIN CONTAINER
   =================================== */

.login-container {
    width: 100%;
    max-width: 480px;
    padding: 20px;
    position: relative;
    z-index: 1;
    animation: slideIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   GLASSMORPHISM CARD
   =================================== */

.login-card {
    background: rgba(26, 31, 46, 0.75);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(59, 130, 246, 0.15),
        0 0 40px rgba(59, 130, 246, 0.1);
    position: relative;
    overflow: hidden;
}

/* Efecto de brillo superior */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(59, 130, 246, 0.6), 
        transparent);
}

/* ===================================
   LOGO & HEADER
   =================================== */

.logo-circle {
    width: 90px;
    height: 90px;
    margin: 0 auto;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 8px 24px var(--accent-glow),
        0 0 0 8px rgba(59, 130, 246, 0.15);
    animation: pulse 3s ease-in-out infinite;
}

.logo-circle i {
    font-size: 42px;
    color: #fff;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.5px;
}

.login-subtitle {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* ===================================
   FORM ELEMENTS
   =================================== */

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 10px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.form-label i {
    color: var(--accent);
    font-size: 13px;
}

.form-control-glass {
    background: rgba(30, 37, 55, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 15px;
    color: var(--text-main);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.form-control-glass::placeholder {
    color: var(--text-muted);
}

.form-control-glass:focus {
    background: rgba(30, 37, 55, 0.8);
    border-color: var(--accent);
    box-shadow: 
        0 0 0 3px var(--accent-glow),
        0 4px 12px rgba(0, 0, 0, 0.25);
    color: var(--text-main);
    outline: none;
}

.form-control-glass:focus::placeholder {
    color: rgba(156, 163, 175, 0.6);
}

/* ===================================
   BUTTON
   =================================== */

.btn-primary-custom {
    background: linear-gradient(135deg, var(--accent), #60a5fa);
    border: none;
    border-radius: 12px;
    padding: 15px 32px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 15px var(--accent-glow),
        0 1px 3px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    transition: left 0.5s;
}

.btn-primary-custom:hover::before {
    left: 100%;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 24px rgba(59, 130, 246, 0.6),
        0 2px 6px rgba(0, 0, 0, 0.3);
}

.btn-primary-custom:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 8px var(--accent-glow),
        0 1px 2px rgba(0, 0, 0, 0.25);
}

/* ===================================
   ALERT
   =================================== */

.alert-custom {
    background: rgba(220, 53, 69, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(220, 53, 69, 0.5);
    border-radius: 12px;
    padding: 12px 18px;
    color: #fecaca;
    font-size: 14px;
    margin-bottom: 20px;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

/* ===================================
   FOOTER
   =================================== */

.footer-text {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.footer-text i {
    color: var(--accent);
    font-size: 12px;
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 576px) {
    .login-container {
        padding: 15px;
    }
    
    .login-card {
        padding: 36px 28px;
        border-radius: 20px;
    }
    
    .logo-circle {
        width: 75px;
        height: 75px;
    }
    
    .logo-circle i {
        font-size: 36px;
    }
    
    .login-title {
        font-size: 24px;
    }
    
    .login-subtitle {
        font-size: 13px;
    }
}

/* ===================================
   AUTOFILL STYLING
   =================================== */

.form-control-glass:-webkit-autofill,
.form-control-glass:-webkit-autofill:hover,
.form-control-glass:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-main);
    -webkit-box-shadow: 0 0 0 1000px rgba(30, 37, 55, 0.8) inset;
    transition: background-color 5000s ease-in-out 0s;
}
