:root {
  --bg: #081120;
  --bg-soft: #0d1730;
  --panel: rgba(10, 20, 38, 0.82);
  --panel-strong: rgba(13, 24, 44, 0.95);
  --panel-border: rgba(148, 163, 184, 0.16);
  --text: #e8f0ff;
  --muted: #8fa5c2;
  --brand: #5b8cff;
  --brand-2: #8b5cf6;
  --accent: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 18px 48px rgba(2, 6, 23, 0.42);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(91,140,255,.22), transparent 24%),
    radial-gradient(circle at top right, rgba(34,197,94,.10), transparent 18%),
    radial-gradient(circle at bottom right, rgba(139,92,246,.16), transparent 24%),
    linear-gradient(180deg, #06101d 0%, #091423 100%);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
p { color: var(--muted); line-height: 1.55; }
h1, h2, h3 { margin: 0; }
.shell { display: grid; grid-template-columns: 290px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 20px;
  border-right: 1px solid var(--panel-border);
  background: rgba(5, 12, 22, 0.94);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
}
.brand-block { display: flex; gap: 14px; align-items: center; }
.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(91,140,255,.95), rgba(139,92,246,.9));
  box-shadow: 0 12px 26px rgba(91,140,255,.32);
}
.brand { font-size: 24px; font-weight: 800; letter-spacing: .02em; }
.brand-block small { display: block; color: var(--muted); font-size: 12px; margin-top: 5px; line-height: 1.45; }
.nav { display: flex; flex-direction: column; gap: 10px; margin-top: 26px; }
.nav button, .ghost, .primary, .danger {
  border: 1px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  padding: 12px 14px;
  font: inherit;
  transition: .18s ease;
}
.nav button {
  background: transparent;
  color: var(--muted);
  text-align: left;
}
.nav button.active,
.nav button:hover {
  background: rgba(91,140,255,.14);
  color: white;
  border-color: rgba(91,140,255,.22);
}
.sidebar-footer { margin-top: auto; display: grid; gap: 12px; }
.main { padding: 28px; }
.panel {
  background: var(--panel);
  backdrop-filter: blur(18px);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.hero {
  padding: 28px;
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 18px;
  align-items: stretch;
  background:
    linear-gradient(135deg, rgba(91,140,255,.14), rgba(139,92,246,.06)),
    var(--panel-strong);
}
.eyebrow, .caps {
  color: #c8d7f5;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 11px;
  font-weight: 700;
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-top: 8px;
  line-height: 1.05;
}
.hero p { max-width: 760px; margin: 14px 0 0; }
.hero-pills { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px; }
.hero-side { display: flex; justify-content: flex-end; }
.grid { display: grid; gap: 18px; }
.grid.metrics.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.metrics.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.two { grid-template-columns: 1.15fr .85fr; }
.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { padding: 20px; }
.stat-card { position: relative; overflow: hidden; }
.stat-card::after {
  content: '';
  position: absolute;
  inset: auto -18px -24px auto;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  opacity: .16;
}
.accent-blue::after { background: #5b8cff; }
.accent-green::after { background: #22c55e; }
.accent-purple::after { background: #8b5cf6; }
.accent-amber::after { background: #f59e0b; }
.metric-value { font-size: 32px; font-weight: 800; margin: 10px 0 6px; }
.metric-inline { font-size: 18px; font-weight: 800; }
.label { color: var(--muted); font-size: 13px; }
.section { margin-top: 20px; }
.list { display: flex; flex-direction: column; gap: 12px; }
.item {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, .12);
  background: rgba(255,255,255,.025);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(91,140,255,.16);
  color: #d7e5ff;
}
.badge.success { background: rgba(34,197,94,.16); color: #d3ffe0; }
.badge.warn { background: rgba(245,158,11,.18); color: #ffe4ac; }
.badge.danger { background: rgba(239,68,68,.18); color: #ffd3d3; }
.table-wrap { overflow: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 740px; }
.table th, .table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, .12);
  vertical-align: top;
}
.table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}
.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: white;
  box-shadow: 0 12px 28px rgba(91,140,255,.25);
}
.ghost {
  background: rgba(255,255,255,.03);
  color: var(--text);
  border-color: var(--panel-border);
}
.danger {
  background: rgba(239,68,68,.16);
  color: #ffd3d3;
  border-color: rgba(239,68,68,.2);
}
.primary:hover, .ghost:hover, .danger:hover { transform: translateY(-1px); }
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  overflow: hidden;
}
.login-side { padding: 36px; }
.login-side.alt {
  background: rgba(255,255,255,.02);
  border-left: 1px solid var(--panel-border);
}
.login h1 { font-size: 44px; margin: 10px 0; }
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.2);
  background: rgba(255,255,255,.04);
  color: var(--text);
  font: inherit;
}
textarea { min-height: 100px; resize: vertical; }
form { display: grid; gap: 12px; }
.small { font-size: 13px; color: var(--muted); line-height: 1.45; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-top: 22px; }
.kpi {
  padding: 15px;
  border-radius: 18px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--panel-border);
}
.inline-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: #dce8ff;
  font-size: 12px;
  border: 1px solid rgba(148,163,184,.12);
}
.pill.glow { box-shadow: inset 0 0 0 1px rgba(91,140,255,.12), 0 0 0 1px rgba(91,140,255,.12); }
.notice {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(34,197,94,.12);
  color: #d6ffe2;
  border: 1px solid rgba(34,197,94,.18);
}
.notice.subtle {
  background: rgba(255,255,255,.03);
  color: var(--text);
  border-color: rgba(148,163,184,.12);
}
.muted-box {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.03);
  border: 1px dashed rgba(148,163,184,.22);
  color: var(--muted);
}
.muted-box.compact { display: grid; gap: 8px; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.surface-form {
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(148,163,184,.12);
}
.hidden-form { display: none; }
.row-between { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.top-gap { align-items: start; }
.customer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.customer-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(148,163,184,.14);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
}
.customer-card h3 { font-size: 20px; margin-bottom: 6px; }
.customer-tagline { margin: 12px 0 14px; }
.customer-meta, .customer-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.status-chip {
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(148,163,184,.12);
  padding: 12px;
}
.mini-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}
.mini-progress.roomy { margin-top: 14px; }
.mini-step {
  font-size: 11px;
  text-align: center;
  border-radius: 999px;
  padding: 8px 6px;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(148,163,184,.12);
  color: var(--muted);
}
.mini-step.done {
  color: #d9ffe4;
  background: rgba(34,197,94,.14);
  border-color: rgba(34,197,94,.24);
}
.journey-grid { display: grid; gap: 12px; }
.journey-card {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(148,163,184,.12);
}
.risk-item { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.stage-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stage-card {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(148,163,184,.12);
}
.check-item::before {
  content: '✓';
  margin-right: 10px;
  color: #85f2ab;
}
.integrations-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.integration-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(148,163,184,.12);
  background: rgba(255,255,255,.03);
}
.onboarding-top { margin-top: 20px; }
.timeline { display: grid; gap: 14px; }
.timeline-step { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; }
.timeline-dot {
  width: 14px;
  height: 14px;
  margin-top: 3px;
  border-radius: 999px;
  background: rgba(148,163,184,.3);
  box-shadow: 0 0 0 4px rgba(148,163,184,.08);
}
.timeline-dot.done {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34,197,94,.12);
}
.ringed { box-shadow: 0 0 0 1px rgba(91,140,255,.25), var(--shadow); }
.task-board { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; }
.task-column { min-height: 100%; }
.task-card p { margin: 10px 0; }
.pricing-card, .template-card { min-height: 100%; }
.error-text { color: #ffd3d3; }

@media (max-width: 1280px) {
  .grid.metrics.five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .integrations-grid, .task-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .shell,
  .hero,
  .login-card,
  .grid.metrics.four,
  .grid.metrics.five,
  .two,
  .three,
  .split,
  .customer-grid,
  .integrations-grid,
  .task-board,
  .stage-grid,
  .mini-progress,
  .customer-meta,
  .customer-status-grid {
    grid-template-columns: 1fr;
  }
  .sidebar {
    height: auto;
    position: relative;
  }
  .hero-side { justify-content: stretch; }
  .main { padding: 18px; }
}
