:root {
  --bg: #0b1020;
  --panel: #121a2f;
  --panel-2: #17213d;
  --text: #eef2ff;
  --muted: #9fb0d3;
  --border: rgba(255,255,255,.08);
  --ok: #3ddc97;
  --bad: #ff6b6b;
  --purple: #8e7cc3;
  --green: #b7d7a8;
  --red: #e06666;
  --dark: #2d3748;
  --shadow: 0 12px 40px rgba(0,0,0,.22);
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: Inter, Arial, sans-serif; background: linear-gradient(180deg, #09101d, #0e1528); color: var(--text); }
a { color: #9dc0ff; text-decoration: none; }
a:hover { text-decoration: underline; }

.page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.hero h1 {
  margin: 6px 0 6px;
  font-size: 34px;
}

.eyebrow {
  margin: 0;
  color: #84a8ff;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.muted { color: var(--muted); }

.toolbar, .stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.grid {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  background: rgba(18, 26, 47, .88);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.stat h2, .card h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.value {
  font-size: 34px;
  font-weight: 700;
}

.meta {
  color: var(--muted);
  margin-top: 6px;
}

.purple { border-left: 6px solid var(--purple); }
.green { border-left: 6px solid var(--green); color: #0d1b10; background: linear-gradient(180deg, rgba(183,215,168,.92), rgba(146,190,126,.92)); }
.red { border-left: 6px solid var(--red); }
.dark { border-left: 6px solid #7f8ea3; }

label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 14px;
}

input, select, button {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0d1529;
  color: var(--text);
  padding: 10px 12px;
  font-size: 15px;
}

button {
  background: linear-gradient(180deg, #2d6dff, #1e56d9);
  border: 0;
  font-weight: 700;
  cursor: pointer;
}

button.secondary {
  background: linear-gradient(180deg, #3b4761, #2c3449);
}

button:hover {
  filter: brightness(1.05);
}

.row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.row:last-child {
  border-bottom: 0;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: #1d2947;
  border: 1px solid var(--border);
  color: var(--text);
}

.ok { color: var(--ok); }
.bad { color: var(--bad); }

.mt12 { margin-top: 12px; }
.mt16 { margin-top: 16px; }

.panel {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 14px;
}

th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-weight: 600;
  background: rgba(255,255,255,.03);
}

@media (max-width: 1200px) {
  .cols-4, .cols-3, .cols-2 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .hero { flex-direction: column; align-items: stretch; }
  .cols-4, .cols-3, .cols-2 { grid-template-columns: 1fr; }
  .page { padding: 14px; }
}

.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  background: #1b2743;
  color: var(--text);
  border: 1px solid var(--border);
  text-decoration: none;
}

.tiny {
  font-size: 11px;
  line-height: 1.35;
  margin-top: 2px;
  word-break: break-word;
}

.sheet-grid td {
  min-width: 140px;
  max-width: 240px;
  border: 1px solid rgba(255,255,255,.12);
  padding: 8px;
  vertical-align: top;
  color: #111;
  background-clip: padding-box;
}

.json-mini {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 11px;
  line-height: 1.4;
  color: var(--text);
}
