:root {
  --bg: #08080a;
  --bg-soft: #0a0a0d;
  --panel: #0e0e10;
  --panel-2: #121214;
  --panel-3: #17171b;
  --text: #eaeaeb;
  --muted: #8d8d96;
  --line: #232329;
  --line-strong: #32323a;
  --orange: #ff7a18;
  --orange-2: #ff9b4a;
  --good: #3ecf8e;
  --bad: #ff5f5f;
  --warn: #f6c453;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(255, 122, 24, 0.16), transparent 28%),
    radial-gradient(circle at left 20%, rgba(255, 155, 74, 0.07), transparent 24%),
    linear-gradient(180deg, #09090b 0%, #0c0c0f 100%);
}

body.v3-page {
  overflow-x: hidden;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 22px 60px;
}

.page-header {
  margin-bottom: 20px;
}

.page-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: auto;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.back-btn::before {
  content: "\2190";
  font-size: 14px;
  line-height: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 122, 24, 0.2);
  border-radius: 999px;
  background: rgba(255, 122, 24, 0.08);
  color: var(--orange-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 14px 0 8px;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

h3 {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.2;
}

.sub {
  margin-bottom: 16px;
  max-width: 860px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.card {
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    rgba(14, 14, 16, 0.96);
  box-shadow: var(--shadow);
}

.card.hero-card {
  padding: 22px;
}

.row {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: end;
}

.field {
  min-width: 0;
  grid-column: span 12;
}

@media (min-width: 700px) {
  .field {
    grid-column: span 6;
  }
}

@media (min-width: 1100px) {
  .field {
    grid-column: span 3;
  }
}

label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

input,
select,
textarea,
button {
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  transition: border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

select {
  color-scheme: dark;
  background-color: rgba(255, 255, 255, 0.05);
}

select option,
select optgroup {
  background: #121214;
  color: #eaeaeb;
}

textarea {
  min-height: 140px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(255, 122, 24, 0.7);
  background: rgba(255, 122, 24, 0.05);
  box-shadow: 0 0 0 3px rgba(255, 122, 24, 0.14);
}

input::placeholder,
textarea::placeholder {
  color: #6c6c75;
}

button {
  cursor: pointer;
  padding: 11px 16px;
  font-weight: 700;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 122, 24, 0.35);
  background: rgba(255, 122, 24, 0.1);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.actions,
.btnRow {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.actions button,
.btnRow button {
  width: auto;
  min-width: 180px;
}

.actions button:first-child,
.btnRow button:first-child,
button.primary {
  border-color: rgba(255, 122, 24, 0.18);
  background: linear-gradient(135deg, var(--orange), var(--orange-2));
  color: #08080a;
  box-shadow: 0 10px 28px rgba(255, 122, 24, 0.28);
}

.actions button:first-child:hover,
.btnRow button:first-child:hover,
button.primary:hover {
  border-color: transparent;
  background: linear-gradient(135deg, #ff862a, #ffab5f);
}

.danger {
  border-color: rgba(255, 95, 95, 0.35);
  color: #ffb3b3;
  background: rgba(255, 95, 95, 0.08);
}

.danger:hover {
  border-color: rgba(255, 95, 95, 0.5);
  background: rgba(255, 95, 95, 0.14);
}

.muted,
.small {
  color: var(--muted);
}

.small {
  font-size: 12px;
}

code,
pre {
  font-family: var(--mono);
}

code {
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
}

pre {
  margin: 0;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(5, 5, 7, 0.65);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
  color: #dbdbde;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
  line-height: 1.45;
  vertical-align: top;
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  font-weight: 700;
}

.pill.good,
.good {
  border-color: rgba(62, 207, 142, 0.35);
  background: rgba(62, 207, 142, 0.12);
  color: #9cf0c4;
}

.pill.bad,
.bad {
  border-color: rgba(255, 95, 95, 0.35);
  background: rgba(255, 95, 95, 0.12);
  color: #ffb3b3;
}

.spark {
  display: block;
  width: 220px;
  max-width: 100%;
  height: 46px;
}

.panel-grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 900px) {
  .panel-grid.two-up {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}
