:root {
  color-scheme: light;
  --navy: #102a43;
  --ink: #243b53;
  --muted: #627d98;
  --blue: #1f6feb;
  --blue-dark: #1755b5;
  --cyan: #38bdf8;
  --green: #16a34a;
  --amber: #d97706;
  --line: #d9e2ec;
  --pale: #eaf2ff;
  --surface: #ffffff;
  --background: #f5f8fc;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--background);
}

select,
textarea,
input {
  font: inherit;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 30px 22px;
  display: flex;
  flex-direction: column;
  color: white;
  background:
    radial-gradient(circle at 15% 75%, rgba(56, 189, 248, 0.16), transparent 28%),
    var(--navy);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  text-decoration: none;
  font-size: 18px;
  font-weight: 750;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  font-size: 20px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 8px 24px rgba(31, 111, 235, 0.35);
}

nav {
  margin-top: 64px;
  display: grid;
  gap: 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border-radius: 10px;
  color: #b8c8d9;
  text-decoration: none;
  font-size: 14px;
}

.nav-item span {
  color: #7491ad;
  font-size: 10px;
  letter-spacing: 1px;
}

.nav-item:hover,
.nav-item.active {
  color: white;
  background: rgba(255, 255, 255, 0.09);
}

.sidebar-note {
  margin-top: auto;
  padding: 16px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.sidebar-note strong,
.sidebar-note small {
  display: block;
}

.sidebar-note strong {
  font-size: 12px;
}

.sidebar-note small {
  margin-top: 4px;
  color: #91a7bc;
  font-size: 10px;
  line-height: 1.35;
}

.status-dot {
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.status-dot.connected {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

main {
  min-width: 0;
}

.topbar {
  height: 96px;
  padding: 0 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2.2px;
}

.topbar h1 {
  margin: 0;
  color: var(--navy);
  font-size: 20px;
}

.team-badge {
  padding: 9px 14px;
  border: 1px solid #c8dbfa;
  border-radius: 999px;
  color: var(--blue-dark);
  background: var(--pale);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
}

.hero-grid {
  max-width: 1220px;
  min-height: calc(100vh - 96px);
  margin: 0 auto;
  padding: 64px 5vw;
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(440px, 1.1fr);
  align-items: center;
  gap: 7vw;
}

.step-label {
  display: inline-block;
  margin-bottom: 22px;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--blue);
  background: var(--pale);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.6px;
}

.intro h2 {
  max-width: 560px;
  margin: 0;
  color: var(--navy);
  font-size: clamp(42px, 5vw, 66px);
  line-height: 0.99;
  letter-spacing: -3.2px;
}

.intro h2 em {
  color: var(--blue);
  font-style: normal;
}

.intro > p {
  max-width: 520px;
  margin: 30px 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.feature-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 13px;
  list-style: none;
  color: #486581;
  font-size: 13px;
}

.feature-list span {
  width: 21px;
  height: 21px;
  margin-right: 9px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: var(--blue);
  background: var(--pale);
  font-size: 11px;
  font-weight: 900;
}

.form-card {
  padding: 32px;
  border: 1px solid #dbe5ef;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(36, 59, 83, 0.1);
}

.form-heading {
  margin-bottom: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-heading span {
  color: var(--blue);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.form-heading h3 {
  margin: 7px 0 0;
  color: var(--navy);
  font-size: 22px;
}

.form-heading .icon-box {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--blue);
  background: var(--pale);
  font-size: 18px;
}

label {
  margin: 17px 0 7px;
  display: block;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.optional {
  margin-left: 6px;
  color: #829ab1;
  font-size: 10px;
  font-weight: 500;
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  content: "⌄";
  position: absolute;
  top: 50%;
  right: 15px;
  color: var(--blue);
  transform: translateY(-58%);
  pointer-events: none;
}

select,
textarea,
input[type="password"],
input[type="url"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #fbfdff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

select {
  height: 46px;
  padding: 0 42px 0 14px;
  appearance: none;
}

input[type="password"],
input[type="url"] {
  height: 46px;
  padding: 0 14px;
}

textarea {
  min-height: 74px;
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.45;
}

select:focus,
textarea:focus,
input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.11);
}

select:disabled {
  color: #9fb3c8;
  cursor: progress;
}

.actions {
  margin-top: 25px;
  display: grid;
  grid-template-columns: 0.9fr 1.2fr;
  gap: 10px;
}

.button {
  min-height: 48px;
  padding: 0 17px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
}

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

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

.button.secondary {
  color: var(--blue-dark);
  border-color: #c8dbfa;
  background: white;
}

.button.primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  background: var(--blue);
  box-shadow: 0 10px 24px rgba(31, 111, 235, 0.24);
}

.button.primary:hover:not(:disabled) {
  background: var(--blue-dark);
  box-shadow: 0 14px 30px rgba(31, 111, 235, 0.3);
}

.form-status {
  min-height: 18px;
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.form-status.error {
  color: #c2410c;
}

.preview-section {
  padding: 72px 5vw 88px;
  border-top: 1px solid var(--line);
  background: white;
}

.preview-section.hidden {
  display: none;
}

.section-heading {
  max-width: 1220px;
  margin: 0 auto 30px;
  display: flex;
  align-items: end;
  justify-content: space-between;
}

.section-heading h2 {
  margin: 0;
  color: var(--navy);
  font-size: 32px;
}

.section-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.metrics,
.preview-grid {
  max-width: 1220px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

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

.metric {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdff;
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--blue);
}

.metric.amber::before {
  background: var(--amber);
}

.metric.green::before {
  background: var(--green);
}

.metric span,
.metric small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.metric strong {
  margin: 6px 0 4px;
  display: block;
  color: var(--navy);
  font-size: 31px;
}

.preview-grid {
  margin-top: 18px;
  grid-template-columns: 0.8fr 1.2fr;
}

.panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.panel-heading {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-heading h3 {
  margin: 0;
  color: var(--navy);
  font-size: 16px;
}

.panel-heading span {
  color: var(--muted);
  font-size: 10px;
}

.bars {
  display: grid;
  gap: 16px;
}

.bar-head {
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  color: var(--ink);
  font-size: 11px;
}

.bar-track {
  height: 7px;
  overflow: hidden;
  border-radius: 8px;
  background: #edf2f7;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.work-items {
  max-height: 345px;
  overflow: auto;
}

.work-item {
  padding: 13px 0;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #edf2f7;
}

.work-item:first-child {
  border-top: 0;
}

.work-id {
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
}

.work-title strong,
.work-title small {
  display: block;
}

.work-title strong {
  color: var(--ink);
  font-size: 12px;
}

.work-title small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.state {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--green);
  background: #eaf9ef;
  font-size: 9px;
  font-weight: 750;
}

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

  .sidebar {
    position: static;
    height: auto;
    padding: 18px 5vw;
    flex-direction: row;
    align-items: center;
  }

  .sidebar nav,
  .sidebar-note {
    display: none;
  }

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

  .intro h2 {
    font-size: 46px;
  }
}

@media (max-width: 620px) {
  .topbar,
  .hero-grid,
  .preview-section {
    padding-left: 20px;
    padding-right: 20px;
  }

  .topbar .eyebrow {
    display: none;
  }

  .hero-grid {
    padding-top: 42px;
  }

  .form-card {
    padding: 23px;
  }

  .actions,
  .metrics,
  .preview-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}
