/*
 * Plataforma Dames - Stylesheet Principal
 * Tema: RD Campo e Capital (Premium Navy & Gold)
 * Estilo: Apex Dashboard Style Overhaul (Fidelidade Absoluta)
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    /* Tema Escuro Premium (Apex Dashboard Style) */
    --bg-primary: #07080b;       /* Azul-escuro cósmico profundo */
    --bg-secondary: #0b0c12;     /* Sidebar ultra-escura azulada */
    --bg-card: rgba(16, 18, 28, 0.7); /* Card translúcido ardósia */
    --input-bg: rgba(10, 11, 18, 0.6); /* Input escuro translúcido */
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;   /* Slate 300 - Alta Legibilidade no Escuro */
    --text-muted: #94a3b8;       /* Slate 400 - Alta Legibilidade no Escuro */
    --border-color: rgba(255, 255, 255, 0.05); /* Borda fina de vidro */
    
    --accent-color: #e2a82b;     /* Ouro RD refinado */
    --accent-hover: #c99320;
    --accent-bg: rgba(226, 168, 43, 0.08);
    
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 75px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --border-radius-card: 14px;
    --border-radius-btn: 8px;
}

[data-theme="light"] {
    /* Tema Claro Premium (Apex Dashboard Light Style) */
    --bg-primary: #f6f8fb;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.8);
    --input-bg: rgba(241, 245, 249, 0.8);
    
    --text-primary: #0f172a;
    --text-secondary: #334155;   /* Slate 700 - Alta Legibilidade no Claro */
    --text-muted: #64748b;       /* Slate 500 - Alta Legibilidade no Claro */
    --border-color: rgba(0, 0, 0, 0.06);
    
    --accent-color: #b37d14;
    --accent-hover: #9c6c0f;
    --accent-bg: rgba(179, 125, 20, 0.08);
    
    --shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.04);
}

/* Global corrections for elements with inline white text styles in Light Mode */
[data-theme="light"] .main-content [style*="color: #fff"],
[data-theme="light"] .main-content [style*="color:#fff"],
[data-theme="light"] .main-content [style*="color: #ffffff"],
[data-theme="light"] .main-content [style*="color:#ffffff"] {
    color: var(--text-primary) !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: var(--transition);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

/* =====================================================
 * ESTRUTURA E LAYOUT
 * ===================================================== */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Estilo Apex */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--bg-secondary) 0%, #030405 100%);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: var(--transition);
}

[data-theme="light"] .sidebar {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, #f1f5f9 100%);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.005);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-container i, .logo-container img {
    transition: var(--transition);
    animation: logo-pulse 3s infinite ease-in-out;
}

@keyframes logo-pulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 4px rgba(226, 168, 43, 0.3));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 12px rgba(226, 168, 43, 0.65));
    }
}

.logo-text {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    background: linear-gradient(135deg, #ffffff 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .logo-text {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar.collapsed .logo-text {
    display: none;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Custom Scrollbar for Sidebar Navigation */
.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

[data-theme="light"] .sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.18);
}

/* Sidebar Group Headers */
.sidebar-group-header {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 24px 14px 10px;
    display: flex;
    align-items: center;
}

.sidebar-group-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    margin-left: 10px;
}

[data-theme="light"] .sidebar-group-header::after {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0) 100%);
}

.sidebar.collapsed .sidebar-group-header {
    display: none;
}

/* Menu Items (Apex Premium Style) */
.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.92rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.nav-item:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .nav-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Indicator Vertical Line on Active */
.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 25%;
    height: 50%;
    width: 3px;
    background-color: var(--accent-color);
    border-radius: 0 4px 4px 0;
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.nav-item.active::before {
    transform: scaleY(1);
    box-shadow: 0 0 10px var(--accent-color);
}

.nav-item.active {
    color: var(--accent-color);
    background: linear-gradient(90deg, rgba(226, 168, 43, 0.08) 0%, rgba(226, 168, 43, 0.01) 100%);
    font-weight: 600;
}

[data-theme="light"] .nav-item.active {
    background: linear-gradient(90deg, rgba(179, 125, 20, 0.08) 0%, rgba(179, 125, 20, 0.01) 100%);
}

