/* TrapReady v36 — operational design layer.
 *
 * Loaded after app.css. This file adds; it does not replace. Every selector here
 * is scoped to a v36 container class so it cannot silently restyle a v35 page,
 * and every rule that has to win against an existing one says so by compounding
 * with the class it is overriding rather than relying on source order. A v35.52.22
 * defect shipped because a single-class rule quietly lost the cascade to a
 * higher-specificity rule elsewhere in app.css; assume that will happen again
 * unless the selector is explicit.
 */

:root {
  /* Spacing — one 4px-based scale, used everywhere in v36. */
  --v36-space-1: 4px;
  --v36-space-2: 8px;
  --v36-space-3: 12px;
  --v36-space-4: 16px;
  --v36-space-5: 24px;
  --v36-space-6: 32px;

  /* Elevation — restrained. Depth signals layering, not decoration. */
  --v36-elev-1: 0 1px 2px rgba(15, 23, 42, .06);
  --v36-elev-2: 0 2px 8px rgba(15, 23, 42, .08);

  /* Semantic status. Mapped onto the existing palette so v36 and v35 surfaces
   * cannot disagree about what "overdue" looks like. */
  --v36-status-overdue: var(--danger);
  --v36-status-due-soon: var(--warning);
  --v36-status-scheduled: var(--blue);
  --v36-status-healthy: var(--ok);
  --v36-status-unknown: var(--muted);

  --v36-rail-width: 232px;
  --v36-rail-width-compact: 64px;
  --v36-radius: 8px;
}

/* ---------- App shell ---------- */

.v36-shell {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.v36-rail {
  flex: 0 0 var(--v36-rail-width);
  width: var(--v36-rail-width);
  position: sticky;
  top: 0;
  align-self: stretch;
  min-height: 100vh;
  padding: var(--v36-space-4) var(--v36-space-3);
  border-right: 1px solid var(--line);
  background: var(--card);
  box-sizing: border-box;
}

.v36-rail .v36-rail-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.v36-rail .v36-rail-divider {
  margin: var(--v36-space-4) 0 var(--v36-space-3);
  border: 0;
  border-top: 1px solid var(--line);
}

.v36-rail .v36-nav-item {
  display: flex;
  align-items: center;
  gap: var(--v36-space-3);
  padding: 9px var(--v36-space-3);
  border-radius: var(--v36-radius);
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.3;
  transition: background-color .12s ease, color .12s ease;
}

.v36-rail .v36-nav-item:hover { background: var(--primary-soft); }

.v36-rail .v36-nav-item:focus-visible {
  outline: 3px solid #0284c7;
  outline-offset: 2px;
}

/* Active state carries a left marker as well as colour, so it is not conveyed
 * by colour alone. */
.v36-rail .v36-nav-item.is-active {
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--primary);
}

[dir="rtl"] .v36-rail .v36-nav-item.is-active {
  box-shadow: inset -3px 0 0 var(--primary);
}

.v36-rail .v36-nav-icon {
  flex: 0 0 18px;
  text-align: center;
  font-size: 15px;
  opacity: .75;
}

