:root {
  --bg: #0b0d10;
  --surface: #11151b;
  --surface-2: #171d25;
  --surface-3: #202832;
  --text: #f6f7fb;
  --muted: #8d98a8;
  --line: #2b3440;
  --accent: #77a7ff;
  --success: #1fa971;
  --warning: #d59a2d;
  --danger: #e05b5b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(180deg, rgba(119, 167, 255, 0.08), transparent 30rem),
    radial-gradient(circle at 20% 0%, rgba(31, 169, 113, 0.08), transparent 26rem),
    var(--bg);
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: min(1120px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.workspace,
.side-panel,
.dialog {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.workspace {
  border-radius: 22px;
  padding: 28px;
  min-height: 680px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

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

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: 0;
}

.site-link,
.mini-link,
.locale-button {
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.site-link:hover,
.mini-link:hover,
.locale-button:hover {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--accent);
}

.locale-button {
  background: transparent;
  min-height: 38px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 34px 0;
  padding: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.tab {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.tab.is-active {
  background: var(--text);
  color: var(--bg);
}

.panel {
  display: none;
}

.panel.is-active {
  display: block;
}

.flow {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.step-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-block.is-disabled {
  opacity: 0.5;
}

.step-head {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.step-block.is-complete .step-index {
  background: rgba(31, 169, 113, 0.14);
  color: var(--success);
  box-shadow: inset 0 0 0 1px rgba(31, 169, 113, 0.5);
}

.step-block.is-complete .field {
  border-color: rgba(31, 169, 113, 0.65);
}

.step-done {
  margin-left: auto;
  color: var(--success);
  font-size: 12px;
  font-weight: 900;
}

.step-index {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 28px;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--accent);
}

.field {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0f1319;
  color: var(--text);
  outline: none;
  padding: 16px;
  min-height: 54px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.field-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 10px;
  align-items: stretch;
}

.field:focus {
  border-color: var(--accent);
  background: #101722;
}

.field:disabled {
  cursor: not-allowed;
}

.textarea {
  min-height: 170px;
  resize: vertical;
  line-height: 1.45;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 0;
}

.preview-card,
.result-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
  padding: 16px;
}

.preview-card {
  display: grid;
  gap: 4px;
}

.preview-card span,
.preview-card small,
.result-meta {
  color: var(--muted);
  font-size: 13px;
}

.result-title {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.status-pill {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
  background: var(--surface-3);
}

.status-pill.SUCCESS {
  color: var(--success);
}

.status-pill.PROCESSING,
.status-pill.PENDING {
  color: var(--warning);
}

.status-pill.ERROR,
.status-pill.OUT_OF_STOCK,
.status-pill.VOIDED,
.status-pill.UNKNOWN {
  color: var(--danger);
}

.result-grid {
  display: grid;
  gap: 10px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.result-row span:first-child {
  color: var(--muted);
}

.result-row span:last-child {
  text-align: right;
  word-break: break-word;
}

.action-row {
  padding-top: 8px;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  min-height: 52px;
  border: 0;
  border-radius: 14px;
  padding: 0 18px;
  font-weight: 900;
  cursor: pointer;
}

.primary-button {
  width: 100%;
  background: var(--text);
  color: var(--bg);
}

.primary-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.secondary-button {
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid var(--line);
}

.secondary-button:disabled {
  opacity: 0.55;
  cursor: progress;
}

.ghost-button {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.danger-button {
  background: var(--danger);
  color: white;
}

.side-panel {
  border-radius: 22px;
  padding: 24px;
  display: grid;
  gap: 18px;
}

.notice-block {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}

.notice-block h2 {
  font-size: 16px;
  margin-bottom: 12px;
}

.notice-block ol,
.notice-block p {
  color: var(--muted);
  margin-bottom: 0;
  padding-left: 18px;
  line-height: 1.7;
}

.guide-list {
  list-style: none;
  padding-left: 0 !important;
  display: grid;
  gap: 14px;
}

.guide-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.guide-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.guide-list strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 4px;
}

.guide-list p {
  padding-left: 0;
  font-size: 13px;
}

.mini-link {
  display: inline-flex;
  min-height: 34px;
  width: fit-content;
  align-items: center;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
  padding: 0 10px;
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

.url-link {
  display: inline-flex;
  width: fit-content;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
  word-break: break-all;
}

.notice-block.subtle {
  background: transparent;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  max-width: min(520px, calc(100vw - 32px));
  background: var(--text);
  color: var(--bg);
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  box-shadow: var(--shadow);
  z-index: 20;
}

.dialog {
  width: min(460px, calc(100vw - 32px));
  color: var(--text);
  border-radius: 20px;
  padding: 0;
}

.dialog::backdrop {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
}

.dialog form {
  padding: 24px;
}

.dialog p {
  color: var(--muted);
  line-height: 1.65;
}

.dialog-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.admin-shell {
  width: min(760px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  align-items: center;
}

.admin-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.output-box {
  width: 100%;
  min-height: 110px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #0f1319;
  color: var(--text);
  padding: 16px;
  word-break: break-all;
  line-height: 1.55;
}

@media (max-width: 860px) {
  .shell {
    grid-template-columns: 1fr;
    padding: 24px 14px 40px;
  }

  .workspace {
    min-height: auto;
    padding: 20px;
    border-radius: 18px;
  }

  h1 {
    font-size: 32px;
  }

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

  .side-panel {
    border-radius: 18px;
  }
}
