body {
  margin:0;
  font-family:Inter, system-ui, sans-serif;
  background:#0b1220;
  color:#e6edf3;
}

.topbar {
  display:flex;
  justify-content:space-between;
  padding:18px 32px;
  background:#111827;
  border-bottom:1px solid #1f2937;
}

.brand { display:flex; gap:14px; align-items:center; }
.logo {
  background:#2563eb;
  padding:10px 14px;
  border-radius:8px;
  font-weight:600;
}

.tabs {
  display:flex;
  gap:6px;
  padding:12px 24px;
  border-bottom:1px solid #1f2937;
}

.tabs button {
  background:none;
  border:none;
  padding:8px 14px;
  border-radius:6px;
  color:#94a3b8;
  cursor:pointer;
}

.tabs button.active {
  background:#1e293b;
  color:white;
}

.toolbar {
  padding:12px 24px;
  border-bottom:1px solid #1f2937;
  display:flex;
  gap:10px;
}

main {
  padding:24px;
  overflow:auto;
  height:calc(100vh - 160px);
}

.card {
  background:#111827;
  border:1px solid #1f2937;
  border-radius:12px;
  padding:20px;
  margin-bottom:20px;
}

.kpi-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:16px;
}

.kpi {
  background:#0f172a;
  padding:16px;
  border-radius:10px;
}

.btn {
  padding:6px 12px;
  border-radius:6px;
  border:none;
  cursor:pointer;
}

.btn.primary { background:#2563eb; color:white; }
.btn.secondary { background:#334155; color:white; }
.btn.danger { background:#7f1d1d; color:white; }

table {
  width:100%;
  border-collapse:collapse;
  font-size:13px;
}

th, td {
  padding:8px;
  border-bottom:1px solid #1f2937;
}

th {
  background:#1e293b;
  position:sticky;
  top:0;
}

.drawer {
  position:fixed;
  right:0;
  top:0;
  bottom:0;
  width:420px;
  background:#111827;
  border-left:1px solid #1f2937;
  display:flex;
}

.drawer.hidden { display:none; }

.drawer-content { padding:20px; width:100%; }
.drawer-header { display:flex; justify-content:space-between; margin-bottom:16px; }

input, select {
  width:100%;
  padding:8px;
  margin-bottom:12px;
  border:none;
  border-radius:6px;
  background:#1e293b;
  color:white;
}

canvas { width:100%; height:240px; }
.warn { background:#78350f; }
.over { background:#7f1d1d; }