.v36-rail .v36-nav-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.v36-rail .v36-nav-badge {
  flex: 0 0 auto;
  min-width: 20px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.v36-rail .v36-nav-item.is-active .v36-nav-badge { background: var(--primary-strong); }

.v36-shell .v36-main {
  flex: 1 1 auto;
  min-width: 0;
}

/* ---------- Compact rail ---------- */

.v36-shell.is-compact .v36-rail {
  flex-basis: var(--v36-rail-width-compact);
  width: var(--v36-rail-width-compact);
}

.v36-shell.is-compact .v36-rail .v36-nav-label { display: none; }

.v36-shell.is-compact .v36-rail .v36-nav-item {
  justify-content: center;
  gap: 0;
}

.v36-rail-toggle {
  display: flex;
  align-items: center;
  gap: var(--v36-space-2);
  width: 100%;
  margin-bottom: var(--v36-space-3);
  padding: 6px var(--v36-space-3);
  border: 1px solid var(--line);
  border-radius: var(--v36-radius);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.v36-rail-toggle:hover { color: var(--ink); }

.v36-rail-toggle:focus-visible {
  outline: 3px solid #0284c7;
  outline-offset: 2px;
}

.v36-shell.is-compact .v36-rail-toggle {
  justify-content: center;
  padding-inline: 6px;
}

.v36-shell.is-compact .v36-nav-badge {
  position: absolute;
  inset-inline-end: 2px;
  top: 2px;
  min-width: 17px;
  padding-inline: 4px;
  font-size: 10px;
}

.v36-shell.is-compact .v36-nav-item { position: relative; }

/* Help lives in the desktop rail in v36. Keep the floating control only as the
 * mobile fallback where the rail is intentionally hidden. */
@media (min-width: 901px) {
  .v36-help-tab { display: none; }
}

/* ---------- Status chip ---------- */

.v36-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

/* The dot is a redundant cue for sighted users; the label carries the meaning
 * for everyone, so status is never colour-only. */
.v36-chip .v36-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}

.v36-chip.is-overdue { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }
.v36-chip.is-due-soon { color: #92400e; border-color: var(--warning); background: #fffaeb; }
.v36-chip.is-scheduled { color: var(--blue-dark); border-color: var(--blue); background: var(--info-soft); }
.v36-chip.is-healthy { color: #14532d; border-color: var(--ok); background: #ecfdf5; }
.v36-chip.is-unknown { color: var(--muted); border-color: var(--border); background: var(--bg); }

/* ---------- Empty state ---------- */

.v36-empty {
  padding: var(--v36-space-6) var(--v36-space-5);
  border: 1px dashed var(--border);
  border-radius: var(--v36-radius);
  text-align: center;
  color: var(--muted);
}

.v36-empty .v36-empty-title {
  display: block;
  margin-bottom: var(--v36-space-2);
  color: var(--ink);
  font-weight: 600;
}

/* ---------- Responsive ---------- */

/* Below the desktop breakpoint the rail stops being a rail. The existing mobile
 * tabbar already covers primary navigation on phones, so duplicating it as a
 * stacked list would push real content below the fold for no gain. */
@media (max-width: 900px) {
  .v36-shell { display: block; }
  .v36-shell .v36-rail { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .v36-rail .v36-nav-item { transition: none; }
}

/* ---------- v36.1 Restaurant Command Centre ---------- */

.v36-command-center {
  display: grid;
  gap: var(--v36-space-5);
}

.v36-command-center > * { margin-bottom: 0; }

.v36-command-head {
  margin-bottom: calc(var(--v36-space-2) * -1);
}

.v36-command-head h1 { margin-bottom: 0; }

.v36-command-primary {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .85fr);
  gap: var(--v36-space-4);
  align-items: stretch;
}

.compliance-verdict.v36-command-status {
  border: 1px solid var(--border);
  border-radius: 14px;
}

.v36-command-status {
  position: relative;
  display: grid;
  align-content: start;
  gap: var(--v36-space-5);
  overflow: hidden;
  padding: var(--v36-space-5);
  border-radius: 14px;
  box-shadow: var(--v36-elev-1);
}

.v36-command-status::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--v36-status-healthy);
}

[dir="rtl"] .v36-command-status::before { inset: 0 0 0 auto; }

.v36-command-status.verdict-action_needed::before { background: var(--v36-status-overdue); }

.v36-command-verdict {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: var(--v36-space-4);
  align-items: center;
}

.v36-command-verdict-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 25px;
  font-weight: 900;
  line-height: 1;
}

.verdict-action_needed .v36-command-verdict-mark {
  background: var(--danger-soft);
  color: var(--danger);
}

.v36-command-verdict h2 {
  margin: 2px 0 4px;
  font-size: clamp(24px, 2.6vw, 32px);
  letter-spacing: -.025em;
}

.v36-command-verdict p { margin: 0; }

.v36-command-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-subtle);
}

.v36-command-metric {
  position: relative;
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 82px;
  padding: var(--v36-space-3);
  border-inline-end: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
  transition: background-color .12s ease, transform .12s ease;
}

.v36-command-metric:last-child { border-inline-end: 0; }
.v36-command-metric:hover { background: var(--surface-subtle); text-decoration: none; }
.v36-command-metric:focus-visible { outline: 3px solid #0284c7; outline-offset: -3px; z-index: 1; }
.v36-command-metric strong { font-size: 27px; line-height: 1; letter-spacing: -.03em; }
.v36-command-metric span { color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1.25; }

.v36-command-metric::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--border-strong);
}

.v36-command-metric.is-overdue::before { background: var(--v36-status-overdue); }
.v36-command-metric.is-due-soon::before { background: var(--v36-status-due-soon); }
.v36-command-metric.is-healthy::before { background: var(--v36-status-healthy); }
.v36-command-metric.is-scheduled::before { background: var(--v36-status-scheduled); }
.v36-command-metric.is-records::before { background: var(--primary); }

.v36-command-reasons {
  display: grid;
  gap: var(--v36-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.v36-command-reasons li {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  color: var(--muted);
  font-size: 13px;
}

.v36-reason-mark {
  width: 7px;
  height: 7px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--warning);
}

.v36-reason-mark.is-critical { background: var(--danger); }

[data-v36-command-next].dashboard-next-action {
  display: flex;
  flex-direction: column;
  margin: 0;
  border-color: var(--border-strong);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--v36-elev-1);
}

[data-v36-command-next] .dashboard-next-action-primary {
  flex: 1 1 auto;
  align-items: flex-start;
  flex-direction: column;
  justify-content: flex-start;
  gap: var(--v36-space-4);
  padding: var(--v36-space-5);
}

[data-v36-command-next] .dashboard-next-action-copy { max-width: none; }
[data-v36-command-next] .dashboard-next-action-copy h2 { font-size: 22px; }
[data-v36-command-next] .dashboard-next-action-cta,
[data-v36-command-next] .dashboard-next-action-cta form,
[data-v36-command-next] .dashboard-next-action-cta .btn { width: 100%; }
[data-v36-command-next] .dashboard-next-action-cta .btn { justify-content: center; }
[data-v36-command-next] .dashboard-task-footer { padding-inline: var(--v36-space-5); }
[data-v36-command-next] .dashboard-urgent-tasks { border-top: 1px solid var(--border); }
[data-v36-command-next] .dashboard-urgent-task { grid-template-columns: 1fr; }
[data-v36-command-next] .dashboard-urgent-task-action { justify-self: stretch; }
[data-v36-command-next] .dashboard-urgent-task-action .btn,
[data-v36-command-next] .dashboard-urgent-task-action form { width: 100%; }

