:root {
  color-scheme: light;
  --bg: #eef2f7;
  --surface: #ffffff;
  --surface-strong: #f8fafc;
  --text: #172033;
  --muted: #667085;
  --line: #d8dee8;
  --primary: #0f766e;
  --primary-strong: #115e59;
  --accent: #d97706;
  --danger: #b42318;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
}

* {
  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:
    linear-gradient(120deg, rgba(15, 118, 110, 0.12), rgba(217, 119, 6, 0.1)),
    var(--bg);
  color: var(--text);
}

button,
input,
textarea {
  font: inherit;
}

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

.workspace {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(216, 222, 232, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.topbar,
.section-title,
.wallet-panel,
.field-row,
.links {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
}

h2 {
  font-size: 20px;
}

.wallet-panel {
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #99f6e4;
  border-radius: 999px;
  background: #ccfbf1;
  color: #134e4a;
  font-size: 14px;
  font-weight: 700;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 20px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.section-title {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-title.compact {
  margin-bottom: 12px;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: #344054;
  font-size: 14px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: var(--surface-strong);
  color: var(--text);
  outline: none;
}

input {
  min-height: 46px;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.field-row {
  gap: 14px;
}

.field-row label {
  flex: 1;
}

.options {
  display: grid;
  gap: 8px;
  margin: 6px 0 18px;
}

.metadata-builder {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  margin: 4px 0 18px;
  padding: 14px;
}

.metadata-preview {
  min-height: 120px;
  max-height: 220px;
  overflow: auto;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: #344054;
  padding: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-weight: 600;
}

.checkline input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--primary);
}

.button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 800;
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.primary,
.action {
  background: var(--primary);
  color: white;
}

.primary:hover,
.action:hover {
  background: var(--primary-strong);
}

.action {
  width: 100%;
  min-height: 50px;
}

.ghost {
  border-color: var(--line);
  background: white;
  color: var(--text);
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.stat-grid div {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  padding: 12px;
}

.stat-grid strong {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  font-size: 15px;
}

.output-group output {
  display: block;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: var(--surface-strong);
  color: var(--text);
  font-weight: 500;
  overflow-wrap: anywhere;
}

.links {
  gap: 10px;
  flex-wrap: wrap;
  margin: 4px 0 16px;
}

.links a {
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
}

.links a[href="#"] {
  color: var(--muted);
  pointer-events: none;
}

.log {
  min-height: 170px;
  max-height: 260px;
  overflow: auto;
  margin: 0;
  border-radius: 8px;
  background: #111827;
  color: #d1fae5;
  padding: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .grid,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .topbar,
  .field-row {
    align-items: stretch;
    flex-direction: column;
  }

  .wallet-panel {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding: 20px 0;
  }

  .workspace,
  .panel {
    padding: 16px;
  }
}
