/* ========================================
   MODERN LOGIN - TEMA FUTURISTA AZUL
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@300;400;500;600;700&display=swap');

/* Variáveis do Tema Futurista */
:root {
    --primary-blue: #00D4FF;
    --secondary-blue: #0099FF;
    --accent-blue: #0066FF;
    --dark-bg: #0a0a0a;
    --darker-bg: #050505;
    --card-bg: rgba(26, 26, 26, 0.95);
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    --glass-bg: rgba(0, 212, 255, 0.1);
    --glass-border: rgba(0, 212, 255, 0.2);
    --glow-blue: 0 0 20px rgba(0, 212, 255, 0.5);
    --glow-blue-strong: 0 0 30px rgba(0, 212, 255, 0.8);
    --gradient-primary: linear-gradient(135deg, #00D4FF 0%, #0099FF 50%, #0066FF 100%);
    --gradient-secondary: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(0, 153, 255, 0.05) 100%);
    --success-color: #00ff88;
    --warning-color: #ffaa00;
    --danger-color: #ff4444;
    --info-color: #00aaff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--darker-bg) 100%);
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    line-height: 1.6;
}

/* Background Animado */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 212, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(0, 212, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Scrollbar Futurista */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
    box-shadow: var(--glow-blue);
}

::-webkit-scrollbar-thumb:hover {
    box-shadow: var(--glow-blue-strong);
}

/* Sistema de Partículas */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary-blue);
    border-radius: 50%;
    box-shadow: var(--glow-blue);
    animation: float 6s linear infinite;
    opacity: 0.6;
}

@keyframes float {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

/* Container Principal */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 2;
}

/* Painel de Login */
.login-panel {
    display: flex;
    width: 100%;
    max-width: 1200px;
    height: 600px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--glow-blue-strong);
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Seção do Vídeo */
.video-section {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.video-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    z-index: 1;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2;
}

/* Seção do Formulário */
.form-section {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 3;
}

/* Header do Login */
.login-header {
    text-align: center;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeIn 0.8s ease 0.2s forwards;
}

.login-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--glow-blue-strong);
    position: relative;
}

.login-logo::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-primary);
    border-radius: 50%;
    z-index: -1;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.login-logo i {
    font-size: 36px;
    color: white;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.login-title {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.login-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Mensagem de Erro */
.error-message {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--danger-color);
    font-weight: 500;
    opacity: 0;
    animation: fadeIn 0.8s ease 0.4s forwards;
}

.error-message i {
    font-size: 18px;
    flex-shrink: 0;
}

.whatsapp-link {
    margin-left: auto;
    background: #25D366;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.whatsapp-link:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

/* Formulário */
.login-form {
    opacity: 0;
    animation: fadeIn 0.8s ease 0.6s forwards;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0 20px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.input-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-secondary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.input-wrapper:hover::before {
    opacity: 1;
}

.input-wrapper:focus-within {
    border-color: var(--primary-blue);
    box-shadow: var(--glow-blue);
    transform: translateY(-2px);
}

.input-icon {
    font-size: 18px;
    color: var(--text-muted);
    margin-right: 15px;
    transition: color 0.3s ease;
    z-index: 2;
}

.input-wrapper:focus-within .input-icon {
    color: var(--primary-blue);
}

.form-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    padding: 15px 0;
    z-index: 2;
}

.form-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.input-focus-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.input-wrapper:focus-within .input-focus-border {
    width: 100%;
}

/* Password Toggle */
.password-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: var(--primary-blue);
    background: rgba(0, 212, 255, 0.1);
}

/* Estados de Validação */
.input-wrapper.error {
    border-color: var(--danger-color);
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.3);
}

.input-wrapper.success {
    border-color: var(--success-color);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
}

/* Botão de Login */
.login-btn {
    width: 100%;
    background: var(--gradient-primary);
    border: none;
    border-radius: 12px;
    padding: 18px 30px;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
    opacity: 0;
    animation: fadeIn 0.8s ease 0.8s forwards;
}

.login-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;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--glow-blue-strong);
}

.login-btn:active {
    transform: translateY(-1px);
}

.login-btn.loading {
    pointer-events: none;
}

.btn-text, .btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-loading {
    display: none;
}

.login-btn.loading .btn-text {
    display: none;
}

.login-btn.loading .btn-loading {
    display: flex;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 40px;
    opacity: 0;
    animation: fadeIn 0.8s ease 1s forwards;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 0.85rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-blue);
}

.separator {
    color: var(--text-muted);
}

/* Notificações */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 15px 20px;
    color: var(--text-primary);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    box-shadow: var(--glow-blue);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 400px;
}

.notification.show {
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.notification-close:hover {
    color: var(--danger-color);
    background: rgba(255, 68, 68, 0.1);
}

.notification-success {
    border-color: var(--success-color);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
}

.notification-error {
    border-color: var(--danger-color);
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.3);
}

.notification-warning {
    border-color: var(--warning-color);
    box-shadow: 0 0 15px rgba(255, 170, 0, 0.3);
}

.notification-info {
    border-color: var(--info-color);
    box-shadow: 0 0 15px rgba(0, 170, 255, 0.3);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    text-align: center;
    color: var(--text-primary);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--glass-border);
    border-top: 3px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Animações */
@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}

/* Responsividade */
@media (max-width: 1024px) {
    .login-panel {
        max-width: 900px;
        height: 550px;
    }
    
    .form-section {
        padding: 30px;
    }
    
    .login-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .login-panel {
        flex-direction: column;
        height: auto;
        max-width: 500px;
    }
    
    .video-section {
        height: 200px;
        flex: none;
    }
    
    .form-section {
        padding: 30px 25px;
    }
    
    .login-title {
        font-size: 2rem;
    }
    
    .login-logo {
        width: 60px;
        height: 60px;
    }
    
    .login-logo i {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 15px;
    }
    
    .form-section {
        padding: 25px 20px;
    }
    
    .login-title {
        font-size: 1.8rem;
    }
    
    .login-subtitle {
        font-size: 1rem;
    }
    
    .form-input {
        font-size: 16px; /* Evita zoom no iOS */
    }
    
    .notification {
        max-width: calc(100vw - 40px);
        margin: 0 20px;
    }
}

/* Acessibilidade */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --text-primary: #ffffff;
        --text-secondary: #ffffff;
        --text-muted: #ffffff;
        --glass-border: rgba(255, 255, 255, 0.3);
    }
    
    .input-wrapper {
        border-width: 2px;
    }
    
    .login-btn {
        border: 2px solid var(--primary-blue);
    }
}

/* Print styles */
@media print {
    .login-container {
        display: none;
    }
}
