:root {
  --ink: #12202d;
  --muted: #64748b;
  --line: #d7e2ea;
  --paper: #ffffff;
  --surface: #f4f8fb;
  --teal: #0f766e;
  --green: #15803d;
  --navy: #172554;
  --amber: #b45309;
  --shadow: 0 18px 60px rgba(15, 23, 42, 0.09);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

a { color: inherit; }

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.sidebar {
  background: #0b1720;
  color: #e8f1f5;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: sticky;
  top: 0;
  height: 100vh;
}

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

.brand strong,
.brand span { display: block; }

.brand strong { font-size: 18px; }
.brand span { color: #9fb4c1; font-size: 13px; margin-top: 2px; }

.dark-brand strong { color: var(--ink); }
.dark-brand span { color: var(--muted); }

.login-shell {
  width: min(440px, 100%);
}

.checkout-shell,
.docs-shell {
  width: min(1180px, 100%);
}

.docs-shell {
  display: grid;
  gap: 20px;
  padding: 24px;
}

.docs-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.text-link {
  color: var(--teal);
  font-weight: 900;
  text-decoration: none;
}

.checkout-shell {
  max-width: 520px;
}

.login-panel {
  display: grid;
  gap: 16px;
  box-shadow: var(--shadow);
}

.checkout-panel {
  display: grid;
  gap: 18px;
  box-shadow: var(--shadow);
}

.checkout-total {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

.checkout-total span {
  color: var(--muted);
}

.checkout-total strong {
  font-size: 22px;
}

.alert {
  margin: 0;
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
}

.notice {
  margin: 0;
  color: #166534;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 7px;
  background: var(--teal);
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  padding: 0 14px;
}

.button-link.muted {
  background: #475569;
}

nav {
  display: grid;
  gap: 8px;
}

nav a {
  text-decoration: none;
  color: #cfe0e8;
  padding: 10px 12px;
  border-radius: 8px;
}

nav a:hover { background: rgba(255, 255, 255, 0.08); }

.mode {
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 12px;
  color: #a7f3d0;
}

.workspace {
  padding: 28px;
  display: grid;
  gap: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  background: linear-gradient(135deg, #ffffff 0%, #eef7f5 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 32px;
  box-shadow: var(--shadow);
}

.eyebrow {
  color: var(--teal);
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  margin: 0 0 8px;
}

h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 780px; font-size: clamp(34px, 5vw, 60px); line-height: 1.02; margin-bottom: 0; }
h2 { font-size: 26px; line-height: 1.2; margin-bottom: 0; }
h3 { font-size: 18px; margin-bottom: 8px; }
p { color: var(--muted); line-height: 1.55; }

.health {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
  color: var(--green);
  font-weight: 800;
}

.health span {
  width: 10px;
  height: 10px;
  background: var(--green);
  border-radius: 50%;
}

.band {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

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

.rail-grid,
.api-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.rail-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rail-grid span {
  width: fit-content;
  color: #fff;
  background: var(--navy);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 800;
}

.rail-grid strong { margin-top: auto; color: var(--teal); }

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

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fbfdfe;
}

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

label {
  display: grid;
  gap: 6px;
  font-weight: 800;
  font-size: 13px;
  color: #334155;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

button {
  border: 0;
  background: var(--teal);
  color: #fff;
  min-height: 44px;
  border-radius: 7px;
  font-weight: 900;
  cursor: pointer;
}

button:hover { background: #115e59; }

.fineprint {
  margin: 0;
  font-size: 12px;
}

.result-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 420px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-head span,
.status {
  background: #ecfdf5;
  color: var(--green);
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

pre {
  margin: 0;
  overflow: auto;
  background: #0b1720;
  color: #dff7ef;
  border-radius: 8px;
  padding: 16px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

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

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

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

th {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
  background: #f8fafc;
}

td { font-size: 14px; }
tr:last-child td { border-bottom: 0; }

.api-grid code {
  display: block;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f8fafc;
  color: var(--amber);
  overflow-wrap: anywhere;
}

.provider-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.provider-list article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfdfe;
}

.provider-list code {
  display: block;
  color: var(--amber);
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    padding: 18px;
  }
  nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .mode { margin-top: 0; }
  .topbar,
  .two-col { grid-template-columns: 1fr; }
  .rail-grid,
  .api-grid,
  .provider-list { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .workspace { padding: 14px; }
  .topbar,
  .band { padding: 18px; }
  h1 { font-size: 34px; }
  nav { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .health { white-space: normal; }
}
