:root {
  --bg: #0b1120;
  --surface: #111827;
  --surface-2: #1e293b;
  --border: #273549;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #10b981;
  --accent-2: #3b82f6;
  --warning-bg: rgba(245, 158, 11, 0.12);
  --warning-border: #d97706;
  --warning-text: #fde68a;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.topbar {
  border-bottom: 1px solid var(--border);
  background: rgba(17, 24, 39, 0.92);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-badge {
  background: linear-gradient(135deg, #10b981, #0ea5e9);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 8px;
}

.brand h1 {
  margin: 0;
  font-size: 1.15rem;
}

.brand p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.upsell-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
  text-decoration: none;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}

.upsell-pill:hover {
  background: rgba(16, 185, 129, 0.25);
}

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

.disclaimer-banner {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  color: var(--warning-text);
  padding: 11px 15px;
  border-radius: var(--radius);
  font-size: 0.86rem;
  margin-bottom: 18px;
}

.layout {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.card h2 {
  margin: 0 0 14px;
  font-size: 1rem;
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

label.field {
  display: grid;
  gap: 5px;
  font-size: 0.82rem;
  color: var(--muted);
}

input[type="number"],
select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.88rem;
}

.checkbox-row {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.84rem;
  cursor: pointer;
}

.checkbox-row input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
}

.main-col {
  display: grid;
  gap: 18px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.stat-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent-2);
  border-radius: 10px;
  padding: 13px;
}

.stat-title {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 1.28rem;
  font-weight: 800;
  color: #fff;
}

.stat-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
}

.chart-wrap {
  width: 100%;
  overflow-x: auto;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--muted);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.btn {
  background: var(--accent);
  color: #06281e;
  border: none;
  border-radius: 8px;
  padding: 8px 13px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.btn:hover {
  opacity: 0.92;
}

.table-wrap {
  overflow-x: auto;
  max-height: 360px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

th,
td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: right;
  white-space: nowrap;
}

th:first-child,
td:first-child {
  text-align: left;
}

th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  color: #cbd5e1;
  font-weight: 600;
}

.footer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}
