/**
 * Sistema de Temas - Canal Bem Viver Saúde
 * Light Mode e Dark Mode com suporte a:
 * - Escolha manual do usuário
 * - Tema automático baseado no dispositivo
 * - Tema automático por horário
 * 
 * Prioridade: Manual → Horário → Dispositivo → Padrão (Light)
 */

/* ============================================
   VARIÁVEIS DO TEMA LIGHT (Padrão)
   ============================================ */
:root,
[data-theme="light"] {
    /* Cores de Fundo */
    --bg-primary: #f6fbff; /* leve tom azulado, não branco puro */
    --bg-secondary: #eef6ff;
    --bg-tertiary: #eef9ff;
    --bg-elevated: #ffffff;
    
    /* Cores de Superfície */
    --surface-1: #ffffff;
    --surface-2: #f6fbff;
    --surface-3: #eef6ff;
    --surface-4: #e6f0ff;
    
    /* Glass Effect Light */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-bg-hover: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(2, 6, 23, 0.06);
    --glass-border-hover: rgba(2, 6, 23, 0.1);
    
    /* Cores Primárias (paleta azul, alinhada com index) */
    --primary: #3b82f6; /* azul vivo */
    --primary-light: #60a5fa;
    --primary-dark: #1e40af;
    --primary-bg: rgba(59, 130, 246, 0.08);
    
    /* Cores Secundárias */
    --secondary: #06b6d4;
    --secondary-light: #22d3ee;
    --secondary-dark: #0891b2;
    
    /* Cores de Destaque */
    --accent: #ec4899;
    --accent-light: #f472b6;
    --accent-dark: #db2777;
    
    /* Cores de Status */
    --success: #10b981;
    --success-light: #34d399;
    --success-bg: rgba(16, 185, 129, 0.1);
    --warning: #f59e0b;
    --warning-light: #fbbf24;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --error: #ef4444;
    --error-light: #f87171;
    --error-bg: rgba(239, 68, 68, 0.1);
    --info: #06b6d4;
    --info-light: #22d3ee;
    --info-bg: rgba(6, 182, 212, 0.1);
    
    /* Texto */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;
    --text-link: #6366f1;
    --text-link-hover: #4f46e5;
    
    /* Bordas */
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --border-dark: #94a3b8;
    --border-focus: #6366f1;
    
    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #60a5fa 50%, #06b6d4 100%);
    --gradient-secondary: linear-gradient(135deg, rgba(59,130,246,0.25) 0%, rgba(14,165,233,0.18) 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --gradient-surface: linear-gradient(180deg, #f6fbff 0%, #eef6ff 100%);
    --gradient-mesh: 
        radial-gradient(at 40% 20%, rgba(59, 130, 246, 0.08) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgba(14, 165, 233, 0.06) 0px, transparent 50%),
        radial-gradient(at 0% 50%, rgba(6, 182, 212, 0.04) 0px, transparent 50%);
    
    /* Sombras */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.2);
    --shadow-glow-success: 0 0 20px rgba(16, 185, 129, 0.2);
    --shadow-glow-error: 0 0 20px rgba(239, 68, 68, 0.2);
    
    /* Input */
    --input-bg: #ffffff;
    --input-border: #e2e8f0;
    --input-border-focus: #6366f1;
    --input-placeholder: #94a3b8;
    
    /* Componentes Específicos */
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.08);
    --modal-bg: #ffffff;
    --modal-overlay: rgba(0, 0, 0, 0.5);
    --tooltip-bg: #1e293b;
    --tooltip-text: #ffffff;
    --dropdown-bg: #ffffff;
    --dropdown-hover: #f1f5f9;
    --table-header-bg: #f8fafc;
    --table-row-hover: #f1f5f9;
    --table-border: #e2e8f0;
    --sidebar-bg: #ffffff;
    --sidebar-hover: #f1f5f9;
    --navbar-bg: rgba(255, 255, 255, 0.9);
    
    /* Scrollbar */
    --scrollbar-track: #f1f5f9;
    --scrollbar-thumb: #cbd5e1;
    --scrollbar-thumb-hover: #94a3b8;
    
    /* Misc */
    --overlay-light: rgba(255, 255, 255, 0.8);
    --overlay-dark: rgba(0, 0, 0, 0.5);
    --divider: #e2e8f0;
    --skeleton-base: #e2e8f0;
    --skeleton-shine: #f8fafc;
    
    /* Transições */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-theme: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Bordas arredondadas */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50px;
    --radius-circle: 50%;
    
    /* Z-index */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;
    --z-toast: 800;
}

