:root {
  color-scheme: light;
  --navy: #071626;
  --navy-deep: #05111f;
  --navy-raised: #11293d;
  --navy-line: #244054;
  --cyan: #70e8e0;
  --accent: #006b66;
  --accent-dark: #005650;
  --accent-soft: #e1f5f1;
  --ink: #172b3c;
  --ink-strong: #0c1f30;
  --muted: #506678;
  --quiet: #64798a;
  --line: #dce5ec;
  --line-dark: #c6d4df;
  --canvas: #f3f6f9;
  --surface: #fff;
  --subtle: #f8fafc;
  --focus: #068982;
  --amber: #8c4a00;
  --amber-bg: #fff0d9;
  --red: #9c253b;
  --red-bg: #ffedf0;
  --shadow: 0 1px 2px rgb(10 30 48 / 4%), 0 5px 18px rgb(10 30 48 / 4%);
  --radius-sm: .55rem;
  --radius: .85rem;
  --radius-lg: 1rem;
  --sidebar-width: 15.6rem;
  --content-width: 100rem;
  --space: clamp(1.1rem, 2.6vw, 2.5rem);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 100%;
  line-height: 1.5;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); min-width: 18rem; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
[hidden] { display: none !important; }
svg { display: block; flex-shrink: 0; }
img { max-width: 100%; display: block; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2, h3 { color: var(--ink-strong); line-height: 1.18; font-weight: 690; letter-spacing: -.025em; }
h1 { font-size: clamp(1.9rem, 3.3vw, 3.2rem); letter-spacing: -.045em; }
h2 { font-size: clamp(1.18rem, 1.55vw, 1.48rem); }
h3 { font-size: 1.05rem; }
small, .small { font-size: .82rem; line-height: 1.45; }
.muted { color: var(--muted); }
.sr-only, .visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; z-index: 100; top: .8rem; left: .8rem; padding: .6rem 1rem;
  background: var(--surface); color: var(--accent-dark); border-radius: var(--radius-sm);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.app { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; align-self: start; display: flex; flex-direction: column;
  height: 100dvh; overflow: auto; padding: 1.6rem 1rem 1.2rem;
  color: #d3e0ec; background: var(--navy); border-right: 1px solid var(--navy-line);
}
.sidebar .sidebar-close { display: none; }
.sidebar :focus-visible { outline-color: var(--cyan); }
.brand {
  display: flex; align-items: center; gap: .7rem; width: fit-content; max-width: 100%;
  margin: 0 .32rem 2.35rem; text-decoration: none; color: #f8fcff; line-height: 1;
  font-size: 1.48rem; font-weight: 720; letter-spacing: -.065em;
}
.brand:hover { color: #fff; }
.brand svg { width: 2rem; height: 2rem; color: var(--cyan); }
.brand img { width: 2.15rem; height: 2.15rem; object-fit: contain; }
.brand-mark { color: var(--cyan); }
.brand small { display: block; margin-top: .27rem; color: #a9bfce; font-size: .68rem; font-weight: 550; letter-spacing: .025em; }
.workspace-label, .eyebrow {
  color: var(--accent); font-size: .73rem; line-height: 1.35; font-weight: 730;
  letter-spacing: .085em; text-transform: uppercase;
}
.sidebar .workspace-label { display: block; color: #a9bfce; margin: 0 .36rem .62rem; }
.industry-control { position: relative; margin-bottom: 1.6rem; }
.industry-control label { display: block; margin: 0 .36rem .44rem; color: #adc1d0; font-size: .78rem; font-weight: 590; }
.industry-control select {
  display: block; appearance: none; width: 100%; min-height: 2.85rem;
  padding: .65rem 2rem .65rem .75rem; border-radius: var(--radius-sm);
  border: 1px solid #36566c; background: #11283b; color: #f4fbff; font-size: .88rem; font-weight: 625;
}
.industry-control:has(select)::after {
  content: ""; position: absolute; pointer-events: none; inset-inline-end: .92rem; bottom: 1.19rem;
  width: .42rem; height: .42rem; border-right: 2px solid #9ad8d8; border-bottom: 2px solid #9ad8d8;
  transform: rotate(45deg);
}
.industry-control select:hover { background: #1a354b; }
.industry-control option { background: #102437; color: #fff; }
.module-nav { display: grid; gap: .22rem; }
.module-nav :is(button, a) {
  position: relative; display: flex; align-items: center; gap: .7rem; width: 100%; min-height: 2.65rem;
  padding: .57rem .7rem; background: transparent; border: 1px solid transparent; border-radius: var(--radius-sm);
  color: #c0d1e2; font-size: .91rem; font-weight: 580; text-align: left; text-decoration: none;
}
.module-nav :is(button, a) svg { width: 1.13rem; height: 1.13rem; color: #8ea9bd; }
.module-nav :is(button, a):hover { color: #fff; background: #142b3e; }
.module-nav :is(button, a):is([aria-current]:not([aria-current="false"]), [aria-pressed="true"], .active) {
  color: #f5fffe; border-color: #2e5262; background: #163444; font-weight: 680;
}
.module-nav :is(button, a):is([aria-current]:not([aria-current="false"]), [aria-pressed="true"], .active) svg { color: var(--cyan); }
.side-footer {
  color: #a9bfce; font-size: .79rem; line-height: 1.45; margin-top: auto; padding: 1rem .35rem 0;
  border-top: 1px solid #223b50;
}
.side-footer p + p { margin-top: .5rem; }
.side-footer a { color: #bafff5; }
.module-nav + .side-footer { margin-top: auto; }
.module-nav { padding-bottom: 1.5rem; }

.workspace { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 4; display: flex; align-items: center; gap: .9rem;
  justify-content: space-between; min-height: 4.25rem; padding: .65rem var(--space);
  background: #fbfdff; border-bottom: 1px solid var(--line);
}
.topbar-crumb { display: flex; align-items: center; gap: .52rem; color: var(--muted); font-size: .9rem; min-width: 0; }
.topbar-crumb strong { color: var(--ink); font-weight: 680; }
.topbar-crumb svg { width: .84rem; height: .84rem; color: #648291; }
.topbar-actions, .heading-actions { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.topbar-actions { justify-content: flex-end; flex-shrink: 0; }
.mobile-nav { display: none; }
#main {
  flex: 1; width: 100%; max-width: var(--content-width); margin-inline: auto;
  padding: clamp(1.5rem, 3vw, 2.75rem) var(--space) 2.8rem; scroll-margin-top: 4.7rem;
}
.page-heading {
  display: flex; justify-content: space-between; gap: 1.2rem; align-items: end; margin-bottom: 1.75rem;
}
.page-heading > :first-child { min-width: 0; }
.page-heading :is(.eyebrow, .workspace-label) { margin-bottom: .55rem; }
.page-heading :is(p:not(.eyebrow), .subtitle, .description) { margin-top: .55rem; max-width: 53rem; color: var(--muted); }
.heading-actions { flex-shrink: 0; }
.workspace-footer {
  display: flex; gap: 1rem; justify-content: space-between; align-items: center;
  padding: 1rem var(--space); color: var(--muted); font-size: .8rem; border-top: 1px solid var(--line);
  background: #f9fbfd;
}

.button, .icon-button, .mobile-nav {
  display: inline-flex; align-items: center; justify-content: center; gap: .48rem; min-height: 2.5rem;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line-dark);
  border-radius: var(--radius-sm); padding: .54rem .8rem;
  font-size: .88rem; font-weight: 650; line-height: 1.22; text-decoration: none; text-align: center;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}
.button:hover, .icon-button:hover, .mobile-nav:hover { background: #eef5f8; border-color: #aebfcb; }
.button svg, .icon-button svg, .mobile-nav svg { width: 1.07rem; height: 1.07rem; }
.button.primary, .button-primary {
  color: #fff; background: var(--accent); border-color: var(--accent); box-shadow: 0 1px 2px rgb(8 38 44 / 10%);
}
.button.primary:hover, .button-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.button.secondary, .button-secondary { color: var(--ink); background: var(--surface); }
.button.ghost, .button-ghost { color: var(--muted); background: transparent; border-color: transparent; box-shadow: none; }
.button.ghost:hover, .button-ghost:hover { color: var(--accent-dark); background: #eaf2f6; }
.button.danger { color: var(--red); background: var(--red-bg); border-color: #efc4cd; }
.button.danger:hover { background: #ffdde4; }
.icon-button { width: 2.5rem; padding: .45rem; }
.topbar .mobile-nav { display: none; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; margin-bottom: 1.2rem; }
.stat-card, .panel, .record-card {
  min-width: 0; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow);
}
.stat-card { position: relative; padding: 1.12rem 1.15rem; }
.stat-card :is(.stat-label, dt) { color: var(--muted); font-size: .86rem; font-weight: 600; }
.stat-card :is(.stat-value, strong, dd) {
  display: block; margin-top: .32rem; color: var(--ink-strong);
  font-size: clamp(1.48rem, 2.55vw, 2.23rem); font-weight: 730; letter-spacing: -.045em; line-height: 1.12;
  overflow-wrap: anywhere; font-variant-numeric: tabular-nums;
}
.stat-card :is(.stat-meta, .stat-detail, small) { display: block; margin-top: .45rem; color: var(--quiet); font-size: .76rem; }
.stat-card :is(.stat-icon, .metric-icon) {
  display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: .55rem;
  color: var(--accent); background: var(--accent-soft); margin-bottom: .55rem;
}
.stat-card :is(.stat-icon, .metric-icon) svg { width: 1.08rem; height: 1.08rem; }

.dashboard-grid, .section-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.section-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-grid + .panel, .section-grid + .panel, main > .panel + .panel { margin-top: 1.2rem; }
.panel { padding: 1.25rem; }
.panel-header { display: flex; gap: .85rem; align-items: start; justify-content: space-between; margin-bottom: 1rem; }
.panel-header > :first-child { min-width: 0; }
.panel-header p { color: var(--muted); font-size: .88rem; margin-top: .35rem; }
.panel-header .button { flex-shrink: 0; }
.chart { min-width: 0; min-height: 9rem; color: var(--accent); }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart text { font-family: inherit; }
.chart-legend { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: .85rem; color: var(--muted); font-size: .82rem; }
.activity-list, .checklist, .flow-steps { list-style: none; padding: 0; margin: 0; }
.activity-list > *, .checklist > * { padding: .78rem 0; border-bottom: 1px solid var(--line); }
.activity-list > :first-child, .checklist > :first-child { padding-top: .2rem; }
.activity-list > :last-child, .checklist > :last-child { border-bottom: 0; padding-bottom: .15rem; }
.activity-list li { display: flex; align-items: flex-start; gap: .66rem; }
.activity-list li > div { min-width: 0; }
.activity-list strong { font-size: .93rem; }
.activity-list p { color: var(--muted); font-size: .85rem; }
.activity-list time, .activity-list small { color: var(--quiet); font-size: .76rem; white-space: nowrap; }
.activity-icon, .check-icon {
  display: inline-grid; flex-shrink: 0; place-items: center; width: 1.95rem; height: 1.95rem;
  color: var(--accent); background: var(--accent-soft); border-radius: .55rem;
}
.activity-icon svg, .check-icon svg { width: 1rem; height: 1rem; }
.flow-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .45rem; margin-block: .95rem 1.1rem; }
.flow-steps > * {
  position: relative; display: grid; gap: .25rem; align-content: start; min-width: 0;
  padding: .55rem .45rem; border-top: 2px solid var(--line-dark);
  color: var(--muted); font-size: .77rem; line-height: 1.35; overflow-wrap: anywhere;
}
.flow-steps > :is([aria-current="step"], .active, .current) { color: var(--accent-dark); border-color: var(--accent); font-weight: 730; }
.flow-steps > :is(.complete, .done) { border-color: #83b8b0; }
.record-card { padding: .95rem; }
.record-card h3 { margin-bottom: .38rem; }
.record-card p { color: var(--muted); font-size: .88rem; }
.record-meta { display: flex; gap: .45rem 1rem; flex-wrap: wrap; color: var(--muted); font-size: .84rem; margin-block: .55rem; }
.record-meta dt { font-weight: 650; }
.record-card .button { margin-top: .65rem; }

.table-wrap { overflow-x: auto; max-width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: .88rem; }
.data-table thead { background: #f3f7f9; color: #425b6c; }
.data-table :is(th, td) { padding: .74rem .86rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table th { font-size: .77rem; font-weight: 680; letter-spacing: .02em; white-space: nowrap; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #f8fcfd; }
.data-table td:has(.badge) { white-space: nowrap; }
.data-table td:first-child { min-width: 8rem; }
.data-table button:not(.icon-button) { min-width: max-content; }
.data-table strong { color: var(--ink-strong); font-weight: 670; }
.data-table .small, .data-table small { color: var(--muted); }
.badge {
  display: inline-flex; align-items: center; gap: .35rem; min-height: 1.55rem;
  padding: .2rem .53rem; border-radius: 999px; color: #345265; background: #eaf1f6;
  font-size: .76rem; font-weight: 675; line-height: 1.16; white-space: nowrap; width: max-content;
}
.badge:is(.active, .good, .success, .complete, .paid, .low) { color: #145749; background: #e1f3eb; }
.badge:is(.pending, .warning, .high, .attention) { color: var(--amber); background: var(--amber-bg); }
.badge:is(.error, .danger, .critical) { color: var(--red); background: var(--red-bg); }
.sidebar .badge { background: #1c3f47; color: #d3fcf1; }
.notice, .empty-state {
  border-radius: var(--radius-sm); padding: .78rem .92rem;
  border: 1px solid #c7dfdf; background: #eff9f8; color: #2b5661;
  font-size: .87rem; line-height: 1.45;
}
.notice { display: flex; align-items: flex-start; gap: .55rem; }
.notice + .panel, .notice + .section-grid, .notice + .stats-grid { margin-top: 1rem; }
.empty-state { text-align: center; background: var(--subtle); border-color: var(--line); padding: 2rem 1rem; }
.empty-state > * + * { margin-top: .45rem; }
.filters { display: flex; gap: .65rem; flex-wrap: wrap; align-items: end; margin: .8rem 0 1rem; }
.filters > :is(input, .field) { flex: 1; min-width: 9rem; }
.filters label { font-size: .84rem; font-weight: 625; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .88rem; }
.field { min-width: 0; display: grid; gap: .35rem; align-content: start; }
.field > label, .field > span:first-child { font-weight: 635; font-size: .87rem; }
.input, .field :is(input:not([type="checkbox"], [type="radio"]), select, textarea),
.filters :is(input:not([type="checkbox"], [type="radio"]), select) {
  width: 100%; min-height: 2.6rem; padding: .5rem .63rem; background: #fff; color: var(--ink);
  border: 1px solid #bfcfdb; border-radius: var(--radius-sm); font-size: 1rem;
}
.input::placeholder, .field input::placeholder, .filters input::placeholder { color: #617989; }
.field textarea { resize: vertical; min-height: 5rem; }
.field:has(textarea), .field.full, .form-grid .wide { grid-column: 1 / -1; }
.form-actions, .dialog-actions {
  display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .5rem; margin-top: 1.15rem;
}
dialog {
  color: var(--ink); width: min(35rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem);
  margin: auto; padding: 1.35rem; overflow: auto; border: 1px solid var(--line);
  border-radius: var(--radius-lg); background: var(--surface);
  box-shadow: 0 14px 70px rgb(4 20 32 / 22%);
}
dialog::backdrop { background: rgb(5 18 29 / 55%); }
dialog h2 { margin-bottom: .42rem; }
dialog p { color: var(--muted); margin-bottom: .85rem; }
.dialog-header { display: flex; justify-content: space-between; align-items: start; gap: .7rem; }
#toast {
  position: fixed; z-index: 20; left: 50%; bottom: 1.1rem; transform: translateX(-50%);
  width: max-content; max-width: calc(100vw - 2rem); padding: .7rem .92rem; border-radius: var(--radius-sm);
  color: #f2fffc; background: var(--navy-raised); border: 1px solid #355267;
  font-size: .87rem; box-shadow: 0 4px 18px rgb(4 20 32 / 20%);
}
#toast:empty { display: none; }

@media (max-width: 70rem) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 54rem) {
  :root { --sidebar-width: 13.9rem; }
  .section-grid { grid-template-columns: 1fr; }
  .page-heading { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 43rem) {
  .app { display: block; }
  .sidebar .sidebar-close { display: grid; position: absolute; right: .8rem; top: .85rem; place-items: center; background: #19394c; color: #e8f7ff; border-color: #396175; }
  .sidebar {
    position: fixed; z-index: 7; inset: 0 auto 0 0; width: min(18rem, calc(100% - 2.6rem)); height: 100dvh;
    transform: translateX(-110%); visibility: hidden;
    transition: transform 180ms ease-out, visibility 180ms;
  }
  .app:is(.nav-open, .sidebar-open, [data-nav-open="true"]) .sidebar,
  body:is(.nav-open, .sidebar-open) .sidebar,
  .sidebar:is(.open, [data-open="true"]) { transform: none; visibility: visible; box-shadow: 0 0 0 100vmax rgb(5 17 31 / 40%); }
  .topbar { justify-content: flex-start; flex-wrap: wrap; min-height: 3.9rem; padding-inline: .8rem; gap: .55rem; }
  .topbar .mobile-nav, .mobile-nav { display: inline-flex; flex-shrink: 0; }
  .app:is(.nav-open, .sidebar-open, [data-nav-open="true"]) .mobile-nav,
  body:is(.nav-open, .sidebar-open) .mobile-nav { z-index: 8; }
  .topbar-start { flex: 1 1 6rem; gap: .45rem; }
  .topbar-crumb { flex: 1 1 6rem; overflow-wrap: anywhere; }
  .topbar-actions { margin-left: auto; }
  .button, .icon-button, .mobile-nav { min-height: 2.75rem; }
  .icon-button { width: 2.75rem; }
  .panel, .stat-card { padding: .95rem; }
  .stats-grid { gap: .62rem; }
  .workspace-footer { align-items: start; flex-direction: column; gap: .36rem; }
}
@media (max-width: 25rem) {
  :root { --space: .8rem; }
  .topbar-actions > .button { padding-inline: .56rem; }
  .topbar-crumb { font-size: .83rem; }
  .page-heading { margin-bottom: 1.2rem; }
  .panel-header { flex-wrap: wrap; align-items: start; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .flow-steps { gap: .25rem; }
  .flow-steps > * { padding-inline: .25rem; }
  .data-table :is(th, td) { padding-inline: .61rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* The compact dashboard pairs operational totals with an industry walkthrough. */
.sidebar .brand-logo {
  display: block;
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 2.35rem;
  object-fit: contain;
}
.sidebar .sandbox-note { display: flex; align-items: center; gap: .43rem; }
.sidebar .sandbox-note strong { color: #eef8fc; font-weight: 620; }
.sidebar .company-switch {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: .55rem;
  padding: .57rem .66rem; margin-top: .6rem; min-height: 2.65rem; text-align: left;
  border: 1px solid #34536a; border-radius: var(--radius-sm);
  color: #e0f8fa; background: #143247; font: inherit; font-weight: 650;
}
.sidebar .company-switch:hover { background: #24495d; }
.company-switch svg { width: .95rem; height: .95rem; color: #90efdf; }
.company-switch > :is(span, div) { min-width: 0; }
.company-switch small { display: block; color: #adc9d7; font-weight: 550; font-size: .75rem; }
.sandbox-dot, .demo-pill > span:empty {
  display: inline-block; width: .46rem; height: .46rem; border-radius: 50%; background: #258e71;
}
.sandbox-dot { background: var(--cyan); }
.side-action {
  display: block; min-height: 2.4rem; padding: .28rem .35rem; margin: .38rem 0 0 -.35rem;
  color: #c0d2e2; background: transparent; border: 1px solid transparent;
  border-radius: var(--radius-sm); font: inherit; text-align: left;
}
.side-action:hover { color: #fff; background: #183247; }
.topbar-start { display: flex; gap: .75rem; align-items: center; min-width: 0; }

.demo-pill {
  display: inline-flex; align-items: center; gap: .38rem; padding: .25rem .57rem;
  color: #15584e; background: #e4f4ed; border: 1px solid #c7e8dc; border-radius: 999px;
  font-size: .76rem; line-height: 1.2; font-weight: 680; white-space: nowrap;
}
.demo-pill svg { width: .82rem; height: .82rem; }
.search-trigger {
  display: inline-flex; align-items: center; justify-content: space-between; gap: .75rem;
  min-width: min(13rem, 24vw); min-height: 2.4rem; padding: .48rem .65rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #f3f7fa; color: var(--muted); font-size: .88rem;
}
.search-trigger:hover { background: #e9f3f6; border-color: var(--line-dark); }
.search-trigger svg { width: 1rem; height: 1rem; }
.search-trigger kbd {
  border: 1px solid var(--line); border-radius: .28rem; padding: .08rem .32rem;
  font: inherit; color: var(--muted); background: var(--surface);
}
.stat-card .stat-name {
  display: block; min-height: 1.3rem; padding-inline-end: 2.15rem;
  color: #426073; line-height: 1.35; font-size: .85rem; font-weight: 640;
}
.stat-card .stat-icon {
  position: absolute; top: .85rem; inset-inline-end: .92rem;
  width: 1.95rem; height: 1.95rem; margin: 0;
}
.stat-card .stat-note { color: var(--muted); margin-top: .36rem; font-size: .79rem; line-height: 1.34; }
.dashboard-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: stretch; }
.chart-panel { min-height: 17rem; }
.guided-feature {
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center;
  min-height: 17rem; padding: 1.38rem; background: #092337; border-color: #183649; color: #ecf8ff;
}
.feature-photo {
  position: absolute; z-index: -2; width: 100%; height: 100%; inset: 0;
  object-fit: cover; object-position: 72% center; opacity: .83;
}
.guided-feature::before {
  position: absolute; z-index: -1; content: ""; inset: 0;
  background: linear-gradient(94deg, #092337 4%, rgb(9 35 55 / 98%) 29%, rgb(9 35 55 / 77%) 63%, rgb(9 35 55 / 20%));
}
.feature-content { position: relative; width: min(100%, 25rem); }
.feature-kicker {
  margin-bottom: .62rem; color: #a5fcf3; font-size: .72rem;
  text-transform: uppercase; letter-spacing: .095em; font-weight: 720;
}
.guided-feature h2 { color: #f9fcff; font-size: clamp(1.32rem, 2.18vw, 2rem); max-width: 15ch; }
.guided-feature p:not(.feature-kicker, .feature-progress) {
  max-width: 34ch; margin-top: .62rem; color: #e2f0f7; font-size: .91rem; line-height: 1.47;
}
.guided-feature .button {
  margin-top: .85rem; color: #0a302f; background: #d1f9ee; border-color: #c7f4e8; font-weight: 710;
}
.guided-feature .button:hover { background: #f5fff9; border-color: #f5fff9; }
.guided-feature .button:focus-visible { outline-color: #85f6ef; }
.feature-progress { margin-top: .65rem; font-size: .76rem; line-height: 1.35; color: #acdbdf; }
.records-panel { margin-top: 1.2rem; }
.records-panel .table-wrap { margin-top: .55rem; }

.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .82rem; }
.board-column {
  min-width: 0; min-height: 15rem; padding: .72rem; display: flex; flex-direction: column; gap: .66rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: #eaf0f5;
}
.board-column-head { display: flex; align-items: center; justify-content: space-between; gap: .55rem; min-height: 2rem; }
.board-column-head span { font-size: .8rem; color: var(--muted); }
.board .record-card { box-shadow: 0 1px 2px rgb(30 53 70 / 8%); padding: .76rem; }
.board .record-card h3, .board-column-head h3 { overflow-wrap: anywhere; }
.board .record-card .button { width: 100%; }

dialog:has(.industry-grid) { width: min(58rem, calc(100% - 2rem)); }
.industry-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .78rem; margin-top: .95rem; }
.industry-card {
  position: relative; padding: 0; display: grid; grid-template-rows: auto 1fr; align-content: start;
  min-width: 0; overflow: hidden; text-align: left; background: var(--surface);
  border: 1px solid var(--line-dark); border-radius: var(--radius); color: var(--ink);
}
.industry-card:hover { border-color: #438f87; background: #eefaf6; }
.industry-card:is([aria-pressed="true"], [aria-current]:not([aria-current="false"]), .active) {
  border-color: var(--accent); box-shadow: 0 0 0 2px #a6ddd4;
}
.industry-thumb { width: 100%; height: 6.85rem; display: block; object-fit: cover; background: #244558; }
.industry-thumb img { width: 100%; height: 100%; object-fit: cover; }
.industry-card-content { display: grid; gap: .24rem; padding: .65rem .72rem .74rem; }
.industry-card-content :is(h2, h3, strong) { font-size: 1rem; line-height: 1.27; font-weight: 690; margin: 0; }
.industry-card-content p { color: var(--muted); font-size: .82rem; line-height: 1.38; margin: 0; }

@media (max-width: 68rem) {
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 40rem) {
  .industry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .industry-thumb { height: 5.5rem; }
  .search-trigger { justify-content: center; padding: .48rem; width: 2.6rem; min-width: 0; }
  .search-trigger :is(kbd, span) { display: none; }
  .guided-feature { min-height: 14rem; }
}
@media (max-width: 27rem) {
  .board { grid-template-columns: minmax(0, 1fr); }
  .board-column { min-height: 5rem; }
  .industry-grid { gap: .56rem; }
  .industry-thumb { height: 4.75rem; }
  .industry-card-content { padding: .55rem; }
  .stat-card .stat-name { padding-inline-end: 1.3rem; }
  .stat-card .stat-icon { width: 1.43rem; height: 1.43rem; top: .74rem; inset-inline-end: .72rem; }
  .stat-card .stat-icon svg { width: .92rem; height: .92rem; }
  .guided-feature::before { background: linear-gradient(95deg, #092337 6%, rgb(9 35 55 / 98%) 52%, rgb(9 35 55 / 65%)); }
}

.company-avatar {
  display: inline-grid; place-items: center; width: 2rem; height: 2rem; flex: 0 0 2rem;
  color: #cef9f2; background: #2a5560; border-radius: .52rem;
  font-size: .76rem; font-weight: 720; letter-spacing: .01em;
}
.company-switch-copy { flex: 1; line-height: 1.3; }
.company-switch-copy strong { display: block; font-size: .85rem; }
.pipeline-chart { display: grid; gap: .77rem; min-height: 0; margin-top: 1.1rem; }
.pipeline-row {
  display: grid; grid-template-columns: minmax(6.5rem, 1fr) minmax(0, 1.8fr) 1.4rem;
  gap: .62rem; align-items: center; min-width: 0;
}
.pipeline-label { color: var(--muted); font-size: .87rem; font-weight: 620; line-height: 1.29; }
.pipeline-track { min-width: 0; height: .63rem; overflow: hidden; border-radius: 999px; background: #e7edf2; }
.pipeline-fill {
  height: 100%; width: clamp(0%, var(--bar-width, 0%), 100%); border-radius: inherit;
  background: #8baabf;
}
.pipeline-row:nth-child(2) .pipeline-fill { background: #547d9d; }
.pipeline-row:nth-child(3) .pipeline-fill { background: #348e9b; }
.pipeline-row:nth-child(4) .pipeline-fill { background: #087c72; }
.pipeline-count { color: var(--ink); text-align: right; font-size: .91rem; font-variant-numeric: tabular-nums; }
.data-table td strong + small { display: block; margin-top: .13rem; }
.badge.waiting { color: var(--amber); background: var(--amber-bg); }
.badge.working { color: #244e75; background: #e5eef9; }
.badge.ready { color: #245864; background: #e6f4f5; }
.board-column-head h2 { font-size: 1.01rem; }
.board-column-head span {
  display: grid; place-items: center; min-width: 1.42rem; padding: .13rem .29rem;
  border-radius: .4rem; background: #dfe9f0; font-weight: 660;
}
.column-empty { color: var(--muted); font-size: .86rem; padding-block: .5rem; }
input:is([type="checkbox"], [type="radio"]) { accent-color: var(--accent); }
@media (max-width: 25rem) {
  .pipeline-row { grid-template-columns: minmax(5.5rem, 1fr) minmax(0, 1.25fr) 1.1rem; gap: .45rem; }
  .pipeline-label { font-size: .8rem; }
}

.detail-list {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .67rem; margin-block: .65rem 1rem;
}
.detail-list > div {
  min-width: 0; padding: .58rem .65rem; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--subtle); overflow-wrap: anywhere;
}
.detail-list dt { font-size: .77rem; color: var(--muted); }
.detail-list dd { margin-top: .15rem; color: var(--ink-strong); font-size: .92rem; font-weight: 640; }
dialog .notice { display: grid; gap: .22rem; }
dialog .notice p { margin: 0; color: inherit; }
.search-results { margin-top: .8rem; }
.search-results .activity-list li { align-items: center; }
.search-results .activity-list li > .button { margin-inline-start: auto; flex-shrink: 0; }
.search-results .activity-list li > div { overflow-wrap: anywhere; }
.form-error { color: var(--red); margin: .5rem 0 0; font-size: .87rem; }
.form-error:empty { display: none; }
.industry-card-content > span { color: var(--muted); font-size: .88rem; line-height: 1.3; }
.industry-card-content > small { color: var(--muted); font-size: .78rem; line-height: 1.26; }
.company-switch-copy :is(strong, small) { overflow-wrap: anywhere; }

@media (max-width: 25rem) {
  .detail-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .search-results .activity-list li { gap: .48rem; }
  .search-results .activity-icon { width: 1.55rem; height: 1.55rem; }
  .feature-photo { object-position: 78% center; }
}

/* 4ProTech's CRM design uses the original sapphire art and beveled porcelain surfaces. */
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('./assets/crm-display.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #0b152b;
  --navy-deep: #071021;
  --navy-raised: #162747;
  --navy-line: #263959;
  --cyan: #91c9ff;
  --accent: #255ddd;
  --accent-dark: #1b43ae;
  --accent-soft: #e9f0ff;
  --ink: #172742;
  --ink-strong: #0b132b;
  --muted: #425572;
  --quiet: #526785;
  --line: #d7e2f1;
  --line-dark: #b7c9e1;
  --canvas: #eef3fb;
  --subtle: #f3f7ff;
  --focus: #245ddd;
  --shadow:
    0 18px 36px -12px rgb(15 23 42 / 13%),
    0 4px 12px -2px rgb(37 99 235 / 8%),
    inset 0 1.5px 0 rgb(255 255 255 / 98%),
    inset 0 -1.5px 0 rgb(37 99 235 / 10%);
  --lifted-shadow:
    0 24px 48px -12px rgb(15 23 42 / 20%),
    0 8px 20px -4px rgb(37 99 235 / 16%),
    inset 0 1.5px 0 #fff,
    inset 0 -2px 0 rgb(37 99 235 / 18%);
  --porcelain: linear-gradient(160deg, #fff 54%, #f1f6ff 100%);
  --royal: linear-gradient(135deg, #1d4ed8 0%, #2456d8 52%, #413bc1 100%);
  --radius: 1.04rem;
  --radius-lg: 1.26rem;
  --content-width: 89rem;
}

body {
  background:
    radial-gradient(ellipse 62rem 40rem at 4% 4%, #dde9ff 0%, transparent 73%),
    radial-gradient(ellipse 58rem 35rem at 92% 12%, #e7e9ff 0%, transparent 69%),
    var(--canvas);
}

h1, h2, h3, .brand, .stat-value {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

h1, h2, h3 { font-weight: 760; }
.sidebar {
  background:
    radial-gradient(ellipse at 22% 2%, rgb(54 106 223 / 29%), transparent 48%),
    linear-gradient(172deg, #0d1b35 0%, #0a162b 52%, #071223 100%);
  border-color: #223559;
  box-shadow: inset -1px 0 0 rgb(148 184 255 / 9%), 5px 0 22px rgb(12 28 59 / 12%);
}
.sidebar .brand-logo, .launch-topbar .brand-logo, .launch-topbar > a > img {
  border-radius: .62rem;
  box-shadow: 0 5px 15px rgb(28 94 234 / 30%);
}
.sidebar .company-switch {
  color: #f4f8ff;
  background: linear-gradient(160deg, #22416b, #162943);
  border-color: #385684;
  box-shadow: inset 0 1px 0 rgb(210 229 255 / 16%), 0 6px 14px rgb(3 10 24 / 24%);
}
.sidebar .company-switch:hover { background: linear-gradient(160deg, #315393, #223c68); }
.company-switch svg { color: #abcfff; }
.company-avatar { color: #ecf4ff; background: linear-gradient(135deg, #2355ad, #2b4281); }
.module-nav :is(button, a):hover { background: #172c4a; }
.module-nav :is(button, a):is([aria-current]:not([aria-current="false"]), [aria-pressed="true"], .active) {
  border-color: #3b5e9a;
  background: linear-gradient(135deg, #203d78, #162b50);
  box-shadow: inset 0 1px 0 rgb(208 228 255 / 18%), 0 5px 12px rgb(4 14 34 / 22%);
}
.module-nav :is(button, a) svg { color: #a4bee6; }
.side-action:hover { background: #1c3151; }
.topbar {
  background: linear-gradient(180deg, #fff, #f1f6ff);
  border-color: #d4e1f3;
  box-shadow: 0 9px 26px -18px rgb(26 58 123 / 36%), inset 0 1px 0 #fff;
}
.demo-pill { color: #284e95; background: #e9f1ff; border-color: #c2d6f6; }
.sandbox-dot, .demo-pill > span:empty { background: #4c82f5; }
.sandbox-dot { background: #91c9ff; }
.search-trigger { background: #f7faff; }
.search-trigger:hover { background: #e9f0ff; }
.workspace-footer { background: rgb(249 252 255 / 84%); }
.button.primary, .button-primary {
  color: #fff;
  background: var(--royal);
  border-color: #274dbd;
  box-shadow: inset 0 1px 0 rgb(221 236 255 / 30%), inset 0 -2px 0 rgb(12 34 109 / 23%), 0 7px 16px -6px rgb(30 76 211 / 53%);
}
.button.primary:hover, .button-primary:hover {
  background: linear-gradient(135deg, #163ba9, #3134aa);
  border-color: #193caa;
}
.button.secondary {
  border-color: #c6d7ef;
  background: var(--porcelain);
  box-shadow: inset 0 1px 0 #fff, 0 3px 8px rgb(34 70 132 / 8%);
}
.button.secondary:hover, .button.ghost:hover { background: #e9f0ff; border-color: #b7cef5; }
.panel, .stat-card, .record-card {
  background: var(--porcelain);
  border-color: #d2dff1;
}
.stat-card .stat-name { color: #344969; padding-inline-end: 3rem; }
.stat-card .stat-value { margin-top: .5rem; }
.stat-card .stat-icon {
  width: 2.65rem; height: 2.65rem;
  border-radius: .75rem;
  border: 1px solid rgb(117 147 208 / 36%);
  background: #dce9fb center / cover no-repeat;
  box-shadow: 0 7px 13px -5px rgb(22 48 99 / 32%), inset 0 1px 0 rgb(255 255 255 / 76%);
}
.stat-card .stat-icon:has(svg) svg { visibility: hidden; }
.stat-card:nth-child(1) .stat-icon { background-image: url('./assets/work-orders-projects.webp'); }
.stat-card:nth-child(2) .stat-icon { background-image: url('./assets/tasks.webp'); }
.stat-card:nth-child(3) .stat-icon { background-image: url('./assets/accounting.webp'); }
.stat-card:nth-child(4) .stat-icon { background-image: url('./assets/inventory.webp'); }
.guided-feature {
  background: #0b1934;
  border-color: #2c5394;
  box-shadow: 0 18px 42px -15px rgb(11 34 76 / 51%), inset 0 1px 0 rgb(212 227 255 / 26%);
}
.feature-photo { opacity: .84; }
.guided-feature::before {
  background: linear-gradient(94deg, #0b1934 3%, rgb(11 25 52 / 97%) 30%, rgb(11 25 52 / 80%) 65%, rgb(11 25 52 / 34%));
}
.feature-kicker, .feature-progress { color: #b9d8ff; }
.guided-feature .button {
  color: #152e6b;
  background: linear-gradient(180deg, #fff, #dbe8ff);
  border-color: #e1edff;
}
.guided-feature .button:hover { color: #102451; background: #fff; border-color: #fff; }
.pipeline-track { height: .72rem; background: #dde8f8; box-shadow: inset 0 1px 2px rgb(31 71 142 / 12%); }
.pipeline-fill { background: linear-gradient(90deg, #5678a8, #79a1d2); box-shadow: inset 0 1px 0 rgb(255 255 255 / 33%); }
.pipeline-row:nth-child(2) .pipeline-fill { background: linear-gradient(90deg, #3f68a9, #618fd9); }
.pipeline-row:nth-child(3) .pipeline-fill { background: linear-gradient(90deg, #2960c7, #4f85e1); }
.pipeline-row:nth-child(4) .pipeline-fill { background: linear-gradient(90deg, #1e47a8, #3f62dc); }
.board-column { background: linear-gradient(172deg, #e4edfb, #eff4fc); }
.board-column-head span { background: #d5e3fb; }
.data-table thead { background: #eef4ff; }
.data-table tbody tr:hover { background: #f0f5ff; }
.industry-card:hover { border-color: #6f98e8; background: #edf4ff; }
.industry-card:is([aria-pressed="true"], [aria-current]:not([aria-current="false"]), .active) {
  box-shadow: 0 0 0 2px #a9c4f8;
}

.demo-launch {
  width: min(100%, 89rem); min-height: 100vh; margin-inline: auto;
  padding: 0 var(--space) 2.8rem;
}
.launch-topbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .72rem;
  min-height: 5.2rem;
}
.launch-topbar .brand {
  margin: 0; align-items: center; color: #101b38;
  font-size: 1.37rem; font-weight: 800; letter-spacing: -.055em;
}
.launch-topbar .brand small { color: var(--muted); }
.launch-topbar img { width: 2.42rem; height: 2.42rem; object-fit: contain; }
.launch-topbar :is(a, button):not(.brand) { font-weight: 680; }
.launch-hero {
  position: relative; isolation: isolate; display: flex; align-items: center;
  min-height: clamp(15.4rem, 26vw, 22rem);
  padding: clamp(1.35rem, 3.8vw, 3.5rem);
  border: 1px solid #3a68af; border-radius: var(--radius-lg);
  overflow: hidden; color: #edf5ff;
  background:
    linear-gradient(90deg, rgb(5 12 26 / 95%) 0%, rgb(5 15 34 / 84%) 42%, rgb(7 25 51 / 19%) 100%),
    #061026 url('./assets/crm-hero.jpg') right 53% / cover no-repeat;
  box-shadow: 0 22px 48px -15px rgb(11 31 70 / 45%), inset 0 1px 0 rgb(216 235 255 / 28%);
}
.launch-hero-copy { min-width: 0; max-width: 37rem; }
.launch-hero h1 { color: #fff; font-size: clamp(2.35rem, 5.25vw, 4.4rem); line-height: 1.035; letter-spacing: -.055em; }
.launch-hero :is(.eyebrow, .launch-kicker) { margin-bottom: .75rem; color: #bddbff; }
.launch-hero p:not(.eyebrow, .launch-kicker) { max-width: 38rem; margin-top: .84rem; color: #d6e6fc; font-size: clamp(.98rem, 1.4vw, 1.12rem); }
.launch-hero .button { margin-top: .9rem; }
.launch-hero .button:focus-visible { outline-color: #aad1ff; }
.launch-instructions {
  display: grid; gap: .38rem; margin: clamp(1.6rem, 3.5vw, 2.7rem) 0 1rem;
}
.launch-instructions h2 { font-size: clamp(1.35rem, 2.25vw, 1.9rem); }
.launch-instructions p { color: var(--muted); }
.launch-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(.85rem, 1.6vw, 1.32rem);
}
.launch-card {
  position: relative; min-width: 0; display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid #c6d7ee; border-radius: var(--radius);
  background: var(--porcelain); box-shadow: var(--shadow);
  transition: box-shadow 170ms ease, transform 170ms ease, border-color 170ms ease;
}
.launch-card:is(:hover, :focus-within) {
  transform: translateY(-2px); border-color: #93b3ed; box-shadow: var(--lifted-shadow);
}
.launch-cover {
  display: block; position: relative; width: 100%; min-height: 0; aspect-ratio: 2.13;
  overflow: hidden; border-bottom: 1px solid #cbdaf0; background: #121e38;
}
.launch-cover > img, img.launch-cover { width: 100%; height: 100%; object-fit: cover; object-position: center; }
img.launch-cover { height: auto; }
.launch-cover:not(img)::after {
  position: absolute; inset: 0; content: ''; pointer-events: none;
  background: linear-gradient(0deg, rgb(10 22 48 / 23%), transparent 65%);
  box-shadow: inset 0 1px 0 rgb(214 231 254 / 29%);
}
.launch-body {
  display: flex; flex: 1; flex-direction: column; align-items: start; gap: .52rem;
  position: relative; padding: 1.35rem clamp(.72rem, 1.2vw, 1rem) 1rem;
}
.launch-body :is(h2, h3) { font-size: clamp(1.03rem, 1.37vw, 1.2rem); }
.launch-body p { color: var(--muted); font-size: .88rem; line-height: 1.42; }
.launch-body .launch-company { font-weight: 680; }
.launch-icon {
  position: absolute; top: -.9rem; inset-inline-end: .83rem;
  width: 2.25rem; height: 2.25rem; display: grid; place-items: center;
  border: 1px solid #9dbcf3; border-radius: .67rem;
  color: var(--industry-accent, var(--accent-dark)); background: linear-gradient(165deg, #fff, #e2ebff);
  box-shadow: inset 0 1px 0 #fff, 0 7px 15px -4px rgb(17 48 109 / 26%);
}
.launch-icon svg { width: 1.12rem; height: 1.12rem; }
.launch-footer { margin-top: 1rem; color: var(--muted); font-size: .84rem; }
.launch-tags {
  display: flex; flex-wrap: wrap; align-items: center; gap: .32rem;
  margin: .16rem 0 .18rem; padding: 0; list-style: none;
}
.launch-tags > * {
  padding: .13rem .42rem; border: 1px solid #cfddf3; border-radius: 999px;
  color: #304e80; background: #eaf1fd; font-size: .73rem; font-weight: 650;
}
.launch-card-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: .45rem;
  margin-top: auto; padding-top: .32rem;
}
.launch-body > .button:first-of-type { margin-top: auto; }
.launch-body > .button, .launch-card-actions .button { min-height: 2.5rem; }
.launch-body .button:focus-visible { outline-offset: 2px; }

.tour-layout {
  display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(15rem, 1fr); align-items: start;
  gap: clamp(.85rem, 2vw, 1.4rem);
}
.tour-main {
  min-width: 0; display: grid; align-content: start; gap: 1rem;
}
.tour-sidebar { min-width: 0; display: grid; gap: .85rem; }
.tour-header { display: flex; align-items: start; justify-content: space-between; gap: .55rem; flex-wrap: wrap; }
.tour-header p, .tour-readout p { margin-top: .3rem; color: var(--muted); font-size: .9rem; }
.tour-step small { display: block; margin-top: .15rem; color: var(--muted); font-size: .73rem; }
.tour-readout .button { margin: .55rem 0 0 -.6rem; }
.tour-action .tour-effect {
  border-left: 3px solid #6f9af0; border-radius: 0 .5rem .5rem 0;
  padding: .52rem .72rem; background: #eaf2ff; color: #24477f; font-size: .9rem;
}
.tour-result-icon {
  background: var(--royal); border: 1px solid #2c56c2; color: #fff;
  display: grid; width: 2.55rem; height: 2.55rem; place-items: center; border-radius: .78rem;
  box-shadow: inset 0 1px 0 rgb(226 238 255 / 36%), 0 6px 15px rgb(30 76 178 / 22%);
}
.tour-steps {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none; padding: 0; margin: 0; gap: .5rem;
}
.tour-step {
  min-width: 0; display: flex; align-items: center; gap: .48rem; min-height: 3.15rem;
  padding: .64rem .7rem; border: 1px solid #cfdbef; border-radius: .69rem;
  overflow-wrap: anywhere; background: #f8fbff; color: #4b5e7d;
  font-size: .83rem; font-weight: 630; line-height: 1.32;
}
.tour-step svg { width: 1rem; height: 1rem; }
.tour-step :is(.step-number, .step-index, .tour-step-number) {
  flex: 0 0 1.55rem; display: grid; place-items: center; min-height: 1.55rem;
  border-radius: .45rem; background: #edf3ff; color: #2256b8; font-size: .75rem; font-weight: 760;
}
.tour-step:is([aria-current="step"], .is-active, [data-status="active"]) {
  background: linear-gradient(155deg, #fff, #e5efff);
  color: #193e94; border-color: #7399e5;
  box-shadow: inset 0 1px 0 #fff, 0 6px 14px -6px rgb(41 95 209 / 33%);
}
.tour-step:is(.is-complete, [data-status="complete"]) {
  background: #edf3ff; color: #274b91; border-color: #bfd4fa;
}
.tour-action, .tour-complete {
  display: grid; align-content: start; gap: .72rem;
  border: 1px solid #bfd2ef; border-radius: var(--radius);
  padding: clamp(1.09rem, 2.2vw, 1.7rem); background: var(--porcelain); box-shadow: var(--shadow);
}
.tour-action p, .tour-complete p { color: var(--muted); }
.tour-action :is(.button, button), .tour-complete :is(.button, button) { justify-self: start; }
.tour-action :is(.heading-actions, .tour-actions), .tour-complete :is(.heading-actions, .tour-actions) {
  display: flex; flex-wrap: wrap; gap: .52rem; margin-top: .26rem;
}
.tour-complete { background: linear-gradient(145deg, #fff 20%, #e8f1ff); }
.tour-sidebar .detail-list { grid-template-columns: minmax(0, 1fr); }
.tour-sidebar .panel h2 { margin-bottom: .56rem; }
.tour-sidebar .panel :is(.record-meta, .detail-list):last-child { margin-bottom: 0; }

@media (max-width: 70rem) {
  .launch-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 62rem) {
  .tour-layout { grid-template-columns: minmax(0, 1fr); }
  .tour-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 52rem) {
  .launch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 37rem) {
  .launch-hero { background-position: 66% center; }
  .tour-sidebar { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 31rem) {
  .launch-topbar { min-height: 4.4rem; }
  .launch-grid { grid-template-columns: minmax(0, 1fr); }
  .launch-cover { aspect-ratio: 2.2; }
  .launch-body { padding-inline: .95rem; }
  .tour-steps { gap: .32rem; }
  .tour-step { display: grid; align-content: start; padding: .49rem .38rem; min-height: 3.86rem; gap: .24rem; font-size: .74rem; }
  .stat-card .stat-icon { width: 1.8rem; height: 1.8rem; top: .7rem; inset-inline-end: .63rem; border-radius: .49rem; }
  .stat-card .stat-name { padding-inline-end: 1.4rem; }
}

/* Dispatch and technician work use the same surfaces as the main CRM. */
.field-console, .field-main, .field-sidebar, .field-jobs {
  display: grid; align-content: start; min-width: 0;
  gap: clamp(.8rem, 1.5vw, 1.15rem);
}
.field-summary {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(.65rem, 1.3vw, 1rem);
}
.field-layout {
  display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(15rem, 1fr);
  align-items: start; gap: clamp(.8rem, 1.7vw, 1.25rem); min-width: 0;
}
.field-job, .field-lead {
  min-width: 0; display: grid; align-content: start; gap: .75rem;
  padding: clamp(.85rem, 1.4vw, 1.15rem); border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--porcelain); box-shadow: var(--shadow);
}
.field-job-head {
  display: flex; align-items: flex-start; flex-wrap: wrap; justify-content: space-between;
  gap: .42rem .64rem;
}
.field-job-head > * { min-width: 0; overflow-wrap: anywhere; }
.field-job-head p, .field-job > p, .field-lead > p {
  color: var(--muted); font-size: .88rem;
}
.field-job-head p { margin-top: .27rem; }
.field-job-meta {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .53rem;
}
.field-job-meta > div {
  min-width: 0; display: grid; align-content: start; gap: .12rem;
  padding: .54rem .66rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--subtle); overflow-wrap: anywhere;
}
.field-job-meta dt { color: var(--muted); font-size: .76rem; }
.field-job-meta dd { color: var(--ink-strong); font-size: .88rem; font-weight: 650; }
.field-job-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .43rem; }
.field-job-actions .button { max-width: 100%; white-space: normal; }
.field-workload, .field-update-list {
  list-style: none; display: grid; gap: .55rem; padding: 0; margin: 0;
}
.field-workload > li, .field-update-list > li {
  min-width: 0; display: grid; gap: .23rem; padding: .52rem .04rem .65rem;
  border-bottom: 1px solid var(--line); overflow-wrap: anywhere;
}
.field-workload > li:last-child, .field-update-list > li:last-child {
  border-bottom: 0; padding-bottom: 0;
}
.field-workload :is(p, small), .field-update-list :is(p, small, time) {
  color: var(--muted); font-size: .84rem;
}
.field-update-list {
  margin-block: .55rem .8rem; padding-inline-start: .8rem;
  border-inline-start: 2px solid #aec8f1;
}
.field-update-list > li { position: relative; }
.field-update-list > li::before {
  content: ''; position: absolute; inset-inline-start: -1.07rem; top: .94rem;
  width: .41rem; height: .41rem; border-radius: 50%; background: var(--accent);
}
:is(.field-monitor, .field-progress)[data-state] {
  display: inline-flex; align-items: center; max-width: 100%; gap: .32rem;
  padding: .21rem .56rem; border-radius: 999px; color: #254c82;
  background: #e9f1ff; font-size: .78rem; font-weight: 690; line-height: 1.4;
}
:is(.field-monitor, .field-progress)[data-state="waiting"] { color: var(--amber); background: var(--amber-bg); }
:is(.field-monitor, .field-progress)[data-state="complete"] { color: #145749; background: #e1f3eb; }
:is(.field-monitor, .field-progress)[data-state="alert"] { color: var(--red); background: var(--red-bg); }
.field-guide .tour-steps, .tour-steps.field-steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.field-flow-steps, .flow-steps[style*="--step-count"] {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 7.15rem), 1fr));
}
.field-board {
  display: grid; min-width: 0; grid-template-columns: repeat(7, minmax(0, 1fr));
}
.field-board .board-column, .field-board .record-card { min-width: 0; overflow-wrap: anywhere; }
.field-board .board-column-head { min-width: 0; align-items: flex-start; }
.field-board .board-column-head span { flex-shrink: 0; }
.field-board .record-card .button { white-space: normal; }

@media (max-width: 92rem) {
  .field-board { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 69rem) {
  .field-layout { grid-template-columns: minmax(0, 1fr); }
  .field-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 58rem) {
  .field-board, .field-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 45rem) {
  .field-sidebar { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 31rem) {
  .field-guide .tour-steps, .tour-steps.field-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-guide .tour-step, .tour-steps.field-steps .tour-step { display: flex; align-items: center; min-height: 3.2rem; }
  .field-board { grid-template-columns: minmax(0, 1fr); }
}

.step-check {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 2.75rem;
  padding: .4rem .65rem;
  border: 1px solid var(--line);
  border-radius: .55rem;
  background: var(--surface);
  font-size: .9rem;
}
.step-check input { flex: 0 0 auto; width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.step-check:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