.v36-command-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .75fr);
  gap: var(--v36-space-4);
  align-items: start;
}

.v36-command-workspace > .card,
.v36-command-secondary > .card,
.v36-command-inspector { border-radius: 14px; box-shadow: var(--v36-elev-1); }

.v36-command-section-head { margin-bottom: var(--v36-space-4); }
.v36-command-section-head h2 { margin: 2px 0 3px; }
.v36-command-section-head p { margin: 0; }

.v36-section-link,
.v36-more-link {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.v36-section-link:hover,
.v36-more-link:hover { text-decoration: underline; }

/* Graph-like grouping: location is the parent node, traps are child nodes. */
.v36-location-network { display: grid; gap: var(--v36-space-4); }

.v36-location-node {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-subtle);
  overflow: hidden;
}

.v36-location-node-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--v36-space-3);
  min-height: 44px;
  padding: 9px var(--v36-space-3);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.v36-location-node-head a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.v36-location-node-head a:hover strong { color: var(--primary); }
.v36-location-glyph { color: var(--primary); font-size: 17px; }
.v36-node-count { color: var(--muted); font-size: 12px; font-weight: 800; }

.v36-trap-node-list {
  position: relative;
  display: grid;
  padding: var(--v36-space-2) var(--v36-space-3) var(--v36-space-3) 30px;
}

[dir="rtl"] .v36-trap-node-list { padding: var(--v36-space-2) 30px var(--v36-space-3) var(--v36-space-3); }

.v36-trap-node-list::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: var(--v36-space-4);
  inset-inline-start: 18px;
  width: 1px;
  background: var(--border-strong);
}

.v36-trap-node {
  position: relative;
  display: grid;
  grid-template-columns: 11px minmax(0, 1fr) auto;
  gap: var(--v36-space-3);
  align-items: center;
  min-width: 0;
  margin-top: var(--v36-space-2);
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 1px 1px rgba(15,23,42,.025);
  transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
}

.v36-trap-node:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  box-shadow: var(--v36-elev-2);
  text-decoration: none;
}

.v36-trap-node:focus-visible { outline: 3px solid #0284c7; outline-offset: 2px; }

.v36-trap-node-line {
  position: absolute;
  top: 50%;
  inset-inline-end: 100%;
  width: 13px;
  height: 1px;
  background: var(--border-strong);
}

.v36-trap-node-state {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--v36-status-unknown);
  box-shadow: 0 0 0 3px var(--surface-sunken);
}
.v36-trap-node.is-overdue .v36-trap-node-state { background: var(--v36-status-overdue); }
.v36-trap-node.is-due-soon .v36-trap-node-state { background: var(--v36-status-due-soon); }
.v36-trap-node.is-scheduled .v36-trap-node-state { background: var(--v36-status-scheduled); }
.v36-trap-node.is-healthy .v36-trap-node-state { background: var(--v36-status-healthy); }

.v36-trap-node-main { display: grid; gap: 7px; min-width: 0; }
.v36-trap-node-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.v36-trap-node-title strong { overflow-wrap: anywhere; }
.v36-trap-node-meta { display: flex; gap: 6px 16px; flex-wrap: wrap; color: var(--muted); font-size: 11px; }
.v36-trap-node-meta strong { color: var(--text); font-weight: 700; }
.v36-trap-node-open { color: var(--text-subtle); font-size: 22px; line-height: 1; }

.v36-accumulation {
  position: relative;
  display: block;
  width: min(300px, 100%);
  height: 5px;
  border-radius: 999px;
  background: var(--surface-sunken);
  overflow: visible;
}

/* The bar is drawn with SVG geometry attributes because the CSP
 * (style-src 'self') blocks inline style attributes. */
.v36-accumulation-clip {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
}

.v36-accumulation-bar,
.v36-accumulation-marker {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.v36-accumulation-marker { overflow: visible; }

.v36-accumulation-fill { fill: var(--primary); }

.v36-trap-node.is-overdue .v36-accumulation-fill { fill: var(--danger); }
.v36-trap-node.is-due-soon .v36-accumulation-fill { fill: var(--warning); }
.v36-trap-node.is-healthy .v36-accumulation-fill { fill: var(--success); }

.v36-accumulation-threshold {
  stroke: var(--text);
  stroke-width: 2px;
  vector-effect: non-scaling-stroke;
}

/* Progress grows from the reading-start edge. */
[dir="rtl"] .v36-accumulation-bar,
[dir="rtl"] .v36-accumulation-marker { transform: scaleX(-1); }

.v36-more-link { display: inline-block; margin-top: var(--v36-space-3); }

/* Compact chronological/priority service surface. */
.v36-timeline-list { display: grid; }

.v36-timeline-event {
  display: grid;
  grid-template-columns: 78px 18px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: stretch;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}
.v36-timeline-event:hover { text-decoration: none; }
.v36-timeline-event:focus-visible { outline: 3px solid #0284c7; outline-offset: 2px; border-radius: 8px; }

.v36-timeline-date {
  padding: 13px 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: end;
}

.v36-timeline-rail { position: relative; display: grid; place-items: start center; }
.v36-timeline-rail::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border-strong);
}
.v36-timeline-event:first-child .v36-timeline-rail::before { top: 18px; }
.v36-timeline-event:last-child .v36-timeline-rail::before { bottom: calc(100% - 18px); }
.v36-timeline-rail > span {
  position: relative;
  z-index: 1;
  width: 9px;
  height: 9px;
  margin-top: 16px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--v36-status-unknown);
  box-shadow: 0 0 0 1px var(--border-strong);
}
.v36-timeline-event.is-overdue .v36-timeline-rail > span { background: var(--v36-status-overdue); }
.v36-timeline-event.is-due-soon .v36-timeline-rail > span { background: var(--v36-status-due-soon); }
.v36-timeline-event.is-scheduled .v36-timeline-rail > span { background: var(--v36-status-scheduled); }

