:root{
  --bg: #0b0f17;
  --panel: #0f1623;
  --panel-2: #111b2b;
  --text: #e9eef8;
  --muted: #a9b4c7;
  --border: rgba(255,255,255,.08);
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 18px;
  --accent: #5fd0d8;
  --accent2: #ec2f5c;
}

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; font-family:Inter,system-ui,Segoe UI,Roboto,Arial; background:var(--bg); color:var(--text); }

.layout{
  display:grid;
  grid-template-columns: 280px 1fr;
  min-height:100vh;
}

.sidebar{
  position:sticky;
  top:0;
  height:100vh;
  padding:18px;
  border-right:1px solid var(--border);
  background: linear-gradient(180deg, rgba(95,208,216,.08), transparent 40%), var(--panel);
}

.brand{
  display:flex;
  gap:12px;
  align-items:center;
  padding:12px;
  border:1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,.02);
  box-shadow: var(--shadow);
}

.brand-badge{
  width:44px; height:44px;
  display:grid; place-items:center;
  border-radius:14px;
  background: linear-gradient(135deg, rgba(95,208,216,.9), rgba(236,47,92,.85));
  font-weight:800;
}

.brand-title{ font-weight:800; letter-spacing:.2px; }
.brand-subtitle{ color:var(--muted); font-size:12px; margin-top:2px; }

.nav{ margin-top:16px; display:flex; flex-direction:column; gap:8px; }
.nav-link{
  text-decoration:none;
  color:var(--text);
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,.02);
}
.nav-link:hover{
  border-color: rgba(95,208,216,.35);
  background: rgba(95,208,216,.06);
}

.sidebar-footer{
  margin-top:auto;
  display:grid;
  gap:10px;
  padding-top:16px;
}

.meta{
  padding:12px;
  border:1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,.02);
}
.meta-label{ color:var(--muted); font-size:12px; }
.meta-value{ margin-top:6px; font-weight:600; }

.main{
  padding:22px 22px 40px;
  background:
    radial-gradient(900px 400px at 20% 0%, rgba(95,208,216,.10), transparent 60%),
    radial-gradient(900px 400px at 80% 10%, rgba(236,47,92,.10), transparent 60%);
}

.header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:18px;
}

h1{ margin:0; font-size:28px; }
.subtitle{ margin:8px 0 0; color:var(--muted); max-width: 820px; line-height:1.4; }

.header-actions{ display:flex; gap:10px; }
.btn{
  text-decoration:none;
  color:var(--bg);
  background: var(--accent);
  padding:10px 14px;
  border-radius: 14px;
  font-weight:700;
  border:1px solid rgba(255,255,255,.06);
}
.btn-outline{
  background: transparent;
  color: var(--text);
  border:1px solid var(--border);
}
.btn:hover{ filter:brightness(1.02); }

.section{ margin: 18px 0 26px; }
.section-head{ margin-bottom:12px; }
.section-head h2{ margin:0; font-size:18px; }
.section-desc{ margin:8px 0 0; color:var(--muted); }

.kpi-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:12px;
  margin-top:12px;
}

.kpi{
  border:1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,.03);
  padding:14px;
  box-shadow: var(--shadow);
}
.kpi-label{ color:var(--muted); font-size:12px; }
.kpi-value{ font-size:22px; font-weight:800; margin-top:8px; }
.kpi-foot{ color:var(--muted); font-size:12px; margin-top:6px; }

.grid-2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
  margin-top:12px;
}

.card{
  border:1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,.03);
  padding:14px;
  box-shadow: var(--shadow);
}

.card-title{ font-weight:800; margin-bottom:10px; }
.card-text p{ color:var(--muted); line-height:1.5; margin:0 0 10px; }

.plot-slot{
  border:1px dashed rgba(255,255,255,.18);
  border-radius: 14px;
  min-height: 320px;
  padding:12px;
  background: rgba(0,0,0,.18);
}

.placeholder{
  color:var(--muted);
  display:flex;
  align-items:center;
  justify-content:center;
  height: 300px;
  text-align:center;
}

.checklist{
  margin:0;
  padding-left:18px;
  color:var(--muted);
  line-height:1.7;
}

.insights{
  margin:0;
  padding-left:20px;
  color:var(--text);
  line-height:1.8;
}
.muted{ color:var(--muted); }

.footer{
  margin-top:22px;
  padding-top:16px;
  border-top:1px solid var(--border);
  display:flex;
  justify-content:space-between;
  color:var(--muted);
  font-size:12px;
}

@media (max-width: 1100px){
  .layout{ grid-template-columns: 1fr; }
  .sidebar{ position:relative; height:auto; }
  .kpi-grid{ grid-template-columns: 1fr 1fr; }
  .grid-2{ grid-template-columns: 1fr; }
}

#chart-distribuicao { width: 100%; height: 320px; }

#chart-correlacao { width: 100%; height: 360px; }