/* ============================================
   VARIÁVEIS DO TEMA DARK
   ============================================ */
[data-theme="dark"] {
    /* Cores de Fundo (azulado) */
    --bg-primary: #07132a; /* alinhado com index */
    --bg-secondary: #081628;
    --bg-tertiary: #0f233d;
    --bg-elevated: #0f2540;
    
    /* Cores de Superfície */
    --surface-1: #1a1a3e;
    --surface-2: #252550;
    --surface-3: #2f2f6a;
    --surface-4: #3a3a7a;
    
    /* Glass Effect Dark */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-bg-hover: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-border-hover: rgba(255, 255, 255, 0.2);
    
    /* Cores Primárias (mais vibrantes no dark) */
    --primary: #818cf8;
    --primary-light: #a5b4fc;
    --primary-dark: #6366f1;
    --primary-bg: rgba(129, 140, 248, 0.15);
    
    /* Cores Secundárias */
    --secondary: #a78bfa;
    --secondary-light: #c4b5fd;
    --secondary-dark: #8b5cf6;
    
    /* Cores de Destaque */
    --accent: #f472b6;
    --accent-light: #f9a8d4;
    --accent-dark: #ec4899;
    
    /* Cores de Status */
    --success: #34d399;
    --success-light: #6ee7b7;
    --success-bg: rgba(52, 211, 153, 0.15);
    --warning: #fbbf24;
    --warning-light: #fcd34d;
    --warning-bg: rgba(251, 191, 36, 0.15);
    --error: #f87171;
    --error-light: #fca5a5;
    --error-bg: rgba(248, 113, 113, 0.15);
    --info: #22d3ee;
    --info-light: #67e8f9;
    --info-bg: rgba(34, 211, 238, 0.15);
    
    /* Texto */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --text-inverse: #0f0f23;
    --text-link: #818cf8;
    --text-link-hover: #a5b4fc;
    
    /* Bordas */
    --border-light: rgba(255, 255, 255, 0.1);
    --border-medium: rgba(255, 255, 255, 0.15);
    --border-dark: rgba(255, 255, 255, 0.2);
    --border-focus: #818cf8;
    
    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    --gradient-secondary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --gradient-surface: linear-gradient(180deg, #1a1a3e 0%, #0f0f23 100%);
    --gradient-mesh: 
        radial-gradient(at 40% 20%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgba(139, 92, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 0% 50%, rgba(236, 72, 153, 0.1) 0px, transparent 50%),
        radial-gradient(at 80% 50%, rgba(6, 182, 212, 0.1) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(99, 102, 241, 0.1) 0px, transparent 50%);
    
    /* Sombras */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 60px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.3);
    --shadow-glow-success: 0 0 30px rgba(52, 211, 153, 0.3);
    --shadow-glow-error: 0 0 30px rgba(248, 113, 113, 0.3);
    
    /* Input */
    --input-bg: rgba(255, 255, 255, 0.05);
    --input-border: rgba(255, 255, 255, 0.1);
    --input-border-focus: #818cf8;
    --input-placeholder: rgba(255, 255, 255, 0.4);
    
    /* Componentes Específicos */
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --modal-bg: #1a1a3e;
    --modal-overlay: rgba(0, 0, 0, 0.7);
    --tooltip-bg: #ffffff;
    --tooltip-text: #0f0f23;
    --dropdown-bg: #1a1a3e;
    --dropdown-hover: rgba(255, 255, 255, 0.1);
    --table-header-bg: rgba(255, 255, 255, 0.05);
    --table-row-hover: rgba(255, 255, 255, 0.08);
    --table-border: rgba(255, 255, 255, 0.1);
    --sidebar-bg: #0f0f23;
    --sidebar-hover: rgba(255, 255, 255, 0.1);
    --navbar-bg: rgba(15, 15, 35, 0.9);
    
    /* Scrollbar */
    --scrollbar-track: #1a1a3e;
    --scrollbar-thumb: #3a3a7a;
    --scrollbar-thumb-hover: #4a4a8a;
    
    /* Misc */
    --overlay-light: rgba(255, 255, 255, 0.1);
    --overlay-dark: rgba(0, 0, 0, 0.7);
    --divider: rgba(255, 255, 255, 0.1);
    --skeleton-base: #252550;
    --skeleton-shine: #3a3a7a;
}

/* ============================================
   TRANSIÇÕES SUAVES ENTRE TEMAS
   ============================================ */
html {
    scroll-behavior: smooth;
}

html.theme-transition,
html.theme-transition *,
html.theme-transition *::before,
html.theme-transition *::after {
    transition: 
        background-color var(--transition-theme),
        border-color var(--transition-theme),
        color var(--transition-theme),
        fill var(--transition-theme),
        stroke var(--transition-theme),
        box-shadow var(--transition-theme),
        opacity var(--transition-theme) !important;
}

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

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background com Mesh Gradient */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-mesh);
    pointer-events: none;
    z-index: 0;
}

