:root {
  color-scheme: dark;
  --bg: #0d1112;
  --surface: #151b1d;
  --surface-2: #1d2528;
  --surface-3: #263135;
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.2);
  --text: #f4f7f5;
  --muted: #aab7b2;
  --soft: #dbe6e1;
  --green: #49d38a;
  --cyan: #67d4e8;
  --amber: #f2c963;
  --coral: #ff7c6e;
  --violet: #a48cff;
  --ink: #07100d;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.28);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(73, 211, 138, 0.08), transparent 260px),
    linear-gradient(135deg, #101617 0%, #0b0f10 54%, #121119 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  background: rgba(10, 14, 15, 0.82);
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin-bottom: 28px;
}

.mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: var(--ink);
  background: linear-gradient(135deg, var(--green), var(--cyan));
  box-shadow: 0 12px 34px rgba(73, 211, 138, 0.18);
}

.brand-name {
  font-weight: 850;
  line-height: 1.1;
}

.brand-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.nav button span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.nav button.active {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--line);
}

.nav-badge {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--amber);
  font-size: 12px;
  font-weight: 800;
}

.main {
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.eyebrow {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 6px 0 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0;
}

.top-actions,
.toolbar,
.inline-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.top-actions .api-token {
  width: 210px;
  max-width: min(210px, 100%);
}

.btn {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-2);
}

.btn.primary {
  color: var(--ink);
  border-color: transparent;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  font-weight: 850;
}

.btn.warn {
  color: var(--ink);
  border-color: transparent;
  background: var(--amber);
  font-weight: 800;
}

.btn.danger {
  border-color: rgba(255, 124, 110, 0.42);
  color: #ffd7d2;
  background: rgba(255, 124, 110, 0.12);
}

.section {
  display: none;
}

.section.active {
  display: block;
}

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

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

.two-col {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
}

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

.card,
.metric,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(21, 27, 29, 0.92);
  box-shadow: var(--shadow);
}

.metric {
  min-height: 116px;
  padding: 16px;
}

.metric-label {
  color: var(--muted);
  font-size: 13px;
}

.metric-value {
  margin-top: 10px;
  font-size: 31px;
  font-weight: 900;
  letter-spacing: 0;
}

.metric-foot {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.panel {
  padding: 18px;
}

.checkout-panel {
  margin-top: 14px;
}

.attention-panel {
  border-color: rgba(73, 211, 138, 0.74);
  box-shadow: 0 0 0 3px rgba(73, 211, 138, 0.15), var(--shadow);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

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

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--soft);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  font-weight: 750;
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--muted);
}

.status.active::before,
.status.paid::before,
.status.ready::before {
  background: var(--green);
}

.status.warning::before,
.status.review::before,
.status.pending::before {
  background: var(--amber);
}

.status.danger::before,
.status.suspended::before,
.status.overdue::before {
  background: var(--coral);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.03);
}

td {
  font-size: 14px;
}

tr:last-child td {
  border-bottom: 0;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.field input,
.field select,
.field textarea,
.search {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: #0f1517;
  padding: 0 11px;
}

.field textarea {
  min-height: 96px;
  padding-top: 10px;
  resize: vertical;
}

.list {
  display: grid;
  gap: 10px;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

a.list-item {
  color: inherit;
  text-decoration: none;
}

.link-item:hover {
  border-color: rgba(103, 212, 232, 0.45);
  background: rgba(103, 212, 232, 0.07);
}

.list-title {
  font-weight: 800;
}

.list-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.release-card {
  display: grid;
  gap: 10px;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.card-copy {
  margin: 0;
  color: var(--soft);
  line-height: 1.55;
}

.panel-divider {
  height: 1px;
  margin: 16px 0;
  background: var(--line);
}

.code-line {
  display: block;
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  overflow-x: auto;
  color: #d9fff1;
  background: #08100e;
  border: 1px solid rgba(73, 211, 138, 0.22);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 13px;
  white-space: nowrap;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: 360px;
  padding: 13px 14px;
  border-radius: 8px;
  border: 1px solid rgba(73, 211, 138, 0.35);
  color: var(--text);
  background: #10201a;
  box-shadow: var(--shadow);
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

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

.timeline-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--cyan);
}

.compact-stack {
  display: grid;
  gap: 8px;
}

.split-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.split-line:last-child {
  border-bottom: 0;
}

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

  .sidebar {
    position: static;
    height: auto;
    padding: 16px;
  }

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

  .metric-grid,
  .two-col,
  .three-col {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .main {
    padding: 16px;
  }

  .nav {
    grid-template-columns: 1fr;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .panel-head,
  .list-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .split-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .split-line strong {
    overflow-wrap: anywhere;
  }
}

.public-shell {
  min-height: 100vh;
}

.public-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 6vw;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 12, 13, 0.9);
  backdrop-filter: blur(18px);
}

.public-nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.public-nav a {
  color: var(--soft);
  text-decoration: none;
  font-weight: 750;
}

.public-hero {
  min-height: 78vh;
  display: grid;
  align-items: end;
  padding: 88px 6vw 72px;
  background:
    linear-gradient(90deg, rgba(8, 12, 13, 0.93), rgba(8, 12, 13, 0.62) 54%, rgba(8, 12, 13, 0.28)),
    var(--hero-image, none) center / cover no-repeat;
}

.public-hero-content {
  max-width: 760px;
}

.public-hero h1 {
  max-width: 820px;
  font-size: clamp(40px, 7vw, 78px);
}

.public-lede {
  max-width: 720px;
  color: var(--soft);
  font-size: 20px;
  line-height: 1.6;
}

.public-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.compact-actions {
  margin-top: 16px;
}

.public-band {
  padding: 56px 6vw;
}

.public-band.alt {
  background: rgba(255, 255, 255, 0.035);
}

.public-section-head {
  max-width: 820px;
  margin-bottom: 22px;
}

.public-section-head p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.product-shot {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: var(--surface);
}

.price-tag {
  font-size: 38px;
  font-weight: 900;
}

.mini-kicker {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.step-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 8px;
  color: var(--ink);
  background: linear-gradient(135deg, var(--green), var(--cyan));
  font-weight: 900;
}

@media (max-width: 760px) {
  .public-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-hero {
    min-height: 70vh;
    padding-top: 64px;
  }
}
