[x-cloak] {
    display: none !important;
}

:root {
    /* Design Tokens (docs/design_system_guide.md) */
    --color-bg:           #0f0f1b;   /* Fundo geral da página */
    --color-surface:      #16162a;   /* Fundo de cards e formulários */
    --color-border:       #23233c;   /* Bordas de inputs e cards */
    
    --color-primary:      #5b3fe8;   /* Roxo Principal */
    --color-primary-dark: #4730c4;   /* Roxo Escuro (Hover) */
    --color-accent:       #7c5cf6;   /* Roxo Claro/Lilás */
    
    --color-text-main:    #ffffff;   /* Texto principal */
    --color-text-muted:   #9ca3af;   /* Texto de apoio */
    
    --color-success:      #10b981;   /* Verde Emerald */
    --color-error:        #ef4444;   /* Vermelho */
    
    --shadow-card:        0 12px 40px rgba(0, 0, 0, 0.35);
    
    /* Legacy Aliases for Seamless Integration */
    --bg-dark:            var(--color-bg);
    --bg-card:            var(--color-surface);
    --bg-card-hover:      #1c1c36;
    
    --primary:            var(--color-primary);
    --primary-hover:      var(--color-primary-dark);
    --primary-glow:       rgba(91, 63, 232, 0.4);
    
    --secondary:          #ec4899;
    --secondary-glow:     rgba(236, 72, 153, 0.4);
    --accent:             var(--color-accent);
    --accent-glow:        rgba(124, 92, 246, 0.4);
    
    --admin-primary:      #3b82f6;
    
    --text-main:          var(--color-text-main);
    --text-muted:         var(--color-text-muted);
    
    --glass-bg:           rgba(22, 22, 42, 0.8);
    --glass-border:       var(--color-border);
    --glass-blur:         16px;
    
    --shadow-sm:          0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md:          0 10px 15px -3px rgba(0, 0, 0, 0.15);
    --shadow-lg:          var(--shadow-card);
    --shadow-neon:        0 0 25px rgba(91, 63, 232, 0.35);
    
    --transition-fast:    0.2s ease;
    --transition-smooth:  0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

/* Accessibility Focus Ring */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Webkit Autofill & Color Scheme Prevention (Seção 4 do Guia) */
input, select, textarea {
    color-scheme: dark;
}

input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
.form-input-custom:-webkit-autofill {
    -webkit-text-fill-color: var(--color-text-main, #ffffff) !important;
    -webkit-box-shadow: 0 0 0px 1000px var(--color-surface, #16162a) inset !important;
    box-shadow: 0 0 0px 1000px var(--color-surface, #16162a) inset !important;
    transition: background-color 500000s ease-in-out 0s !important;
    caret-color: var(--color-text-main, #ffffff) !important;
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text-main);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: radial-gradient(circle at top left, #1a1838, var(--color-bg));
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', 'Space Grotesk', sans-serif;
    letter-spacing: -0.02em;
}

/* Utilities */
.glass-panel {
    background: var(--color-surface);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
    border-radius: 1.5rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.neon-glow {
    box-shadow: var(--shadow-neon);
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Auth Components (Design System Guide) */
[x-cloak] {
    display: none !important;
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-card {
    max-width: 440px;
    width: 100%;
    background: var(--color-surface) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: 24px;
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-card);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-icon-box {
    width: 60px;
    height: 60px;
    background: rgba(91, 63, 232, 0.15);
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.auth-icon {
    font-size: 2.5rem;
    color: var(--color-accent);
}

.auth-title {
    margin: 0;
    color: white;
    font-weight: 800;
    font-size: 1.75rem;
}

.auth-subtitle {
    color: var(--color-text-muted);
    margin: 0.5rem 0 0;
    font-size: 0.95rem;
}

.form-group-custom {
    margin-bottom: 1.5rem;
}

.form-label-custom {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-input-wrapper {
    position: relative;
}

.form-input-icon {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    pointer-events: none;
    font-size: 1.1rem;
}

.form-input-custom {
    width: 100%;
    background: var(--color-bg) !important;
    border: 2px solid var(--color-border) !important;
    color: var(--color-text-main) !important;
    border-radius: 14px;
    padding: 1rem 1rem 1rem 2.8rem;
    font-size: 1rem;
    font-weight: 600;
    outline: none;
    transition: all 0.2s ease;
}

.form-input-custom:focus {
    outline: none;
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 4px rgba(91, 63, 232, 0.18) !important;
    background: var(--color-bg) !important;
}

.auth-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: #ffffff;
    border: none;
    padding: 1.1rem;
    border-radius: 14px;
    font-weight: 800;
    font-size: 1.05rem;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(91, 63, 232, 0.35);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(91, 63, 232, 0.5);
}

.auth-footer-text {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.auth-footer-link {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer-link:hover {
    text-decoration: underline;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
