:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f7fb;
  color: #111827;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
}

.sidebar {
  background: #0b1220;
  color: #f8fafc;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.brand strong {
  font-size: 20px;
}

.brand span,
.muted {
  color: #94a3b8;
  line-height: 1.5;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px;
}

.stat b {
  display: block;
  font-size: 22px;
}

.launchpad-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.launchpad-button {
  width: 100%;
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px;
  text-align: left;
}

.launchpad-button.active {
  background: #155eef;
  border-color: #155eef;
}

.main {
  padding: 28px;
  display: grid;
  gap: 20px;
}

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

.topbar h1 {
  font-size: 28px;
  line-height: 1.1;
  margin: 0 0 6px;
}

.primary-action,
.secondary-action {
  border-radius: 8px;
  min-height: 40px;
  padding: 0 14px;
  white-space: nowrap;
}

.primary-action {
  color: white;
  background: #155eef;
}

.secondary-action {
  color: #111827;
  background: white;
  border: 1px solid #d1d5db;
}

.grid {
  display: grid;
  grid-template-columns: minmax(300px, 440px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.panel {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.04);
}

.panel h2 {
  font-size: 16px;
  margin: 0 0 14px;
}

.form {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: #374151;
  font-size: 13px;
  font-weight: 650;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 11px;
  min-height: 40px;
  background: #fff;
}

.field textarea {
  min-height: 74px;
  resize: vertical;
}

.inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.preview {
  overflow: hidden;
  padding: 0;
}

.preview-hero {
  padding: 24px;
  color: white;
  min-height: 156px;
  background:
    linear-gradient(135deg, var(--tenant-primary), rgba(0, 0, 0, 0.3)),
    #155eef;
}

.preview-hero h2 {
  color: inherit;
  font-size: 26px;
  margin: 0 0 8px;
}

.preview-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
}

.preview-body {
  padding: 18px;
  display: grid;
  gap: 16px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  background: #eef2ff;
  color: #3730a3;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

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

.token-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 8px;
  background: #fff;
}

.token-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.mono {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
}

.flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.flow-step {
  min-height: 70px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  padding: 10px;
  display: flex;
  align-items: center;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
}

.notice {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  border-radius: 8px;
  padding: 12px;
  line-height: 1.5;
}

.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .grid,
  .flow {
    grid-template-columns: 1fr;
  }

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