.v36-timeline-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.v36-timeline-event:last-child .v36-timeline-copy { border-bottom: 0; }
.v36-timeline-copy strong { font-size: 13px; overflow-wrap: anywhere; }
.v36-timeline-traps { color: var(--text); font-size: 12px; overflow-wrap: anywhere; }
.v36-timeline-state { color: var(--muted); font-size: 11px; font-weight: 700; }
.v36-timeline-open { align-self: center; color: var(--text-subtle); font-size: 19px; }
.v36-timeline-event:hover .v36-timeline-copy strong,
.v36-timeline-event:hover .v36-timeline-open { color: var(--primary); }

.v36-command-secondary { margin-bottom: 0; }
.v36-recent-records .list-row { padding-block: 9px; }

.v36-command-inspector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--v36-space-5);
  background: var(--surface);
}
.v36-command-inspector > div:first-child { max-width: 760px; }
.v36-command-inspector h2 { margin: 3px 0 5px; }
.v36-command-inspector p { margin: 0; }
.v36-command-inspector .actions { flex: 0 0 auto; margin: 0; }

@media (max-width: 1120px) {
  .v36-command-primary,
  .v36-command-workspace { grid-template-columns: 1fr; }
  [data-v36-command-next] .dashboard-next-action-primary { flex-direction: row; align-items: center; justify-content: space-between; }
  [data-v36-command-next] .dashboard-next-action-cta,
  [data-v36-command-next] .dashboard-next-action-cta form,
  [data-v36-command-next] .dashboard-next-action-cta .btn { width: auto; }
  .v36-command-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .v36-command-metric { border-bottom: 1px solid var(--border); }
}

@media (max-width: 700px) {
  .v36-command-center { gap: var(--v36-space-4); }
  .v36-command-status { padding: var(--v36-space-4); }
  .v36-command-verdict { grid-template-columns: 42px minmax(0, 1fr); gap: var(--v36-space-3); }
  .v36-command-verdict-mark { width: 42px; height: 42px; border-radius: 10px; font-size: 20px; }
  .v36-command-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v36-command-metric { min-height: 72px; }
  [data-v36-command-next] .dashboard-next-action-primary { align-items: stretch; flex-direction: column; }
  [data-v36-command-next] .dashboard-next-action-cta,
  [data-v36-command-next] .dashboard-next-action-cta form,
  [data-v36-command-next] .dashboard-next-action-cta .btn { width: 100%; }
  .v36-command-section-head { align-items: flex-start; }
  .v36-trap-node { grid-template-columns: 10px minmax(0, 1fr); }
  .v36-trap-node-open { display: none; }
  .v36-trap-node-meta { display: grid; gap: 2px; }
  .v36-timeline-event { grid-template-columns: 62px 15px minmax(0, 1fr); }
  .v36-timeline-open { display: none; }
  .v36-command-inspector { align-items: stretch; flex-direction: column; }
  .v36-command-inspector .actions { width: 100%; }
  .v36-command-inspector .actions .btn { flex: 1 1 160px; }
}

@media (max-width: 430px) {
  .v36-command-metrics { grid-template-columns: 1fr 1fr; }
  .v36-command-metric strong { font-size: 24px; }
  .v36-trap-node-list { padding-inline-start: 26px; padding-inline-end: 8px; }
  .v36-trap-node-list::before { inset-inline-start: 15px; }
  .v36-timeline-event { grid-template-columns: 1fr; gap: 0; padding: 9px 0; border-bottom: 1px solid var(--border); }
  .v36-timeline-event:last-child { border-bottom: 0; }
  .v36-timeline-date { padding: 0 0 2px; text-align: start; }
  .v36-timeline-rail { display: none; }
  .v36-timeline-copy { padding: 0; border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .v36-command-metric,
  .v36-trap-node { transition: none; }
}

/* ---------- v36.2 production polish ----------
 *
 * This pass is intentionally restrained. It improves hierarchy, responsive
 * behavior and interaction feedback without adding another visual language or
 * changing any operational workflow.
 */

/* The authenticated top bar is sticky and 64px tall on desktop. Keeping the
 * rail pinned below it prevents the first navigation item from sliding behind
 * the header during long pages. */
@media (min-width: 901px) {
  .v36-rail {
    top: 64px;
    min-height: calc(100vh - 64px);
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
}

/* Visually hiding a compact label with display:none removed the link's useful
 * accessible name. Keep the text in the accessibility tree instead. */
.v36-shell.is-compact .v36-rail .v36-nav-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.v36-rail .v36-nav-item:hover,
.v36-rail .v36-nav-item:focus-visible { text-decoration: none; }

.v36-rail .v36-nav-item.is-active {
  background: color-mix(in srgb, var(--primary-soft) 84%, var(--surface));
}

.v36-command-center {
  gap: 20px;
  padding-bottom: var(--v36-space-2);
}

.v36-command-head {
  align-items: end;
  padding: 2px 2px 0;
}

.v36-command-head .role-dashboard-intro { min-width: 0; }
.v36-command-head h1 {
  margin-top: 3px;
  font-size: clamp(28px, 2.7vw, 36px);
  line-height: 1.12;
  letter-spacing: -.035em;
}
.v36-command-head p { margin: 5px 0 0; }

/* Explicitly neutralize the older dashboard gradient. State is carried by the
 * leading rail, status mark and text instead of painting the whole card. */
.compliance-verdict.v36-command-status.verdict-up_to_date,
.compliance-verdict.v36-command-status.verdict-action_needed {
  background: var(--surface);
}

.v36-command-status {
  gap: 20px;
  padding: 22px;
  border-color: var(--border-strong);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .035), 0 8px 24px rgba(15, 23, 42, .035);
}

.v36-command-status::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--primary) 16%, transparent), transparent);
  pointer-events: none;
}

