:root {
  --bg: #0f172a;
  --panel: #111827;
  --card: #1f2937;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #22c55e;
  --danger: #ef4444;
  --border: #334155;
  --gold: #fbbf24;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background:
    radial-gradient(circle at top, rgba(34, 197, 94, 0.08), transparent 32%),
    linear-gradient(180deg, #0b1220 0%, #0f172a 100%);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  opacity: 0.95;
}

.container {
  width: min(1280px, 92vw);
  margin: 0 auto;
  padding: 24px 0 40px;
}

.card {
  background: linear-gradient(180deg, rgba(31, 41, 55, 0.98), rgba(17, 24, 39, 0.98));
  border: 1px solid rgba(51, 65, 85, 0.95);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

.row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.space-between {
  justify-content: space-between;
}

input,
textarea,
select,
button {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(51, 65, 85, 0.95);
  border-radius: 12px;
  background: rgba(11, 18, 32, 0.96);
  color: var(--text);
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.08);
}

button {
  cursor: pointer;
  background: linear-gradient(180deg, #22c55e, #16a34a);
  color: #06250f;
  font-weight: 700;
  border: none;
  transition: transform 0.18s ease, filter 0.18s ease;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

button.secondary {
  background: linear-gradient(180deg, #334155, #1f2937);
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

button.danger {
  background: linear-gradient(180deg, #ef4444, #dc2626);
  color: #fff;
}

.nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 0;
}

.nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(17, 24, 39, 0.72);
  border: 1px solid transparent;
  color: var(--text);
  transition: 0.18s ease;
}

.nav a:hover {
  border-color: rgba(148, 163, 184, 0.4);
  transform: translateY(-1px);
}

.nav a[aria-current="page"],
.nav a.nav-active {
  border-color: rgba(251, 191, 36, 0.55);
  background: rgba(251, 191, 36, 0.12);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(15, 23, 42, 0.72);
  border-bottom: 1px solid rgba(51, 65, 85, 0.8);
}

.topbar-inner {
  width: min(1280px, 92vw);
  margin: 0 auto;
  padding: 14px 0;
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--gold), var(--accent));
  box-shadow: 0 12px 30px rgba(251, 191, 36, 0.18);
  flex: 0 0 auto;
}

.brand-title {
  display: grid;
  gap: 2px;
}

.brand-title strong {
  font-size: 15px;
  line-height: 1.1;
}

.brand-title span {
  color: var(--muted);
  font-size: 12px;
}

.hero {
  padding: 8px 0 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: var(--text);
  font-size: 13px;
  line-height: 1;
}

.badge.gold {
  background: rgba(251, 191, 36, 0.14);
  border-color: rgba(251, 191, 36, 0.32);
  color: var(--gold);
}

.kpi {
  background: linear-gradient(180deg, rgba(31, 41, 55, 0.96), rgba(17, 24, 39, 0.96));
  border: 1px solid rgba(51, 65, 85, 0.95);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.kpi-label {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.kpi-value {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.panel {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 14px;
  padding: 16px;
}

.alert {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.75);
  color: var(--text);
}

.alert.success {
  display: block;
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.12);
}

.alert.danger {
  display: block;
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.12);
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.actions > * {
  width: auto;
}

.inline-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.section-title {
  margin: 0 0 6px;
}

.section-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.small {
  color: var(--muted);
  font-size: 14px;
}

.stack {
  display: grid;
  gap: 12px;
}

.content {
  display: grid;
  gap: 18px;
}

.hidden {
  display: none !important;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 980px) {
  .topbar-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .brand {
    min-width: 0;
  }

  .nav-shell {
    width: 100%;
  }

  .nav-shell a {
    flex: 1 1 auto;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .actions > * {
    width: 100%;
  }
}