.nav-item svg, .nav-item i {
    font-size: 1.05rem;
    color: var(--text-secondary);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover svg, .nav-item:hover i {
    color: var(--text-primary);
    transform: translateX(3px);
}

.nav-item.active svg, .nav-item.active i {
    color: var(--accent-color);
    filter: drop-shadow(0 0 5px rgba(226, 168, 43, 0.45));
}

.sidebar.collapsed .nav-text {
    display: none;
}

/* Submenu */
.submenu-container {
    display: flex;
    flex-direction: column;
}

.submenu-items {
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.submenu-container.open .submenu-items {
    max-height: 300px;
    margin-top: 6px;
    margin-bottom: 8px;
}

.submenu-item {
    position: relative;
    padding: 8px 12px 8px 26px;
    font-size: 0.88rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.submenu-item::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    width: 6px;
    height: 6px;
    background-color: var(--text-muted);
    border-radius: 50%;
    transform: translateY(-50%) scale(0.8);
    transition: all 0.25s ease;
    opacity: 0.4;
}

.submenu-item:hover::before {
    background-color: var(--accent-color);
    transform: translateY(-50%) scale(1.2);
    box-shadow: 0 0 8px var(--accent-color);
    opacity: 0.85;
}

.submenu-item.active::before {
    background-color: var(--accent-color);
    transform: translateY(-50%) scale(1.3);
    box-shadow: 0 0 10px var(--accent-color), 0 0 20px var(--accent-color);
    opacity: 1;
}

.submenu-item:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.015);
    padding-left: 29px;
}

[data-theme="light"] .submenu-item:hover {
    background-color: rgba(0, 0, 0, 0.015);
}

.submenu-item.active {
    color: var(--accent-color);
    font-weight: 600;
    background-color: rgba(226, 168, 43, 0.04);
}

[data-theme="light"] .submenu-item.active {
    background-color: rgba(179, 125, 20, 0.04);
}

/* Main Workspace */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: var(--transition);
}

.main-content.expanded {
    margin-left: var(--sidebar-collapsed-width);
}

/* Header */
.top-header {
    height: 70px;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.toggle-sidebar-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.toggle-sidebar-btn:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.03);
}

[data-theme="light"] .toggle-sidebar-btn:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.theme-toggle-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

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

.user-profile-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    font-family: 'Outfit', sans-serif;
}

.user-info-text {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.8rem;
    font-weight: 600;
}

.user-role {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.content-body {
    padding: 32px;
    flex: 1;
}

/* =====================================================
 * CARDS & CONTAINERS (Premium Card Design)
 * ===================================================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    box-shadow: 0 12px 36px 0 rgba(0, 0, 0, 0.55), 0 0 20px 0 rgba(226, 168, 43, 0.05);
    border-color: rgba(226, 168, 43, 0.25);
    transform: translateY(-2px);
}

[data-theme="light"] .card:hover {
    box-shadow: 0 12px 36px 0 rgba(0, 0, 0, 0.06), 0 0 20px 0 rgba(179, 125, 20, 0.03);
    border-color: rgba(179, 125, 20, 0.25);
    transform: translateY(-2px);
}

.card-title {
    font-size: 1.08rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* =====================================================
 * STATS CARDS (Fidelidade Absoluta ao Estilo Apex)
 * ===================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 165px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

/* Hover Glows Coloridos Customizados */
.stat-card-gold:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.65), 0 4px 14px -4px rgba(226, 168, 43, 0.25);
    border-color: rgba(226, 168, 43, 0.45);
}
.stat-card-green:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.65), 0 4px 14px -4px rgba(16, 185, 129, 0.25);
    border-color: rgba(16, 185, 129, 0.45);
}
.stat-card-red:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.65), 0 4px 14px -4px rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.45);
}
.stat-card-blue:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.65), 0 4px 14px -4px rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.45);
}

[data-theme="light"] .stat-card-gold:hover {
    box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.12), 0 4px 14px -4px rgba(179, 125, 20, 0.12);
    border-color: rgba(179, 125, 20, 0.45);
}
[data-theme="light"] .stat-card-green:hover {
    box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.12), 0 4px 14px -4px rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.45);
}
[data-theme="light"] .stat-card-red:hover {
    box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.12), 0 4px 14px -4px rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.45);
}
[data-theme="light"] .stat-card-blue:hover {
    box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.12), 0 4px 14px -4px rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.45);
}

.stat-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-label i {
    font-size: 1rem;
    color: var(--accent-color);
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.5px;
}

.stat-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* =====================================================
 * TABELAS DE ALTA FIDELIDADE (Sem cards internos)
 * ===================================================== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-primary);
    text-align: left;
}

.table th, .table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.table th {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.015);
}

[data-theme="light"] .table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.015);
}

