/* Numaker Ultra-Modern Login System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
@import url('https://cdn.jsdelivr.net/npm/sweetalert2@11.7.32/dist/sweetalert2.min.css');

/* Reset e configurações globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #022891;
    --secondary-blue: #0066ff;
    --accent-blue: #4285f4;
    --dark-bg: #0a0a0a;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-muted: rgba(255, 255, 255, 0.6);
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
}

/* Body e estrutura principal */
body.login_admin,
body.clients_login {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--primary-blue) 50%, var(--dark-bg) 100%);
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Fundo animado com partículas */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(2, 40, 145, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 102, 255, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(66, 133, 244, 0.2) 0%, transparent 50%);
    animation: backgroundFloat 20s ease-in-out infinite;
    z-index: -2;
}

@keyframes backgroundFloat {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.8; }
    50% { transform: scale(1.1) rotate(180deg); opacity: 1; }
}

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

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-blue);
    border-radius: 50%;
    animation: floatParticle 15s linear infinite;
    opacity: 0;
}

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

/* Container principal com layout lateral */
.numaker-login-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 10;
}

/* Lado esquerdo - Formulário */
.login-form-side {
    flex: 1;
    max-width: 500px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.login-form-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.02) 50%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

/* Lado direito - Visual/Imagem */
.login-visual-side {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-visual-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(10px, 10px); }
}

/* Logo e branding */
.numaker-logo {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
}

.numaker-logo img {
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
}

.numaker-logo img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.4));
}

/* Título e subtítulo */
.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 2;
}

.login-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.login-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.5;
}

/* Container do formulário */
.login-form-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.login-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-blue), var(--secondary-blue));
    border-radius: 20px 20px 0 0;
}

/* Grupos de formulário */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group.focused .form-control {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

/* Labels */
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

/* Inputs */
.form-control {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
    transform: translateY(-2px);
}

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

/* Botões */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 52px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-blue) 100%);
    color: var(--text-primary);
    box-shadow: 0 8px 16px rgba(2, 40, 145, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(2, 40, 145, 0.4);
}

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

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--glass-bg);
    border-color: var(--accent-blue);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
    margin-bottom: 1rem;
}

/* Loading state */
.btn-loading {
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Checkbox customizado */
.checkbox-container {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    cursor: pointer;
}

.checkbox-input {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--glass-border);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    margin-right: 0.75rem;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkbox-input:checked {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
}

.checkbox-input:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
}

/* Links */
.form-link {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.form-link:hover {
    color: var(--secondary-blue);
    text-decoration: underline;
}

/* Alertas */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: none;
    font-weight: 500;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border-left: 4px solid #ef4444;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
    border-left: 4px solid #10b981;
}

/* Visual side content */
.visual-content {
    text-align: center;
    color: var(--text-primary);
    position: relative;
    z-index: 2;
    max-width: 400px;
    padding: 2rem;
}

.visual-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.visual-subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.visual-features {
    list-style: none;
    text-align: left;
}

.visual-features li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 2rem;
}

.visual-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 20px;
    height: 20px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Responsividade */
@media (max-width: 768px) {
    .numaker-login-container {
        flex-direction: column;
    }
    
    .login-visual-side {
        order: -1;
        min-height: 200px;
        flex: none;
    }
    
    .login-form-side {
        max-width: none;
        padding: 1.5rem;
    }
    
    .login-form-container {
        padding: 1.5rem;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
    
    .visual-title {
        font-size: 1.75rem;
    }
    
    .visual-content {
        padding: 1rem;
    }
    
    .visual-features {
        display: none;
    }
}

@media (max-width: 480px) {
    .login-form-side {
        padding: 1rem;
    }
    
    .login-form-container {
        padding: 1rem;
    }
    
    .numaker-logo img {
        max-width: 140px;
    }
}

/* Animações de entrada */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.login-form-side {
    animation: slideInLeft 0.8s ease-out;
}

.login-visual-side {
    animation: slideInRight 0.8s ease-out;
}

/* Efeitos especiais */
.glow-effect {
    position: relative;
}

.glow-effect::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-blue), var(--accent-blue), var(--secondary-blue));
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glow-effect:hover::after {
    opacity: 0.7;
}

/* Customização do SweetAlert2 */
.swal2-popup {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 20px !important;
    color: var(--text-primary) !important;
}

.swal2-title {
    color: var(--text-primary) !important;
}

.swal2-content {
    color: var(--text-secondary) !important;
}

.swal2-confirm {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-blue) 100%) !important;
    border: none !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
}

/* Seletor de idioma */
.language-selector {
    margin-bottom: 1.5rem;
}

.language-selector select {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    width: 100%;
    font-size: 1rem;
}

.language-selector select:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.1);
}

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.login-footer strong {
    color: var(--text-primary);
}

