:root {
  color-scheme: dark;
  --font-body: "Aptos", "Segoe UI Variable Text", "Segoe UI", sans-serif;
  --font-heading: "Aptos Display", "Bahnschrift", "Segoe UI Variable Display", sans-serif;
  --bg: #071019;
  --bg-2: #0b1522;
  --panel: rgba(12, 19, 31, 0.92);
  --panel-strong: rgba(10, 16, 26, 0.96);
  --panel-soft: rgba(18, 28, 43, 0.82);
  --panel-border: rgba(140, 167, 198, 0.16);
  --text: #edf3fb;
  --muted: #9aaecb;
  --muted-2: #6d84a4;
  --accent: #f3a21b;
  --accent-soft: rgba(243, 162, 27, 0.14);
  --accent-2: #0fb3ab;
  --good: #3ad072;
  --warning: #ff8f3c;
  --danger: #ee5f5f;
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.32);
  --shadow-md: 0 18px 40px rgba(0, 0, 0, 0.22);
  --shadow-sm: 0 8px 18px rgba(0, 0, 0, 0.18);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 15px;
  --radius-sm: 11px;
  font-family: var(--font-body);
  line-height: 1.5;
  font-weight: 400;
  background:
    radial-gradient(circle at 0% 0%, rgba(243, 162, 27, 0.2), transparent 24%),
    radial-gradient(circle at 100% 0%, rgba(15, 179, 171, 0.14), transparent 22%),
    radial-gradient(circle at 30% 100%, rgba(79, 124, 172, 0.16), transparent 30%),
    linear-gradient(180deg, var(--bg), var(--bg-2) 45%, #070d15 100%);
  color: var(--text);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  background: inherit;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.018), transparent 32%),
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.014) 0,
      rgba(255, 255, 255, 0.014) 1px,
      transparent 1px,
      transparent 96px
    );
  opacity: 0.8;
}

* {
  box-sizing: border-box;
}

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

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

.flow-shell,
.shell {
  width: min(760px, calc(100% - 28px));
  margin: 28px auto 72px;
  position: relative;
  z-index: 1;
}

.flow-card,
.hero-panel,
.surface-panel {
  border: 1px solid var(--panel-border);
  background:
    linear-gradient(180deg, rgba(18, 28, 43, 0.9), rgba(10, 16, 26, 0.95));
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
}

.flow-card {
  padding: 22px;
  display: grid;
  gap: 18px;
}

.flow-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 4px;
}

.flow-toolbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.status-chip,
.pill,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 0.78rem;
  line-height: 1;
  letter-spacing: 0.03em;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-loading {
  color: #d5dfef;
  background: rgba(148, 163, 184, 0.12);
}

.status-ready,
.status-ok {
  color: #aff2c7;
  background: rgba(58, 208, 114, 0.12);
}

.status-error,
.status-bad {
  color: #fecaca;
  background: rgba(238, 95, 95, 0.12);
}

.status-warn {
  color: #ffd8b5;
  background: rgba(255, 143, 60, 0.12);
}

.status-inline {
  color: var(--muted);
  font-size: 0.88rem;
}

.step-block {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(17, 27, 42, 0.75), rgba(12, 19, 31, 0.92));
  box-shadow: var(--shadow-sm);
}

.step-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
}

.step-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(243, 162, 27, 0.98), rgba(15, 179, 171, 0.82));
  color: #071019;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 0 18px 36px rgba(243, 162, 27, 0.22);
}

.step-header p {
  margin-top: 4px;
  color: var(--muted);
}

.stack-list {
  display: grid;
  gap: 14px;
}

.surface-note {
  padding: 14px 15px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(6, 12, 21, 0.76);
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field span {
  color: var(--muted);
  font-size: 0.84rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(6, 12, 21, 0.9);
  color: var(--text);
  padding: 12px 14px;
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease,
    background 120ms ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(243, 162, 27, 0.42);
  box-shadow: 0 0 0 4px rgba(243, 162, 27, 0.1);
  background: rgba(8, 14, 23, 0.96);
}

.field-hint {
  color: var(--muted-2);
  font-size: 0.8rem;
}

.field-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.field-row input {
  flex: 1 1 auto;
}

.button,
.button-secondary {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 11px 14px;
  background: rgba(18, 28, 48, 0.94);
  color: var(--text);
  transition:
    transform 120ms ease,
    border-color 120ms ease,
    background 120ms ease,
    box-shadow 120ms ease;
}

.button:hover,
.button-secondary:hover {
  transform: translateY(-1px);
  border-color: rgba(243, 162, 27, 0.34);
  background: rgba(24, 36, 60, 0.94);
  box-shadow: var(--shadow-sm);
}

.button {
  background: linear-gradient(135deg, rgba(243, 162, 27, 0.18), rgba(24, 36, 60, 0.94));
  border-color: rgba(243, 162, 27, 0.26);
}

.button-small {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 10px;
  font-size: 0.82rem;
}

.muted {
  color: var(--muted);
}

.is-hidden {
  display: none;
}

.toast-layer {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  display: grid;
  gap: 12px;
  width: min(480px, calc(100vw - 32px));
}

.toast {
  padding: 18px;
  border: 1px solid var(--panel-border);
  border-left-width: 6px;
  border-radius: 18px;
  background: var(--panel-strong);
  box-shadow: 0 22px 48px rgba(24, 32, 39, 0.28);
}

.toast.toast-ok {
  border-left-color: var(--good);
}

.toast.toast-bad {
  border-left-color: var(--danger);
}

.toast h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.toast-body {
  display: grid;
  gap: 8px;
  color: var(--text);
  white-space: pre-wrap;
}

.toast-actions {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toast-timer {
  color: var(--muted);
  font-size: 0.92rem;
}

.shell-login {
  width: min(520px, calc(100% - 28px));
}

.hero-panel {
  padding: 24px;
}

.login-hero-panel {
  display: grid;
  gap: 18px;
}

.hero-copy {
  display: grid;
  gap: 8px;
}

.eyebrow {
  color: var(--muted-2);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
}

.surface-panel {
  padding: 18px;
}

.panel-heading {
  margin-bottom: 14px;
}

.panel-copy {
  color: var(--muted);
  margin-top: 4px;
}

@media (max-width: 720px) {
  .flow-shell,
  .shell,
  .shell-login {
    width: calc(100% - 16px);
    margin: 12px auto 32px;
  }

  .flow-card,
  .hero-panel,
  .surface-panel {
    padding: 16px;
    border-radius: 22px;
  }

  .step-block {
    padding: 14px;
  }

  .flow-toolbar,
  .field-row,
  .toast-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .flow-toolbar-left {
    align-items: flex-start;
  }

  .field-row input,
  .field-row button,
  .button,
  .button-secondary {
    width: 100%;
  }

  .toast-layer {
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
  }
}