.v36-command-verdict-mark {
  border: 1px solid color-mix(in srgb, var(--success) 18%, transparent);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.45);
}
.verdict-action_needed .v36-command-verdict-mark {
  border-color: color-mix(in srgb, var(--danger) 18%, transparent);
}

.v36-command-verdict h2 { font-weight: 850; }

/* A deliberate 3 × 2 status matrix is easier to scan than an auto-fit strip of
 * tiny tiles. Empty metrics remain clickable but recede visually. */
.v36-command-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-color: var(--border-strong);
  background: var(--surface);
}
.v36-command-metric {
  min-height: 76px;
  padding: 12px 14px;
  border-inline-end: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  transition: background-color .12s ease, box-shadow .12s ease;
}
.v36-command-metric:nth-child(3n) { border-inline-end: 0; }
.v36-command-metric:nth-last-child(-n+3) { border-bottom: 0; }
.v36-command-metric:last-child { border-inline-end: 0; }
.v36-command-metric:hover {
  background: var(--surface-subtle);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 9%, transparent);
}
.v36-command-metric strong {
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}
.v36-command-metric.is-overdue:not(.is-zero) strong { color: var(--danger); }
.v36-command-metric.is-due-soon:not(.is-zero) strong { color: var(--warning); }
.v36-command-metric.is-healthy:not(.is-zero) strong { color: var(--success); }
.v36-command-metric.is-scheduled:not(.is-zero) strong { color: var(--info); }
.v36-command-metric.is-records:not(.is-zero) strong { color: var(--primary-strong); }
.v36-command-metric.is-zero::before { background: var(--border-strong); }
.v36-command-metric.is-zero strong,
.v36-command-metric.is-zero span { color: var(--text-subtle); }

.v36-command-reasons {
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.v36-command-reasons li { color: var(--text-muted); }

[data-v36-command-next].dashboard-next-action {
  position: relative;
  border-color: var(--border-strong);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .035), 0 8px 24px rgba(15, 23, 42, .035);
}
[data-v36-command-next].dashboard-next-action::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--primary);
}
[data-v36-command-next] .dashboard-next-action-primary { padding-top: 26px; }
[data-v36-command-next] .dashboard-next-action-copy h2 {
  margin-top: 4px;
  font-size: 23px;
  line-height: 1.25;
  letter-spacing: -.018em;
}
[data-v36-command-next] .dashboard-next-action-cta .btn {
  min-height: 44px;
  box-shadow: 0 1px 2px rgba(15,23,42,.10);
}
[data-v36-command-next] .dashboard-task-footer {
  border-top-color: var(--border);
  background: var(--surface-subtle);
}
[data-v36-command-next] .dashboard-urgent-tasks {
  border-top-color: var(--border);
  background: var(--surface);
}

.v36-command-workspace > .card,
.v36-command-secondary > .card,
.v36-command-inspector {
  border-color: var(--border-strong);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03), 0 6px 18px rgba(15, 23, 42, .025);
}

.v36-command-section-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.v36-command-section-head h2 {
  font-size: 20px;
  letter-spacing: -.018em;
}
.v36-section-link,
.v36-more-link { border-radius: 6px; }
.v36-section-link:focus-visible,
.v36-more-link:focus-visible {
  outline: 3px solid #0284c7;
  outline-offset: 3px;
}

.v36-location-network { gap: 14px; }
.v36-location-node {
  border-color: var(--border-strong);
  background: var(--surface-subtle);
}
.v36-location-node-head {
  min-height: 46px;
  padding-inline: 14px;
}
.v36-location-node-head strong { font-size: 13px; }
.v36-node-count {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding-inline: 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-subtle);
  font-variant-numeric: tabular-nums;
}

