/* ===================================
   TEMA MODERNO DARK - SISTEMA MP
   Paleta: Azul Elétrico, Roxo Vibrante, Verde Neon, Laranja Coral
   =================================== */

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Cores Principais */
    --primary: #3B82F6;
    --secondary: #8B5CF6;
    --success: #10B981;
    --accent: #F59E0B;
    
    /* Backgrounds */
    --bg-primary: #0F172A;
    --bg-secondary: #1E293B;
    --bg-card: #334155;
    --bg-input: #1E293B;
    
    /* Textos */
    --text-primary: #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-muted: #64748B;
    
    /* Borders */
    --border-light: #475569;
    --border-dark: #334155;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.15);
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, #0C1426 50%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

/* Efeito de partículas no background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.login-container {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 48px;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    position: relative;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Efeito de borda animada */
.login-container::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(45deg, var(--primary), var(--secondary), var(--success), var(--accent));
    border-radius: 24px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.login-container:hover::before {
    opacity: 0.1;
}

.logo-section {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    width: 88px;
    height: 88px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 32px;
    margin: 0 auto 20px;
    box-shadow: var(--shadow-lg);
    position: relative;
    transition: all 0.3s ease;
}

.logo::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 22px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.logo:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-xl), 0 0 30px rgba(59, 130, 246, 0.3);
}

.logo:hover::before {
    opacity: 0.2;
}

.title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.025em;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 400;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-control {
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-input);
    border: 2px solid var(--border-dark);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1), var(--shadow-md);
    transform: translateY(-1px);
}

.form-control:hover:not(:focus) {
    border-color: var(--border-light);
    background: rgba(30, 41, 59, 0.6);
}

.btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn::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:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 25px rgba(59, 130, 246, 0.4);
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn:disabled:hover::before {
    left: -100%;
}

.error-message {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
    color: #FCA5A5;
    padding: 16px 20px;
    border-radius: 12px;
    margin: 20px 0;
    display: none;
    border: 1px solid rgba(239, 68, 68, 0.2);
    font-weight: 500;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.demo-info {
    margin-top: 32px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    background: rgba(51, 65, 85, 0.4);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--border-dark);
    backdrop-filter: blur(10px);
}

.demo-info strong {
    color: var(--success);
    font-weight: 600;
}

.loading {
    display: none;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsividade */
@media (max-width: 640px) {
    .login-container {
        margin: 20px;
        padding: 32px 24px;
        border-radius: 20px;
    }
    
    .logo {
        width: 72px;
        height: 72px;
        font-size: 28px;
    }
    
    .title {
        font-size: 24px;
    }
    
    .form-control {
        padding: 14px 16px;
    }
    
    .btn {
        padding: 14px 20px;
    }
}

@media (max-width: 480px) {
    .login-container {
        margin: 16px;
        padding: 28px 20px;
    }
}

/* Melhorias de acessibilidade */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Estados de foco para navegação por teclado */
.btn:focus-visible,
.form-control:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Hover states para dispositivos que suportam */
@media (hover: hover) {
    .form-control:hover:not(:focus) {
        border-color: var(--border-light);
    }
}

