:root {
  --bg: #f4f6f9;
  --panel: #ffffff;
  --panel-2: #f7f9fc;
  --hover: #f1f6fb;
  --sidebar: #fbfcfe;
  --topbar: rgba(255, 255, 255, .92);
  --field: #ffffff;
  --soft: #ece7fe;
  --soft-ink: #6d28f5;
  --chip: #f1f5f9;
  --ink: #101827;
  --ink-soft: #374151;
  --muted: #6b7280;
  --line: #dfe6ef;
  --line-2: #e8edf4;
  --accent: #7c3aff;
  --accent-dark: #11243f;
  --accent-2: #0b7285;
  --accent-3: #ff6a00;
  --warn: #b45309;
  --bad: #b42318;
  --good: #15803d;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 18px 44px rgba(16, 24, 40, .08);
  --shadow-soft: 0 1px 1px rgba(16, 24, 40, .05), 0 10px 24px rgba(16, 24, 40, .05);
}

[data-theme="dark"] {
  --bg: #090d12;
  --panel: #121820;
  --panel-2: #18212b;
  --hover: #1b2732;
  --sidebar: #0d1218;
  --topbar: rgba(9, 13, 18, .9);
  --field: #0d141b;
  --soft: #241a4d;
  --soft-ink: #c9b6ff;
  --chip: #1a2530;
  --ink: #eef4f8;
  --ink-soft: #c5d0da;
  --muted: #92a0ad;
  --line: #26323d;
  --line-2: #202b35;
  --accent: #b388ff;
  --accent-2: #35c3a6;
  --accent-3: #ffb02e;
  --warn: #f5a623;
  --bad: #ff7b72;
  --good: #5cc88f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 22px 55px rgba(0, 0, 0, .36);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 30px rgba(0, 0, 0, .22);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  display: grid;
  grid-template-columns: 252px 1fr;
  min-height: 100vh;
}

button, input, select, textarea { font: inherit; }
button {
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
  font-weight: 700;
  transition: transform .14s ease, border-color .14s ease, background .14s ease, box-shadow .14s ease;
}
button:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.buttonLink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
  border-radius: 8px;
  padding: 9px 12px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
  transition: transform .14s ease, border-color .14s ease, background .14s ease, box-shadow .14s ease;
}
.buttonLink:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-soft); }
button:disabled, a.mfaBlocked {
  cursor: not-allowed;
  opacity: .55;
  transform: none;
}
a.mfaBlocked { pointer-events: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 2px;
}
.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 45%, transparent); }
.primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000 12%); }

.sidebar {
  background: var(--sidebar);
  color: var(--ink);
  border-right: 1px solid var(--line);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 16px;
  border-bottom: 1px solid var(--line);
}
button.brand {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
}
button.brand:hover { transform: none; background: var(--panel-2); box-shadow: none; }
.brand strong { display: block; font-size: 17px; }
.brand span, .sidebarFoot { color: var(--muted); font-size: 12px; }
.mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f97316;
  color: #fff;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
}
nav { display: grid; gap: 3px; }
.navGroup {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  padding: 14px 10px 5px;
  letter-spacing: .08em;
}
.nav {
  color: var(--ink-soft);
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  box-shadow: none;
}
.nav:hover { transform: none; box-shadow: none; background: var(--panel-2); color: var(--ink); }
.nav.active { background: var(--soft); color: var(--soft-ink); box-shadow: inset 3px 0 0 var(--accent); }
.roomLink[hidden],
.roomTabs[hidden] { display: none !important; }
.sidebarFoot { margin-top: auto; display: grid; gap: 8px; }
.sidebarFoot button { background: var(--field); border-color: var(--line); color: var(--ink); }

main { min-width: 0; }
.topbar {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--topbar);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 2;
}
h1, h2, h3 { margin: 0; letter-spacing: 0; }
h1 { font-size: 28px; line-height: 1.1; }
.topbar p { margin: 7px 0 0; color: var(--muted); font-size: 14px; }
.topActions { display: flex; gap: 10px; align-items: center; }
.topThemeToggle {
  width: auto;
  min-width: 72px;
  height: 34px;
  min-height: 34px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  box-shadow: none;
}
.themeToggleGlyph { font-size: 15px; line-height: 1; }
.themeToggleLabel { font-size: 11px; font-weight: 900; letter-spacing: .02em; }
.topThemeToggle:hover { transform: none; background: var(--hover); box-shadow: none; }
.uiModeSwitch {
  display: inline-grid;
  grid-template-columns: repeat(2, auto);
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
}
.uiModeSwitch button {
  min-height: 34px;
  padding: 7px 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  font-size: 12px;
}
.uiModeSwitch button:hover { transform: none; background: var(--hover); box-shadow: none; }
.uiModeSwitch button.active { background: var(--panel); color: var(--accent); box-shadow: var(--shadow-soft); }
input, select, textarea {
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
  border-radius: 8px;
  padding: 10px 11px;
  min-width: 0;
  outline: none;
  transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

input::placeholder, textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

select option {
  background: var(--field);
  color: var(--ink);
}

input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  box-shadow: 0 0 0 1000px var(--field) inset;
  caret-color: var(--ink);
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  color: #fff;
  caret-color: #fff;
}

[data-theme="dark"] input:-webkit-autofill,
[data-theme="dark"] textarea:-webkit-autofill,
[data-theme="dark"] select:-webkit-autofill {
  -webkit-text-fill-color: #fff;
  box-shadow: 0 0 0 1000px var(--field) inset;
  caret-color: #fff;
}
#globalSearch { width: 360px; }
textarea { min-height: 78px; resize: vertical; }

.view { display: none; padding: 26px 28px 48px; }
.view.active { display: block; }

.kpis { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 16px; margin-bottom: 20px; }
.invoiceAging { grid-template-columns: repeat(6, minmax(120px, 1fr)); }
.kpi, .panel, .feature {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.kpi { padding: 20px; position: relative; overflow: hidden; }
.kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent-3);
}
.kpi span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.kpi strong { display: block; margin-top: 8px; font-size: 30px; line-height: 1; }
.kpi small { color: var(--muted); display: block; margin-top: 10px; font-size: 13px; }

.grid2 { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(360px, .95fr); gap: 18px; }
.grid3, .featureGrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.panel { overflow: hidden; }
.panelHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel-2) 72%, var(--panel) 28%);
}
.panelHead h2 { font-size: 17px; }
.panelBody { padding: 18px; }
.toolbar { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 16px; align-items: center; }
.toolbar .filters { display: flex; gap: 8px; flex-wrap: wrap; }