.v36-trap-node {
  min-height: 64px;
  padding: 12px 13px;
  border-color: var(--border);
  box-shadow: none;
}
.v36-trap-node:hover {
  transform: none;
  border-color: color-mix(in srgb, var(--primary) 26%, var(--border));
  box-shadow: 0 3px 12px rgba(15,23,42,.055);
}
.v36-trap-node.is-overdue { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--danger) 78%, transparent); }
.v36-trap-node.is-due-soon { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--warning) 72%, transparent); }
.v36-trap-node.is-scheduled { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--info) 68%, transparent); }
.v36-trap-node.is-healthy { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--success) 62%, transparent); }
[dir="rtl"] .v36-trap-node.is-overdue { box-shadow: inset -3px 0 0 color-mix(in srgb, var(--danger) 78%, transparent); }
[dir="rtl"] .v36-trap-node.is-due-soon { box-shadow: inset -3px 0 0 color-mix(in srgb, var(--warning) 72%, transparent); }
[dir="rtl"] .v36-trap-node.is-scheduled { box-shadow: inset -3px 0 0 color-mix(in srgb, var(--info) 68%, transparent); }
[dir="rtl"] .v36-trap-node.is-healthy { box-shadow: inset -3px 0 0 color-mix(in srgb, var(--success) 62%, transparent); }
.v36-trap-node-title strong { font-size: 13px; }
.v36-trap-node-meta { font-size: 11.5px; }
.v36-trap-node-open { transition: transform .12s ease, color .12s ease; }
.v36-trap-node:hover .v36-trap-node-open { transform: translateX(2px); color: var(--primary); }
[dir="rtl"] .v36-trap-node:hover .v36-trap-node-open { transform: translateX(-2px); }

.v36-accumulation {
  height: 6px;
  background: color-mix(in srgb, var(--surface-sunken) 80%, var(--border));
}

.v36-timeline-list { gap: 1px; }
.v36-timeline-event {
  margin-inline: -7px;
  padding-inline: 7px;
  border-radius: 8px;
  transition: background-color .12s ease;
}
.v36-timeline-event:hover { background: var(--surface-subtle); }
.v36-timeline-event:focus-visible { outline-offset: 1px; }
.v36-timeline-event.is-overdue .v36-timeline-state { color: var(--danger); }
.v36-timeline-event.is-due-soon .v36-timeline-state { color: var(--warning); }
.v36-timeline-event.is-scheduled .v36-timeline-state { color: var(--info); }
.v36-timeline-event .v36-timeline-date { font-variant-numeric: tabular-nums; }
.v36-timeline-event:first-child .v36-timeline-date { color: var(--text); }

