:root {
  color-scheme: dark;
  --bg: #09090b;
  --card: #141418;
  --line: #27272f;
  --text: #f6f7fb;
  --muted: #a1a1aa;
  --brand: #ff5a1f;
  --brand-2: #ffb703;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 90, 31, 0.2), transparent 30rem),
    radial-gradient(circle at top right, rgba(255, 183, 3, 0.14), transparent 28rem),
    var(--bg);
  color: var(--text);
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.hero,
.card {
  border: 1px solid var(--line);
  background: rgba(20, 20, 24, 0.88);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(16px);
  border-radius: 24px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  padding: 32px;
  margin-bottom: 24px;
}

.eyebrow {
  color: var(--brand-2);
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 800;
}

h1,
h2 {
  margin: 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 0.96;
}

h2 {
  font-size: 20px;
  margin-bottom: 18px;
}

.hero p:not(.eyebrow) {
  color: var(--muted);
  max-width: 680px;
  font-size: 18px;
  line-height: 1.6;
}

.status {
  white-space: nowrap;
  border: 1px solid rgba(255, 183, 3, 0.5);
  color: var(--brand-2);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 700;
}

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

.layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.main-panel {
  display: grid;
  gap: 24px;
}

.sidebar {
  align-self: start;
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow: auto;
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.card {
  padding: 24px;
}

.preview-card {
  min-height: 720px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #0e0e12;
  color: var(--text);
  border-radius: 14px;
  padding: 13px 14px;
  font: inherit;
}

textarea {
  resize: vertical;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 14px;
  padding: 13px 18px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #111;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}

.small {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
}

button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.secondary {
  border: 1px solid var(--line);
  background: #0e0e12;
  color: var(--text);
}

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

.muted {
  color: var(--muted);
  line-height: 1.6;
}

.preview {
  width: 100%;
  min-height: 620px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.preview.empty {
  background:
    linear-gradient(135deg, rgba(255, 90, 31, 0.08), rgba(255, 183, 3, 0.06)),
    #0e0e12;
}

.clone-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.clone-item {
  display: grid;
  justify-content: stretch;
  text-align: left;
  gap: 6px;
  width: 100%;
  border: 1px solid var(--line);
  background: #0e0e12;
  color: var(--text);
  border-radius: 14px;
  padding: 12px;
}

.clone-item.active {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 1px rgba(255, 183, 3, 0.25);
}

.clone-item span,
.clone-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.metrics > div {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #0e0e12;
}

.metrics strong {
  display: block;
  color: var(--text);
  font-size: 18px;
}

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

.warning {
  border-left: 3px solid var(--brand-2);
  padding-left: 10px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.chip {
  background: #0e0e12;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.history {
  margin-top: 18px;
}

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

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 18px;
  color: var(--muted);
}

pre {
  min-height: 180px;
  overflow: auto;
  white-space: pre-wrap;
  color: #d4d4d8;
}

.hidden {
  display: none;
}

@media (max-width: 820px) {
  .hero,
  .grid,
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    max-height: none;
  }

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

  .hero {
    display: grid;
  }

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