:root {
  --bg: #0b0c10;
  --card: #12141b;
  --stroke: #222634;
  --text: #e9ecf1;
  --muted: #9aa3b2;
  --accent: #f7931e;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 16px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    "Noto Sans",
    "Liberation Sans",
    sans-serif;
  background:
    radial-gradient(
      900px 500px at 15% 10%,
      rgba(247, 147, 30, 0.18),
      transparent 55%
    ),
    radial-gradient(
      700px 400px at 80% 0%,
      rgba(110, 231, 183, 0.08),
      transparent 60%
    ),
    var(--bg);
  color: var(--text);
}
.wrap {
  max-width: 1200px;
  margin: 28px auto;
  padding: 0 18px 40px;
}
.header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.2px;
}
.sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}
.badge {
  padding: 8px 12px;
  border: 1px solid rgba(247, 147, 30, 0.35);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(247, 147, 30, 0.08);
  font-weight: 600;
  font-size: 12px;
}
.card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent), var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.controls {
  margin-bottom: 14px;
}
.grid-controls {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr 140px;
  gap: 12px;
  align-items: end;
}
.field label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}
input,
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  background: #0f1118;
  border: 1px solid #2a2f40;
  color: var(--text);
  outline: none;
}
button {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(247, 147, 30, 0.4);
  background: rgba(247, 147, 30, 0.12);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}
button:hover {
  background: rgba(247, 147, 30, 0.18);
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}
.status {
  font-size: 13px;
}
.muted {
  color: var(--muted);
  font-size: 12px;
}

.tabs {
  display: flex;
  gap: 10px;
  margin: 10px 0;
}
.tab {
  width: auto;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #2a2f40;
  background: #0f1118;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}
.tab.active {
  border-color: rgba(247, 147, 30, 0.4);
  color: var(--text);
  background: rgba(247, 147, 30, 0.12);
}

.tabpane {
  display: none;
}
.tabpane.active {
  display: block;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 12px 0;
}
.kpi-title {
  color: var(--muted);
  font-size: 12px;
}
.kpi-value {
  font-size: 28px;
  font-weight: 800;
  margin-top: 8px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 12px 0;
}
.card-title {
  font-weight: 800;
  margin-bottom: 10px;
}
canvas {
  max-height: 290px;
}

.table-wrap {
  max-height: 360px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid #2a2f40;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: #0f1118;
}
thead th {
  position: sticky;
  top: 0;
  background: #121523;
  color: var(--muted);
  text-align: left;
  font-size: 12px;
  padding: 10px;
  border-bottom: 1px solid #2a2f40;
}
tbody td {
  padding: 10px;
  border-bottom: 1px solid #1f2330;
  font-size: 13px;
  vertical-align: top;
}
.num {
  text-align: right;
}

.nps-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.pill {
  padding: 8px 10px;
  border: 1px solid #2a2f40;
  border-radius: 999px;
  background: #0f1118;
  font-size: 12px;
  color: var(--muted);
}
.pill b {
  color: var(--text);
}
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--accent);
  margin-right: 6px;
}

.footer {
  margin-top: 18px;
  text-align: center;
}

@media (max-width: 980px) {
  .grid-controls {
    grid-template-columns: 1fr 1fr;
  }
  .grid-cards {
    grid-template-columns: 1fr 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}