.v36-command-secondary .section-head {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.v36-recent-records .list-row {
  margin-inline: -8px;
  padding-inline: 8px;
  border-radius: 8px;
}
.v36-recent-records .list-row:hover { background: var(--surface-subtle); text-decoration: none; }

.v36-command-inspector { padding-block: 18px; }

/* The desktop rail consumes 232px, so a viewport-only 1120px breakpoint let
 * two-column command surfaces become cramped around common narrower desktop layouts. */
@media (max-width: 1190px) and (min-width: 901px) {
  .v36-command-primary,
  .v36-command-workspace { grid-template-columns: 1fr; }
  [data-v36-command-next] .dashboard-next-action-primary {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  [data-v36-command-next] .dashboard-next-action-cta,
  [data-v36-command-next] .dashboard-next-action-cta form,
  [data-v36-command-next] .dashboard-next-action-cta .btn { width: auto; }
}

@media (max-width: 700px) {
  .v36-command-head h1 { font-size: 28px; }
  .v36-command-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v36-command-metric:nth-child(3n) { border-inline-end: 1px solid var(--border); }
  .v36-command-metric:nth-child(2n) { border-inline-end: 0; }
  .v36-command-metric:nth-last-child(-n+3) { border-bottom: 1px solid var(--border); }
  .v36-command-metric:nth-last-child(-n+2) { border-bottom: 0; }
  .v36-trap-node.is-overdue,
  .v36-trap-node.is-due-soon,
  .v36-trap-node.is-scheduled,
  .v36-trap-node.is-healthy { box-shadow: none; }
}

@media (max-width: 430px) {
  .v36-command-status { padding: 15px; }
  .v36-command-metric { min-height: 70px; padding: 11px 12px; }
  .v36-command-section-head { padding-bottom: 11px; }
  .v36-location-node-head { padding-inline: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .v36-trap-node-open,
  .v36-timeline-event { transition: none; }
}

/* Grid separators are implemented by the parent gap, so they remain correct
 * whether the optional threshold-exceeded metric is present or absent. */
.v36-command-metrics {
  gap: 1px;
  background: var(--border);
}
.v36-command-metric,
.v36-command-metric:nth-child(3n),
.v36-command-metric:nth-last-child(-n+3),
.v36-command-metric:last-child {
  border: 0;
}
.v36-shell.is-compact .v36-rail .v36-nav-label { display: block; }

@media (max-width: 700px) {
  .v36-command-metric,
  .v36-command-metric:nth-child(3n),
  .v36-command-metric:nth-child(2n),
  .v36-command-metric:nth-last-child(-n+3),
  .v36-command-metric:nth-last-child(-n+2) { border: 0; }
}

/* Dependency-free SVG icons replace text glyphs so navigation renders
 * consistently across Windows, macOS, Linux and mobile system fonts. */
.v36-ui-icon {
  display: block;
  width: 18px;
  height: 18px;
  vector-effect: non-scaling-stroke;
}
.v36-rail .v36-nav-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  opacity: .72;
}
.v36-rail .v36-nav-item.is-active .v36-nav-icon { opacity: 1; }
.mobile-tabbar .tabbar-icon .v36-ui-icon {
  width: 20px;
  height: 20px;
  margin-inline: auto;
}

/* Guided historical-record import -------------------------------------------------
 * Keep the import engine powerful, but expose only the decisions most operators
 * actually need. Advanced mapping/filter controls remain available on demand. */
.import-page-head { margin-bottom: 16px; }
.guided-import-steps { padding: 16px 18px; margin-bottom: 18px; }
.guided-import-steps .section-head { margin-bottom: 12px; }
.guided-step-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.guided-step {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-subtle);
  color: var(--text-muted);
  font-size: 13px;
}
.guided-step > span {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
}
.guided-step.is-primary {
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
  color: var(--text);
}
.guided-step.is-primary > span { background: var(--primary); color: #fff; border-color: var(--primary); }
.guided-import-grid { margin-bottom: 18px; }
.guided-import-card { min-height: 100%; }
.guided-import-card.is-primary { border-color: color-mix(in srgb, var(--primary) 25%, var(--border)); }
.guided-file-field input[type="file"] { padding: 9px; background: var(--surface-subtle); }
.guided-import-actions { justify-content: space-between; }
.import-advanced-details {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.import-advanced-details > summary,
.import-details-card > summary,
.import-history-card > summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--text);
  list-style-position: outside;
}
.import-advanced-details[open] > summary,
.import-details-card[open] > summary,
.import-history-card[open] > summary { margin-bottom: 12px; }
.compact-details .field { margin-top: 12px; margin-bottom: 0; }
.import-history-card { margin-top: 18px; }
.import-history-card > summary { font-size: 16px; }

.import-readiness-card { margin-bottom: 18px; }
.import-file-summary { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.import-file-summary h2 { margin: 2px 0; overflow-wrap: anywhere; }
.import-readiness-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 16px;
}
.import-readiness-stat { display: grid; gap: 2px; padding: 14px 16px; background: var(--surface); }
.import-readiness-stat strong { font-size: 25px; line-height: 1; font-variant-numeric: tabular-nums; }
.import-readiness-stat span { color: var(--text-muted); font-size: 12px; font-weight: 750; }
.import-readiness-stat.is-ready strong { color: var(--success); }
.import-readiness-stat.is-warning strong { color: var(--warning); }
.import-preflight-alert { margin-top: 14px; margin-bottom: 0; }
.import-preflight-alert ul { margin: 7px 0 0; padding-inline-start: 20px; }
.import-required-card { padding-bottom: 0; overflow: hidden; }
.mapping-grid-required { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mapping-row.is-mapped { border-color: color-mix(in srgb, var(--success) 28%, var(--border)); background: color-mix(in srgb, var(--success) 5%, var(--surface)); }
.import-confirm-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 18px -20px 0;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-subtle);
}
.import-confirm-bar > div:first-child { display: grid; gap: 2px; }
.import-confirm-bar .actions { margin-top: 0; }
.import-support-grid { margin-top: 18px; }
.import-details-card { min-height: 0; }
.import-details-card[open] { min-height: 220px; }
.guided-unmatched-form { grid-template-columns: minmax(260px, 2.2fr) minmax(180px, 1fr) auto; }

@media (max-width: 850px) {
  .guided-step-row,
  .import-readiness-grid,
  .mapping-grid-required { grid-template-columns: 1fr; }
  .guided-step { padding: 9px 10px; }
  .guided-import-actions { justify-content: flex-start; }
  .import-confirm-bar { align-items: stretch; flex-direction: column; }
  .import-confirm-bar .actions,
  .import-confirm-bar .btn { width: 100%; }
  .guided-unmatched-form { grid-template-columns: 1fr; }
}
.import-issue-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.import-issue-chips span { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: rgba(255,255,255,.62); font-size: 12px; font-weight: 750; }

/* v36.6 operational access layer -------------------------------------------------
 * Global search, prioritized attention and guided onboarding share the same
 * restrained visual language as the Command Centre. These controls reveal
 * existing workflows; they do not create a second source of business truth. */