.trendChart {
  height: 190px;
  display: flex;
  align-items: end;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 10px 2px 0;
}
.trendBar {
  flex: 1;
  display: grid;
  gap: 8px;
  align-items: end;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.trendBar div {
  min-height: 36px;
  background: var(--accent);
  border-radius: 8px 8px 0 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}
.trendBar small {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  min-height: 14px;
}
.trendBar:nth-child(even) div { background: var(--accent-2); }
.trendBar:nth-child(3n) div { background: var(--accent-3); }

.tableWrap { overflow-x: auto; }
table { width: 100%; min-width: 760px; border-collapse: separate; border-spacing: 0; font-size: 14px; background: var(--panel); }
th, td { text-align: left; padding: 16px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
th { color: var(--ink-soft); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; background: var(--panel-2); white-space: nowrap; font-weight: 900; }
thead th { border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 0; }
tr:hover td { background: var(--hover); }
td strong { font-size: 14px; }
.num { text-align: right; white-space: nowrap; }
.muted { color: var(--muted); }
.srOnly {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.compactList { margin: 8px 0 0; padding-left: 20px; color: var(--muted); }
.compactList li + li { margin-top: 4px; }
.link { color: var(--accent); cursor: pointer; font-weight: 800; }
.link:hover { text-decoration: underline; }
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}
.customerTopbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}
.customerTopbar h2 {
  font-size: 24px;
}
.customerTopbar p {
  margin: 5px 0 0;
}
.customerNameCell {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 260px;
}
.customerAvatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--soft);
  color: var(--soft-ink);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  font-weight: 900;
}
.customerActions button {
  padding: 6px 8px;
}
.portalBtn {
  color: var(--warn);
  background: #fff7cc;
  border-color: #fde68a;
}
[data-theme="dark"] .portalBtn {
  background: #2a2310;
  border-color: #5b4a1f;
}
#customers table {
  min-width: 1240px;
}
.snapshotTitleLink {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  box-shadow: none;
  font: inherit;
  text-align: left;
}
.snapshotTitleLink:hover {
  background: transparent;
  box-shadow: none;
  transform: none;
  text-decoration: underline;
}
#loads table { min-width: 1180px; }
#loads td:last-child, #loads th:last-child { min-width: 280px; }
#loads .actions { flex-wrap: wrap; }
.grid2 .panel table { min-width: 560px; }
.status {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid var(--line);
  background: var(--panel-2);
  white-space: nowrap;
}
.status.Delivered, .status.Paid, .status.Active, .status.Approved, .status.Accepted, .status.Tracking { color: var(--good); background: #d1fae5; border-color: #3ddc97; }
.status.In, .status.Ready, .status.Booked, .status.Posted, .status.Sent, .status.Queued { color: var(--accent); background: #e7e2fe; border-color: #b794ff; }
.status.Needs, .status.Overdue, .status.Blocked { color: var(--bad); background: #fee2e2; border-color: #ff7a7a; }
.status.Quoted, .status.Draft, .status.Review, .status.Pending { color: var(--warn); background: #fef3c7; border-color: #ffce1f; }

.ins { display: inline-block; padding: 4px 10px; border-radius: 100px; font-size: 12px; font-weight: 800; border: 1px solid var(--line); background: var(--panel-2); white-space: nowrap; }
.ins.ok { color: var(--good); background: #d1fae5; border-color: #3ddc97; }
.ins.bad { color: var(--bad); background: #fee2e2; border-color: #ff7a7a; }
.ins.na { color: var(--muted); }
.danger { color: var(--bad); border-color: #fca5a5; }
.danger:hover { background: #fee2e2; border-color: var(--bad); }

.actions { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.actions button { padding: 6px 9px; font-size: 12px; }
.actions .buttonLink { padding: 6px 9px; font-size: 12px; }

.board { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.lane { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; min-height: 360px; box-shadow: var(--shadow-soft); }
.lane h3 { padding: 14px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); border-bottom: 1px solid var(--line); }
.loadCard {
  margin: 10px;
  padding: 13px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  display: grid;
  gap: 7px;
  box-shadow: var(--shadow-soft);
}
.loadCard strong { font-size: 14px; }
.loadCard span { font-size: 13px; color: var(--muted); }

.heroSearch {
  width: min(860px, 100%);
  margin: 28px auto 34px;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 28px;
}
.heroSearch h2 { font-size: 28px; margin-bottom: 10px; }
.heroSearch p { color: var(--muted); margin: 0 0 20px; font-size: 14px; line-height: 1.5; }
.searchBar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  box-shadow: var(--shadow);
}
.searchBar input { border: 0; padding-left: 14px; min-height: 42px; }
.searchBar button { border-radius: 8px; padding-left: 22px; padding-right: 22px; }
.carrierLookup {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: center;
}
.lookupResult {
  width: min(1180px, 100%);
  margin: -14px auto 26px;
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.lookupLoading {
  width: min(880px, 100%);
  margin: -14px auto 26px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.lookupLoading strong { display: block; font-size: 18px; }
.lookupLoading p { margin: 5px 0 0; color: var(--muted); }
.globeLoader {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--accent-2) 72%, white 28%), transparent 18px),
    radial-gradient(circle at 65% 70%, color-mix(in srgb, var(--accent) 70%, white 30%), transparent 20px),
    var(--panel-2);
  border: 1px solid color-mix(in srgb, var(--accent) 36%, var(--line));
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 9%, transparent), var(--shadow-soft);
  overflow: hidden;
}
.globeLoader::before,
.globeLoader::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid color-mix(in srgb, #fff 60%, transparent);
  border-radius: 50%;
}
.globeLoader::after {
  inset: 0;
  border: 2px solid transparent;
  border-top-color: var(--accent-3);
  animation: spin 1.1s linear infinite;
}
.globeLoader span {
  position: absolute;
  width: 92px;
  height: 1px;
  background: color-mix(in srgb, #fff 56%, transparent);
}
.globeLoader span:nth-child(1) { transform: rotate(0deg); }
.globeLoader span:nth-child(2) { transform: rotate(60deg); }
.globeLoader span:nth-child(3) { transform: rotate(120deg); }
@keyframes spin { to { transform: rotate(360deg); } }
.lookupCarrierLine {
  display: grid;
  grid-template-columns: auto minmax(220px, 1.3fr) repeat(4, minmax(120px, auto));
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 54px;
  text-align: left;
  background: var(--panel-2);
  border-color: var(--line);
  box-shadow: none;
}
.lookupCarrierLine:hover {
  background: var(--hover);
  transform: translateY(-1px);
}
.lookupCarrierLine strong {
  color: var(--ink);
  font-size: 15px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lookupCarrierLine span:not(.lookupStatusDot) {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.lookupStatusDot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--good);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--good) 14%, transparent);
}
.miniTabs {
  display: inline-flex;
  gap: 4px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 22px;
}
.miniTabs span { padding: 8px 15px; border-radius: 999px; color: var(--muted); font-size: 13px; font-weight: 800; }
.miniTabs span.active { background: var(--panel); color: var(--ink); box-shadow: var(--shadow-soft); }
.feature { padding: 17px; }
.feature strong { display: block; margin-bottom: 7px; font-size: 15px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.carrierPage { display: grid; gap: 18px; }
.carrierHero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
}
.carrierHero h2 { font-size: 30px; margin-top: 12px; }
.carrierHero p { margin: 7px 0 0; color: var(--muted); }
.carrierStats { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 16px; }
.profileFreshness {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.profileFreshness span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.carrierHero .profileFreshness { margin-top: 12px; }
.profileSummaryGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.profileActionList {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 16px 18px 4px 36px;
  color: var(--ink);
}
.sectionNotice,
.sectionList {
  margin: 0;
  padding: 16px 18px;
}
.sectionActions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 16px 18px;
}
.profileEmpty {
  display: grid;
  gap: 6px;
  padding: 22px;
  color: var(--muted);
}
.profileEmpty strong { color: var(--ink); }
.profileEmpty p { margin: 0; }
.easyStartNext { display:flex; align-items:flex-start; gap:11px; padding:13px 14px; border:1px solid var(--line); border-radius:10px; background:var(--panel-2); }
.easyStartNext input { width:auto; margin-top:3px; }
.easyStartNext span { display:grid; gap:3px; }
.easyStartNext small { color:var(--muted); font-weight:500; line-height:1.4; }

.whatsNewIntro { margin: 14px 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.whatsNewIntro > span,.whatsNewMeta { color: var(--accent); font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.whatsNewIntro h2 { margin: 5px 0 4px; }
.whatsNewIntro p { margin: 0; color: var(--muted); }
.whatsNewFeed { display: grid; gap: 12px; }
.whatsNewCard .panelHead { align-items: flex-start; }
.whatsNewCard .panelHead h2 { margin: 5px 0 3px; font-size: 18px; }
.whatsNewCard .panelHead p { margin: 0; }
.whatsNewCard ul { margin: 0; padding-left: 20px; color: var(--text-2); }
.whatsNewCard li + li { margin-top: 7px; }
.profileEmptyState {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
}
.profileEmptyState p { margin: 6px 0 0; color: var(--muted); }
.carrierSourceCard.compactCarrierSource {
  grid-template-columns: minmax(0, 1fr);
  padding: 18px;
}
.compactCarrierSource > div > p {
  margin: 14px 0 0;
  color: var(--ink-soft);
}
.compactDetails,
.advancedDetails {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}
.compactDetails summary,
.advancedDetails summary {
  padding: 13px 0;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}
.compactDetails p { margin: 0 0 2px; color: var(--muted); }
.advancedDetails { padding: 0 18px 18px; }
.requiredDocumentGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}
.documentStatusCard {
  min-height: 112px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 5px;
  text-align: left;
  border-radius: 8px;
  background: var(--panel-2);
}
.documentStatusCard span,
.documentStatusCard small {
  color: var(--muted);
  font-size: 12px;
}
.documentStatusCard strong { font-size: 18px; }
.documentQuickActions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.snapshotOverlay { display: grid; gap: 18px; }
.snapshotIntro {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}
.snapshotIntro h2 { font-size: 24px; margin-bottom: 7px; }
.snapshotIntro p { margin: 0; color: var(--muted); line-height: 1.5; }
.snapshotGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}
.snapshotGrid > div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}
.snapshotGrid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}
.snapshotGrid strong { font-size: 15px; word-break: break-word; }
.snapshotTabs {
  display: inline-flex;
  gap: 6px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px;
  width: fit-content;
}
.snapshotTab {
  border-radius: 999px;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 9px 16px;
  color: var(--muted);
}
.snapshotTab:hover {
  transform: none;
  box-shadow: none;
  background: var(--hover);
}
.snapshotTab.active {
  background: var(--accent);
  color: #fff;
}
.snapshotPane { display: none; gap: 18px; }
.snapshotPane.active { display: grid; }
.contactMapLayout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: 16px;
}
.carrierSourceCard {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel-2) 70%, var(--panel) 30%);
}
.carrierSourceCard h4 { margin: 0 0 12px; font-size: 16px; }
.carrierSourceOrbit {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  position: relative;
  background: radial-gradient(circle at center, var(--accent-2), var(--accent));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35), 0 10px 24px color-mix(in srgb, var(--accent) 26%, transparent);
}
.carrierSourceOrbit::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px dashed color-mix(in srgb, var(--accent) 50%, var(--line));
  animation: spin 5s linear infinite;
}
.carrierSourceOrbit span {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-3);
  top: -3px;
  left: 27px;
}
.streetCard {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 12px;
  box-shadow: var(--shadow-soft);
}
.streetImage {
  position: relative;
  min-height: 230px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel-2);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
}
.streetImage img {
  width: 100%;
  height: 100%;
  min-height: 230px;
  object-fit: cover;
}
.streetFallback {
  padding: 18px;
  text-align: center;
  color: var(--muted);
  display: grid;
  gap: 7px;
}
.streetImage img + .streetFallback { display: none; }
.streetImage.missing .streetFallback { display: grid; }
.streetFallback strong { color: var(--ink); font-size: 16px; }
.streetFallback span { font-size: 13px; line-height: 1.45; }
.fmcsaProfilePage {
  display: grid;
  gap: 18px;
}
.fmcsaProfileHeader {
  position: sticky;
  top: 96px;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin: -26px -28px 6px;
  padding: 16px 28px;
  background: color-mix(in srgb, var(--topbar) 86%, var(--panel) 14%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.carrierTitleBlock {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.carrierTitleBlock h2 {
  font-size: 24px;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chipRow {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.chipRow span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--soft-ink);
  background: var(--soft);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  font-size: 12px;
  font-weight: 900;
}
.fmcsaProfileGrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  gap: 18px;
  align-items: start;
}
.fmcsaMainCol {
  display: grid;
  gap: 18px;
  min-width: 0;
}
.fmcsaRightRail {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 186px;
}
.profileHero {
  position: relative;
  min-height: 240px;
  background: var(--panel-2);
}
.profileHeroImage {
  min-height: 240px;
  height: clamp(240px, 29vw, 340px);
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(23, 105, 224, .2), rgba(11, 114, 133, .16)),
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--line) 72%, transparent) 0 1px, transparent 1px 18px),
    var(--panel-2);
}
.profileHeroImage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profileHeroImage img + .streetFallback { display: none; }
.profileHeroImage.missing .streetFallback { display: grid; }
.profileHero .streetFallback {
  max-width: 560px;
  color: var(--muted);
  text-align: center;
  padding: 26px;
}
.riskOverlay {
  position: absolute;
  right: 20px;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  background: rgba(180, 35, 24, .92);
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, .24);
}
.riskOverlay.low {
  background: rgba(21, 128, 61, .94);
}
.riskOverlay.review {
  background: rgba(180, 83, 9, .94);
}
.riskOverlay.high {
  background: rgba(180, 35, 24, .94);
}
.riskOverlay strong {
  font-size: 38px;
  line-height: 1;
}
.riskOverlay span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 900;
  line-height: 1.35;
}
.gradePill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
}
.gradePill.low {
  color: #0f7a39;
  background: color-mix(in srgb, #15db66 14%, var(--panel));
}
.gradePill.review {
  color: #9a5b00;
  background: color-mix(in srgb, #ffb000 16%, var(--panel));
}
.gradePill.high {
  color: #b42318;
  background: color-mix(in srgb, #ff3b3b 13%, var(--panel));
}
.riskVerdictCard .panelBody {
  display: grid;
  gap: 14px;
}
.riskVerdictScore {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.riskVerdictScore strong {
  font-size: 46px;
  line-height: 1;
}
.riskVerdictScore span {
  color: var(--muted);
  font-weight: 800;
}
.riskVerdictCard p {
  margin: -8px 0 0;
  color: var(--ink);
  font-weight: 850;
}
.riskFactorList {
  display: grid;
  gap: 8px;
}
.riskFactor {
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  padding: 11px 12px;
  background: color-mix(in srgb, var(--panel-2) 66%, transparent);
}
.riskFactor span {
  display: inline-flex;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.riskFactor strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}
.riskFactor small {
  color: var(--muted);
  line-height: 1.4;
}
.riskFactor.low { border-left-color: #15db66; }
.riskFactor.medium { border-left-color: #ffb000; }
.riskFactor.high,
.riskFactor.critical { border-left-color: #ff3b3b; }
.mapPill {
  position: absolute;
  left: 18px;
  bottom: 20px;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(16, 24, 39, .82);
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
}
.policyPanel .panelHead h2,
.generalInfo .panelHead h2,
.railCard .panelHead h2 { font-size: 18px; }
.policyRows {
  display: grid;
  gap: 10px;
  padding: 18px;
}
.policyRow {
  min-height: 56px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.policyRow span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-weight: 900;
}
.policyRow.pass span {
  color: var(--good);
  background: color-mix(in srgb, var(--good) 14%, transparent);
}
.policyRow.fail span {
  color: var(--bad);
  background: color-mix(in srgb, var(--bad) 14%, transparent);
}
.policyRow strong {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.policyRow small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}
.profileTabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.carrierProfileTabs {
  justify-self: start;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
}
.carrierProfileTabs .profileTab { white-space: nowrap; }
.profileTab {
  border: 0;
  box-shadow: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 8px 14px;
}
.profileTab:hover {
  transform: none;
  box-shadow: none;
  background: var(--hover);
}
.profileTab.active {
  background: var(--accent-dark);
  color: #fff;
}
[data-theme="dark"] .profileTab.active {
  background: var(--accent);
}
.generalInfo .panelBody {
  display: grid;
  gap: 14px;
}
.generalInfo h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-soft);
}
.profileInfoGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.profileInfoGrid > div {
  min-height: 84px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}
.profileInfoGrid span,
.safetyGrid span,
.fleetGrid span,
.railStats span,
.railList span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.profileInfoGrid strong,
.railList strong {
  font-size: 15px;
  word-break: break-word;
}
.contactFields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.profileInfoGrid .wide {
  grid-column: 1 / -1;
}
.safetyGrid,
.fleetGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.fleetGrid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.safetyGrid > div,
.fleetGrid > div {
  min-height: 92px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}
.safetyGrid strong,
.fleetGrid strong {
  display: block;
  margin: 8px 0 5px;
  font-size: 20px;
}
.safetyGrid small {
  color: var(--muted);
  font-size: 12px;
}
.railCard {
  box-shadow: var(--shadow-soft);
}
.railStats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 18px;
}
.railStats > div {
  min-height: 62px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  text-align: center;
}
.railStats strong {
  display: block;
  margin-top: 5px;
  font-size: 20px;
}
.railCard > p {
  margin: 0;
  padding: 0 18px 18px;
  font-size: 13px;
}
.railList {
  display: grid;
  gap: 10px;
  padding: 18px;
}
.railList > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}
.railList strong {
  text-align: right;
}
.ghostBtn {
  background: transparent;
  box-shadow: none;
  color: var(--muted);
}
.rawTable { min-width: 720px; }
.rawTable td:first-child { width: 260px; color: var(--ink-soft); }
.rawTable td:last-child {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  word-break: break-word;
  white-space: pre-wrap;
}
.detail { display: grid; gap: 18px; }
.detailHead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.detailHead h2 { font-size: 22px; }
.detailHead .sub { color: var(--muted); font-size: 14px; margin-top: 5px; }
.detailSection { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel); box-shadow: var(--shadow-soft); }
.detailSection > h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-soft); background: var(--panel-2); padding: 12px 16px; border-bottom: 1px solid var(--line); }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); }
.kv > div { background: var(--panel); padding: 13px 16px; }
.kv .k { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 5px; font-weight: 900; }
.kv .v { font-size: 15px; }
.kv .full { grid-column: 1 / -1; }
.sourceWithAction,
.contactFields .sideSourceLink {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.sideSourceLink {
  text-decoration: none;
}
.sideSourceLink.buttonLink {
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
@media (max-width: 640px) { .kv { grid-template-columns: 1fr; } }

.riskBar { height: 8px; background: var(--panel-2); border-radius: 999px; overflow: hidden; min-width: 96px; margin-bottom: 5px; }
.riskBar span { display: block; height: 100%; background: #15db66; }
.riskBar .mid { background: #ffb000; }
.riskBar .high { background: #ff3b3b; }

dialog { border: 1px solid var(--line); border-radius: 10px; padding: 0; background: var(--panel); color: var(--ink); width: min(1160px, calc(100vw - 28px)); box-shadow: 0 28px 100px rgba(0, 0, 0, .36); }
dialog::backdrop { background: rgba(3, 7, 12, .62); backdrop-filter: blur(3px); }
.modalBox { margin: 0; }
.captureSetupDialog { width: min(760px, calc(100vw - 28px)); }
.captureSetupShell { overflow: hidden; }
.captureSetupHead {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 36px;
  gap: 14px;
  align-items: start;
  padding: 22px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.captureSetupHead > div:nth-child(2) > span {
  display: block;
  margin: 2px 0 5px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
}
.captureSetupHead h2 { margin: 0; font-size: 23px; }
.captureSetupHead p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.captureSetupMark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: var(--accent);
  font-weight: 900;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 25%, transparent);
}
.captureSetupBody { display: grid; gap: 16px; padding: 20px 22px; }
.captureSetupStatus {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 850;
}
.captureSetupStatus.installed { color: var(--good); border-color: color-mix(in srgb, var(--good) 38%, var(--line)); }
.captureSetupStatus.missing { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 38%, var(--line)); }
.captureSetupSteps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.captureSetupSteps article {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
}
.captureSetupSteps article > span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
  font-size: 12px;
  font-weight: 900;
}
.captureSetupSteps strong { display: block; font-size: 13px; }
.captureSetupSteps p,
.captureSetupNotice p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.captureSetupNotice {
  padding: 13px 14px;
  border: 1px solid color-mix(in srgb, var(--good) 32%, var(--line));
  border-radius: 9px;
  background: color-mix(in srgb, var(--good) 7%, var(--panel));
}
.captureSetupNotice strong { font-size: 13px; }
.captureSetupActions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  background: var(--panel-2);
}
.captureSetupActions button[disabled] { opacity: .58; cursor: not-allowed; transform: none; }
.captureReviewNotice {
  padding: 13px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 7%, var(--panel));
}
.captureReviewNotice strong { display: block; margin-bottom: 4px; }
.captureReviewNotice p { margin: 0; color: var(--muted); line-height: 1.45; }
.modalHead, .modalActions { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.modalActions { border-top: 1px solid var(--line); border-bottom: 0; justify-content: flex-end; gap: 8px; }
.modalError { margin: 0 18px 14px; color: var(--bad); background: #fff1f0; border: 1px solid #ffccc7; border-radius: 6px; padding: 10px 12px; font-size: 13px; }
[data-theme="dark"] .modalError { background: color-mix(in srgb, var(--bad) 12%, var(--panel)); }
.iconBtn { min-width: 36px; height: 36px; padding: 0 10px; }
#modalBody { padding: 18px; max-height: 72vh; overflow: auto; }
.formGrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.loadWizardForm {
  display: grid;
  gap: 0;
}
.loadWizardIntro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin: -18px -18px 0;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 13px;
}
.loadWizardIntro button {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--field));
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
}
.loadSteps {
  display: grid;
  grid-template-columns: repeat(6, minmax(96px, 1fr));
  gap: 10px;
  margin: 0 -18px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.loadSteps button {
  display: grid;
  justify-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  padding: 0;
  font-size: 12px;
}
.loadSteps button:hover {
  transform: none;
  background: transparent;
  box-shadow: none;
  color: var(--accent);
}
.loadSteps button span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  font-weight: 900;
}
.loadSteps button.active {
  color: var(--accent);
  font-weight: 900;
}
.loadSteps button.active span {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 12%, transparent);
}
.loadStepPanel {
  display: grid;
  gap: 16px;
  padding: 24px 6px 12px;
  scroll-margin-top: 20px;
}
.loadStepPanel + .loadStepPanel {
  border-top: 1px solid var(--line);
}
.loadStepNote {
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 8px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--panel));
}
.loadFormGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
}
.loadFormGrid .field.full {
  grid-column: 1 / -1;
}
.loadDocCards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.loadDocCards > div {
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}
.loadDocCards strong {
  font-size: 15px;
}
.loadDocCards span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.loadChecklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.loadChecklist div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}
.loadChecklist span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: transparent;
  flex: 0 0 auto;
}
.loadChecklist .done span {
  color: #fff;
  background: var(--good);
  border-color: var(--good);
}
.loadChecklist strong {
  font-size: 13px;
}
.crmBoard {
  display: grid;
  grid-template-columns: repeat(7, minmax(210px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.crmLane {
  min-height: 320px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}
.crmLane h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.crmLane h3 span {
  color: var(--muted);
  font-size: 12px;
}
.crmCard {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.crmCard strong {
  font-size: 14px;
}
.crmCard span,
.crmCard small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.inlineHead {
  margin: -16px -18px 14px;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}
.customerForm {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.formSectionTitle {
  grid-column: 1 / -1;
  font-size: 20px;
  margin: 8px 0 3px;
}
.customerForm .field.full {
  grid-column: 1 / -1;
}
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12px; color: var(--ink-soft); font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.docUpload { display: grid; grid-template-columns: minmax(220px, 1fr) 190px 190px auto; gap: 10px; margin-bottom: 16px; align-items: center; }
.documentLibraryIntro .panelHead { align-items: center; }
.documentUploadForm { max-width: 720px; margin: 0 auto; }
.documentFilePicker {
  padding: 18px;
  border: 1px dashed color-mix(in srgb, var(--accent) 52%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 5%, var(--panel));
}
.documentFilePicker label { color: var(--accent); font-size: 15px; }
.documentFilePicker input[type="file"] { min-height: 48px; padding: 10px; background: var(--field); }
.documentTargetSummary { display: grid; gap: 5px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.documentTargetSummary span { color: var(--muted); font-size: 12px; }
.loadDocUpload { grid-template-columns: minmax(220px, 1fr) 190px auto; }
.loadDocActions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

.easyStart,
.easyStage { max-width: 1120px; margin: 0 auto; }
.easyStartIntro { max-width: 660px; margin-bottom: 28px; }
.easyStartIntro h2 { margin-top: 12px; font-size: 30px; }
.easyStartIntro p { margin: 10px 0 0; color: var(--muted); font-size: 16px; line-height: 1.55; }
.easyModeBadge,
.easyFlowCard > div > span,
.easyChoiceCard > span,
.easyRecordCard > div > span,
.easyProfileHeader > div > span,
.easyNextAction > span {
  color: var(--accent);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.easyFlow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.easyFlowCard {
  position: relative;
  display: grid;
  align-content: start;
  gap: 17px;
  min-height: 360px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.easyFlowCard > img,
.easyChoiceCard > img { width: 30px; height: 30px; }
.easyFlowCard h3,
.easyChoiceCard h3 { margin-top: 5px; font-size: 24px; }
.easyFlowCard p,
.easyChoiceCard p { margin: 9px 0 0; color: var(--muted); line-height: 1.5; }
.easyFlowCard small { margin-top: auto; color: var(--muted); }
.easyFlowNumber,
.easyStageNumber {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}
.easyStageLead { margin-bottom: 22px; }
.easyStageLead > div { display: flex; align-items: flex-start; gap: 14px; }
.easyStageLead h2 { font-size: 25px; }
.easyStageLead p { margin: 7px 0 0; color: var(--muted); line-height: 1.5; }
.easyAttention { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding: 13px 15px; border: 1px solid color-mix(in srgb, var(--warn) 30%, var(--line)); border-radius: 12px; background: color-mix(in srgb, var(--warn) 6%, var(--panel)); }
.easyAttention span { color: var(--muted); }
.easyCardList { display: grid; gap: 12px; }
.easyRecordCard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 19px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}
.easyRecordCard h3 { margin-top: 5px; font-size: 18px; }
.easyRecordCard p { margin: 6px 0; color: var(--ink-soft); }
.easyRecordCard small { color: var(--muted); }
.carrierHomeBase { display: block; margin-top: 7px; line-height: 1.45; }
.carrierHomeBase strong { color: var(--ink-soft); }
.easyRecordActions { display: flex; gap: 8px; }
.easyEmpty { padding: 46px 24px; border: 1px dashed var(--line); border-radius: 14px; background: var(--panel); text-align: center; }
.easyEmpty p { margin: 8px 0 18px; color: var(--muted); }
.easyChoiceGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.easyChoiceCard { display: grid; align-content: start; gap: 13px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: var(--shadow); }
.easyChoiceCard button.primary { margin-top: 6px; }
.easyFormIntro { padding: 15px 16px; border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line)); border-radius: 12px; background: color-mix(in srgb, var(--accent) 6%, var(--panel)); }
.easyFormIntro strong,
.easyFormIntro span { display: block; }
.easyFormIntro span { margin-top: 5px; color: var(--muted); line-height: 1.45; }
.easyEntryForm { max-width: 720px; margin: 0 auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.easyContinue { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.easyLoadSteps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: -18px -18px 20px; padding: 17px 20px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.easyLoadSteps button { display: flex; align-items: center; justify-content: center; gap: 9px; border: 0; background: transparent; color: var(--muted); box-shadow: none; }
.easyLoadSteps button:hover { transform: none; box-shadow: none; color: var(--accent); }
.easyLoadSteps button span { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: var(--line-2); }
.easyLoadSteps button.active { color: var(--accent); }
.easyLoadSteps button.active span { background: var(--accent); color: #fff; }
.easyLoadPanel[hidden] { display: none; }
.easyStepHeading { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 20px; }
.easyStepHeading > span { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 900; }
.easyStepHeading strong { font-size: 19px; }
.easyStepHeading p { margin: 5px 0 0; color: var(--muted); }
.easyLoadGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.easyInlineCreate { padding: 15px; border: 1px dashed var(--line); border-radius: 12px; background: var(--panel-2); }
.easyInlineCreate[hidden] { display: none; }
.easyStopPair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.easyStopCard,
.easyFormGroup { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-2); }
.easyStopFields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.easyFormGroupTitle { margin-bottom: 16px; }
.easyFormGroupTitle > span { color: var(--accent); font-size: 10px; font-weight: 900; letter-spacing: .1em; }
.easyFormGroupTitle h3 { margin-top: 5px; font-size: 17px; }
.easyWizardActions { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.easyLoadReview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.easyLoadReview > div { padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-2); }
.easyLoadReview span,
.easyProfileGrid span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.easyLoadReview small { display: block; margin-top: 6px; color: var(--muted); line-height: 1.4; }
.easyProfileHeader { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 16px; margin-bottom: 18px; }
.easyProfileHeader h2 { margin: 5px 0; font-size: 25px; }
.easyProfileHeader p { margin: 0; color: var(--muted); }
.easyNextAction { display: grid; justify-items: start; gap: 8px; margin-bottom: 18px; padding: 22px; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: 15px; background: color-mix(in srgb, var(--accent) 6%, var(--panel)); }
.easyNextAction h3 { font-size: 22px; }
.easyNextAction p { margin: 0 0 6px; color: var(--muted); }
.easyProfileStops { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.easyProfileStops section { padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow-soft); }
.easyProfileStops span { color: var(--accent); font-size: 10px; font-weight: 900; letter-spacing: .1em; }
.easyProfileStops strong { display: block; margin-top: 6px; line-height: 1.45; }
.easyProfileStops p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.easyProfileGrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.easyProfileGrid section { padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow-soft); }
.easyProfileGrid p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.easyDocumentAction { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.easyDocumentAction p { margin: 5px 0 0; color: var(--muted); }
.easyDocumentButtons { display: flex; flex-wrap: wrap; gap: 8px; }
.compactTable { min-width: 0; }
.compactTable th, .compactTable td { padding: 12px 10px; }
.compactTable button { padding-inline: 9px; }

.loginPage { display: grid; grid-template-columns: 1fr; place-items: center; min-height: 100vh; background: var(--panel-2); }
.loginShell { width: min(430px, calc(100vw - 32px)); }
.loginBox { display: grid; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 26px; }
.loginBox form { display: grid; gap: 14px; }
.loginBrand { color: var(--ink); border-bottom-color: var(--line); padding: 0 0 16px; }
.loginBrand span { color: var(--muted); }
.loginBox h1 { font-size: 24px; }
.loginBox p { margin: 0; color: var(--muted); font-size: 13px; }
.loginBox label { font-size: 12px; color: var(--ink-soft); font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.error { color: var(--bad); background: #fff1f0; border: 1px solid #ffccc7; border-radius: 6px; padding: 8px 10px; font-size: 13px; }
.notice { color: var(--good); background: #ecfdf3; border: 1px solid #86efac; border-radius: 6px; padding: 9px 11px; font-size: 13px; }
.loginHelp { color: var(--accent); font-size: 13px; font-weight: 800; text-decoration: none; }
.loginHelp:hover { text-decoration: underline; }
.loginResetButton {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}
.loginResetButton:hover { border-color: var(--accent); color: var(--accent); }
.accountRecoveryAction { margin-top: 9px; }
.carrierSaveChoice {
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 5%, var(--panel));
}
.carrierSaveChoice p { margin: 0; }

@media (max-width: 980px) {
  body { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; min-height: 0; }
  nav { grid-template-columns: repeat(3, 1fr); }
  .navGroup { grid-column: 1 / -1; }
  .topbar { height: auto; align-items: flex-start; flex-direction: column; padding: 14px; }
  .topActions, #globalSearch { width: 100%; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid2, .grid3, .formGrid, .featureGrid, .carrierStats, .snapshotGrid, .contactMapLayout, .fmcsaProfileGrid, .profileInfoGrid, .contactFields, .safetyGrid, .fleetGrid, .loadFormGrid, .loadDocCards, .loadChecklist, .profileSummaryGrid, .requiredDocumentGrid { grid-template-columns: 1fr; }
  .carrierHero, .snapshotIntro { flex-direction: column; }
  .customerTopbar { flex-direction: column; align-items: stretch; }
  .customerTopbar .actions { justify-content: flex-start; }
  .loadSteps { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-left: -18px; margin-right: -18px; }
  .loadWizardIntro { flex-direction: column; align-items: stretch; }
  .fmcsaProfileHeader { position: static; margin: 0 -28px 6px; grid-template-columns: 1fr; }
  .fmcsaRightRail { position: static; }
  .lookupResult { grid-template-columns: 1fr; }
  .lookupCarrierLine { grid-template-columns: auto minmax(0, 1fr); }
  .lookupCarrierLine span:not(.lookupStatusDot) { white-space: normal; }
  .railStats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  th { top: 0; }
  .docUpload { grid-template-columns: 1fr; }
  .searchBar, .carrierLookup { grid-template-columns: 1fr; border-radius: 10px; }
}

/* Dark-mode chip + control tints */
[data-theme="dark"] .status.Delivered,[data-theme="dark"] .status.Paid,[data-theme="dark"] .status.Active,[data-theme="dark"] .status.Approved,[data-theme="dark"] .status.Accepted,[data-theme="dark"] .status.Tracking,[data-theme="dark"] .ins.ok { background:#10241b; border-color:#1f5135; }
[data-theme="dark"] .status.Needs,[data-theme="dark"] .status.Overdue,[data-theme="dark"] .status.Blocked,[data-theme="dark"] .ins.bad { background:#2a1416; border-color:#5b2526; }
[data-theme="dark"] .status.In,[data-theme="dark"] .status.Ready,[data-theme="dark"] .status.Booked,[data-theme="dark"] .status.Posted,[data-theme="dark"] .status.Sent,[data-theme="dark"] .status.Queued { background:#12233d; border-color:#244468; }
[data-theme="dark"] .status.Quoted,[data-theme="dark"] .status.Draft,[data-theme="dark"] .status.Review,[data-theme="dark"] .status.Pending { background:#2a2310; border-color:#5b4a1f; }
[data-theme="dark"] .danger { background:transparent; }
[data-theme="dark"] .danger:hover { background:#2a1416; }
[data-theme="dark"] button:hover { border-color:#3a434f; }
.themeToggle { display:flex; gap:8px; align-items:center; }
.themeToggle button.active { background: var(--accent); border-color: var(--accent); color:#fff; }
.settingsPage {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 18px;
}
.settingsHeader {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 6px;
}
.settingsHeader h2 {
  font-size: 24px;
}
.settingsTabs,
.settingsSubtabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
}
.settingsTab {
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 999px;
  color: var(--muted);
  padding: 8px 14px;
}
.settingsTab:hover {
  transform: none;
  box-shadow: none;
  background: var(--hover);
}
.settingsTab.active,
.settingsSubtabs .active {
  color: #fff;
  background: var(--accent-dark);
}
[data-theme="dark"] .settingsTab.active,
[data-theme="dark"] .settingsSubtabs .active {
  background: var(--accent);
}
.settingsSubtabs {
  width: fit-content;
  margin: 0 auto;
}
.settingsSubtabs button {
  display: inline-flex;
  padding: 8px 18px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-weight: 800;
}
.settingsSubtabs button:hover { transform: none; box-shadow: none; background: var(--hover); }
.settingsSubtabs .active {
  color: #fff;
}
.settingsStack {
  display: grid;
  gap: 18px;
}
.settingsList {
  display: grid;
  gap: 12px;
}
.statusColorRow {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(160px, auto) auto;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.statusPreview,
.statusChip {
  display: inline-flex;
  width: fit-content;
  min-height: 30px;
  align-items: center;
  padding: 6px 13px;
  border-radius: 999px;
  color: #111827;
  font-size: 13px;
  font-weight: 900;
  border: 1px solid rgba(17, 24, 39, .12);
}
.settingsBucket {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.settingsBucket > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.settingsBucket > div span {
  color: var(--muted);
  font-size: 12px;
}
.settingsBucket p {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}
.settingsPage textarea[name="broker_carrier_agreement_template"],
.settingsPage textarea[name="shipper_broker_agreement_template"],
.settingsPage textarea[name="carrier_policy_text"] {
  min-height: 360px;
  line-height: 1.55;
}
@media (max-width: 980px) {
  .settingsHeader { grid-template-columns: 1fr; }
  .settingsTabs, .settingsSubtabs { border-radius: 8px; width: 100%; }
  .settingsTab, .settingsSubtabs button { flex: 1 1 auto; justify-content: center; }
  .statusColorRow { grid-template-columns: 1fr; }
}

/* ============ Mobile: hamburger + off-canvas drawer + PWA ============ */
.menuToggle { display: none; }
.navBackdrop { display: none; }

@media (max-width: 768px) {
  body { grid-template-columns: 1fr; }

  /* Hamburger button in the top bar */
  .menuToggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; flex: 0 0 auto;
    font-size: 20px; line-height: 1; border-radius: 10px;
    background: var(--field); border: 1px solid var(--line); color: var(--ink);
  }

  /* Sidebar becomes a slide-in drawer */
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 60;
    width: 270px; max-width: 84vw; height: 100vh;
    transform: translateX(-102%); transition: transform .22s ease;
    box-shadow: none;
  }
  body.nav-open .sidebar { transform: translateX(0); box-shadow: 0 0 50px rgba(0,0,0,.45); }
  nav { grid-template-columns: 1fr; }
  .navGroup { grid-column: auto; }
  .nav { padding: 12px 14px; font-size: 15px; }

  .navBackdrop {
    display: block; position: fixed; inset: 0; z-index: 55;
    background: rgba(0,0,0,.55); opacity: 0; pointer-events: none;
    transition: opacity .2s ease;
  }
  body.nav-open .navBackdrop { opacity: 1; pointer-events: auto; }

  /* Compact single-row top bar: [menu] [title] [New Load] */
  .topbar {
    flex-direction: row; align-items: center; gap: 10px;
    min-height: 60px; padding: 10px 14px env(safe-area-inset-top) 14px;
    padding-top: max(10px, env(safe-area-inset-top));
  }
  .topbarTitle { min-width: 0; flex: 1; }
  .topbar h1 { font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar p { display: none; }
  #globalSearch { display: none; }
  .topActions { flex: 0 0 auto; }

  /* Content + cards */
  .view { padding: 16px 14px calc(40px + env(safe-area-inset-bottom)); }
  .kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
  .kpi { padding: 14px; }
  .kpi strong { font-size: 22px; }

  /* Wider tap targets */
  button { padding: 11px 13px; }
  .actions { gap: 8px; }
  .actions button { padding: 9px 11px; font-size: 13px; }

  /* Full-screen modals on phone */
  dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  #modalBody { max-height: calc(100dvh - 132px); }
  .formGrid { grid-template-columns: 1fr; }
}

/* ============ Install (Add to Home Screen) hint banner ============ */
.installBar {
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 80;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  font-size: 14px;
  color: var(--ink);
}
.installBar .installMsg { line-height: 1.35; }
.installActions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.installClose { background: transparent; border: 0; color: var(--muted); font-size: 15px; padding: 6px 8px; }
.installClose:hover { color: var(--ink); transform: none; box-shadow: none; }
@media (min-width: 769px) { .installBar { left: auto; right: 20px; max-width: 440px; } }

/* ============ Notification bell + panel ============ */
.bellWrap { position: relative; }
.bellBtn { position: relative; width: 42px; height: 42px; font-size: 17px; padding: 0; border-radius: 10px; }
.bellBtn img { display: block; width: 19px; height: 19px; margin: auto; opacity: .72; }
.bellBadge {
  position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 100px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--panel);
}
.notifPanel {
  position: absolute; right: 0; top: 50px; z-index: 90;
  width: min(380px, calc(100vw - 24px));
  max-height: 70vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow);
}
.notifHead { padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 800; font-size: 13px;
  text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); position: sticky; top: 0; background: var(--panel); display:flex; align-items:center; justify-content:space-between; gap:12px; }
.notifHead button,.notifRead { padding:5px 8px; font-size:11px; text-transform:none; letter-spacing:0; white-space:nowrap; }
.notifItem { display: flex; align-items:flex-start; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line-2); }
.notifItem:last-child { border-bottom: 0; }
.notifItem:hover { background: var(--hover); }
.notifDot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 100px; margin-top: 5px; background: var(--muted); }
.notifDot.high { background: var(--bad); }
.notifDot.mid { background: var(--warn); }
.notifDot.low { background: var(--accent-2); }
.notifBody { min-width: 0; flex:1; display:grid; gap:2px; padding:0; border:0; background:transparent; color:inherit; text-align:left; box-shadow:none; }
.notifBody:hover { background:transparent; color:inherit; }
.notifBody .t { font-size: 13px; font-weight: 700; }
.notifBody .s { font-size: 12px; color: var(--muted); margin-top: 1px; }
.notifEmpty { padding: 26px 14px; text-align: center; color: var(--muted); font-size: 13px; }
@media (max-width: 768px) { .notifPanel { position: fixed; right: 12px; left: 12px; top: 64px; width: auto; } }

/* Ensure [hidden] wins over display:flex on these elements */
.bellBadge[hidden], .installBar[hidden], .notifPanel[hidden], .installBtn[hidden], #installBtn[hidden] { display: none !important; }

@media (max-width: 700px) {
  .captureSetupDialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .captureSetupHead { grid-template-columns: 42px minmax(0, 1fr) 36px; padding: 18px; }
  .captureSetupMark { width: 42px; height: 42px; border-radius: 10px; }
  .captureSetupSteps { grid-template-columns: 1fr; }
  .captureSetupBody { padding: 18px; }
  .captureSetupActions { padding: 14px 18px; flex-wrap: wrap; }
  .captureSetupActions button { flex: 1 1 150px; }
}

/* ============ TenSenk Command Workspace ============ */
:root {
  --bg: #f7f8fc;
  --panel: #ffffff;
  --panel-2: #fafafe;
  --hover: #f6f3ff;
  --sidebar: #ffffff;
  --topbar: rgba(255, 255, 255, .96);
  --field: #ffffff;
  --soft: #f0eaff;
  --soft-ink: #6f36df;
  --chip: #f2f4f8;
  --ink: #1f2940;
  --ink-soft: #3d475c;
  --muted: #737c8d;
  --line: #dfe3ea;
  --line-2: #eceef3;
  --accent: #7338e6;
  --accent-dark: #2f2461;
  --accent-2: #2d83c5;
  --accent-3: #f4a45d;
  --warn: #bd6b17;
  --bad: #d9473f;
  --good: #16a068;
  --shadow: 0 1px 2px rgba(31, 41, 64, .035), 0 8px 24px rgba(31, 41, 64, .045);
  --shadow-soft: 0 4px 14px rgba(31, 41, 64, .07);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0b0e14;
  --panel: #141922;
  --panel-2: #181f2a;
  --hover: #211c31;
  --sidebar: #10151d;
  --topbar: rgba(16, 21, 29, .96);
  --field: #111722;
  --soft: #2c2250;
  --soft-ink: #cab8ff;
  --chip: #202837;
  --ink: #f1f4fa;
  --ink-soft: #cbd2de;
  --muted: #929bad;
  --line: #2a3342;
  --line-2: #222a37;
  --accent: #a980ff;
  --accent-dark: #e3d9ff;
  --accent-2: #5cb5ec;
  --accent-3: #ffae63;
  --warn: #ffb45d;
  --bad: #ff7f76;
  --good: #54d49a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 32px rgba(0, 0, 0, .24);
  --shadow-soft: 0 5px 18px rgba(0, 0, 0, .26);
  color-scheme: dark;
}
[data-theme="dark"] .roomIcon,
[data-theme="dark"] .bellBtn img { filter: invert(1); }
[data-theme="dark"] .attentionIcon { background: #382124; }
[data-theme="dark"] .attentionIcon.notice { background: #382c1d; }
[data-theme="dark"] .attentionIcon.ready { background: #182c3d; }
[data-theme="dark"] .newCustomerFields,
[data-theme="dark"] .quoteGuardrail { background: var(--panel-2); border-color: var(--line); color: var(--ink); }

body {
  grid-template-columns: 242px minmax(0, 1fr);
  background: var(--bg);
}

.sidebar {
  width: 242px;
  padding: 0 14px 14px;
  gap: 0;
  overflow: visible;
  z-index: 20;
}

.brand {
  height: 88px;
  justify-content: flex-start;
  padding: 0 8px;
  border-bottom: 1px solid var(--line);
}

.brand .mark {
  width: 35px;
  height: 35px;
  border-radius: 10px;
  font-size: 12px;
  box-shadow: 0 5px 12px rgba(249, 115, 22, .22), inset 0 0 0 1px rgba(255,255,255,.42);
}

.brandName { display: grid; gap: 2px; color: var(--ink); }
.brandName strong { font-size: 14px; }
.brandName small { color: var(--muted); font-size: 10px; }
.roomLabel { display: inline; }

.roomNav {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
  padding-top: 30px;
}

.roomLink.nav {
  position: relative;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  width: 100%;
  height: 48px;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border: 0;
  border-radius: 11px;
  color: var(--ink-soft);
  text-align: left;
}

.roomLink.nav::before {
  content: "";
  position: absolute;
  left: -14px;
  width: 3px;
  height: 31px;
  border-radius: 0 4px 4px 0;
  background: transparent;
}

.roomLink.nav:hover { background: var(--hover); color: var(--accent); }
.roomLink.nav.active {
  background: var(--soft);
  color: var(--accent);
  box-shadow: none;
}
.roomLink.nav.active::before { background: var(--accent); }

.whatsNewLink.nav {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  width: 100%;
  min-height: 32px;
  align-items: center;
  gap: 12px;
  margin: 7px 0 0;
  padding: 4px 14px;
  border: 0;
  color: var(--muted);
  font-size: 11px;
  text-align: left;
}
.whatsNewLink.nav .roomIcon { width: 14px; height: 14px; opacity: .62; }
.whatsNewLink.nav .roomLabel { font-size: 11px; font-weight: 700; }
.whatsNewLink.nav:hover,
.whatsNewLink.nav.active { background: var(--hover); color: var(--accent); box-shadow: none; }
.whatsNewLink[hidden] { display: none !important; }

.roomIcon {
  display: block;
  width: 20px;
  height: 20px;
  opacity: .76;
}
.roomLink.active .roomIcon { opacity: 1; }
.roomLabel { font-size: 13px; font-weight: 750; }

.sidebarFoot {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
  margin-top: auto;
}

.sidebarFoot .userBadge,
.sidebarFoot .sidebarUtility {
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  gap: 11px;
  padding: 7px;
  border-radius: 12px;
  background: var(--panel);
  color: var(--accent);
  font-size: 12px;
  box-shadow: none;
}
.userInitials { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; border-radius: 10px; background: var(--soft); color: var(--accent); }
.userDetails { display: grid; min-width: 0; gap: 3px; text-align: left; }
.userDetails strong, .userDetails small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.userDetails strong { color: var(--ink); font-size: 12px; }
.userDetails small { color: var(--muted); font-size: 10px; }

main { background: var(--bg); }

.topbar {
  min-height: 142px;
  padding: 26px 34px 22px;
  background: var(--panel);
  backdrop-filter: none;
  position: relative;
  top: auto;
}

.screenEyebrow {
  display: block;
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .13em;
}
.mobileBrandName, .mobileProfileBtn { display: none; }

.topbar h1 {
  color: var(--ink);
  font-size: clamp(27px, 3vw, 34px);
  letter-spacing: -.035em;
}
.topbar p { margin-top: 8px; font-size: 14px; }

.topActions { gap: 11px; }
#globalSearch {
  width: min(330px, 26vw);
  border-radius: 10px;
  background: var(--field);
}

.topActions > .primary {
  min-height: 42px;
  border-radius: 10px;
  padding-inline: 18px;
  background: var(--field);
  border-color: #cfc3ed;
  color: var(--accent);
  box-shadow: none;
}
.topActions > .primary:hover { background: var(--hover); }
.pageHelpBtn { min-height: 42px; white-space: nowrap; }
.pageHelpBtn[hidden] { display: none !important; }
.globalSearchWrap { position: relative; }
.globalSearchResults { position: absolute; z-index: 45; top: calc(100% + 8px); right: 0; width: min(430px, 82vw); max-height: 420px; overflow: auto; padding: 7px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: 0 22px 55px rgba(17,24,39,.18); }
.globalSearchResults[hidden] { display: none; }
.globalSearchResult { display: grid; width: 100%; grid-template-columns: 72px minmax(0,1fr); gap: 10px; padding: 11px 12px; border: 0; border-radius: 9px; background: transparent; text-align: left; box-shadow: none; }
.globalSearchResult:hover { transform: none; background: var(--hover); box-shadow: none; }
.globalSearchResult > span { color: var(--accent); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.globalSearchResult strong { display: block; }
.globalSearchResult small { display: block; margin-top: 3px; color: var(--muted); }
.globalSearchEmpty { padding: 18px; color: var(--muted); text-align: center; }
.recordLink { padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--accent); box-shadow: none; }
.recordLink:hover { transform: none; background: transparent; box-shadow: none; text-decoration: underline; }

.roomTabs {
  display: flex;
  min-height: 51px;
  align-items: end;
  gap: 14px;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  overflow-x: auto;
}
.roomTab {
  position: relative;
  flex: 0 0 auto;
  height: 51px;
  padding: 0 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #5e6777;
  box-shadow: none;
  font-size: 13px;
}
.roomTab:hover { border: 0; background: transparent; box-shadow: none; transform: none; color: var(--accent); }
.roomTab.active { color: var(--accent); }
.roomTab.active::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: -1px;
  left: 8px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
}

.view { padding: 24px 28px 52px; }
.panel, .kpi, .feature { border-radius: 12px; box-shadow: var(--shadow); }
.panelHead { padding: 16px 18px; background: var(--panel); }
.panelHead h2 { font-size: 15px; }
.toolbar { padding: 2px; }

table { font-size: 13px; }
th { color: #778091; font-size: 10px; letter-spacing: .08em; }
tbody tr:hover { background: var(--hover); }

.homeWorkspace {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(290px, .72fr);
  gap: 18px;
  max-width: 1180px;
}
.homeMain,
.homeSide { display: grid; align-content: start; gap: 18px; }
.homePanel { padding: 0; overflow: hidden; }
.homePanelHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 21px 22px 14px;
}
.homePanelHeader .eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .14em;
}
.homePanelHeader h2 { font-size: 16px; }
.attentionCount {
  padding: 4px 9px;
  border: 1px solid #f1c9c2;
  border-radius: 999px;
  color: #c1483f;
  font-size: 10px;
  font-weight: 800;
}
.attentionList,
.movementList,
.waitingList,
.quickActionList { padding: 0 22px 14px; }
.attentionItem,
.movementItem,
.waitingItem,
.quickAction {
  display: grid;
  align-items: center;
  min-height: 65px;
  border-top: 1px solid var(--line-2);
}
.attentionItem { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 13px; }
.attentionItem:first-child,
.movementItem:first-child,
.waitingItem:first-child,
.quickAction:first-child { border-top: 0; }
.attentionIcon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  background: #fff0ed;
  color: #d94d42;
  font-weight: 900;
}
.attentionIcon img { width: 17px; height: 17px; }
.attentionIcon.notice { background: #fff6e8; color: #de861a; }
.attentionIcon.ready { background: #eef6ff; color: #2e79c3; }
.attentionCopy strong,
.movementCopy strong { display: block; font-size: 13px; }
.attentionCopy span,
.movementCopy span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.attentionArrow { color: var(--muted); font-size: 11px; font-weight: 800; }
.movementItem { grid-template-columns: 12px minmax(0, 1fr) auto; gap: 13px; }
.healthDot { width: 10px; height: 10px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px #eaf8f1; }
.movementStatus { font-size: 10px; }
.waitingList { padding-bottom: 7px; }
.waitingItem { grid-template-columns: 42px minmax(0, 1fr); }
.waitingItem strong { font-size: 24px; }
.waitingItem span { color: var(--muted); font-size: 11px; }
.quickAction {
  width: 100%;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  padding: 0;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  text-align: left;
}
.quickAction:hover { transform: none; border-color: var(--line-2); background: var(--hover); box-shadow: none; }
.quickActionIcon { width: 18px; height: 18px; color: currentColor; opacity: .75; }
.quickAction > span:last-child { color: var(--muted); }
.homeEmpty { padding: 18px 0 24px; color: var(--muted); font-size: 13px; }

.newCustomerFields {
  padding: 16px;
  border: 1px solid #ded5f3;
  border-radius: 12px;
  background: #faf8ff;
}
.newCustomerFields[hidden] { display: none !important; }
.newCustomerGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.newCustomerGrid .field { margin: 0; }
.quoteGuardrail {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #d7ebe1;
  border-radius: 10px;
  background: #f3faf6;
  color: #315946;
  font-size: 13px;
}
.quoteGuardrail span { color: #5f756a; font-size: 12px; }
.quoteDelivery > .muted { margin: 18px 0; line-height: 1.55; }

.mfaNotice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--warn) 38%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--warn) 9%, var(--panel));
}
.mfaNotice strong { display: block; }
.mfaNotice p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

.pageGuide {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(12, 16, 24, .62);
  backdrop-filter: blur(8px);
}
.pageGuide[hidden] { display: none; }
.pageGuideCard { width: min(760px, 100%); max-height: min(840px, 92vh); overflow: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: 0 28px 90px rgba(0,0,0,.34); }
.pageGuideHead, .pageGuideActions { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px; }
.pageGuideHead span { color: var(--accent); font-size: 10px; font-weight: 900; letter-spacing: .13em; }
.pageGuideHead h2 { margin-top: 4px; font-size: 22px; }
.pageGuide video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #090b10; object-fit: cover; }
.pageGuideBody { padding: 19px 22px 10px; }
.pageGuideSummary { margin: 0 0 16px; color: var(--muted); }
.pageGuideStep { min-height: 88px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.pageGuideStep strong { display: block; margin-bottom: 6px; }
.pageGuideStep p { margin: 0; color: var(--muted); line-height: 1.5; }
.pageGuideDots { display: flex; gap: 7px; margin-top: 14px; }
.pageGuideDots span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.pageGuideDots span.active { width: 22px; border-radius: 999px; background: var(--accent); }
.pageGuideActions { border-top: 1px solid var(--line); }
.pageGuideActions > div { display: flex; gap: 9px; }

.scorecardTabs, .recordTabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 16px; }
.scorecardTabs button.active, .recordTabs button.active { border-color: var(--accent); background: var(--soft); color: var(--soft-ink); }
.loadRecordHeader { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.loadRecordHeader h2 { margin-bottom: 6px; }
.loadRecordGrid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(270px, .7fr); gap: 18px; }
.loadRecordGrid > *, .loadRecordGrid .panel, .loadRecordGrid .tableWrap { min-width: 0; max-width: 100%; }
.loadRecordRail { display: grid; align-content: start; gap: 12px; }
.recordProgress { height: 9px; overflow: hidden; border-radius: 999px; background: var(--line-2); }
.recordProgress span { display: block; height: 100%; background: var(--accent); }
.recordFacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.recordFact { padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.recordFact span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.discoveryGrid { display: grid; grid-template-columns: 1.35fr repeat(2, minmax(150px, .7fr)); gap: 10px; }
.discoveryActions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.suggestionList { display: grid; gap: 9px; }
.suggestionCard { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.suggestionCard p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.field { position: relative; }
.locationSuggestions { position: absolute; z-index: 80; top: calc(100% + 5px); right: 0; left: 0; max-height: 260px; overflow: auto; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: 0 18px 44px rgba(17,24,39,.2); }
.locationSuggestions button { display: grid; width: 100%; gap: 3px; padding: 10px 11px; border: 0; background: transparent; text-align: left; box-shadow: none; }
.locationSuggestions button:hover { transform: none; background: var(--hover); box-shadow: none; }
.locationSuggestions small, .locationSuggestionStatus { color: var(--muted); font-size: 11px; }
.locationSuggestionStatus { padding: 12px; }
.quoteDistanceStatus { align-self: end; min-height: 41px; padding: 11px 12px; border: 1px dashed var(--line); border-radius: 9px; color: var(--muted); font-size: 12px; }

@media (max-width: 980px) {
  .topbar { padding-inline: 24px; }
  .roomTabs { padding-inline: 20px; }
  .view { padding-inline: 20px; }
  .homeWorkspace { grid-template-columns: 1fr; }
  .homeSide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body { grid-template-columns: 86px minmax(0, 1fr); }
  .sidebar { width: 86px; padding-inline: 12px; }
  .brand { justify-content: center; padding-inline: 0; }
  .brandName, .roomLabel, .userDetails { display: none; }
  .roomLink.nav { grid-template-columns: 1fr; place-items: center; padding: 0; }
  .whatsNewLink.nav { grid-template-columns: 1fr; width: 100%; min-height: 34px; margin: 3px 0 0; place-items: center; padding: 0; }
  .sidebarFoot .userBadge { justify-content: center; }
  .loadRecordGrid { grid-template-columns: 1fr; }
  .easyFlow { grid-template-columns: 1fr; }
  .easyFlowCard { min-height: 0; }
  .easyProfileGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .easyStopPair { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  html, body { height: 100dvh; max-height: 100dvh; overflow: hidden; overscroll-behavior: none; }
  body { display: block; min-height: 100dvh; padding-bottom: 0; }
  main {
    height: calc(100dvh - 64px - env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }
  .sidebar {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: none;
    height: calc(64px + env(safe-area-inset-bottom));
    padding: 0 7px env(safe-area-inset-bottom);
    transform: none;
    border-top: 1px solid var(--line);
    border-right: 0;
    box-shadow: 0 -10px 28px rgba(31, 41, 64, .06);
  }
  .brand, .sidebarFoot, .navBackdrop { display: none; }
  .roomNav {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    width: 100%;
    padding: 0;
    gap: 2px;
  }
  html[data-ui-mode="easy"] .roomNav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  html[data-ui-mode="easy"] .roomLabel { display: block; font-size: 10px; line-height: 1.1; }
  html[data-ui-mode="easy"] .roomLink.nav { display: grid; grid-template-rows: auto auto; gap: 3px; place-items: center; }
  .roomLink.nav { width: 100%; height: 58px; border-radius: 9px; }
  .whatsNewLink.nav { width: 100%; height: 58px; min-height: 58px; margin: 0; border-radius: 9px; }
  .whatsNewLink.nav .roomIcon { width: 18px; height: 18px; }
  .roomLink.nav::before { display: none; }
  .roomIcon { width: 20px; height: 20px; }
  .topbar {
    position: sticky;
    z-index: 30;
    top: 0;
    min-height: 96px;
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: max(12px, env(safe-area-inset-top)) 12px 12px;
    box-shadow: 0 8px 24px rgba(31, 41, 64, .07);
  }
  .topbarTitle { display: flex; min-width: 0; align-items: center; }
  .topActions { width: 100%; flex: 0 0 auto; justify-content: space-between; gap: 7px; }
  .uiModeSwitch { gap: 2px; padding: 2px; }
  .uiModeSwitch button { min-height: 31px; padding: 6px 7px; font-size: 10px; }
  .menuToggle { display: none; }
  .screenEyebrow { display: none; }
  .mobileBrandName { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; margin: 0; color: var(--muted); font-size: 11px; font-weight: 850; }
  .mobileBrandMark { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 7px; background: #f97316; color: #fff; font-size: 8px; font-weight: 900; }
  .mobileProfileBtn { display: grid; flex: 0 0 40px; width: 40px; height: 40px; place-items: center; padding: 0; border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: 12px; background: var(--soft); color: var(--accent); box-shadow: none; font-size: 12px; font-weight: 900; }
  .topbar h1 { overflow: hidden; margin-left: 10px; padding-left: 10px; border-left: 1px solid var(--line); font-size: 17px; line-height: 1.08; text-overflow: ellipsis; white-space: nowrap; }
  .topbar p { display: none; }
  .topActions > .primary { min-height: 39px; padding-inline: 10px; font-size: 11px; white-space: nowrap; }
  .bellBtn { display: none; }
  .roomTabs { min-height: 47px; padding-inline: 8px; }
  .roomTab { height: 47px; padding-inline: 11px; font-size: 12px; }
  .view { padding: 16px 12px 24px; }
  .homeSide { grid-template-columns: 1fr; }
  .newCustomerGrid { grid-template-columns: 1fr; }
  .topActions .pageHelpBtn { display: none; }
  .discoveryGrid, .recordFacts { grid-template-columns: 1fr; }
  .easyChoiceGrid,
  .easyEntryForm,
  .easyLoadGrid,
  .easyLoadReview,
  .easyProfileGrid,
  .easyProfileStops,
  .easyStopFields { grid-template-columns: 1fr; }
  .easyStartIntro h2 { font-size: 25px; }
  .easyFlowCard { padding: 20px; }
  .easyRecordCard { grid-template-columns: 1fr; gap: 14px; }
  .easyRecordActions { justify-content: stretch; }
  .easyRecordActions > * { flex: 1; }
  .easyLoadSteps { gap: 2px; padding-inline: 8px; }
  .easyLoadSteps button { display: grid; justify-items: center; gap: 4px; padding-inline: 3px; font-size: 10px; text-align: center; }
  .easyLoadSteps button span { width: 25px; height: 25px; }
  .easyProfileHeader { grid-template-columns: auto minmax(0, 1fr); }
  .easyProfileHeader > button:last-child { grid-column: 2; justify-self: start; }
  .easyDocumentAction { align-items: stretch; flex-direction: column; }
  .easyDocumentButtons > * { flex: 1; }
  .pageGuide { padding: 10px; }
  .pageGuideCard { max-height: 96vh; border-radius: 14px; }
  .installBar { bottom: calc(76px + env(safe-area-inset-bottom)); }

  /* Deeper workspaces use the same mobile card language as the new shell. */
  .toolbar { align-items: stretch; flex-wrap: wrap; }
  .toolbar > .primary { margin-left: auto; }
  .invoiceAging { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scorecardTabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .scorecardTabs button { width: 100%; }

  .board,
  .crmBoard {
    grid-template-columns: minmax(0, 1fr);
    overflow-x: visible;
    gap: 12px;
    padding-bottom: 0;
  }
  .lane,
  .crmLane { min-height: 0; }
  .lane:has(.loadCard),
  .crmLane:has(.crmCard) { padding-bottom: 10px; }

  .responsiveTablePanel {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .responsiveTableWrap { overflow: visible; }
  .responsiveTable {
    display: block;
    width: 100%;
    min-width: 0 !important;
    background: transparent;
  }
  .responsiveTable thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .responsiveTable tbody {
    display: grid;
    gap: 12px;
  }
  .responsiveTable tbody tr {
    display: block;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
    box-shadow: var(--shadow-soft);
  }
  .responsiveTable tbody tr:hover td { background: transparent; }
  .responsiveTable tbody td {
    display: grid;
    grid-template-columns: minmax(92px, .38fr) minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    width: 100%;
    min-width: 0 !important;
    padding: 11px 13px;
    border-bottom: 1px solid var(--line-2);
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .responsiveTable tbody td::before {
    content: attr(data-label);
    color: var(--ink-soft);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
    line-height: 1.4;
    text-transform: uppercase;
  }
  .responsiveCellValue { min-width: 0; overflow-wrap: anywhere; }
  .responsiveCellValue > .status,
  .responsiveCellValue > .ins { width: max-content; max-width: 100%; }
  .responsiveTable tbody td:last-child { border-bottom: 0; }
  .responsiveTable tbody td[data-label=""] { display: block; }
  .responsiveTable tbody td[data-label=""]::before,
  .responsiveTable tbody td[colspan]::before { display: none; }
  .responsiveTable tbody td[colspan] {
    display: block;
    padding: 18px;
    text-align: center;
  }
  .responsiveTable .customerNameCell { min-width: 0; }
  .responsiveTable .actions { justify-content: flex-start; }
}
