/* style.css - Área Administrativa EIXO - Light Premium Editorial */
:root {
  --bg: #f4f6f4;            /* Off-white leve com toque de oliva */
  --surface: #faf8f5;       /* Painéis e Cards: Alabastro/Bone premium */
  --surface-soft: #f0f2f0;  /* Elementos internos e tabelas */
  --text: #10211b;          /* Tipografia principal escura e confortável */
  --muted: #5d6d66;         /* Textos secundários e instruções */
  --border: rgba(13, 90, 66, 0.12); /* Divisões extremamente suaves */
  --primary: #c69b4f;       /* Dourado champanhe */
  --primary-dark: #0d5a42;  /* Verde floresta para títulos e destaques */
  --primary-soft: rgba(216, 174, 96, 0.08);
  --danger: #b94a42;
  --danger-soft: #fdf2f2;
  --success: #0d5a42;
  --success-soft: #e6f7f0;
  --warning: #c69b4f;
  --warning-soft: rgba(216, 174, 96, 0.08);
  --shadow: 0 4px 20px rgba(13, 90, 66, 0.03);
}

* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); overflow-x: hidden; }
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
.sidebar { background: #0a1c17; color: #f3efe7; padding: 30px 20px; position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid rgba(255, 255, 255, 0.05); display: flex; flex-direction: column; justify-content: flex-start; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.brand-mark { width: 36px; height: 36px; background: linear-gradient(180deg, #69c69b, var(--primary)); color: #0c1914; display: grid; place-items: center; font-weight: 900; font-size: 18px; }
.brand strong { display: block; font-size: 14px; color: #ffffff; }
.brand small { display: block; font-size: 11px; color: var(--primary); text-transform: uppercase; margin-top: 2px; }

nav { display: grid; gap: 6px; margin-bottom: auto; }
nav a { padding: 12px 14px; font-size: 13.5px; font-weight: 600; color: #bbc5be; transition: all 0.2s ease; }
nav a:hover, nav a.active { background: rgba(255, 255, 255, 0.08); color: #ffffff; }

.admin-guide { border-radius: 4px; border: 1px solid rgba(216, 174, 96, 0.2); background: rgba(255, 255, 255, 0.05); padding: 20px; margin-top: auto; }
body:not(.admin-guided-active) .admin-guide { display: none !important; }
.admin-guide-timeline { display: flex; gap: 10px; margin-bottom: 12px; font-size: 11px; color: #bbc5be; }
.admin-guide-timeline .done, .admin-guide-timeline .current { color: var(--primary); font-weight: 700; }
.admin-guide h2 { font-family: Georgia, serif; font-size: 18px; color: #ffffff; margin-bottom: 4px; }
.admin-guide-button { width: 100%; height: 40px; background-color: var(--primary); color: #0c1914; font-weight: 700; border: none; cursor: pointer; }

.main { padding: 32px 40px; background: radial-gradient(circle at 100% 0, rgba(198, 155, 79, 0.03), transparent 40%); }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px !important; }
.eyebrow { font-size: 11px; text-transform: uppercase; color: var(--primary-dark); font-weight: 700; margin: 0 0 6px; }
h1 { font-family: Georgia, serif; font-size: 26px !important; color: var(--text); margin: 0; }
.muted { font-size: 13px !important; color: var(--muted); margin-top: 2px !important; }

.ops-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px !important; margin-bottom: 16px !important; }
.ops-card { background: var(--surface); border: 1px solid var(--border); padding: 10px 14px !important; box-shadow: var(--shadow); }
.ops-card span { font-size: 10px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.ops-card strong { display: block; font-family: Georgia, serif; font-size: 24px !important; color: var(--primary-dark); margin: 2px 0 !important; font-weight: 400; }
.ops-card small { font-size: 12px; color: var(--muted); }

.dashboard-visual-grid { display: grid; grid-template-columns: 1.1fr 1fr 0.9fr; gap: 16px; align-items: stretch; }
.visual-panel { background: var(--surface); border: 1px solid var(--border); padding: 16px !important; margin-bottom: 0 !important; display: flex; flex-direction: column; justify-content: space-between; }
.panel-head h2 { font-size: 14px !important; font-weight: 700 !important; text-transform: uppercase; color: var(--muted) !important; margin-bottom: 12px !important; }

/* Gráficos de Pizza em CSS por Aba */
.donut-chart-visual { width: 110px; height: 110px; margin: 10px auto; border-radius: 50%; position: relative; display: flex; align-items: center; justify-content: center; }
.donut-chart-visual.segment-graph { background: conic-gradient(#0d5a42 0% 34%, #c69b4f 34% 62%, #69c69b 62% 84%, #a4b5ad 84% 100%) !important; }
.donut-chart-visual.age-graph { background: conic-gradient(#0d5a42 0% 15%, #c69b4f 15% 55%, #69c69b 55% 85%, #a4b5ad 85% 100%) !important; }
.donut-chart-visual.gender-graph { background: conic-gradient(#0d5a42 0% 48%, #c69b4f 48% 93%, #a4b5ad 93% 100%) !important; }
.donut-hole { width: 76px; height: 76px; background: var(--surface); border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-hole strong { font-size: 18px; color: var(--text); }
.donut-hole small { font-size: 10px; color: var(--muted); }

/* Abas de Navegação */
.font-tabs-head { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-bottom: 8px !important; }
.tab-trigger { background: transparent; border: none; font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--muted); padding: 4px 8px; cursor: pointer; }
.tab-trigger.active { color: var(--primary-dark); background: var(--surface-soft); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Gráfico de Evolução SVG */
.evolution-chart-wrapper { display: flex; flex-direction: column; justify-content: space-between; height: 100%; }
.svg-chart { width: 100%; height: 70px; margin-top: 10px; }
.trend-list-compact { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); }
.trend-list-compact div { display: flex; flex-direction: column; align-items: center; font-size: 11px; }

.compact-list { gap: 4px !important; margin-top: 10px; }
.compact-list div { display: flex; justify-content: space-between; padding: 6px 10px !important; font-size: 12px !important; background: var(--surface-soft) !important; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.double-column-stacked { display: flex; flex-direction: column; gap: 16px; }
.bar-container { background: var(--surface-soft); height: 6px; border-radius: 3px; overflow: hidden; position: relative; }
.bar-fill { display: block; height: 100%; background: var(--primary-dark) !important; border-radius: 3px; }
.compact-trend div { display: grid; grid-template-columns: 70px 1fr 35px !important; gap: 8px !important; align-items: center; }
.label-fixed { font-size: 11px !important; color: var(--muted); font-weight: 600; }
.mini-row-list div { display: flex; justify-content: space-between; font-size: 12.5px; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.badge-alert { color: var(--danger); font-weight: 700; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 820px; }
th, td { padding: 12px; border-bottom: 1px solid var(--border); text-align: left; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; }
tr:hover td { background: var(--surface-soft); }
.badge { display: inline-flex; padding: 4px 8px; font-size: 11px; font-weight: 700; border-radius: 4px; }
.badge.success { background: var(--success-soft); color: #0d5a42; }
.badge.warning { background: var(--warning-soft); color: #8a6525; }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.neutral { background: var(--surface-soft); color: var(--muted); }

@media (max-width: 1200px) { .dashboard-visual-grid { grid-template-columns: 1fr; } }