/* ===== RESET E CONFIGURACOES GLOBAIS ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Cores principais - Modo Dark */
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-card: #2a2a2a;
    --bg-input: #3a3a3a;
    --bg-button: #6366f1;
    --bg-button-hover: #5855eb;
    --bg-success: #10b981;
    --bg-warning: #f59e0b;
    --bg-danger: #ef4444;
    
    /* Cores de texto */
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #888888;
    --text-error: #ef4444;
    --text-success: #10b981;
    
    /* Cores de borda */
    --border-primary: #404040;
    --border-focus: #6366f1;
    --border-light: #555555;
    
    /* Sombras */
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-button: 0 4px 14px 0 rgba(99, 102, 241, 0.3);
    
    /* Transicoes */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Bordas arredondadas */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    
    /* Espacamentos */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

/* ===== CONFIGURACOES GERAIS ===== */
body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
}

/* ===== CONTAINER PRINCIPAL ===== */
.login-container {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-xl);
    width: 100%;
    max-width: 450px;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--bg-button), var(--bg-button-hover));
}

/* ===== HEADER DO LOGIN ===== */
.login-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.logo i {
    font-size: 2.5rem;
    color: var(--bg-button);
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--bg-button));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* ===== FORMULARIO ===== */
.login-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: var(--spacing-md);
    color: var(--text-muted);
    font-size: 1rem;
    z-index: 1;
}

.input-wrapper input {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-md) var(--spacing-md) 3rem;
    background: var(--bg-input);
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition-medium);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

.toggle-password {
    position: absolute;
    right: var(--spacing-md);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

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

.error-message {
    color: var(--text-error);
    font-size: 0.85rem;
    font-weight: 500;
    display: none;
}

.error-message.show {
    display: block;
}

/* ===== OPCOES DO FORMULARIO ===== */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: var(--spacing-sm) 0;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    background: var(--bg-input);
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-sm);
    position: relative;
    transition: all var(--transition-medium);
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark {
    background: var(--bg-button);
    border-color: var(--bg-button);
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-password {
    color: var(--bg-button);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.forgot-password:hover {
    color: var(--bg-button-hover);
    text-decoration: underline;
}

/* ===== BOTAO DE LOGIN ===== */
.login-btn {
    background: var(--bg-button);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
}

.login-btn:hover {
    background: var(--bg-button-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-button);
}

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

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.loading-icon {
    font-size: 0.9rem;
}

/* ===== MENSAGEM DE ERRO GERAL ===== */
.general-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--text-error);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    color: var(--text-error);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

/* ===== FOOTER ===== */
.login-footer {
    text-align: center;
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-primary);
}

.login-footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== ANIMACOES ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.login-container {
    animation: fadeIn 0.6s ease-out;
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 480px) {
    body {
        padding: var(--spacing-sm);
    }
    
    .login-container {
        padding: var(--spacing-lg);
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .logo i {
        font-size: 2rem;
    }
    
    .form-options {
        flex-direction: column;
        gap: var(--spacing-sm);
        align-items: flex-start;
    }
}

/* ===== SCROLLBAR CUSTOMIZATION ===== */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--bg-input);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-primary);
}

/* ===== FOCUS STYLES ===== */
*:focus {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

button:focus,
input:focus {
    outline: none;
}

