:root {
  color-scheme: dark;
  --bg0: #070c12;
  --bg1: #0d1624;
  --card: rgba(18, 32, 52, 0.72);
  --stroke: rgba(120, 160, 200, 0.18);
  --text: #e8eef6;
  --muted: #9db0c8;
  --accent: #3bd6c7;
  --accent2: #5b8cff;
  --danger: #ff6b84;
  --radius: 16px;
  --font: "DM Sans", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(91, 140, 255, 0.25), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(59, 214, 199, 0.18), transparent 50%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--stroke);
  backdrop-filter: blur(12px);
  background: rgba(7, 12, 18, 0.6);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.logo {
  font-size: 1.75rem;
  color: var(--accent);
}

.brand-name {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}

.brand-tag {
  margin: 0.1rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.nav {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.panel {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.hero {
  margin-bottom: 1.5rem;
}

.kicker {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
}

.hero-title {
  margin: 0 0 0.75rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 400;
  line-height: 1.12;
}

.lede {
  margin: 0 0 1.25rem;
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.6;
}

.lede em {
  color: var(--text);
  font-style: normal;
  border-bottom: 1px solid rgba(59, 214, 199, 0.35);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  font: inherit;
  cursor: pointer;
  border-radius: 999px;
  padding: 0.55rem 1.15rem;
  border: 1px solid transparent;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn.primary {
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  color: #041018;
  font-weight: 600;
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--stroke);
}

.btn.small {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}

.account-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.account-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.65rem;
}

.profile-pill {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.profile-pill strong {
  color: var(--text);
}

.table-wrap {
  overflow: auto;
  border-radius: 12px;
  border: 1px solid var(--stroke);
}

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

th,
td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--stroke);
}

th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.2);
}

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

code {
  font-family: ui-monospace, monospace;
  font-size: 0.85em;
  color: var(--accent);
}

select.status-select {
  font: inherit;
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
  min-width: 12rem;
}

.toast {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  max-width: min(420px, calc(100% - 2rem));
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(18, 32, 52, 0.95);
  border: 1px solid var(--stroke);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.45);
  font-size: 0.9rem;
}

.toast.err {
  border-color: rgba(255, 107, 132, 0.45);
}

.foot {
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.tag-auth {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-left: 0.35rem;
}

.tag-public {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8ae8ff;
  margin-left: 0.35rem;
}

.track-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-top: 1rem;
  max-width: 36rem;
}

.track-form label {
  flex: 1 1 14rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.track-form input {
  font: inherit;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
}

.track-result {
  margin-top: 1.25rem;
}

.track-result.hidden {
  display: none;
}

.track-card {
  padding: 1.1rem 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(0, 0, 0, 0.2);
  max-width: 32rem;
}

.track-code-display {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.track-status {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.track-dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.track-dl dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.track-dl dd {
  margin: 0;
  color: var(--text);
}

.track-error,
.loading-hint {
  margin: 0;
  color: var(--muted);
}

.track-error {
  color: var(--danger);
}

.hidden {
  display: none !important;
}

.modal {
  border: none;
  border-radius: var(--radius);
  padding: 0;
  background: transparent;
  max-width: calc(100% - 2rem);
}

.modal::backdrop {
  background: rgba(4, 8, 14, 0.72);
  backdrop-filter: blur(4px);
}

.modal-inner {
  width: min(440px, 92vw);
  background: linear-gradient(160deg, #111c2e, #0b1320);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.55);
}

.tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.tab {
  flex: 1;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: transparent;
  color: var(--muted);
  padding: 0.45rem;
  font: inherit;
  cursor: pointer;
}

.tab.active {
  color: var(--bg0);
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  border-color: transparent;
  font-weight: 600;
}

.modal-inner label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.modal-inner input,
.modal-inner textarea {
  font: inherit;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.modal-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
  line-height: 1.45;
}

.btn-fill-demo {
  width: 100%;
  margin-bottom: 0.35rem;
}

.temp-pw-field input {
  letter-spacing: 0.04em;
  font-size: 0.92rem;
  font-family: ui-monospace, monospace;
}

.api-docs {
  margin-top: 1.25rem;
}

.api-docs-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  margin: 0 0 0.75rem;
}

.api-docs-lede {
  color: var(--muted);
  margin: 0 0 1.25rem;
  line-height: 1.55;
  max-width: 72ch;
}

.api-docs-lede code {
  font-size: 0.85em;
}

.api-doc-block {
  margin-bottom: 1.35rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--stroke);
}

.api-doc-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.api-doc-block h3 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.api-doc-block p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.api-snippet {
  margin: 0.65rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--stroke);
  overflow-x: auto;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text);
}

@media (max-width: 640px) {
  .top {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}