/* =====================================================
 * BOTÕES E INPUTS PREMIUM
 * ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--border-radius-btn);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #111;
    font-weight: 700;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: rgba(148, 163, 184, 0.08);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background-color: rgba(148, 163, 184, 0.15);
}

.btn-outline {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background-color: var(--accent-bg);
}

/* Checkboxes Customizados (Hollow yellow circles) */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    vertical-align: middle;
    position: relative;
}
input[type="checkbox"]:checked {
    background-color: transparent;
}
input[type="checkbox"]:checked::before {
    content: '';
    width: 8px;
    height: 8px;
    background-color: var(--accent-color);
    border-radius: 50%;
    display: block;
}

/* Inputs de Formulários */
.filter-input, .filter-select {
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: var(--border-radius-btn);
    font-size: 0.8rem;
    outline: none;
    min-width: 160px;
    transition: var(--transition);
}

.filter-input:focus, .filter-select:focus {
    border-color: var(--accent-color);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-success { background-color: rgba(16, 185, 129, 0.1); color: var(--success); }
.badge-danger { background-color: rgba(239, 68, 68, 0.1); color: var(--danger); }
.badge-warning { background-color: rgba(245, 158, 11, 0.1); color: var(--warning); }
.badge-info { background-color: rgba(59, 130, 246, 0.1); color: var(--info); }

/* =====================================================
 * KANBAN DO CRM
 * ===================================================== */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    align-items: start;
}

.kanban-column {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 520px;
}

.kanban-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    border-bottom: 1.5px solid var(--border-color);
}

.kanban-column-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.kanban-count-badge {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 600;
}

.kanban-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 400px;
}

.kanban-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px;
    cursor: grab;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kanban-card:hover {
    transform: translateY(-2px);
    border-color: rgba(226, 168, 43, 0.3);
    box-shadow: var(--shadow);
}

.card-lead-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-lead-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* =====================================================
 * FILTROS & FORMULÁRIOS
 * ===================================================== */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 14px;
    border-radius: var(--border-radius-card);
    margin-bottom: 24px;
}

/* Form inputs */
.form-input {
    width: 100%;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-btn);
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 0.85rem;
    transition: var(--transition);
}

.form-input:focus {
    border-color: var(--accent-color);
}

/* =====================================================
 * FLASH MESSAGES
 * ===================================================== */
.flash-message {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
    padding: 14px 22px;
    border-radius: 8px;
    color: #fff;
    font-weight: 500;
    font-size: 0.85rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.25s ease-out;
    display: flex;
    align-items: center;
    gap: 10px;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.flash-success { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.flash-error { background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%); }
.flash-warning { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.flash-info { background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%); }

/* =====================================================
 * TIMELINE DE ATIVIDADES E ELEMENTOS PREMIUM DASHBOARD
 * ===================================================== */
.activity-timeline {
    position: relative;
    padding-left: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 10px;
}

.activity-timeline::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background-color: var(--border-color);
}

.timeline-item {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timeline-badge {
    position: absolute;
    left: -24px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--bg-card);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    z-index: 1;
    transition: var(--transition);
}

.timeline-badge.success { border-color: var(--success); color: var(--success); background-color: rgba(16, 185, 129, 0.1); }
.timeline-badge.info { border-color: var(--info); color: var(--info); background-color: rgba(59, 130, 246, 0.1); }
.timeline-badge.warning { border-color: var(--warning); color: var(--warning); background-color: rgba(245, 158, 11, 0.1); }
.timeline-badge.danger { border-color: var(--danger); color: var(--danger); background-color: rgba(239, 68, 68, 0.1); }

.timeline-item:hover .timeline-badge {
    transform: scale(1.2);
    box-shadow: 0 0 8px currentColor;
}

.timeline-content {
    padding-left: 12px;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
    flex-wrap: wrap;
    gap: 5px;
}

.timeline-header strong {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 600;
}

.timeline-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.timeline-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Status Dots */
.status-dot-container {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
}

.status-dot-pulsing {
    position: relative;
}

.status-dot-pulsing::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    top: 0;
    left: 0;
    animation: pulse-dot 1.8s infinite ease-in-out;
    opacity: 0.7;
}

@keyframes pulse-dot {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(2.8); opacity: 0; }
}

/* Apex Tooltip custom matches style */
.apexcharts-canvas {
    font-family: 'Inter', sans-serif !important;
}

.apexcharts-tooltip {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow) !important;
    color: var(--text-primary) !important;
}

.apexcharts-tooltip-title {
    background: rgba(255, 255, 255, 0.02) !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-theme="light"] .apexcharts-tooltip {
    background: #ffffff !important;
    color: #0f172a !important;
}

/* =====================================================
 * WIDGET DE PERFIL DE USUÁRIO (SIDEBAR FOOTER)
 * ===================================================== */