/* Container Principal */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* ============================================
   COMPONENTES BASE
   ============================================ */

/* Links */
a {
    color: var(--text-link);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--text-link-hover);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    line-height: 1.3;
}

/* Paragraphs */
p {
    color: var(--text-secondary);
}

/* ============================================
   CARDS
   ============================================ */
.card,
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition-normal);
}

[data-theme="dark"] .card,
[data-theme="dark"] .glass-card {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.card:hover,
.glass-card:hover {
    border-color: var(--glass-border-hover);
    box-shadow: var(--shadow-md);
}

/* ============================================
   BOTÕES
   ============================================ */
.btn,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-inverse);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background: var(--glass-bg-hover);
    border-color: var(--border-medium);
}

.btn-success {
    background: var(--gradient-success);
    color: white;
}

.btn-danger {
    background: var(--error);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* ============================================
   FORMULÁRIOS
   ============================================ */
input,
textarea,
select {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

input::placeholder,
textarea::placeholder {
    color: var(--input-placeholder);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--input-border-focus);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* ============================================
   TABELAS
   ============================================ */
table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: var(--table-header-bg);
    color: var(--text-primary);
    font-weight: 600;
    text-align: left;
    padding: 1rem;
    border-bottom: 1px solid var(--table-border);
}

td {
    padding: 1rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--table-border);
}

tr:hover td {
    background: var(--table-row-hover);
}

/* ============================================
   MODAIS
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--modal-overlay);
    backdrop-filter: blur(4px);
    z-index: var(--z-modal-backdrop);
}

.modal {
    background: var(--modal-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

/* ============================================
   BADGES E TAGS
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: var(--radius-full);
}

.badge-primary {
    background: var(--primary-bg);
    color: var(--primary);
}

.badge-success {
    background: var(--success-bg);
    color: var(--success);
}

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning);
}

.badge-error {
    background: var(--error-bg);
    color: var(--error);
}

.badge-info {
    background: var(--info-bg);
    color: var(--info);
}

/* ============================================
   ALERTS E TOASTS
   ============================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-success {
    background: var(--success-bg);
    border: 1px solid var(--success);
    color: var(--success);
}

.alert-warning {
    background: var(--warning-bg);
    border: 1px solid var(--warning);
    color: var(--warning);
}

.alert-error {
    background: var(--error-bg);
    border: 1px solid var(--error);
    color: var(--error);
}

.alert-info {
    background: var(--info-bg);
    border: 1px solid var(--info);
    color: var(--info);
}

/* ============================================
   DROPDOWN
   ============================================ */
.dropdown-menu {
    background: var(--dropdown-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.dropdown-item {
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--dropdown-hover);
    color: var(--text-primary);
}

/* ============================================
   SIDEBAR / NAVIGATION
   ============================================ */
.sidebar {
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-light);
}

.sidebar-item {
    padding: 0.875rem 1rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition-fast);
}

.sidebar-item:hover,
.sidebar-item.active {
    background: var(--sidebar-hover);
    color: var(--text-primary);
}

.sidebar-item.active {
    color: var(--primary);
    border-left: 3px solid var(--primary);
}

/* ============================================
   NAVBAR / HEADER
   ============================================ */
