@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;14..32,400;14..32,500;14..32,600;14..32,700;14..32,800&display=swap');

:root {
    --primary: #d4af37;
    --primary-dark: #b8942b;
    --primary-light: #f0d77a;
    --primary-glow: rgba(212, 175, 55, 0.3);
    
    --dark: #0a0c15;
    --dark-card: #111827;
    --gray: #1f2937;
    --gray-light: #374151;
    --gray-lighter: #4b5563;
    
    --text: #f3f4f6;
    --text-muted: #9ca3af;
    --text-light: #d1d5db;
    
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --success: #10b981;
    --success-dark: #059669;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    --border: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.05);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
    --shadow-gold: 0 0 20px rgba(212, 175, 55, 0.2);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background: url('../img/fondo.jpg') no-repeat center center fixed;
    background-size: cover;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    padding: 0;
    height: 100vh;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 12, 21, 0.85) 0%, rgba(15, 17, 24, 0.9) 50%, rgba(17, 24, 39, 0.95) 100%);
    z-index: 0;
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(212, 175, 55, 0.03) 0%, transparent 50%),
        repeating-linear-gradient(45deg, transparent, transparent 40px, rgba(212, 175, 55, 0.01) 40px, rgba(212, 175, 55, 0.01) 80px);
    pointer-events: none;
    z-index: 1;
}

.login-outer {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    z-index: 2;
}

.login-box {
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(212, 175, 55, 0.15);
    max-width: 420px;
    width: 100%;
    transition: var(--transition);
}

.login-box:hover {
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 30px rgba(212, 175, 55, 0.25);
    transform: translateY(-2px);
}

.login-box .display-1 {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.3));
}

.login-box h2 {
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--text), var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.login-box .text-white-50 {
    color: var(--text-muted) !important;
}

.form-label {
    color: var(--text);
    font-weight: 500;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.form-label i {
    color: var(--primary);
    margin-right: 0.5rem;
}

.form-control {
    background-color: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
    padding: 0.7rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-control:focus {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    color: var(--text);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-muted);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    font-weight: 600;
    padding: 0.75rem;
    transition: var(--transition);
    width: 100%;
    color: var(--dark);
    border-radius: 0.75rem;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.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;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
    color: var(--dark);
}

.btn-primary:active {
    transform: translateY(0);
}

.login-box a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.3s ease;
}

.login-box a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.login-box hr {
    border-color: var(--border);
    margin: 1.25rem 0;
}

/* Alertas */
.alert {
    border-radius: 0.75rem;
    border: none;
    padding: 0.875rem 1.25rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(5, 150, 105, 0.9));
    color: white;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(220, 38, 38, 0.9));
    color: white;
}

.alert-danger ul {
    color: white;
    padding-left: 1.25rem;
    margin-bottom: 0;
}

.alert .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.alert .btn-close:hover {
    opacity: 1;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Responsive */
@media (max-width: 576px) {
    .login-box {
        padding: 2rem 1.5rem;
        margin: 1rem;
        border-radius: 1.25rem;
    }
    
    .login-box .display-1 {
        font-size: 2.75rem;
    }
    
    .login-box h2 {
        font-size: 1.5rem;
    }
    
    .form-control {
        padding: 0.6rem 0.875rem;
    }
    
    .btn-primary {
        padding: 0.6rem;
    }
}