:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --ink: #172033;
  --muted: #687386;
  --line: #dfe7f2;
  --line-strong: #c9d5e7;
  --blue: #2457d6;
  --blue-dark: #173c9f;
  --blue-soft: #eaf1ff;
  --green: #15803d;
  --green-soft: #e9f8ef;
  --amber: #9a6700;
  --amber-soft: #fff5dc;
  --red: #b42318;
  --red-soft: #ffedeb;
  --teal: #0f766e;
  --teal-soft: #e7f7f5;
  --shadow: 0 16px 50px rgba(20, 31, 56, 0.12);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 14px;
  color: #ffffff;
  background: linear-gradient(180deg, #101827 0%, #0b1220 100%);
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px 8px 18px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 850;
  background: #ffffff;
  color: var(--blue);
}

.brand strong {
  display: block;
  font-size: 17px;
  letter-spacing: 0;
}

.brand span {
  display: block;
  margin-top: 2px;
  color: #aab7cc;
  font-size: 12px;
  font-weight: 700;
}

.nav {
  display: grid;
  gap: 4px;
}

.nav button {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #cbd5e1;
  min-height: 42px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  font-weight: 750;
}

.nav button:hover,
.nav button.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.nav .icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  font-size: 11px;
  font-weight: 850;
  flex: 0 0 26px;
}

.nav button.active .icon {
  background: #ffffff;
  color: var(--blue);
}

.seller-note {
  margin-top: auto;
  padding: 14px 10px 4px;
  color: #cbd5e1;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
  line-height: 1.5;
}

.seller-note strong {
  color: #ffffff;
}

.seller-note p {
  margin: 6px 0 0;
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px 28px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(209, 219, 232, 0.85);
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 850;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.15;
}

.topbar p:last-child {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.top-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn {
  border: 1px solid var(--line-strong);
  background: #ffffff;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--ink);
  font-weight: 800;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.btn:hover {
  border-color: #aab9d0;
}

.btn.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
}

.btn.primary:hover {
  background: var(--blue-dark);
}

.btn.ghost {
  background: #ffffff;
}

.btn.small {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
}

.content {
  padding: 26px 28px 46px;
  display: grid;
  gap: 18px;
}

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

.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel.pad {
  padding: 18px;
}

.panel-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.panel-header h2,
.panel-header h3,
.panel h2,
.panel h3 {
  margin: 0;
}

.panel-header p,
.panel .subtle {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.metric {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  min-height: 118px;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric strong {
  display: block;
  margin-top: 9px;
  font-size: 30px;
  line-height: 1;
}

.metric p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
  line-height: 1.35;
}

th {
  color: #3a4659;
  background: #f8fafc;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

tr:last-child td {
  border-bottom: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.pill.green {
  color: var(--green);
  background: var(--green-soft);
}

.pill.amber {
  color: var(--amber);
  background: var(--amber-soft);
}

.pill.red {
  color: var(--red);
  background: var(--red-soft);
}

.pill.blue {
  color: var(--blue);
  background: var(--blue-soft);
}

.pill.teal {
  color: var(--teal);
  background: var(--teal-soft);
}

.stage-list {
  display: grid;
  gap: 10px;
}

.stage {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.stage-number {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #ffffff;
  color: var(--blue);
  font-weight: 900;
  border: 1px solid var(--line);
}

.stage h3 {
  margin: 0;
  font-size: 15px;
}

.stage p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.states {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.state-chip {
  padding: 4px 6px;
  border-radius: 6px;
  background: #edf2f7;
  color: #384457;
  font-size: 12px;
  font-weight: 850;
}

.detail-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.detail-card h3 {
  margin: 0;
  font-size: 15px;
}

.detail-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.callout {
  padding: 15px;
  border: 1px solid #cfe0ff;
  background: var(--blue-soft);
  border-radius: 8px;
  line-height: 1.5;
}

.callout strong {
  color: var(--blue-dark);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

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

.field label {
  font-size: 12px;
  color: #445066;
  font-weight: 850;
}

.input,
.select {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 10px 11px;
  background: #ffffff;
  min-height: 40px;
}

.demo-banner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.8fr);
  gap: 18px;
  align-items: stretch;
}

.hero-panel {
  padding: 22px;
  background: linear-gradient(135deg, #ffffff 0%, #eef4ff 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-panel h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
}

.hero-panel p {
  margin: 12px 0 0;
  color: #4d5a70;
  line-height: 1.55;
  max-width: 760px;
}

.workflow-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.workflow-card h3 {
  margin: 0;
}

.timeline {
  display: grid;
  gap: 8px;
}

.timeline div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.timeline div:last-child {
  border-bottom: 0;
}

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

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

  .sidebar {
    position: relative;
    height: auto;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .seller-note {
    display: none;
  }

  .demo-banner,
  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    position: relative;
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .content,
  .topbar {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .stage {
    grid-template-columns: 34px 1fr;
  }

  .stage .pill {
    grid-column: 2;
    width: fit-content;
  }
}