.header,
.navbar-container {
    background: var(--navbar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: var(--radius-full);
}

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

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

/* ============================================
   SKELETON LOADING
   ============================================ */
.skeleton {
    background: var(--skeleton-base);
    background-image: linear-gradient(
        90deg,
        var(--skeleton-base) 0px,
        var(--skeleton-shine) 50%,
        var(--skeleton-base) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ============================================
   DIVIDERS
   ============================================ */
.divider {
    height: 1px;
    background: var(--divider);
    margin: 1.5rem 0;
}

.divider-vertical {
    width: 1px;
    height: 100%;
    background: var(--divider);
}

/* ============================================
   TOOLTIPS
   ============================================ */
.tooltip {
    background: var(--tooltip-bg);
    color: var(--tooltip-text);
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
}

/* ============================================
   TOGGLE DE TEMA
   ============================================ */
.theme-toggle {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-normal);
}

.theme-toggle:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
}

.theme-toggle-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.theme-toggle-btn:hover {
    color: var(--text-primary);
    background: var(--glass-bg);
}

.theme-toggle-btn.active {
    color: var(--primary);
    background: var(--primary-bg);
}

.theme-toggle-btn i {
    font-size: 1.1rem;
}

/* Theme Toggle Slider */
.theme-switch {
    position: relative;
    width: 60px;
    height: 32px;
    background: var(--surface-3);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-normal);
    border: 1px solid var(--border-light);
}

.theme-switch::before {
    content: '';
    position: absolute;
    width: 26px;
    height: 26px;
    top: 2px;
    left: 2px;
    background: white;
    border-radius: 50%;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .theme-switch {
    background: var(--primary);
}

[data-theme="dark"] .theme-switch::before {
    transform: translateX(28px);
}

/* Icon inside switch */
.theme-switch .icon-sun,
.theme-switch .icon-moon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.theme-switch .icon-sun {
    left: 8px;
    color: #fbbf24;
    opacity: 1;
}

.theme-switch .icon-moon {
    right: 8px;
    color: #94a3b8;
    opacity: 0.5;
}

[data-theme="dark"] .theme-switch .icon-sun {
    opacity: 0.5;
}

[data-theme="dark"] .theme-switch .icon-moon {
    color: white;
    opacity: 1;
}

/* ============================================
   PAINEL DE CONFIGURAÇÕES DE TEMA
   ============================================ */
.theme-settings-panel {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: var(--z-popover);
}

.theme-settings-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    transition: var(--transition-normal);
}

.theme-settings-toggle:hover {
    transform: scale(1.1);
}

.theme-settings-dropdown {
    position: absolute;
    bottom: 60px;
    right: 0;
    width: 280px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 1rem;
    display: none;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.theme-settings-dropdown.active {
    display: block;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.theme-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--divider);
}

.theme-settings-header h4 {
    font-size: 0.95rem;
    font-weight: 600;
}

.theme-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
}

.theme-option:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
}

.theme-option.selected {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.theme-option-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.theme-option-info i {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.theme-option.selected .theme-option-info i {
    color: var(--primary);
}

.theme-option-label {
    font-size: 0.9rem;
    font-weight: 500;
}

.theme-option-check {
    color: var(--primary);
    opacity: 0;
    transition: var(--transition-fast);
}

.theme-option.selected .theme-option-check {
    opacity: 1;
}

/* ============================================
   ORBES ANIMADOS (Background Decoration)
   ============================================ */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

[data-theme="light"] .orb {
    opacity: 0.15;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    right: -100px;
    animation: float-orb 20s ease-in-out infinite;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary);
    bottom: -50px;
    left: -50px;
    animation: float-orb 25s ease-in-out infinite reverse;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: var(--accent);
    top: 50%;
    left: 50%;
    animation: float-orb 30s ease-in-out infinite;
}

@keyframes float-orb {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(50px, -50px) scale(1.1);
    }
    50% {
        transform: translate(-30px, 30px) scale(0.9);
    }
    75% {
        transform: translate(-50px, -30px) scale(1.05);
    }
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */
@media (max-width: 768px) {
    .theme-settings-dropdown {
        width: calc(100vw - 40px);
        right: -10px;
    }
    
    .theme-toggle-btn {
        width: 36px;
        height: 36px;
    }
}

/* ============================================
   UTILITÁRIOS
   ============================================ */
.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-error { color: var(--error) !important; }
.text-info { color: var(--info) !important; }

.bg-primary { background-color: var(--bg-primary) !important; }
.bg-secondary { background-color: var(--bg-secondary) !important; }
.bg-surface { background-color: var(--surface-1) !important; }
.bg-card { background-color: var(--card-bg) !important; }

.border-light { border-color: var(--border-light) !important; }
.border-medium { border-color: var(--border-medium) !important; }

/* Print styles */
@media print {
    body {
        background: white !important;
        color: black !important;
    }
    
    .orb,
    .theme-settings-panel {
        display: none !important;
    }
}