.v36-topbar-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-inline-start: auto;
}
.v36-topbar-tool {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 6px 9px;
  border-radius: 8px;
  color: #dbeafe;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.v36-topbar-tool:hover,
.v36-topbar-tool:focus-visible {
  color: #fff;
  background: rgba(255,255,255,.1);
  text-decoration: none;
}
.v36-topbar-tool:focus-visible { outline: 3px solid #38bdf8; outline-offset: 2px; }
.v36-topbar-tool .v36-ui-icon { width: 17px; height: 17px; }
.v36-shortcut {
  display: inline-flex;
  min-width: 27px;
  justify-content: center;
  padding: 1px 5px;
  border: 1px solid rgba(255,255,255,.2);
  border-bottom-color: rgba(255,255,255,.32);
  border-radius: 5px;
  background: rgba(255,255,255,.07);
  color: #cbd5e1;
  font: inherit;
  font-size: 10px;
  line-height: 1.5;
}
.v36-notification-badge {
  position: absolute;
  inset-block-start: 1px;
  inset-inline-end: 1px;
  display: grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding-inline: 4px;
  border: 2px solid #0f172a;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

.v36-overlay-dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 48px));
  margin: max(24px, 8vh) auto auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 28px 80px rgba(15,23,42,.28);
}
.v36-overlay-dialog::backdrop { background: rgba(15,23,42,.52); backdrop-filter: blur(2px); }
.v36-overlay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.v36-overlay-head h2 { margin: 1px 0 0; font-size: 20px; }
.v36-overlay-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
}
.v36-overlay-close:hover { background: var(--surface-subtle); color: var(--text); }
.v36-overlay-close:focus-visible { outline: 3px solid #0284c7; outline-offset: 1px; }
.v36-palette-search {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 9px;
  margin: 14px 16px 8px;
  padding-inline: 12px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: var(--surface);
}
.v36-palette-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.v36-palette-search .input {
  min-height: 48px;
  padding-inline: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.v36-palette-search .input:focus { outline: 0; border: 0; box-shadow: none; }
.v36-palette-search-icon { color: var(--text-muted); }
.v36-palette-search kbd {
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-subtle);
  color: var(--text-muted);
  font: inherit;
  font-size: 10px;
}
.v36-palette-results,
.v36-notification-list {
  max-height: min(470px, 58vh);
  overflow-y: auto;
  padding: 8px 16px 16px;
}
.v36-palette-results > p,
.v36-notification-list > p { padding: 22px 8px; margin: 0; text-align: center; }
.v36-palette-result,
.v36-notification-item {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 5px 14px;
  padding: 11px 12px;
  border-radius: 9px;
  color: var(--text);
  text-decoration: none;
}
.v36-palette-result:hover,
.v36-palette-result:focus-visible,
.v36-notification-item:hover,
.v36-notification-item:focus-visible {
  background: var(--surface-subtle);
  text-decoration: none;
}
.v36-palette-result:focus-visible,
.v36-notification-item:focus-visible { outline: 3px solid #0284c7; outline-offset: -1px; }
.v36-palette-result strong,
.v36-notification-item strong { min-width: 0; overflow-wrap: anywhere; }
.v36-palette-result small,
.v36-notification-item small { grid-column: 1; color: var(--text-muted); }
.v36-palette-result .badge { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.v36-notification-item { border-inline-start: 3px solid var(--border); }
.v36-notification-item.is-critical { border-inline-start-color: var(--danger); }
.v36-notification-item.is-warning { border-inline-start-color: var(--warning); }
.v36-notification-item.is-info { border-inline-start-color: var(--primary); }
.v36-notification-item-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 2px; }
.v36-notification-summary {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  padding: 12px 20px 4px;
}
.v36-notification-summary:empty { display: none; }
.v36-overlay-footer { padding: 12px 16px 16px; border-top: 1px solid var(--border); }

.v36-onboarding {
  margin-bottom: 18px;
  border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 5%, var(--surface)), var(--surface) 58%);
}
.v36-onboarding-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.v36-onboarding-head h2 { margin: 2px 0 0; }
.v36-onboarding-progress-copy { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.v36-onboarding-progress-copy strong { font-size: 22px; }
.v36-onboarding-progress-copy span { color: var(--text-muted); font-size: 12px; }
.v36-onboarding-progress {
  display: block;
  width: 100%;
  height: 7px;
  margin: 14px 0 17px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-sunken) 82%, var(--border));
  appearance: none;
}
.v36-onboarding-progress::-webkit-progress-bar { background: color-mix(in srgb, var(--surface-sunken) 82%, var(--border)); border-radius: 999px; }
.v36-onboarding-progress::-webkit-progress-value { background: var(--primary); border-radius: 999px; }
.v36-onboarding-progress::-moz-progress-bar { background: var(--primary); border-radius: 999px; }
.v36-onboarding-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0,1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.v36-onboarding-step {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.v36-onboarding-step.is-current { border-color: color-mix(in srgb, var(--primary) 55%, var(--border)); box-shadow: 0 0 0 2px var(--primary-soft); }
.v36-onboarding-step.is-complete { background: color-mix(in srgb, var(--success) 5%, var(--surface)); }
.v36-onboarding-step-mark {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface-subtle);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 900;
}
.v36-onboarding-step.is-current .v36-onboarding-step-mark { border-color: var(--primary); background: var(--primary); color: #fff; }
.v36-onboarding-step.is-complete .v36-onboarding-step-mark { border-color: var(--success); background: var(--success); color: #fff; }
.v36-onboarding-step-copy { display: grid; gap: 4px; min-width: 0; font-size: 12px; }
.v36-onboarding-step-copy strong { overflow-wrap: anywhere; }
.v36-onboarding-step-copy a { font-weight: 750; }

@media (max-width: 1000px) {
  .v36-topbar-tool-label, .v36-shortcut { display: none; }
  .v36-topbar-tool { width: 38px; justify-content: center; padding-inline: 7px; }
  .v36-onboarding-steps { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .v36-topbar-tools { margin-inline-start: 0; }
  .v36-overlay-dialog { width: 100%; max-width: none; max-height: 82vh; margin: auto 0 0; border-radius: 16px 16px 0 0; }
  .v36-overlay-dialog::backdrop { background: rgba(15,23,42,.45); }
  .v36-palette-results, .v36-notification-list { max-height: 48vh; }
  .v36-onboarding-head { align-items: flex-start; }
  .v36-onboarding-steps { grid-template-columns: 1fr; }
  .v36-onboarding-step:not(.is-current):not(.is-complete) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .v36-onboarding-progress { scroll-behavior: auto; }
}
