:root {
    /* Paleta de Cores Clara e Moderna */
    --primary: #2563eb;       /* Azul Vibrante */
    --primary-light: #eff6ff; /* Azul Muito Claro (Fundo de ícones) */
    --primary-dark: #1e40af;
    
    --secondary: #64748b;     /* Cinza Texto Secundário */
    --bg-body: #f8fafc;       /* Fundo da Página (Quase branco) */
    --bg-card: #ffffff;       /* Fundo dos Cards */
    
    --text-main: #0f172a;     /* Texto Principal (Azul Escuro Profundo) */
    --text-muted: #94a3b8;    /* Texto Suave */
    
    --success: #10b981;
    --success-bg: #ecfdf5;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --purple: #8b5cf6;
    --purple-bg: #f5f3ff;

    /* Dimensões e Efeitos */
    --navbar-height: 70px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-hover: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -2px rgba(0,0,0,0.025);
    
    --font-family: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-family);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    padding-top: var(--navbar-height); /* Espaço para o menu fixo */
}

/* --- TOP NAVBAR --- */
.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--navbar-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.nav-left { display: flex; align-items: center; gap: 2rem; }

.brand-logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.5px;
}
.brand-logo i { color: var(--primary); font-size: 1.4rem; }
.brand-logo span { color: var(--primary); }

.nav-links { display: flex; gap: 5px; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 1rem;
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: all 0.2s;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

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

.nav-item i.fa-chevron-down { font-size: 0.75rem; margin-left: 4px; transition: transform 0.2s; }
.nav-item:hover i.fa-chevron-down { transform: rotate(180deg); }

/* Dropdown Menu */
.dropdown { position: relative; }
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    min-width: 220px;
    box-shadow: var(--shadow-hover);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 0.5rem;
    margin-top: 0.5rem;
    animation: fadeIn 0.2s ease;
}
.dropdown:hover .dropdown-content { display: block; }
.dropdown-content a {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--text-main);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: background 0.2s;
}
.dropdown-content a:hover { background: var(--bg-body); color: var(--primary); }

.nav-right { display: flex; align-items: center; gap: 1.5rem; }

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--success);
    background: var(--success-bg);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid #a7f3d0;
}
.dot { width: 8px; height: 8px; background: currentColor; border-radius: 50%; animation: pulse 2s infinite; }

.icon-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--secondary);
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}
.icon-btn:hover { color: var(--primary); }
.badge-notif {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 10px;
    border: 2px solid var(--bg-body);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 1.5rem;
    border-left: 1px solid #e2e8f0;
}
.avatar {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}
.user-name { font-weight: 600; font-size: 0.95rem; color: var(--text-main); }
.logout-link { color: var(--secondary); text-decoration: none; font-size: 1.1rem; transition: color 0.2s; }
.logout-link:hover { color: var(--danger); }

/* --- MAIN CONTAINER --- */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}
.page-header h1 { font-size: 1.75rem; font-weight: 700; color: var(--text-main); margin-bottom: 0.25rem; }
.page-header p { color: var(--secondary); font-size: 0.95rem; }

.header-actions { display: flex; gap: 1rem; }

.btn-primary, .btn-secondary, .btn-outline {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    border: none;
}

.btn-primary { background: var(--primary); color: white; box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }

.btn-secondary { background: white; color: var(--text-main); border: 1px solid #e2e8f0; }
.btn-secondary:hover { background: var(--bg-body); border-color: var(--secondary); }

.btn-outline { background: transparent; border: 1px dashed #cbd5e1; color: var(--secondary); width: 100%; justify-content: center; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* --- STATS GRID --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: #e2e8f0;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}
.stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon.purple { background: var(--purple-bg); color: var(--purple); }
.stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-icon.orange { background: var(--warning-bg); color: var(--warning); }

.stat-details h3 { font-size: 0.85rem; color: var(--secondary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.5rem; }
.stat-value { font-size: 1.75rem; font-weight: 800; color: var(--text-main); margin-bottom: 0.5rem; }
.stat-value small { font-size: 1rem; font-weight: 500; color: var(--secondary); }

.stat-trend { font-size: 0.85rem; font-weight: 500; display: flex; align-items: center; gap: 4px; }
.stat-trend.up { color: var(--success); }
.stat-trend.neutral { color: var(--secondary); }

.stat-chart-mini { height: 30px; margin-top: 1rem; opacity: 0.5; }
.sparkline { width: 100%; height: 100%; }

.progress-bar-bg {
    width: 100%;
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    margin-top: 1rem;
    overflow: hidden;
}
.progress-bar-fill { height: 100%; border-radius: 3px; transition: width 1s ease-in-out; }

/* --- CONTENT SPLIT (Table + Side) --- */
.content-split {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.card-large {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid #f1f5f9;
    padding: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.card-header h3 { font-size: 1.1rem; font-weight: 700; color: var(--text-main); }
.link-action { color: var(--primary); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.link-action:hover { text-decoration: underline; }

/* Table Styles */
.table-responsive { overflow-x: auto; }
.modern-table { width: 100%; border-collapse: collapse; }
.modern-table th {
    text-align: left;
    padding: 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--secondary);
    font-weight: 700;
    border-bottom: 1px solid #e2e8f0;
}
.modern-table td {
    padding: 1rem;
    font-size: 0.9rem;
    color: var(--text-main);
    border-bottom: 1px solid #f8fafc;
    vertical-align: middle;
}
.modern-table tr:last-child td { border-bottom: none; }
.modern-table tr:hover td { background: #f8fafc; }

.event-cell { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.text-success { color: var(--success); }
.text-primary { color: var(--primary); }
.text-warning { color: var(--warning); }

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }

/* Side Info Widget */
.info-group { margin-bottom: 2rem; }
.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}
.info-row:last-child { border-bottom: none; }
.info-row .label { color: var(--secondary); font-size: 0.9rem; }
.info-row .value { font-weight: 600; color: var(--text-main); font-size: 0.9rem; }

.storage-widget {
    background: #f8fafc;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}
.storage-header { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-weight: 600; font-size: 0.9rem; }
.helper-text { font-size: 0.8rem; color: var(--secondary); margin-top: 0.5rem; }
.mt-2 { margin-top: 0.5rem; }
.full-width { width: 100%; }

/* Animations */
@keyframes pulse {
    0% { opacity: 1; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { opacity: 1; box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Responsive */
@media (max-width: 1024px) {
    .content-split { grid-template-columns: 1fr; }
    .nav-links { display: none; } /* Em produção, adicionar menu hambúrguer */
.clickable-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: #3498db;
}
.clickable-card .stat-trend i {
    opacity: 0;
    transition: opacity 0.2s;
}
.clickable-card:hover .stat-trend i {
    opacity: 1;
}    
   
