/* =========================================================
   estilo.css — UI neutra para o painel Social Analytics
   - Paleta cinza com acento azul discreto
   - Sem gradientes fortes, foco em legibilidade
   - Compatível com as classes existentes do seu HTML
   ========================================================= */

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }

:root{
  /* Cores neutras */
  --bg:            #f5f6f8;
  --bg-soft:       #eef1f4;
  --card:          #ffffff;
  --border:        #e5e7eb;
  --shadow-sm:     0 2px 8px rgba(17, 24, 39, .06);
  --shadow:        0 12px 32px rgba(17, 24, 39, .08);

  --text:          #1f2937; /* cinza-900 */
  --text-soft:     #475569; /* cinza-700 */
  --muted:         #6b7280; /* cinza-500 */

  /* Acento discreto */
  --accent:        #2563eb; /* azul-600 */
  --accent-600:    #1d4ed8; /* azul-700 */
  --accent-soft:   #e8eefc;

  /* Estados */
  --success:       #16a34a;
  --danger:        #ef4444;
  --neutral:       #6b7280;

  /* Dimensões */
  --sidebar-w:     280px;
  --radius:        12px;
}

body{
  margin: 0;
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

/* =========================================================
   SIDEBAR
   ========================================================= */
.sidebar{
  position: fixed; inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: #fafafa;
  color: var(--text);
  border-right: 1px solid var(--border);
  z-index: 1000;
  box-shadow: none;
}

.sidebar-header{
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
}

.logo-icon{
  width: 40px; height: 40px; border-radius: 8px;
  display: inline-grid; place-items: center;
  margin-right: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 700;
}

.sidebar-title{ font-size: 20px; font-weight: 700; margin: 0; color: var(--text); }
.sidebar-subtitle{ font-size: 13px; color: var(--muted); margin-top: 4px; }

.nav-menu{ list-style: none; padding: 8px 0 16px; margin: 0; }
.nav-item{ margin: 0; }

.nav-link{
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px;
  color: var(--text-soft);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.nav-link:hover{
  background: #f3f4f6;
  color: var(--text);
}
.nav-link.active{
  background: #eef2ff;
  color: var(--accent-600);
  border-left-color: var(--accent);
}

.nav-icon{
  width: 22px; height: 22px; display: grid; place-items: center;
  color: var(--text-soft);
}
.nav-text{ font-weight: 600; font-size: 14px; }

/* Mobile Sidebar */
.mobile-toggle{
  display: none;
  position: fixed; top: 16px; left: 16px; z-index: 1001;
  width: 46px; height: 46px; border-radius: 10px;
  border: 1px solid var(--border); background: #fff; color: var(--text);
  cursor: pointer;
}
.sidebar-overlay{
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 999; display: none;
}

/* =========================================================
   MAIN / CONTAINER / HEADER
   ========================================================= */
.main-content{ margin-left: var(--sidebar-w); min-height: 100vh; }
.container{ max-width: 1400px; margin: 0 auto; padding: 20px; }

.header{
  background: #ffffff;
  color: var(--text);
  padding: 22px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}
.header h1{ font-size: 26px; margin: 0 0 8px; }
.header-nav{ display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.header-nav a{
  color: var(--text-soft);
  text-decoration: none;
  padding: 6px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.header-nav a:hover{
  background: var(--accent-soft);
  border-color: #c7d2fe;
  color: var(--accent-600);
}

/* =========================================================
   STATS
   ========================================================= */
.stats-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card{
  background: var(--card);
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.stat-value{ font-size: 26px; font-weight: 800; color: var(--text); }
.stat-label{ color: var(--muted); font-size: 13px; }

/* =========================================================
   FORM / BUSCA
   ========================================================= */
.search-form{
  background: var(--card);
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}
.search-form h2{ color: var(--text); margin-bottom: 14px; font-size: 18px; }

.form-grid{
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
.form-group{ position: relative; }
.form-group label{
  display: block; margin-bottom: 6px; color: var(--text-soft); font-weight: 600; font-size: 13px;
}
.form-group input,
.form-group select{
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  background: #fff; color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-group input:focus,
.form-group select:focus{
  outline: none;
  border-color: #c7d2fe;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

/* Autocomplete */
.autocomplete-container{ position: relative; }
.autocomplete-suggestions{
  position: absolute; top: 100%; left: 0; right: 0;
  background: #fff; border: 1px solid var(--border); border-top: none;
  border-radius: 0 0 10px 10px; max-height: 220px; overflow-y: auto; z-index: 1000; display: none;
  box-shadow: var(--shadow-sm);
}
.autocomplete-suggestion{
  padding: 10px 12px; cursor: pointer; border-bottom: 1px solid var(--border); transition: background .15s;
}
.autocomplete-suggestion:last-child{ border-bottom: none; }
.autocomplete-suggestion:hover{ background: var(--bg); }

/* Tags */
.tags-input{ position: relative; }
.tags-suggestions{
  position: absolute; top: 100%; left: 0; right: 0;
  background: #fff; border: 1px solid var(--border); border-top: none;
  border-radius: 0 0 10px 10px; max-height: 180px; overflow-y: auto; z-index: 1000; display: none;
  box-shadow: var(--shadow-sm);
}
.tag-suggestion{
  padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--border); font-size: 12px;
}
.tag-suggestion:last-child{ border-bottom: none; }
.tag-suggestion:hover{ background: var(--bg); }
.current-tags{ margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag-chip{
  background: var(--accent-soft); color: var(--accent-600);
  padding: 4px 8px; border-radius: 999px; font-size: 12px; display: inline-flex; align-items: center; gap: 6px;
}
.tag-remove{
  background: none; border: none; color: var(--accent-600); cursor: pointer; font-size: 14px; padding: 0 2px;
}

/* Botões */
.btn{
  padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: #fff; color: var(--text); font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  transition: transform .05s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover{ box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.btn-primary{
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.btn-primary:hover{ background: var(--accent-600); border-color: var(--accent-600); }
.btn-secondary{
  background: var(--bg); color: var(--text-soft);
}

/* =========================================================
   TABS
   ========================================================= */
.tabs{
  display: flex; gap: 6px; margin-bottom: 14px;
  background: #fff; padding: 6px; border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.tab{
  flex: 1; padding: 12px 14px; border: none; background: transparent;
  border-radius: 8px; cursor: pointer; font-weight: 600; color: var(--text-soft);
}
.tab:hover:not(.active){ background: var(--bg); }
.tab.active{
  background: var(--accent); color: #fff;
}
.tab-content{ display: none; }
.tab-content.active{ display: block; }

/* =========================================================
   RESULTADOS / LISTAS
   ========================================================= */
.search-results{
  background: #fff; border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm); overflow: hidden;
}
.results-header{ padding: 18px 20px; border-bottom: 1px solid var(--border); }
.results-header h3{ margin: 0 0 8px; color: var(--text); }
.results-stats{ display: flex; gap: 24px; flex-wrap: wrap; }
.result-stat{ text-align: center; }
.result-stat-value{ font-size: 22px; font-weight: 800; color: var(--text); display: block; }
.result-stat-label{ font-size: 12px; color: var(--muted); }

.comments-list{ max-height: 800px; overflow-y: auto; }
.comment-item{
  padding: 18px 20px; border-bottom: 1px solid var(--border); transition: background .15s;
}
.comment-item:hover{ background: var(--bg); }
.comment-item:last-child{ border-bottom: none; }

.comment-header{
  display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px;
}
.comment-user{ display: flex; align-items: center; gap: 12px; }
.comment-avatar{
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--border); color: var(--text-soft);
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
}
.comment-username{ font-weight: 700; color: var(--text); }
.comment-date{ font-size: 12px; color: var(--muted); }
.comment-text{ color: var(--text-soft); line-height: 1.6; }
.comment-text mark{
  background: #fff4cc; padding: 1px 4px; border-radius: 3px; font-weight: 600;
}

/* Sentimento */
.sentiment-badge{
  padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  cursor: pointer; position: relative; transition: transform .05s;
  border: 1px solid var(--border); background: var(--bg);
}
.sentiment-badge:hover{ transform: scale(1.03); }
.sentiment-badge.positivo{ background: #e7f6ec; color: #166534; border-color: #c7e9d4; }
.sentiment-badge.negativo{ background: #fde8e8; color: #7f1d1d; border-color: #f5c2c2; }
.sentiment-badge.neutro{   background: #eef2f7; color: #374151; border-color: #d7dce3; }

.sentiment-dropdown{
  position: absolute; top: 100%; right: 0; min-width: 140px;
  background: #fff; border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow-sm); z-index: 1000; display: none;
}
.sentiment-option{
  padding: 10px 12px; cursor: pointer; font-size: 13px; border-bottom: 1px solid var(--border);
}
.sentiment-option:last-child{ border-bottom: none; }
.sentiment-option:hover{ background: var(--bg); }

/* Paginação */
.per-page-selector{
  padding: 14px 20px; background: var(--bg); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.per-page-selector select{
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; background: #fff;
}

.pagination-info{
  padding: 10px 20px; background: var(--bg); font-size: 14px; color: var(--muted); text-align: center;
}
.pagination{
  display: flex; justify-content: center; gap: 8px; padding: 18px; background: var(--bg);
}
.pagination a, .pagination span{
  padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--text-soft);
  background: #fff; border: 1px solid var(--border); transition: background .15s, color .15s;
}
.pagination a:hover{ background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination .current{ background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination .disabled{ opacity: .55; cursor: not-allowed; }

/* =========================================================
   ANÁLISE / GRÁFICOS / HASHTAGS
   ========================================================= */
.analysis-loading{ text-align: center; padding: 48px 20px; }
.spinner{
  width: 40px; height: 40px; border: 4px solid #e5e7eb; border-top: 4px solid var(--accent);
  border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 16px;
}
@keyframes spin{ to{ transform: rotate(360deg); } }

.analysis-container{
  background: #fff; border-radius: var(--radius); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); padding: 22px; display: none;
}
.analysis-container.loaded{ display: block; }

.quant-stats-grid{
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px; margin-bottom: 22px;
}
.quant-stat-card{
  background: var(--bg); padding: 16px; border-radius: 10px; text-align: center;
  border-left: 4px solid var(--accent);
}
.quant-stat-value{ font-size: 22px; font-weight: 800; color: var(--text); }
.quant-stat-label{ font-size: 12px; color: var(--text-soft); font-weight: 600; }
.quant-stat-sublabel{ font-size: 11px; color: var(--muted); margin-top: 2px; }

.chart-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.chart-card{ background: var(--bg); padding: 18px; border-radius: 12px; }

.content-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }

.hashtags-container{
  background: #fff; border-radius: var(--radius); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); padding: 22px; margin-bottom: 24px;
}
.hashtag-list{ display: flex; flex-wrap: wrap; gap: 8px; }
.hashtag-item{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  background: #fff; color: var(--accent-600);
  border: 1px solid #c7d2fe; border-radius: 999px; font-size: 13px; font-weight: 600;
  text-decoration: none; transition: background .15s, color .15s, border-color .15s, transform .05s;
}
.hashtag-item:hover{ background: var(--accent-soft); transform: translateY(-1px); }
.hashtag-count{
  background: #eef2ff; color: var(--accent-600);
  padding: 2px 8px; border-radius: 999px; font-size: 12px;
}

.word-item{
  display: inline-block; padding: 6px 10px; margin: 4px;
  border-radius: 999px; background: var(--bg); color: var(--text);
  text-decoration: none; font-weight: 600; position: relative; transition: transform .05s;
}
.word-item:hover{ transform: scale(1.03); }
.word-freq{ font-size: 10px; opacity: .75; margin-left: 6px; }

.top-users-grid{ display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.user-card{ background: #fff; padding: 14px; border-radius: 10px; border: 1px solid var(--border); }
.user-header{ margin-bottom: 8px; }
.user-name{ font-weight: 700; color: var(--text); margin-bottom: 4px; }
.user-stats{ display: flex; gap: 10px; font-size: 12px; color: var(--muted); }

.wordcloud-container{
  background: #fff; border-radius: var(--radius); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); padding: 22px; margin-bottom: 24px; text-align: center;
}
#wordcloud-svg{
  width: 100%; height: 500px; border: 1px solid var(--border); border-radius: 8px;
}

/* =========================================================
   EMPTY / LOADING OVERLAY
   ========================================================= */
.empty-state{ text-align: center; padding: 56px 20px; }
.empty-state-icon{ font-size: 44px; margin-bottom: 12px; opacity: .7; }
.empty-state h3{ color: var(--text); margin-bottom: 8px; }
.empty-state p{ color: var(--muted); }

.loading{
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: rgba(17, 24, 39, .9); color: #fff; padding: 14px 18px; border-radius: 10px;
  z-index: 10000; display: none;
}
.loading.show{ display: block; }

/* =========================================================
   RESPONSIVO
   ========================================================= */
@media (max-width: 1024px){
  .sidebar{ transform: translateX(-100%); transition: transform .3s ease; }
  .sidebar.open{ transform: translateX(0); }
  .main-content{ margin-left: 0; }
  .mobile-toggle{ display: block; }
  .form-grid{ grid-template-columns: 1fr; }
  .chart-grid, .content-grid{ grid-template-columns: 1fr; }
}

@media (max-width: 768px){
  .container{ padding: 12px; }
  .header{ padding: 18px; }
  .header h1{ font-size: 22px; }
  .search-form{ padding: 18px; }
  .tabs{ flex-direction: column; }
  .results-stats{ justify-content: center; }
  .stats-grid{ grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}

/* estilos.css - Sistema Unificado de Estilos */

/* ===== VARIÁVEIS CSS ===== */
:root {
    --primary: #2563eb;
    --secondary: #3b82f6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    --dark: #1e293b;
    --light: #f1f5f9;
    --bg: #f8fafc;
    --border: #e2e8f0;
    --text: #334155;
    --text-soft: #64748b;
    --sidebar-width: 260px;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== LAYOUT ===== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: var(--bg);
    transition: margin-left 0.3s ease;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: #fff;
    border-right: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

.sidebar-subtitle {
    font-size: 12px;
    color: var(--text-soft);
    margin-top: 2px;
}

.nav-menu {
    list-style: none;
    padding: 10px;
    flex: 1;
    overflow-y: auto;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: var(--text);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.nav-link:hover {
    background: var(--bg);
    color: var(--primary);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
}

.nav-icon {
    width: 24px;
    margin-right: 12px;
    font-size: 18px;
}

.nav-text {
    flex: 1;
}

.sidebar-footer {
    padding: 15px;
    border-top: 1px solid var(--border);
}

.sidebar-info {
    text-align: center;
    color: var(--text-soft);
}

.sidebar-info small {
    display: block;
    font-size: 11px;
}

/* ===== MOBILE MENU ===== */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* ===== HEADER ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
}

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

.header-nav a {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

/* ===== CARDS ===== */
.stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.chart-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 15px;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
}

.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background: #fff;
    border-color: var(--primary);
}

/* ===== BADGES ===== */
.sentiment-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.sentiment-badge.positivo {
    background: #d1fae5;
    color: #065f46;
}

.sentiment-badge.negativo {
    background: #fee2e2;
    color: #991b1b;
}

.sentiment-badge.neutro {
    background: #f3f4f6;
    color: #374151;
}

/* ===== RESULT STATS ===== */
.result-stat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg);
    border-radius: 8px;
}

.result-stat-value {
    font-weight: 700;
    color: var(--primary);
}

.result-stat-label {
    color: var(--text-soft);
    font-size: 13px;
}

/* ===== SECTION TITLE ===== */
.section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ===== DATA ITEMS ===== */
.data-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.data-item:last-child {
    border-bottom: none;
}

.data-stats {
    font-size: 12px;
    color: var(--text-soft);
    margin-top: 4px;
}

/* ===== LOADING ===== */
.loading {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .chart-grid {
        grid-template-columns: 1fr;
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .header-nav {
        width: 100%;
        justify-content: space-between;
    }
}

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

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

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

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

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 2rem; }

/* ===== ANIMATIONS ===== */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-in {
    animation: slideIn 0.3s ease;
}

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