.sidebar-user-widget {
    margin: auto 14px 14px 14px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-radius: 12px;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

[data-theme="light"] .sidebar-user-widget {
    background: rgba(0, 0, 0, 0.02);
}

.user-widget-info {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    flex: 1;
}

.user-widget-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(226, 168, 43, 0.25);
    transition: var(--transition);
}

.user-widget-text {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-widget-name {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-widget-role {
    font-size: 0.74rem;
    color: var(--text-muted);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-widget-logout {
    color: var(--danger);
    font-size: 0.95rem;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    background: rgba(239, 68, 68, 0.04);
    border: 1px solid rgba(239, 68, 68, 0.08);
}

.user-widget-logout:hover {
    background: rgba(239, 68, 68, 0.12);
    transform: scale(1.05);
}

/* Comportamento da Sidebar Colapsada */
.sidebar.collapsed .sidebar-user-widget {
    margin: auto 0 0 0;
    padding: 16px 0;
    border: none;
    border-top: 1px solid var(--border-color);
    border-radius: 0;
    background: transparent;
    justify-content: center;
    backdrop-filter: none;
}

.sidebar.collapsed .user-widget-text,
.sidebar.collapsed .user-widget-logout {
    display: none !important;
}

.sidebar.collapsed .user-widget-info {
    justify-content: center;
    flex: none;
}

/* =====================================================
 * CUSTOM SCROLLBARS GLOBIAS
 * ===================================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(226, 168, 43, 0.3);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
    border: 2px solid var(--bg-primary);
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(179, 125, 20, 0.3);
}

/* =====================================================
 * BLOBS DE LUZ DECORATIVOS DE FUNDO
 * ===================================================== */
.glow-blob-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.glow-blob-1, .glow-blob-2 {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.03;
    pointer-events: none;
}

.glow-blob-1 {
    background-color: var(--accent-color);
    top: -100px;
    right: -100px;
    animation: blob-float-1 25s infinite ease-in-out alternate;
}

.glow-blob-2 {
    background-color: var(--info);
    bottom: -150px;
    left: -150px;
    animation: blob-float-2 30s infinite ease-in-out alternate;
}

[data-theme="light"] .glow-blob-1, [data-theme="light"] .glow-blob-2 {
    opacity: 0.015;
}

@keyframes blob-float-1 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-80px, 80px) scale(1.1); }
    100% { transform: translate(40px, -40px) scale(0.9); }
}

@keyframes blob-float-2 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(90px, -90px) scale(0.95); }
    100% { transform: translate(-50px, 50px) scale(1.05); }
}

/* =====================================================
 * TÍTULOS PREMIUM COM GRADIENTES DE TEXTO
 * ===================================================== */
.content-body h2 {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.content-body h2 i {
    -webkit-text-fill-color: var(--accent-color);
}

[data-theme="light"] .content-body h2 {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

/* =====================================================
 * SHIMMER SKELETON LOADER ANIMATION
 * ===================================================== */
.shimmer-effect {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.08) 37%, rgba(255, 255, 255, 0.03) 63%);
    background-size: 400px 100%;
    animation: shimmer-load 1.4s ease infinite;
}

[data-theme="light"] .shimmer-effect {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.03) 25%, rgba(0, 0, 0, 0.08) 37%, rgba(0, 0, 0, 0.03) 63%);
    background-size: 400px 100%;
}

@keyframes shimmer-load {
    0% { background-position: -200px 0; }
    100% { background-position: 200px 0; }
}

.shimmer-bar {
    height: 12px;
    border-radius: 4px;
    margin-bottom: 10px;
}

/* =====================================================
 * COLLAPSIBLE SIDEBAR GROUPS
 * ===================================================== */
.sidebar-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 2px;
}

.sidebar-group-header {
    cursor: pointer !important;
    transition: all 0.2s ease;
    user-select: none;
}

.sidebar-group-header:hover {
    color: var(--text-primary) !important;
    background-color: rgba(255, 255, 255, 0.02);
}

.sidebar-group-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, margin 0.25s ease;
    padding-left: 6px;
}

.sidebar-group.open .sidebar-group-items {
    max-height: 600px;
    opacity: 1;
    margin-top: 4px;
    margin-bottom: 8px;
}

.sidebar-group.open .group-toggle-icon {
    transform: rotate(180deg);
}

.group-toggle-icon {
    margin-left: auto;
    font-size: 0.72rem;
    color: var(--text-muted);
    transition: transform 0.25s ease, color 0.2s ease;
}

.sidebar-group-header:hover .group-toggle-icon {
    color: var(--text-primary);
}

.sidebar.collapsed .sidebar-group-items {
    display: none !important;
}
.sidebar.collapsed .group-toggle-icon {
    display: none !important;
}
