:root {
    --grad-1: #667eea;
    --grad-2: #764ba2;
    --grad-3: #f093fb;
    --brand: #7c3aed;
    --brand-light: #a78bfa;
    --accent: #f5576c;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --glass-bg: rgba(255, 255, 255, 0.18);
    --glass-border: rgba(255, 255, 255, 0.25);
    --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.18);
}

* { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--grad-1) 0%, var(--grad-2) 50%, var(--grad-3) 100%);
    background-attachment: fixed;
    color: #1f2937;
}

body { padding-bottom: 90px; }

.bg-app {
    background: linear-gradient(135deg, var(--grad-1) 0%, var(--grad-2) 50%, var(--grad-3) 100%);
    background-attachment: fixed;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.glass-strong {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.18);
}

.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 24px rgba(31, 38, 135, 0.1);
    border-radius: 1.25rem;
}

.header-glass {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 -4px 20px rgba(31, 38, 135, 0.1);
}

.text-gradient {
    background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.text-gradient-purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.btn-brand {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
    color: white;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}
.btn-brand:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(124, 58, 237, 0.45); }
.btn-brand:active { transform: translateY(0); }

.btn-success { background: linear-gradient(135deg, #10b981 0%, #059669 100%); color: white; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35); }
.btn-success:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(16, 185, 129, 0.45); }

.btn-danger { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); color: white; box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35); }
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(239, 68, 68, 0.45); }

.btn-warning { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); color: white; box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35); }

.btn-info { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); color: white; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35); }

.btn-teal { background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%); color: white; box-shadow: 0 4px 12px rgba(20, 184, 166, 0.35); }

.btn-gradient-pink {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
    transition: all 0.3s ease;
}
.btn-gradient-pink:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(245, 87, 108, 0.5); }

.input-glass {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: #1f2937;
    transition: all 0.25s ease;
}
.input-glass:focus {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--brand);
    outline: none;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.modal-overlay {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 20px 60px rgba(31, 38, 135, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 1.25rem;
}

.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}
.blob-1 { width: 400px; height: 400px; background: #f093fb; top: -150px; left: -150px; }
.blob-2 { width: 500px; height: 500px; background: #4facfe; bottom: -200px; right: -200px; }
.blob-3 { width: 350px; height: 350px; background: #a78bfa; top: 40%; right: 10%; opacity: 0.25; }

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 24px rgba(31, 38, 135, 0.08);
    border-radius: 1.25rem;
    transition: all 0.3s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15); }

.icon-circle-brand {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.logo-icon {
    background: transparent;
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.45);
    overflow: hidden;
    padding: 0;
}
.logo-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }

@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}
.pulse-ring { animation: pulse-ring 2s infinite; }

.icon-circle-success { background: linear-gradient(135deg, #10b981 0%, #059669 100%); box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3); }
.icon-circle-danger { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3); }
.icon-circle-warning { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3); }
.icon-circle-info { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3); }
.icon-circle-teal { background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%); box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3); }

.badge-brand { background: rgba(124, 58, 237, 0.15); color: #6d28d9; }
.badge-success { background: rgba(16, 185, 129, 0.15); color: #047857; }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: #b91c1c; }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #b45309; }

.progress-bar-track { background: rgba(0, 0, 0, 0.08); }
.progress-bar-fill { background: linear-gradient(90deg, var(--brand) 0%, var(--accent) 100%); transition: width 0.5s ease; }

.action-chip {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 8px rgba(31, 38, 135, 0.08);
    transition: all 0.2s ease;
}
.action-chip:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(31, 38, 135, 0.15); }

.divider-soft { border-top: 1px solid rgba(0, 0, 0, 0.06); }

@media (max-width: 640px) {
    .blob { filter: blur(60px); }
    .blob-1, .blob-2 { width: 280px; height: 280px; }
}

.scroll-thin::-webkit-scrollbar { width: 6px; height: 6px; }
.scroll-thin::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 3px; }
.scroll-thin::-webkit-scrollbar-track { background: transparent; }

/* ==========================================================================
   MODO ESCURO PROFISSIONAL (DARK MODE)
   ========================================================================== */
html.dark {
    color-scheme: dark;
}

html.dark, html.dark body {
    background: linear-gradient(135deg, #0b0f19 0%, #111827 50%, #1e1b4b 100%) !important;
    background-attachment: fixed !important;
    color: #f1f5f9 !important;
}

html.dark .header-glass {
    background: rgba(15, 23, 42, 0.82) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

html.dark .nav-glass {
    background: rgba(15, 23, 42, 0.88) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5) !important;
}

html.dark .glass-card,
html.dark .stat-card {
    background: rgba(30, 41, 59, 0.78) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
}

html.dark .glass-strong {
    background: rgba(30, 41, 59, 0.92) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

html.dark .modal-card {
    background: rgba(15, 23, 42, 0.96) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #f8fafc !important;
}

html.dark .bg-white {
    background-color: #1e293b !important;
}

html.dark .bg-gray-50,
html.dark .bg-gray-50\/50,
html.dark .bg-gray-50\/70 {
    background-color: #0f172a !important;
}

html.dark .bg-gray-100 {
    background-color: #334155 !important;
}

html.dark .bg-white\/70,
html.dark .bg-white\/80,
html.dark .bg-white\/90 {
    background-color: rgba(30, 41, 59, 0.8) !important;
}

html.dark .text-gray-900,
html.dark .text-gray-800,
html.dark .text-gray-700 {
    color: #f8fafc !important;
}

html.dark .text-gray-600,
html.dark .text-gray-500 {
    color: #94a3b8 !important;
}

html.dark .text-gray-400 {
    color: #64748b !important;
}

html.dark .text-slate-600 {
    color: #cbd5e1 !important;
}

html.dark .border-gray-100,
html.dark .border-gray-200,
html.dark .border-white\/60,
html.dark .divider-soft {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

html.dark .divide-gray-100 > :not([hidden]) ~ :not([hidden]) {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

html.dark input,
html.dark select,
html.dark textarea,
html.dark .input-glass {
    background: rgba(15, 23, 42, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #f8fafc !important;
}

html.dark input::placeholder,
html.dark textarea::placeholder {
    color: #64748b !important;
}

html.dark input[type="month"],
html.dark input[type="date"] {
    color-scheme: dark !important;
}

html.dark .action-chip {
    background: rgba(30, 41, 59, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #e2e8f0 !important;
}

html.dark .progress-bar-track {
    background: rgba(255, 255, 255, 0.1) !important;
}

html.dark .hover\:bg-gray-50:hover,
html.dark .hover\:bg-gray-100:hover {
    background-color: rgba(51, 65, 85, 0.6) !important;
}

html.dark .hover\:bg-purple-100\/70:hover {
    background-color: rgba(124, 58, 237, 0.25) !important;
}

html.dark .bg-purple-50,
html.dark .bg-purple-50\/70 {
    background-color: rgba(124, 58, 237, 0.15) !important;
    border-color: rgba(124, 58, 237, 0.3) !important;
}

html.dark .bg-red-50,
html.dark .bg-red-50\/80 {
    background-color: rgba(239, 68, 68, 0.15) !important;
}

html.dark .scroll-thin::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2) !important;
}