@import url("https://fonts.googleapis.com/css2?family=Sigmar&family=Poppins:wght@300;400;500;600;700;800;900&display=swap");

:root {
  --bg: #fafafa;
  --paper: #ffffff;
  --black: #1d1d1b;
  --grey: #3e3e3f;
  --muted: #687076;
  --teal: #189b9f;
  --teal-dark: #127d80;
  --teal-soft: rgba(24, 155, 159, .10);
  --lime: #befb62;
  --lime-soft: rgba(190, 251, 98, .28);
  --pink: #ff0086;
  --red: #d73027;
  --orange: #f97316;
  --blue: #2563eb;
  --line: rgba(29, 29, 27, .11);
  --line-soft: rgba(29, 29, 27, .06);
  --shadow: 0 18px 55px rgba(29, 29, 27, .08);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

:root[data-theme="dark"] .production-responsibility-grid > div,
:root[data-theme="dark"] .production-date-row,
:root[data-theme="dark"] .production-external-state,
:root[data-theme="dark"] .stock-source-bar,
:root[data-theme="dark"] .stock-fallback-editor,
:root[data-theme="dark"] .production-owned-section {
  background: var(--paper);
  border-color: var(--line);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1112;
  --paper: #171b1d;
  --black: #f4f7f7;
  --grey: #c3cbd0;
  --muted: #9aa6ab;
  --teal: #26bfc3;
  --teal-dark: #82e4e5;
  --teal-soft: rgba(38, 191, 195, .16);
  --lime: #c8ff69;
  --lime-soft: rgba(200, 255, 105, .18);
  --pink: #ff4aa9;
  --red: #ff6b61;
  --orange: #ff9a3d;
  --blue: #76a7ff;
  --line: rgba(244, 247, 247, .16);
  --line-soft: rgba(244, 247, 247, .08);
  --shadow: 0 18px 55px rgba(0, 0, 0, .30);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--black);
  font-family: "Poppins", Arial, sans-serif;
  letter-spacing: 0;
}
:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at 0 0, rgba(38, 191, 195, .11), transparent 28vw),
    linear-gradient(180deg, #0d1011 0%, var(--bg) 55%);
}
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }

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

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 20px;
  background: var(--bg);
}
body.auth-required {
  overflow: hidden;
}
body.auth-required .app-shell {
  visibility: hidden;
}
.login-panel {
  width: min(420px, 100%);
  display: grid;
  gap: 18px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.login-brand img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
}
.login-brand div {
  display: grid;
  line-height: .95;
}
.login-brand span,
.login-brand strong {
  font-family: "Sigmar", "Arial Black", sans-serif;
  font-size: 18px;
}
.login-brand strong { color: var(--teal); }
.login-panel h1 { margin: 0 0 4px; font-size: 25px; }
.login-panel p { margin: 0; color: var(--muted); font-size: 13px; }
.login-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}
.login-panel input {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--black);
  outline: 0;
}
.login-panel input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}
.login-panel .primary-btn { width: 100%; min-height: 44px; }
.login-panel .login-error { color: var(--red); font-weight: 850; }

.sidebar, .inspector {
  background: rgba(250, 250, 250, .96);
  border-color: var(--line-soft);
  z-index: 5;
}
.sidebar {
  min-height: 100vh;
  max-height: 100vh;
  border-right: 1px solid var(--line-soft);
  padding: 16px;
  position: sticky;
  top: 0;
  overflow-y: auto;
  overflow-x: hidden;
}
body.single-workspace-mode .sidebar { display: none; }
body.single-workspace-mode .app-shell {
  grid-template-columns: minmax(0, 1fr) 390px;
}
.inspector {
  min-height: 100vh;
  max-height: 100vh;
  border-left: 1px solid var(--line-soft);
  padding: 16px;
  position: sticky;
  top: 0;
  overflow: auto;
  scroll-behavior: smooth;
}
.workspace {
  min-width: 0;
  padding: 16px 18px 28px;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 100vh;
}

.brand-block {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: grid;
  gap: 9px;
  padding: 14px;
  margin-bottom: 14px;
  overflow: hidden;
}
.brand-logo {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.brand-logo-img {
  width: 52px;
  height: 52px;
  display: block;
  object-fit: cover;
  border-radius: 15px;
  border: 2px solid rgba(29, 29, 27, .08);
  box-shadow: 0 10px 24px rgba(24, 155, 159, .16);
}
.brand-logo-type {
  min-width: 0;
  display: grid;
  gap: 0;
}
.brand-logo-type span,
.brand-logo-type strong {
  font-family: "Sigmar", "Arial Black", sans-serif;
  margin: 0;
  display: block;
  font-size: 20px;
  line-height: .9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-logo-type span { color: var(--black); }
.brand-logo-type strong { color: var(--teal); font-weight: 900; }
.brand-block p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-list { display: grid; gap: 7px; margin: 10px 0 16px; }
.nav-btn, .wide-btn, .file-btn, .wide-link, .primary-btn, .secondary-btn, .secondary-link {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--black);
  text-decoration: none;
  cursor: pointer;
  font-weight: 850;
  min-height: 38px;
}
.nav-btn {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  text-align: left;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 16px;
  min-width: 0;
}
.nav-btn span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f0f3f3;
}
.nav-btn.active {
  background: var(--black);
  color: white;
}
.nav-btn.active span {
  background: var(--lime);
  color: var(--black);
}
.theme-toggle {
  width: 100%;
  min-height: 38px;
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  color: var(--black);
  padding: 9px 10px;
  text-align: left;
  cursor: pointer;
  font-weight: 900;
}
.theme-toggle span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 11px;
}
.theme-toggle strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.source-panel { display: grid; gap: 8px; }
.readonly-badge {
  background: var(--lime-soft);
  border-left: 6px solid var(--lime);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  font-size: 12px;
  font-weight: 900;
}
.wide-btn, .file-btn, .wide-link {
  display: grid;
  place-items: center;
  padding: 9px;
  text-align: center;
  border-radius: 16px;
}
.file-btn input { display: none; }
.wide-link { background: var(--teal); color: white; border-color: var(--teal); }

.topbar {
  display: grid;
  grid-template-columns: minmax(180px, .75fr) minmax(110px, .35fr) minmax(320px, 1.7fr) 110px minmax(108px, .4fr) minmax(130px, .45fr) auto;
  gap: 8px;
  align-items: center;
  position: relative;
  z-index: 25;
  background: transparent;
  border-bottom: 0;
  box-shadow: none;
  padding: 0;
  margin: 0 0 12px;
}
.topbar > .search-wrap { grid-column: 1; }
.topbar > .role-context { grid-column: 2; }
.topbar > .mobile-filters-toggle,
.topbar > .filters { grid-column: 3; }
.topbar > .data-refresh { grid-column: 4; }
.topbar > .topbar-theme-toggle { grid-column: 5; }
.topbar > .session-identity { grid-column: 6; }
.topbar > .logout-btn { grid-column: 7; }
.topbar > .active-filter-bar { grid-column: 1 / -1; }
.topbar-theme-toggle {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border-radius: 12px;
}
.search-wrap {
  position: relative;
}
.search-wrap input, .filters input, .multi-filter-toggle {
  width: 100%;
  min-height: 36px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 7px 10px;
  outline: none;
}
.search-wrap input:focus, .filters input:focus, .multi-filter.open .multi-filter-toggle {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}
.role-context {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 36px;
  padding: 4px 7px 4px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.role-context span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}
.role-context select {
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--black);
  font-size: 11px;
  font-weight: 900;
  outline: 0;
}
.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  min-width: 0;
  width: 100%;
}
.mobile-filters-toggle {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--black);
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 950;
}
.mobile-filters-toggle em {
  min-width: 24px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  padding: 5px 7px;
  text-align: center;
}
.mobile-filters-toggle.has-active em {
  background: var(--lime-soft);
  color: var(--black);
}
.data-refresh {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  justify-items: end;
  min-width: 0;
}
.data-refresh .secondary-btn {
  width: 100%;
  min-height: 36px;
  border-radius: 12px;
}
.data-refresh .secondary-btn:disabled,
.wide-btn:disabled {
  cursor: progress;
  opacity: .68;
}
.session-identity {
  min-width: 0;
  display: grid;
  gap: 1px;
  padding: 5px 9px;
  border-left: 3px solid var(--teal);
}
.session-identity strong,
.session-identity span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.session-identity strong { font-size: 11px; }
.session-identity span { color: var(--muted); font-size: 9px; font-weight: 850; }
.logout-btn {
  min-width: 0;
  min-height: 36px;
  padding: 7px 10px;
  white-space: nowrap;
}
.preview-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 12px;
  padding: 9px 11px;
  border: 1px solid rgba(249, 115, 22, .35);
  border-left: 5px solid var(--orange);
  border-radius: 8px;
  background: rgba(249, 115, 22, .08);
}
.preview-banner > div { min-width: 0; display: grid; gap: 2px; }
.preview-banner strong { font-size: 12px; }
.preview-banner span { color: var(--muted); font-size: 10px; font-weight: 800; }
.preview-banner .secondary-btn { flex: 0 0 auto; min-height: 34px; }
.preview-banner .preview-actions { display: flex; align-items: center; gap: 7px; }
.preview-banner .preview-actions .secondary-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
body.preview-mode [draggable="true"] { cursor: default !important; }
.refresh-status {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
  padding-right: 2px;
}
.multi-filter {
  position: relative;
  min-width: 0;
}
.multi-filter-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  gap: 1px;
  text-align: left;
  cursor: pointer;
  color: var(--black);
}
.multi-filter-toggle span {
  font-size: 12px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.multi-filter-toggle b {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.multi-filter-menu {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 120;
  display: none;
  width: min(340px, 90vw);
  max-height: 360px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 20px 54px rgba(29, 29, 27, .16);
}
.multi-filter.open .multi-filter-menu {
  display: grid;
  gap: 3px;
}
.multi-filter-option,
.multi-filter-clear {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 12px;
  color: var(--black);
  font-size: 12px;
  font-weight: 850;
}
.multi-filter-option:hover,
.multi-filter-clear:hover {
  background: #f3f6f6;
}
.multi-filter-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}
.multi-filter-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.multi-filter-option em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}
.multi-filter-clear {
  grid-template-columns: 1fr;
  width: 100%;
  border: 0;
  background: var(--lime-soft);
  cursor: pointer;
  text-align: left;
}
.active-filter-bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  min-height: 0;
}
.active-filter-bar span,
.active-filter-bar button {
  border: 1px solid var(--line-soft);
  background: #f4f7f7;
  border-radius: 999px;
  color: var(--muted);
  min-height: 24px;
  padding: 4px 9px;
  font-size: 10px;
  font-weight: 900;
}
.active-filter-bar span b {
  color: var(--black);
  margin-right: 5px;
}
.active-filter-bar .quiet {
  background: transparent;
  border-color: transparent;
  padding-left: 0;
}
.active-filter-bar .busy {
  background: var(--lime-soft);
  border-color: rgba(80, 150, 40, .18);
  color: var(--black);
}
.active-filter-bar button {
  cursor: pointer;
  background: var(--black);
  color: #fff;
  border-color: var(--black);
}
body.is-loading .workspace {
  cursor: progress;
}

.view { display: none; }
.view.active { display: block; }
.view-head, .panel-head, .detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
h2 { margin: 0; font-size: 19px; line-height: 1.1; }
.muted { color: var(--muted); font-size: 12px; font-weight: 700; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.kpi {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 28px rgba(29, 29, 27, .04);
  padding: 14px;
  min-height: 104px;
  position: relative;
}
.kpi::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 7px;
  bottom: 0;
  background: var(--teal);
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}
.kpi.lime::before { background: var(--lime); }
.kpi.red::before { background: var(--red); }
.kpi.orange::before { background: var(--orange); }
.kpi .label { color: var(--muted); font-size: 12px; font-weight: 850; }
.kpi .value { font-size: 28px; font-weight: 950; margin-top: 8px; }
.kpi .sub { color: var(--muted); font-size: 11px; margin-top: 4px; }

.today-page {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.today-hero,
.today-grid,
.today-card-metrics {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.today-hero {
  grid-template-columns: repeat(4, minmax(170px, 1fr));
}
.today-grid {
  grid-template-columns: repeat(2, minmax(310px, 1fr));
  align-items: start;
}
.today-card {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-left: 6px solid var(--teal);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 14px;
  min-width: 0;
  overflow: hidden;
}
.today-card.lime,
.today-card.ok { border-left-color: var(--lime); }
.today-card.orange,
.today-card.warning { border-left-color: var(--orange); }
.today-card.danger { border-left-color: var(--red); }
.today-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  margin-bottom: 10px;
}
.today-card-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
}
.today-card-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  margin-top: 3px;
}
.today-card-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.today-card .today-card-metrics:has(.today-metric:nth-child(4)) {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.today-metric {
  background: #fbfcfc;
  border: 1px solid var(--line-soft);
  border-top: 4px solid var(--teal);
  border-radius: 8px;
  padding: 10px;
  min-width: 0;
  overflow: hidden;
}
.today-metric.lime,
.today-metric.ok { border-top-color: var(--lime); }
.today-metric.warning,
.today-metric.orange { border-top-color: var(--orange); }
.today-metric.danger { border-top-color: var(--red); }
.today-metric span,
.today-metric em {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.today-metric b {
  display: block;
  color: var(--black);
  font-size: 22px;
  line-height: 1.05;
  margin: 4px 0;
  overflow-wrap: anywhere;
}
.today-metric small {
  display: block;
  min-height: 24px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.today-card-body {
  margin-top: 10px;
  min-width: 0;
}
.today-mini-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}
.today-mini-list li {
  display: grid;
  grid-template-columns: minmax(92px, .65fr) minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 8px;
  min-width: 0;
  background: rgba(250, 250, 250, .72);
}
.today-mini-list li[data-id] { cursor: pointer; }
.today-mini-list li[data-id]:hover { background: var(--soft); }
.today-mini-list b,
.today-mini-list span,
.today-more,
.today-empty {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.25;
}
.today-mini-list b {
  font-size: 12px;
  font-weight: 950;
}
.today-mini-list span,
.today-more,
.today-empty {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}
.today-more {
  display: block !important;
  grid-template-columns: 1fr !important;
  border-style: dashed !important;
}
.today-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 10px;
}
.today-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.today-card-actions .compact-btn {
  min-width: 0;
  white-space: normal;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .9fr);
  gap: 12px;
  margin-bottom: 12px;
}
.split-grid > * { min-width: 0; }
.panel {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 16px;
  min-width: 0;
}
.wide-panel { min-height: 330px; }
.action-panel { min-height: 260px; }

.action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.action-tile {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: #fbfcfc;
  padding: 10px;
  min-height: 150px;
}
.action-title {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  font-weight: 950;
}
.action-title b {
  min-width: 30px;
  text-align: right;
  font-size: 20px;
}
.action-tile p {
  margin: 4px 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.mini-list { display: grid; gap: 5px; }
.mini-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  border-top: 1px solid var(--line-soft);
  padding-top: 5px;
  cursor: pointer;
}
.mini-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 850;
}
.mini-row b {
  font-size: 11px;
}
.mini-row em {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}
.mini-empty {
  border-top: 1px solid var(--line-soft);
  padding-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.timeline-chart {
  display: grid;
  grid-auto-rows: minmax(30px, auto);
  gap: 7px;
}
.month-row {
  display: grid;
  grid-template-columns: 72px 1fr 68px;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.month-bars {
  height: 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  background: #f3f5f6;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  position: relative;
}
.bar {
  height: 6px;
  min-width: 2px;
}
.bar.cash { background: var(--teal); }
.bar.service { background: var(--lime); }
.bar.production { background: var(--pink); }

.module-stack { display: grid; gap: 8px; }
.module-line {
  display: grid;
  grid-template-columns: 1fr 56px;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 8px;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}
.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.legend-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--teal);
  display: inline-block;
}
.legend-dot.reliable, .chart-fill.reliable, .chart-fill.main { background: var(--teal); }
.legend-dot.forecast, .chart-fill.forecast, .chart-fill.can { background: var(--lime); }
.legend-dot.signed, .chart-fill.signed, .chart-fill.outside { background: var(--pink); }
.legend-dot.main { background: var(--teal); }
.legend-dot.can { background: var(--lime); }
.legend-dot.outside { background: var(--pink); }
.legend-dot.max, .chart-fill.max { background: var(--black); }
.chart-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 112px;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
}
.chart-label, .chart-value {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.chart-label b, .chart-value b {
  font-size: 12px;
  line-height: 1.1;
}
.chart-label span, .chart-value span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chart-value { text-align: right; }
.chart-track {
  display: flex;
  align-items: stretch;
  height: 28px;
  overflow: hidden;
  background: #f1f4f4;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
}
.chart-fill {
  display: block;
  flex: 0 0 auto;
  height: 100%;
  min-width: 0;
}
.line-chart {
  width: 100%;
  overflow: hidden;
}
.line-chart svg {
  display: block;
  width: 100%;
  height: auto;
}
.line-grid {
  stroke: rgba(29, 29, 27, .08);
  stroke-width: 1;
}
.line-axis,
.line-month {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.line-series {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.line-dot {
  stroke: var(--paper);
  stroke-width: 2;
}
.line-series.total { stroke: var(--black); stroke-width: 6; }
.line-series.main { stroke: var(--teal); }
.line-series.exte { stroke: var(--orange); }
.line-series.forecast { stroke: var(--orange); stroke-dasharray: 10 7; }
.line-series.can { stroke: var(--lime); }
.line-series.outside { stroke: var(--pink); }
.line-series.max { stroke: var(--grey); }
.line-dot.total { fill: var(--black); stroke-width: 3; }
.line-dot.main { fill: var(--teal); }
.line-dot.exte { fill: var(--orange); }
.line-dot.forecast { fill: var(--orange); }
.line-dot.can { fill: var(--lime); }
.line-dot.outside { fill: var(--pink); }
.line-dot.max { fill: var(--grey); }
.line-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}
.line-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.line-legend i {
  width: 26px;
  height: 4px;
  border-radius: 999px;
  background: var(--teal);
}
.line-legend i.total { background: var(--black); }
.line-legend i.main { background: var(--teal); }
.line-legend i.exte { background: var(--orange); }
.line-legend i.forecast { background: var(--orange); }
.line-legend i.can { background: var(--lime); }
.line-legend i.outside { background: var(--pink); }
.line-legend i.max { background: var(--grey); }
.part-totals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.part-totals div {
  border: 1px solid var(--line-soft);
  background: #fbfcfc;
  border-radius: 16px;
  padding: 10px;
}
.part-totals span,
.part-totals em {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}
.part-totals b {
  display: block;
  font-size: 24px;
  line-height: 1.05;
  margin: 4px 0;
}
.module-line strong { font-size: 13px; }
.module-line strong, .module-line span { display: block; }
.module-line span { color: var(--muted); font-size: 11px; margin-top: 3px; }
.module-line b { font-size: 20px; text-align: right; }

.quality-stack { display: grid; gap: 8px; }
.quality-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}
.quality-metric {
  border: 1px solid var(--line-soft);
  border-top: 5px solid var(--teal);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 10px;
  min-width: 0;
}
.quality-metric.lime { border-top-color: var(--lime); }
.quality-metric.orange { border-top-color: var(--orange); }
.quality-metric.red { border-top-color: var(--red); }
.quality-metric span,
.quality-metric em {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.25;
}
.quality-metric b {
  display: block;
  font-size: 21px;
  line-height: 1;
  margin: 6px 0 5px;
}
.quality-score-card {
  border: 1px solid var(--line-soft);
  border-left: 7px solid var(--teal);
  border-radius: var(--radius-md);
  background: #fbfcfc;
  padding: 12px;
}
.quality-score-card.lime { border-left-color: var(--lime); }
.quality-score-card.orange { border-left-color: var(--orange); }
.quality-score-card.red { border-left-color: var(--red); }
.quality-score-card span,
.quality-score-card em {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}
.quality-score-card b {
  display: block;
  font-size: 30px;
  line-height: 1;
  margin: 6px 0;
}
.quality-line {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line-soft);
  padding: 8px 0;
  font-size: 12px;
  min-width: 0;
}
.quality-line span { color: var(--muted); font-weight: 800; }
.quality-line b { font-size: 14px; min-width: 0; overflow-wrap: anywhere; text-align: right; }
.quality-group {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line-soft);
  border-left: 6px solid var(--orange);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 10px;
}
.quality-group.severity-danger { border-left-color: var(--red); }
.quality-group.severity-info { border-left-color: var(--teal); }
.quality-group .top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 950;
}
.quality-samples {
  display: grid;
  gap: 5px;
}
.quality-address-panel {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line-soft);
  border-left: 6px solid var(--teal);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 10px;
}
.quality-address-panel .panel-head {
  margin-bottom: 0;
}
.compact-quality {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}
.address-review-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.table-footnote {
  position: sticky;
  left: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line-soft);
  background: #fff;
  color: var(--muted);
  padding: 9px 10px;
  font-size: 11px;
  font-weight: 850;
}
.table-footnote b {
  color: var(--black);
  font-size: 11px;
  font-weight: 900;
}
.column-footnote {
  margin-top: 6px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  padding: 7px 8px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.25;
}

.inconsistency-panel {
  margin-bottom: 14px;
}
.inconsistent-ticket-grid {
  display: grid;
  gap: 12px;
}
.inconsistency-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.inconsistency-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.inconsistency-card {
  border: 1px solid var(--line-soft);
  border-left: 6px solid var(--orange);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 10px 12px;
  cursor: pointer;
  min-width: 0;
}
.inconsistency-card:hover {
  border-color: rgba(24, 155, 159, .34);
  box-shadow: 0 8px 18px rgba(29, 29, 27, .07);
}
.inconsistency-card.severity-danger {
  border-left-color: var(--red);
}
.inconsistency-card.severity-info {
  border-left-color: var(--teal);
}
.inconsistency-card .top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}
.inconsistency-card h3 {
  margin: 6px 0 3px;
  font-size: 13px;
  line-height: 1.2;
}
.inconsistency-card .meta,
.inconsistency-card p,
.inconsistency-card small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.inconsistency-card p {
  margin: 6px 0 3px;
  color: var(--black);
  font-weight: 850;
}

.list-stack { display: grid; gap: 8px; max-height: 470px; overflow: auto; }
.list-stack.compact { max-height: 470px; }
.list-item {
  border: 1px solid var(--line-soft);
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 10px;
  cursor: pointer;
}
.list-item:hover { border-color: rgba(24, 155, 159, .34); }
.list-item .top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-weight: 900;
  font-size: 12px;
}
.list-item .meta { color: var(--muted); font-size: 11px; margin-top: 4px; }
.severity-danger { border-left: 6px solid var(--red); }
.severity-warning { border-left: 6px solid var(--orange); }
.severity-info { border-left: 6px solid var(--teal); }
.severity-ok { border-left: 6px solid var(--lime); }

.data-table {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  overflow: auto;
  box-shadow: var(--shadow);
  max-width: 100%;
  min-width: 0;
}
.sales-finance-page.data-table {
  display: grid;
  gap: 12px;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
}
.sales-finance-page > .service-tabs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  width: min(460px, 100%);
  padding: 4px;
  margin: 0 0 10px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: #f3f5f5;
  overflow: visible;
  isolation: isolate;
}
.sales-finance-page > .service-tabs::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 8px) / 2);
  border-radius: 14px;
  background: var(--black);
  box-shadow: 0 10px 24px rgba(29, 29, 27, .16);
  transform: translateX(0);
  transition: transform .24s ease;
}
.sales-finance-page > .service-tabs.active-tab-finance::before {
  transform: translateX(100%);
}
.sales-finance-page > .service-tabs:has(> button:only-child) {
  grid-template-columns: minmax(0, 1fr);
}
.sales-finance-page > .service-tabs:has(> button:only-child)::before {
  width: calc(100% - 8px);
  transform: translateX(0);
}
.sales-finance-page > .service-tabs button {
  position: relative;
  z-index: 1;
  justify-content: space-between;
  min-height: 46px;
  width: 100%;
  border-color: transparent;
  border-radius: 14px;
  padding: 11px 14px;
  background: transparent;
  color: var(--muted);
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.sales-finance-page > .service-tabs button:hover {
  background: rgba(255, 255, 255, .72);
}
.sales-finance-page > .service-tabs button.active:hover {
  background: transparent;
}
.sales-finance-page > .service-tabs button.active {
  background: transparent;
  color: #fff;
  box-shadow: none;
}
.sales-finance-page > .service-tabs button em {
  min-width: 34px;
  padding: 6px 9px;
  background: rgba(29, 29, 27, .07);
}
.sales-finance-page > .service-tabs button.active em {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}
.delivery-map-embedded,
.transport-embedded-table {
  min-width: 0;
}
.embedded-view-head {
  margin-bottom: 12px;
}
table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 980px; }
th, td {
  border-bottom: 1px solid var(--line-soft);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  font-size: 12px;
}
th {
  position: sticky;
  top: 0;
  background: #f5f7f7;
  z-index: 2;
  color: var(--grey);
  font-weight: 950;
}
tbody tr:nth-child(even) td { background: rgba(29, 29, 27, .015); }
tr { cursor: pointer; }
tr:hover td { background: var(--teal-soft); }
.responsive-table td::before {
  display: none;
}
.status-pill, .tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  background: #f3f5f6;
  border: 1px solid var(--line-soft);
  font-size: 11px;
  font-weight: 850;
  border-radius: 999px;
}
.status-new_sale { background: var(--lime-soft); }
.status-pipeline_contact { background: #eef2f7; }
.status-pipeline { background: rgba(37, 99, 235, .10); }
.status-pipeline_hot { background: rgba(249, 115, 22, .16); }
.status-lost { background: rgba(220, 38, 38, .13); }
.status-production { background: rgba(255, 0, 134, .11); }
.status-delivery_planned { background: rgba(37, 99, 235, .12); }
.status-delivered { background: rgba(24, 155, 159, .14); }
.status-in_service, .status-cash_received { background: rgba(22, 163, 74, .14); }
.status-blocked { background: rgba(239, 68, 68, .14); color: var(--red); }

.ticket-toolbar {
  display: grid;
  grid-template-columns: minmax(210px, 280px) minmax(260px, 420px) minmax(220px, 320px);
  gap: 10px;
  align-items: end;
  padding: 0;
  margin: 0 0 12px;
  background: transparent;
  border-bottom: 0;
}
.field-wrap {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.ticket-toolbar label,
.field-wrap > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}
.ticket-toolbar select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px 10px;
  background: #fff;
  color: var(--black);
  font-weight: 800;
}
.ticket-toolbar .multi-filter-menu {
  width: min(420px, 92vw);
}
.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  background: #fff;
}
.segmented-control button {
  border: 0;
  border-right: 1px solid var(--line-soft);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
}
.segmented-control button:last-child {
  border-right: 0;
}
.segmented-control button.active {
  background: var(--black);
  color: #fff;
}
.ticket-table table {
  min-width: 980px;
}
.ticket-table {
  overflow: visible;
}
.ticket-data-board {
  display: grid;
  gap: 10px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line-soft);
}
.ticket-data-board table {
  min-width: 1720px;
}
.ticket-data-board th {
  top: 0;
}
.tickets-full-board {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
.tickets-full-board .journey-strip {
  margin-bottom: 0;
}
.ticket-table tbody tr {
  content-visibility: auto;
  contain-intrinsic-size: 58px;
}
.ticket-table-footer {
  position: sticky;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid var(--line-soft);
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}
.ticket-table-footer .secondary-btn {
  min-height: 34px;
  border-radius: 12px;
  padding: 7px 10px;
}
.ticket-missing-groups {
  display: grid;
  gap: 7px;
  min-width: 250px;
  max-width: 440px;
}
.ticket-missing-group {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: start;
  gap: 7px;
}
.ticket-missing-group b {
  color: var(--black);
  font-size: 10px;
  font-weight: 950;
  line-height: 1.2;
}
.ticket-missing-group div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.ticket-missing-group.ok b {
  color: var(--teal-dark);
}
.missing-chip.muted-chip {
  color: var(--muted);
  border-color: var(--line-soft);
  background: #f6f7f7;
}
.ticket-project-cell,
.ticket-status-cell,
.ticket-date-stack,
.ticket-amount-cell,
.ticket-need-cell,
.ticket-machine-cell,
.ticket-owner-cell,
.ticket-reference-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.ticket-project-cell b,
.ticket-amount-cell b,
.ticket-need-cell b,
.ticket-machine-cell b,
.ticket-owner-cell b,
.ticket-reference-cell b {
  font-size: 12px;
  line-height: 1.2;
}
.ticket-project-cell span,
.ticket-project-cell em,
.ticket-status-cell span,
.ticket-date-stack span,
.ticket-date-stack em,
.ticket-amount-cell span,
.ticket-need-cell span,
.ticket-machine-cell span,
.ticket-machine-cell em,
.ticket-owner-cell span,
.ticket-reference-cell span,
.ticket-reference-cell em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.25;
}
.ticket-date-stack div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px;
  align-items: baseline;
}
.ticket-owner-cell div {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 6px;
  align-items: baseline;
}
.ticket-date-stack b {
  color: var(--black);
  font-size: 11px;
  white-space: nowrap;
}
.ticket-date-stack span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ticket-anomaly-block {
  display: grid;
  gap: 3px;
  margin-top: 7px;
  padding: 7px 8px;
  border: 1px solid rgba(249, 115, 22, .22);
  border-left: 5px solid var(--orange);
  border-radius: 12px;
  background: rgba(249, 115, 22, .08);
}
.ticket-anomaly-block.severity-danger {
  border-color: rgba(215, 48, 39, .24);
  border-left-color: var(--red);
  background: rgba(215, 48, 39, .07);
}
.ticket-anomaly-block.severity-info {
  border-color: rgba(24, 155, 159, .22);
  border-left-color: var(--teal);
  background: var(--teal-soft);
}
.ticket-anomaly-block b {
  color: var(--black);
  font-size: 10px;
  font-weight: 950;
}
.ticket-anomaly-block span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
}
.sale-done-yes {
  background: var(--lime-soft);
}
.sale-done-no {
  background: rgba(249, 115, 22, .13);
}
.list-item,
.machine-card,
.completion-card,
.asset-card,
.excel-feature,
.quality-group {
  content-visibility: auto;
  contain-intrinsic-size: 96px;
}
.mini-action-btn {
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--black);
  border-radius: 999px;
  background: var(--black);
  color: white;
  cursor: pointer;
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}
.mini-action-btn.ghost {
  background: #fff;
  color: var(--black);
}
.document-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.detail-document-actions {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}
.doc-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--black);
  border-radius: 999px;
  background: var(--black);
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}
.doc-action-btn.needs-data {
  border-color: rgba(249, 115, 22, .38);
  background: rgba(249, 115, 22, .12);
  color: #8a3a08;
}
.doc-action-btn span {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  color: #8a3a08;
  font-size: 10px;
}

.kanban-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 12px;
}
.role-kanban-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}
.role-kanban-grid.single-column {
  grid-template-columns: minmax(0, 1fr);
}
#deliveryBoard.routes-tab-active {
  display: block;
  min-width: 0;
}
#deliveryBoard.routes-tab-active > .service-tabs,
#deliveryBoard.routes-tab-active > .service-tab-panel {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.kanban-col, .week-col {
  background: #f8fafb;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  min-height: 220px;
  overflow: hidden;
}
.kanban-title, .week-title {
  padding: 10px;
  font-weight: 950;
  border-bottom: 1px solid var(--line-soft);
  background: var(--paper);
}
.kanban-items { display: grid; gap: 8px; padding: 8px; }
.workflow-pole {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  margin-bottom: 14px;
  overflow: hidden;
}
.workflow-pole-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--line-soft);
  background: #f8fafb;
}
.workflow-pole-head h3 {
  margin: 0;
  font-size: 17px;
}
.workflow-pole-head span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 850;
  margin-top: 2px;
}
.workflow-pole-head b {
  font-size: 24px;
}
.workflow-columns,
.priority-lanes,
.factory-lanes {
  display: grid;
  grid-template-columns: repeat(3, minmax(210px, 1fr));
  gap: 10px;
  padding: 10px;
}
.workflow-col,
.priority-lane,
.factory-lane {
  background: #f8fafb;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  min-height: 180px;
  overflow: hidden;
}
.workflow-col.complete { background: rgba(80, 150, 40, .06); }
.workflow-col.partial { background: rgba(249, 115, 22, .06); }
.workflow-col.missing { background: rgba(215, 48, 39, .04); }
.workflow-col-title,
.priority-title {
  background: var(--paper);
  border-bottom: 1px solid var(--line-soft);
  font-size: 12px;
  font-weight: 950;
  padding: 9px;
}
.production-priority-board,
.production-factory-board,
.production-flow-board,
.delivery-planning-board,
.tech-planning-board,
.route-panel,
.stock-tool {
  grid-column: 1 / -1;
}
.role-flow-board {
  margin-top: 12px;
}
.production-responsibility-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 12px;
}
.production-responsibility-grid > div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 2px 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(24, 155, 159, .22);
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  background: var(--teal-soft);
}
.production-responsibility-grid > div.external {
  border-color: var(--line-soft);
  border-left-color: var(--muted);
  background: #f8fafb;
}
.production-responsibility-grid span {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}
.production-responsibility-grid .external span { background: var(--muted); }
.production-responsibility-grid b {
  min-width: 0;
  font-size: 11px;
  line-height: 1.25;
}
.production-responsibility-grid em {
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  line-height: 1.3;
}
.production-task-card {
  display: grid;
  gap: 8px;
  padding: 10px;
}
.production-task-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.production-task-card-head > div { min-width: 0; }
.production-task-card-head h3 {
  margin: 0;
  font-size: 12px;
  line-height: 1.25;
}
.production-task-card-head > div > span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.production-task-state {
  flex: 0 0 auto;
  padding: 3px 6px;
  border: 1px solid rgba(245, 158, 11, .30);
  border-radius: 999px;
  background: #fff7ed;
  color: #8a3a08;
  font-size: 9px;
  font-weight: 950;
}
.production-task-state.done {
  border-color: rgba(24, 155, 159, .22);
  background: var(--teal-soft);
  color: var(--teal-dark);
}
.production-date-checklist { display: grid; gap: 5px; }
.production-date-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: #fff;
}
.production-date-row .production-check-dot {
  width: 10px;
  height: 10px;
  margin-top: 2px;
  border: 2px solid var(--orange);
  border-radius: 50%;
  background: #fff;
}
.production-date-row.done .production-check-dot {
  border-color: var(--teal);
  background: var(--teal);
}
.production-date-row b,
.production-date-row em { display: block; min-width: 0; }
.production-date-row b { font-size: 10px; line-height: 1.2; }
.production-date-row em {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.production-card-confirm .factory-validation-pill { width: 100%; justify-content: center; }
.production-cadence-alert {
  display: grid;
  gap: 2px;
  margin-top: 5px;
  padding: 6px 7px;
  border: 1px solid rgba(215, 48, 39, .28);
  border-radius: 6px;
  background: rgba(215, 48, 39, .07);
  color: var(--red);
  font-size: 9px;
  line-height: 1.3;
}
.production-cadence-alert b { font-size: 9px; }
.production-cadence-alert span { overflow-wrap: anywhere; }
.production-takeback-stock-panel .responsive-table button { white-space: nowrap; }
.production-external-state,
.production-task-card-foot {
  display: flex;
  justify-content: space-between;
  gap: 7px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.25;
}
.production-external-state {
  padding: 6px 7px;
  border-left: 3px solid var(--muted);
  border-radius: 6px;
  background: #f8fafb;
}
.production-external-state b { color: var(--black); }
.production-task-card-foot { flex-wrap: wrap; }
.role-flow-board > .panel-head > div {
  min-width: 0;
}
.backlog-scope-note {
  flex: 0 1 auto;
  max-width: min(420px, 48%);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  text-align: right;
}
@media (max-width: 850px) {
  .role-flow-board > .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .backlog-scope-note {
    max-width: 100%;
    text-align: left;
  }
  .production-responsibility-grid { grid-template-columns: 1fr; }
}
.journey-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}
body.single-workspace-mode .journey-strip { display: none; }
#deliveryBoard.routes-tab-active > .journey-strip {
  display: none;
}
.journey-step {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: #fff;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 1px;
  align-items: center;
  padding: 8px;
  cursor: pointer;
}
.journey-step b {
  grid-row: span 2;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f0f3f3;
  font-size: 11px;
}
.journey-step span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 950;
}
.journey-step em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}
.journey-step.active {
  border-color: rgba(24, 155, 159, .35);
  background: var(--teal-soft);
}
.journey-step.active b {
  background: var(--teal);
  color: #fff;
}
.service-tabs {
  grid-column: 1 / -1;
  display: flex;
  gap: 6px;
  align-items: stretch;
  overflow-x: auto;
  padding: 2px 0 10px;
  margin-bottom: 2px;
}
.service-tabs button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 8px 11px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
}
.service-tabs button.active {
  background: var(--black);
  border-color: var(--black);
  color: #fff;
}
.service-tabs button em {
  min-width: 24px;
  border-radius: 999px;
  background: #f0f3f3;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
  padding: 5px 6px;
  text-align: center;
}
.service-tabs button.active em {
  background: rgba(255, 255, 255, .16);
  color: #fff;
}
.service-tabs::-webkit-scrollbar {
  height: 6px;
}
.service-tabs::-webkit-scrollbar-thumb {
  background: rgba(104, 112, 118, .28);
  border-radius: 999px;
}
.service-tab-panel {
  grid-column: 1 / -1;
  display: none;
}
.service-tab-panel.active {
  display: grid;
  gap: 12px;
}
.priority-lanes {
  grid-template-columns: repeat(5, minmax(180px, 1fr));
}
.etria-stage-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 10px;
  padding: 10px;
}
.etria-stage-grid.etria-milestone-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}
.etria-stage-col .kanban-title {
  display: grid;
  gap: 3px;
}
.etria-stage-col .kanban-title small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
}
.etria-card.stage-to_frame { border-left-color: var(--orange); }
.etria-card.stage-sim_config { border-left-color: var(--teal); }
.etria-card.stage-tests { border-left-color: var(--pink); }
.etria-card.stage-packing_bl { border-left-color: var(--grey); }
.etria-card.stage-ready { border-left-color: var(--lime); }
.etria-card.stage-todo { border-left-color: var(--orange); }
.etria-card.stage-powered { border-left-color: var(--teal); }
.etria-card.stage-updated { border-left-color: var(--pink); }
.etria-card.stage-packed { border-left-color: var(--lime); }
.etria-card,
.etria-stage-board .machine-card,
.it-column-board .machine-card {
  content-visibility: visible;
  contain-intrinsic-size: none;
  overflow: visible;
}
.etria-parts-summary-grid .tech-pill {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}
.etria-date-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
  gap: 5px;
  margin-top: 8px;
}
.etria-date-grid label {
  display: grid;
  gap: 3px;
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 5px;
}
.etria-date-grid label.filled {
  border-color: rgba(31, 161, 166, .28);
  background: rgba(31, 161, 166, .07);
}
.etria-date-grid span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 950;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.etria-date-grid input {
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--black);
  font-size: 10px;
  font-weight: 900;
}
.etria-page,
.it-page,
.it-config-board {
  display: grid;
  gap: 12px;
}
.settings-grid,
.it-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}
.settings-grid label,
.it-config-grid label {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.settings-grid span,
.it-config-grid span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}
.it-config-board {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.it-column-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 10px;
  align-items: start;
}
.it-column .kanban-title {
  display: grid;
  gap: 3px;
}
.it-column .kanban-title small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
}
.it-config-card {
  display: grid;
  gap: 8px;
}
.it-config-card.is-demo {
  background: linear-gradient(0deg, rgba(31, 161, 166, .035), rgba(31, 161, 166, .035)), var(--paper);
}
.it-card-title-row,
.it-demo-banner,
.it-demo-actions {
  display: flex;
  align-items: center;
}
.it-card-title-row {
  justify-content: space-between;
  gap: 8px;
}
.it-demo-badge {
  flex: 0 0 auto;
  border: 1px solid rgba(31, 161, 166, .35);
  border-radius: 999px;
  padding: 3px 7px;
  background: rgba(31, 161, 166, .10);
  color: var(--teal-dark);
  font-size: 9px;
  font-weight: 950;
  text-transform: uppercase;
}
.it-demo-banner {
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: var(--paper);
}
.it-demo-banner.active {
  border-color: rgba(31, 161, 166, .32);
  background: rgba(31, 161, 166, .055);
}
.it-demo-banner > div:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.it-demo-banner b {
  font-size: 11px;
}
.it-demo-banner span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}
.it-demo-actions {
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.it-config-card.stage-todo { border-left-color: var(--orange); }
.it-config-card.stage-in_progress { border-left-color: var(--teal); }
.it-config-card.stage-blocked { border-left-color: var(--red); }
.it-config-card.stage-ready { border-left-color: var(--lime); }
.it-machine-finder {
  display: grid;
  grid-template-columns: minmax(180px, 320px) auto minmax(0, 1fr);
  align-items: end;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--paper);
}
.it-machine-finder label {
  display: grid;
  gap: 4px;
}
.it-machine-finder label span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}
.it-machine-finder input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  background: var(--paper);
  color: var(--black);
  font-size: 15px;
  font-weight: 900;
}
.it-machine-finder em {
  align-self: center;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}
.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}
.etria-parts-card {
  display: grid;
  gap: 8px;
}
.etria-parts-grid {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}
.etria-production-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.etria-production-card {
  min-height: 150px;
}
.etria-production-card .chips {
  padding-right: 48px;
}
.mini-segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.mini-segmented button {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: #fff;
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}
.mini-segmented button.active {
  background: var(--black);
  border-color: var(--black);
  color: #fff;
}
.mini-segmented.etria-takeback-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(112px, max-content));
  justify-content: flex-start;
  align-items: center;
}
.mini-segmented.etria-takeback-choice button {
  min-width: 112px;
  min-height: 34px;
  padding: 7px 12px;
  font-size: 11px;
}
.workflow-owner-notice {
  display: grid;
  gap: 2px;
  max-width: 520px;
  margin-top: 8px;
  border-left: 3px solid var(--orange);
  background: #fff7ed;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.workflow-owner-notice b {
  color: var(--black);
  font-size: 10px;
  text-transform: uppercase;
}
.etria-day-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.etria-task-card .top {
  align-items: center;
  flex-wrap: wrap;
}
.etria-task-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
  margin-left: auto;
}
.etria-task-validate {
  min-width: 82px;
}
.etria-task-validate.validated,
.etria-task-validate.validated:disabled {
  border-color: rgba(80, 150, 40, .34);
  background: var(--lime-soft);
  color: var(--black);
  opacity: 1;
}
.etria-task-card.is-validated {
  border-left-color: var(--lime);
  background: color-mix(in srgb, var(--lime-soft) 38%, #fff);
}
.etria-task-carry {
  margin-top: 5px;
  color: #8a3a08;
  font-size: 10px;
  font-weight: 850;
}
.technical-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-top: 7px;
}
.tech-pill {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 3px 6px;
  background: #fff;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}
.tech-pill.ok {
  border-color: rgba(80, 150, 40, .22);
  background: var(--lime-soft);
  color: var(--black);
}
.tech-pill.todo {
  border-color: rgba(249, 115, 22, .24);
  background: rgba(249, 115, 22, .08);
  color: #8a3a08;
}
.factory-lanes {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}
.planning-month-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.production-factory-board .panel-head,
.delivery-planning-board .panel-head,
.tech-planning-board .panel-head {
  justify-content: flex-start;
}
.planning-month-controls span {
  min-width: 110px;
  text-align: center;
  font-size: 13px;
  font-weight: 950;
}
.etria-day-controls span {
  min-width: 180px;
}
.compact-btn {
  min-height: 30px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  box-shadow: none;
  font-size: 11px;
}
.planning-subline {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  margin: -4px 0 8px;
}
.month-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.calendar-undated {
  margin-bottom: 8px;
  min-height: 64px;
}
.calendar-day,
.calendar-undated {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: #fbfcfc;
  padding: 4px;
  min-width: 0;
}
.calendar-day {
  min-height: 82px;
}
.calendar-day-head {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  align-items: center;
  margin-bottom: 3px;
}
.calendar-day-head b {
  font-size: 11px;
  font-weight: 950;
}
.calendar-day-head span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calendar-chip-stack {
  display: grid;
  gap: 2px;
}
.calendar-chip {
  position: relative;
  display: grid;
  gap: 1px;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--teal);
  border-radius: 5px;
  background: #fff;
  padding: 3px 34px 3px 4px;
  min-width: 0;
  cursor: pointer;
}
.calendar-chip.production-chip {
  padding-right: 38px;
}
.calendar-chip.to-plan,
.calendar-chip.severity-warning {
  border-left-color: var(--orange);
}
.calendar-chip b,
.calendar-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calendar-chip b {
  font-size: 9px;
  font-weight: 950;
  line-height: 1.1;
}
.calendar-chip b.machine-primary {
  font-size: 12px;
  overflow-wrap: anywhere;
  white-space: normal;
}
.calendar-chip span {
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
  line-height: 1.1;
}
.production-validation-badge {
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 6px;
  background: #fff;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 950;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.calendar-chip .production-validation-badge {
  max-width: calc(100% - 2px);
  padding: 1px 4px;
  font-size: 7px;
}
.production-validation-badge.validated {
  border-color: rgba(42, 157, 99, .24);
  background: var(--lime-soft);
  color: var(--black);
}
.production-validation-badge.action {
  border-color: rgba(24, 155, 159, .35);
  background: var(--teal-soft);
  color: var(--teal-dark);
}
.production-validation-badge.shifted {
  border-color: rgba(215, 48, 39, .28);
  background: rgba(215, 48, 39, .08);
  color: var(--red);
}
.production-validation-badge.pending {
  border-color: rgba(214, 128, 0, .24);
  background: rgba(214, 128, 0, .08);
  color: var(--orange);
}
.factory-validation-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  min-height: 18px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}
.calendar-chip .factory-validation-pill {
  min-height: 14px;
  padding: 2px 5px;
  font-size: 7px;
}
.calendar-chip .factory-validation-control {
  top: 3px;
  right: 4px;
  gap: 1px;
  width: 28px;
  font-size: 7px;
}
.calendar-chip .factory-validation-dot {
  width: 15px;
  height: 15px;
  border-width: 1.5px;
}
.calendar-chip .factory-validation-control.validated .factory-validation-dot {
  box-shadow: 0 0 0 2px rgba(42, 157, 99, .18);
}
.factory-validation-pill.validated {
  border-color: rgba(42, 157, 99, .24);
  background: var(--lime-soft);
  color: var(--black);
}
.factory-validation-pill.pending {
  border-color: rgba(214, 128, 0, .24);
  background: rgba(214, 128, 0, .08);
  color: var(--orange);
}
.factory-validation-pill.shifted {
  border-color: rgba(214, 128, 0, .32);
  background: rgba(214, 128, 0, .10);
  color: var(--orange);
  cursor: pointer;
}
.factory-validation-pill.action {
  border-color: rgba(24, 155, 159, .35);
  background: var(--teal-soft);
  color: var(--teal);
  cursor: pointer;
}
.factory-validation-pill.action:hover {
  border-color: var(--teal);
  background: rgba(24, 155, 159, .14);
}
.production-ready-pill.validated {
  border-color: rgba(24, 155, 159, .38);
  background: var(--teal-soft);
  color: var(--teal-dark);
}
.production-ready-pill.pending,
.production-ready-pill.action {
  border-color: rgba(24, 155, 159, .35);
  background: var(--teal-soft);
  color: var(--teal);
}
.production-ready-pill.shifted {
  border-color: rgba(24, 155, 159, .55);
  background: rgba(24, 155, 159, .12);
  color: var(--teal-dark);
}
.factory-validation-control {
  position: absolute;
  top: 8px;
  right: 10px;
  display: grid;
  justify-items: center;
  gap: 3px;
  width: 42px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 9px;
  font-weight: 950;
  line-height: 1;
  text-align: center;
  cursor: default;
}
.factory-card-actions {
  position: absolute;
  top: 8px;
  right: 10px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 5px;
}
.factory-card-actions .factory-validation-control {
  position: static;
  top: auto;
  right: auto;
}
.calendar-chip .factory-card-actions {
  top: 3px;
  right: 4px;
  gap: 2px;
}
.calendar-chip .factory-card-actions .factory-validation-control {
  width: 28px;
  font-size: 7px;
}
.factory-validation-control.action,
.factory-validation-control.validated {
  cursor: pointer;
}
.factory-validation-dot {
  width: 22px;
  height: 22px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff;
}
.factory-validation-control.validated .factory-validation-dot {
  border-color: var(--teal);
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(42, 157, 99, .18);
}
.factory-validation-control.validated:hover .factory-validation-dot {
  border-color: rgba(24, 155, 159, .55);
}
.factory-validation-control.just-validated .factory-validation-dot {
  animation: factoryValidatePop .42s ease-out;
}
.factory-validation-control.action .factory-validation-dot {
  border-color: rgba(24, 155, 159, .55);
  background: var(--teal-soft);
}
.factory-validation-control.action:hover .factory-validation-dot {
  border-color: var(--teal);
  background: rgba(24, 155, 159, .18);
}
.factory-validation-control.pending .factory-validation-dot {
  border-color: rgba(214, 128, 0, .35);
  background: rgba(214, 128, 0, .08);
}
.factory-validation-control.shifted {
  cursor: pointer;
}
.factory-validation-control.shifted .factory-validation-dot {
  border-color: rgba(214, 128, 0, .55);
  background: rgba(214, 128, 0, .12);
}
.production-ready-control.validated .factory-validation-dot {
  border-color: var(--teal);
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(24, 155, 159, .22);
}
.production-ready-control.action .factory-validation-dot,
.production-ready-control.pending .factory-validation-dot,
.production-ready-control.shifted .factory-validation-dot {
  border-color: rgba(24, 155, 159, .55);
  background: var(--teal-soft);
}
.production-ready-control.validated .factory-validation-label {
  color: var(--teal-dark);
}
.factory-validation-control.validated .factory-validation-label {
  color: var(--teal-dark);
}
.factory-validation-control.action .factory-validation-label {
  color: var(--teal);
}
.production-ready-control.validated .factory-validation-label {
  color: var(--teal-dark);
}
.production-ready-control.action .factory-validation-label,
.production-ready-control.pending .factory-validation-label,
.production-ready-control.shifted .factory-validation-label {
  color: var(--teal);
}
@keyframes factoryValidatePop {
  0% {
    box-shadow: 0 0 0 0 rgba(42, 157, 99, .35);
    transform: scale(.82);
  }
  55% {
    box-shadow: 0 0 0 8px rgba(42, 157, 99, .16);
    transform: scale(1.12);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(42, 157, 99, 0);
    transform: scale(1);
  }
}
.calendar-more {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
}
.priority-lane.drag-over,
.factory-lane.drag-over,
.delivery-lane.drag-over,
.tech-lane.drag-over {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 2px rgba(24, 155, 159, .22);
}
.factory-card {
  border-left-color: var(--teal);
  position: relative;
  padding-right: 60px;
}
.stock-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.stock-cell {
  border: 1px solid var(--line-soft);
  border-left: 5px solid var(--teal);
  border-radius: var(--radius-md);
  display: grid;
  gap: 6px;
  padding: 10px;
}
.stock-cell.stock-gap { border-left-color: var(--orange); }
.stock-cell.stock-warning { border-left-color: var(--orange); }
.stock-cell.stock-ok { border-left-color: var(--lime); }
.stock-cell span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.stock-cell input {
  min-height: 34px;
}
.stock-cell em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}
.stock-dual-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.stock-dual-inputs label {
  display: grid;
  gap: 4px;
}
.stock-dual-inputs em {
  font-size: 10px;
  text-transform: uppercase;
}
.mrp-table {
  display: grid;
  gap: 4px;
  margin-top: 12px;
}
.mrp-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.3fr) repeat(3, minmax(70px, .6fr)) minmax(150px, 1fr);
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fff;
  padding: 8px;
  font-size: 11px;
  font-weight: 850;
}
.mrp-head {
  background: #f8fafb;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}
.mrp-row strong {
  font-size: 13px;
}
.mrp-row em {
  color: var(--muted);
  font-style: normal;
}
.mrp-gap strong { color: var(--red); }
.mrp-ok strong { color: var(--teal); }
.erp-stock-panel {
  grid-column: 1 / -1;
}
.erp-status {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.erp-status-compact {
  grid-template-columns: minmax(220px, 360px);
}
.erp-table {
  overflow-x: auto;
}
.erp-row {
  grid-template-columns: minmax(150px, 1.2fr) repeat(4, minmax(72px, .55fr)) minmax(210px, 1.35fr);
}
.reconditioned-stock-panel .erp-row {
  grid-template-columns: minmax(130px, 1.1fr) repeat(5, minmax(78px, .58fr));
}
.stock-source-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid rgba(24, 155, 159, .22);
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  background: var(--teal-soft);
}
.stock-source-bar.warning {
  border-color: rgba(245, 158, 11, .28);
  border-left-color: var(--orange);
  background: #fff7ed;
}
.stock-source-bar.loading {
  border-left-color: var(--muted);
  background: #f8fafb;
}
.stock-source-bar > div { display: grid; gap: 2px; min-width: 0; }
.stock-source-bar b { font-size: 12px; }
.stock-source-bar span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.stock-fallback-editor {
  margin: 12px 0;
  padding: 10px;
  border: 1px solid rgba(245, 158, 11, .28);
  border-radius: 8px;
  background: #fffaf2;
}
.stock-fallback-editor .panel-head { margin-bottom: 9px; }
@media (max-width: 520px) {
  .stock-source-bar {
    align-items: stretch;
    flex-direction: column;
  }
  .stock-source-bar button { width: 100%; }
  .production-task-card-head { flex-direction: column; }
}
.erp-table.stock-only .erp-row {
  grid-template-columns: minmax(150px, 1.25fr) repeat(3, minmax(72px, .55fr)) minmax(240px, 1.5fr);
}
.panel-subblock {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.72);
}
.erp-alerts {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}
.erp-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.erp-list {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: #fbfcfc;
  min-width: 0;
  padding: 10px;
}
.erp-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.erp-list-head h3 {
  margin: 0;
  font-size: 12px;
}
.erp-list-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
}
.erp-item {
  display: grid;
  gap: 2px;
  border-top: 1px solid var(--line-soft);
  padding: 7px 0;
  min-width: 0;
}
.erp-item:first-of-type {
  border-top: 0;
}
.erp-item b,
.erp-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.erp-item b {
  font-size: 11px;
}
.erp-item span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}
.machine-card {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-left: 5px solid var(--teal);
  border-radius: var(--radius-md);
  padding: 9px;
  cursor: pointer;
}
.machine-card:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(29, 29, 27, .08); }
.machine-card h3 { margin: 0; font-size: 13px; line-height: 1.2; }
.machine-card h3.machine-primary { font-size: 15px; }
.machine-card .machine-primary {
  overflow-wrap: anywhere;
  white-space: normal;
}
.machine-card .meta { color: var(--muted); font-size: 11px; margin-top: 4px; }
.machine-card .chips { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 7px; }
.logistics-ticket-card {
  display: grid;
  gap: 8px;
}
.logistics-ticket-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.logistics-ticket-grid div {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: #fbfcfc;
  padding: 6px;
}
.logistics-ticket-grid div:nth-child(3),
.logistics-ticket-grid div:nth-child(7) {
  grid-column: 1 / -1;
}
.logistics-ticket-grid span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 950;
  text-transform: uppercase;
}
.logistics-ticket-grid b {
  display: block;
  min-width: 0;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  color: var(--black);
  font-size: 11px;
  line-height: 1.25;
  white-space: normal;
}
.logistics-ticket-grid .todo {
  border-color: rgba(245, 158, 11, .25);
  background: #fff7ed;
}
.logistics-ticket-grid .external-pending {
  border-color: var(--line-soft);
  background: #f3f6f6;
}
.machine-card .tag.external-owner {
  border-color: var(--line);
  background: #f3f6f6;
  color: var(--muted);
}
.logistics-inline-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  border-top: 1px solid var(--line-soft);
  padding-top: 8px;
}
.logistics-inline-form label {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 950;
  text-transform: uppercase;
}
.logistics-inline-form label.hidden {
  display: none;
}
.logistics-inline-form label.wide,
.logistics-inline-form .logistics-save {
  grid-column: 1 / -1;
}
.logistics-inline-form input,
.logistics-inline-form select,
.logistics-inline-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  color: var(--black);
  padding: 7px 8px;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  text-transform: none;
}
.logistics-inline-form textarea {
  resize: vertical;
}
.photo-upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.photo-upload-card {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 10px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
  row-gap: 4px;
}
.photo-upload-card:not(.has-file) {
  grid-template-columns: minmax(0, 1fr) auto;
}
.photo-upload-card.no-preview {
  grid-template-columns: minmax(0, 1fr) auto;
}
.photo-upload-card.has-file {
  border-color: rgba(24, 155, 159, .24);
  background: var(--teal-soft);
}
.photo-preview-thumb {
  width: 52px;
  height: 52px;
  grid-column: 1;
  grid-row: 1 / span 3;
  border: 1px solid rgba(24, 155, 159, .24);
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
  background: #fff;
  cursor: zoom-in;
}
.photo-preview-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-preview-thumb.pdf {
  display: grid;
  place-items: center;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 950;
}
.photo-preview-thumb.pdf span {
  grid-column: auto;
  color: inherit;
  font-size: inherit;
  line-height: 1;
}
.photo-upload-card b,
.photo-upload-card span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  line-height: 1.2;
}
.photo-upload-card b {
  color: var(--black);
  font-size: 12px;
}
.photo-upload-card span,
.photo-upload-card em {
  display: block;
  min-width: 0;
  grid-column: 2;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
  font-style: normal;
  font-weight: 850;
}
.photo-upload-actions {
  grid-column: 3;
  grid-row: 1 / span 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.photo-upload-actions a,
.photo-upload-actions button,
.photo-upload-btn {
  min-height: 28px;
  padding: 6px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: #fff;
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 950;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.photo-upload-actions button {
  appearance: none;
}
.photo-upload-btn.disabled {
  opacity: .45;
  cursor: not-allowed;
}
.photo-upload-btn input {
  display: none;
}
@media (max-width: 420px) {
  .photo-upload-card {
    grid-template-columns: minmax(0, 1fr);
  }
  .photo-preview-thumb {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
    height: 110px;
  }
  .photo-upload-actions {
    grid-column: 1;
    grid-row: auto;
    flex-direction: row;
    justify-content: flex-start;
  }
}
label.field-locked {
  opacity: .58;
}
label.field-locked input,
label.field-locked select,
label.field-locked textarea {
  cursor: not-allowed;
}
.role-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-top: 6px;
  padding: 3px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}
.detail-v0-status {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}
.detail-next-action {
  display: grid;
  gap: 3px;
  margin-top: 8px;
  padding: 9px 10px;
  border: 1px solid rgba(245, 158, 11, .3);
  border-left: 4px solid var(--orange);
  border-radius: 8px;
  background: #fff8ee;
}
.detail-next-action span,
.detail-next-action em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.25;
}
.detail-next-action b {
  color: var(--black);
  font-size: 12px;
  line-height: 1.25;
}
.card-next-action {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 7px;
  margin-top: 7px;
  padding: 7px 8px;
  border-left: 3px solid var(--orange);
  border-radius: 6px;
  background: #fff8ee;
}
.card-next-action b {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}
.card-next-action span {
  min-width: 0;
  color: var(--black);
  font-size: 10px;
  font-weight: 900;
  overflow-wrap: anywhere;
}
.card-next-action em {
  grid-column: 2;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  overflow-wrap: anywhere;
}
.v0-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}
.v0-status-chip em {
  font-style: normal;
  color: var(--black);
}
.v0-status-chip.ok {
  border-color: rgba(24, 155, 159, .20);
  background: var(--teal-soft);
}
.v0-status-chip.warning {
  border-color: rgba(245, 158, 11, .28);
  background: #fff7ed;
}
.v0-status-chip.danger {
  border-color: rgba(215, 48, 39, .28);
  background: #fff0ef;
  color: var(--red);
}
.missing-focus {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid rgba(215, 48, 39, .22);
  border-radius: 14px;
  background: rgba(215, 48, 39, .07);
}
.missing-focus.complete {
  border-color: rgba(24, 155, 159, .16);
  background: var(--teal-soft);
}
.missing-focus b {
  color: var(--red);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}
.missing-focus.complete b { color: var(--teal-dark); }
.blocker-focus {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid rgba(215, 48, 39, .36);
  border-radius: 12px;
  background: #fff0ef;
}
.blocker-focus b {
  color: var(--red);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}
.blocker-focus div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.missing-focus div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.missing-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(215, 48, 39, .20);
  background: #fff;
  color: #8f1d18;
  font-size: 10px;
  font-weight: 900;
}
.missing-chip.ok {
  border-color: rgba(24, 155, 159, .18);
  color: var(--teal-dark);
}
.missing-chip.danger {
  border-color: rgba(215, 48, 39, .34);
  background: #fff;
  color: var(--red);
}
.convert-opportunity-btn {
  width: 100%;
  min-height: 34px;
  margin-top: 9px;
  border: 1px solid var(--black);
  border-radius: 14px;
  background: var(--black);
  color: white;
  cursor: pointer;
  font-weight: 950;
}
.opportunity-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 12px;
}
.opportunity-card { border-left-color: var(--blue); }

.week-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(190px, 1fr));
  gap: 10px;
}
.week-col { min-height: 420px; }

.finance-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .75fr) minmax(0, .75fr);
  gap: 12px;
}
.finance-insights,
.component-coverage {
  grid-column: 1 / -1;
}
.insight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.insight-tile {
  border: 1px solid var(--line-soft);
  border-left: 6px solid var(--teal);
  border-radius: var(--radius-md);
  background: #fbfcfc;
  padding: 12px;
  min-width: 0;
}
.insight-tile.lime { border-left-color: var(--lime); }
.insight-tile.orange { border-left-color: var(--orange); }
.insight-tile.red { border-left-color: var(--red); }
.insight-tile span,
.insight-tile em {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  overflow-wrap: anywhere;
  white-space: normal;
}
.insight-tile b {
  display: block;
  margin: 5px 0;
  font-size: 23px;
  line-height: 1.05;
}
.finance-product-gains table {
  margin-top: 12px;
}
.finance-product-gains,
.attribution-month-panel,
.finance-installations-panel {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
}
.data-trust-panel {
  grid-column: 1 / -1;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.trust-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}
.trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: #f5f7f7;
  color: var(--muted);
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 900;
}
.trust-chip b,
.trust-chip em {
  color: inherit;
  font-style: normal;
  white-space: nowrap;
}
.trust-chip.ok {
  background: var(--lime-soft);
  color: var(--black);
}
.trust-chip.warning,
.trust-chip.attention {
  background: rgba(249, 115, 22, .12);
  color: var(--orange);
}
.finance-installations-panel table {
  margin-top: 12px;
}
.mini-choice {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(82px, 1fr));
  gap: 4px;
  min-width: 170px;
  max-width: 100%;
  align-items: stretch;
}
.mini-choice button {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 950;
  min-height: 28px;
  padding: 5px 7px;
  white-space: nowrap;
  transition: background-color .14s ease, border-color .14s ease, color .14s ease, transform .14s ease;
}
.mini-choice button:hover {
  border-color: rgba(24, 155, 159, .35);
  background: var(--teal-soft);
  color: var(--black);
}
.mini-choice button:active {
  transform: translateY(1px);
}
.mini-choice button span,
.mini-choice button em {
  display: block;
  line-height: 1.15;
}
.mini-choice button em {
  margin-top: 2px;
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
  opacity: .78;
}
.mini-choice button[data-stock-gap="1"] {
  border-color: rgba(239, 68, 68, .35);
  color: var(--red);
  background: rgba(239, 68, 68, .06);
}
.mini-choice button.active {
  border-color: var(--black);
  background: var(--black);
  color: #fff;
}
.mini-choice button:disabled {
  cursor: wait;
}
.mini-choice.is-saving button:not(.active) {
  opacity: .55;
}
.mini-choice.provision-choice {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(100%, 272px);
  min-width: 238px;
  gap: 5px;
}
.mini-choice.provision-choice button {
  min-width: 0;
  min-height: 34px;
  padding: 5px 6px;
  font-size: 10px;
  white-space: normal;
}
.mini-choice.provision-choice button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mini-choice.provision-choice button em {
  min-height: 10px;
  font-size: 8px;
}
.attribution-month-panel .data-table,
.finance-installations-panel .data-table {
  overflow-x: auto;
}
.attribution-month-panel table,
.finance-installations-panel table {
  min-width: 780px;
}
.attribution-month-panel th,
.attribution-month-panel td,
.finance-installations-panel th,
.finance-installations-panel td {
  padding: 8px 10px;
  font-size: 11px;
}
.attribution-month-panel th:nth-child(1),
.attribution-month-panel td:nth-child(1),
.finance-installations-panel th:nth-child(1),
.finance-installations-panel td:nth-child(1) {
  width: 68px;
}
.attribution-month-panel th:nth-child(3),
.attribution-month-panel td:nth-child(3),
.finance-installations-panel th:nth-child(4),
.finance-installations-panel td:nth-child(4) {
  width: 290px;
}
.attribution-month-panel th:nth-child(4),
.attribution-month-panel td:nth-child(4),
.attribution-month-panel th:nth-child(5),
.attribution-month-panel td:nth-child(5) {
  width: 110px;
}
.attribution-month-panel .machine-primary,
.finance-installations-panel .machine-primary {
  font-size: 12px;
  line-height: 1.15;
  overflow-wrap: anywhere;
  white-space: normal;
}
.attribution-month-panel td span,
.finance-installations-panel td span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  white-space: normal;
}
.finance-total-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.finance-month-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}
.finance-month-picker select,
.finance-month-picker input {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  padding: 6px 10px;
  font: inherit;
  cursor: pointer;
}
.factory-capacity-controls {
  display: grid;
  gap: 7px;
  min-width: 220px;
}
.factory-capacity-controls .finance-month-picker {
  display: grid;
  grid-template-columns: minmax(112px, 1fr) 110px;
}
.factory-capacity-controls .finance-month-picker input {
  width: 100%;
}
.demo-data-tag {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  margin-left: 6px;
  padding: 2px 7px;
  border: 1px solid #d89b25;
  border-radius: 5px;
  background: #fff5d9;
  color: #7a4a00;
  font-size: 9px;
  font-weight: 900;
  vertical-align: middle;
}
.demo-data-tag.compact {
  min-height: 17px;
  padding: 1px 5px;
  font-size: 8px;
}
.factory-day-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 12px;
}
.factory-day-selector label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  min-height: 30px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 950;
}
.factory-day-selector label.active {
  border-color: var(--black);
  background: var(--black);
  color: #fff;
}
.factory-day-selector input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.coverage-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.coverage-foot span {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: #f6f7f7;
  color: var(--muted);
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 900;
}
.production-demand {
  margin-bottom: 12px;
}
.demand-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .8fr);
  gap: 12px;
}
.demand-curve,
.finance-curve {
  grid-column: 1 / -1;
}
.demand-panel,
.demand-side {
  min-height: 280px;
}
.demand-table {
  display: grid;
  gap: 4px;
  max-height: 360px;
  overflow: auto;
}
.demand-cumulative {
  gap: 0;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  overflow: auto;
}
.demand-row {
  display: grid;
  grid-template-columns: minmax(70px, 1fr) repeat(4, minmax(58px, .7fr));
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12px;
}
.factory-capacity-table .demand-row {
  grid-template-columns: minmax(74px, .85fr) repeat(4, minmax(126px, 1fr)) minmax(150px, 1fr);
}
.factory-capacity-row {
  min-height: 58px;
}
.factory-metric-cell {
  display: grid;
  gap: 2px;
  justify-items: end;
  min-width: 0;
}
.factory-metric-cell b {
  color: var(--black);
  font-size: 17px;
  line-height: 1;
}
.factory-metric-cell em {
  max-width: 100%;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.15;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.factory-capacity-edit {
  justify-items: stretch;
}
.factory-capacity-edit b,
.factory-capacity-edit em {
  justify-self: end;
}
.factory-capacity-edit input {
  width: 100%;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  padding: 4px 7px;
  font: inherit;
  font-weight: 850;
}
.factory-status-pill {
  display: inline-grid;
  gap: 1px;
  min-width: 118px;
  padding: 7px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(104, 112, 118, .08);
  color: var(--muted);
}
.factory-status-pill b {
  color: var(--black);
  font-size: 12px;
  line-height: 1.1;
}
.factory-status-pill em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.1;
}
.factory-status-pill.ok {
  border-color: rgba(24, 155, 159, .22);
  background: var(--teal-soft);
}
.factory-status-pill.neutral {
  border-color: rgba(104, 112, 118, .18);
}
.factory-status-pill.danger {
  border-color: rgba(215, 48, 39, .24);
  background: rgba(215, 48, 39, .09);
}
.factory-status-pill.danger b {
  color: var(--red);
}
.demand-row:last-child {
  border-bottom: 0;
}
.demand-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f7f9f9;
  color: var(--muted);
  font-weight: 950;
}
.demand-month {
  color: var(--muted);
  font-size: 12px;
}
.demand-number {
  text-align: right;
  font-weight: 950;
}
.demand-focus {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.demand-focus h3 {
  margin: 0;
  font-size: 14px;
}
.finance-months, .finance-missing {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  min-width: 0;
  overflow: auto;
}
.finance-months {
  grid-column: 1 / -1;
}

.sales-map-layout {
  display: grid;
  grid-template-columns: minmax(560px, 1fr) 360px;
  gap: 14px;
  min-height: calc(100vh - 130px);
}
.map-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.map-actions .secondary-link {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 15px;
  box-shadow: none;
}
.map-actions label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}
.map-actions input {
  accent-color: var(--teal);
}
.address-audit-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.address-audit-card {
  border: 1px solid var(--line-soft);
  border-left: 6px solid var(--teal);
  border-radius: var(--radius-md);
  background: var(--paper);
  box-shadow: 0 10px 28px rgba(29, 29, 27, .04);
  padding: 11px;
  min-width: 0;
}
.address-audit-card.warning { border-left-color: var(--orange); }
.address-audit-card.danger { border-left-color: var(--red); }
.address-audit-card b {
  display: block;
  font-size: 22px;
  line-height: 1;
}
.address-audit-card span,
.address-audit-card small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  margin-top: 5px;
}
.sales-map-shell {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: #dfe9e7;
  box-shadow: var(--shadow);
}
.sales-map {
  position: absolute;
  inset: 0;
  min-height: 640px;
}
.map-delivery-legend {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 500;
  display: grid;
  gap: 7px;
  min-width: 190px;
  padding: 12px;
  border: 1px solid rgba(29,29,27,.12);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.94);
  box-shadow: 0 14px 36px rgba(29,29,27,.14);
  color: var(--black);
  font-size: 11px;
  font-weight: 900;
}
.map-delivery-legend b {
  font-size: 12px;
}
.map-delivery-legend span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
}
.map-delivery-legend i {
  width: 12px;
  height: 12px;
  border: 2px solid var(--black);
  border-radius: 999px;
  flex: 0 0 auto;
}
.map-delivery-legend em {
  margin-left: auto;
  color: var(--black);
  font-style: normal;
}
.map-fallback {
  position: absolute;
  inset: 18px;
  z-index: 5;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.92);
  color: var(--muted);
  font-weight: 850;
}
.map-side-panel {
  min-height: 640px;
  max-height: calc(100vh - 130px);
  overflow: auto;
}
.map-sale-line {
  border-left: 5px solid var(--teal);
}
.map-sale-line.approx { border-left-color: var(--orange); }
.map-sale-line.invalid,
.map-sale-line.failed { border-left-color: var(--red); }
.map-sale-line.pending { border-left-color: var(--line); }
.map-sale-line.late { border-left-color: var(--red); }
.map-sale-line.week { border-left-color: var(--orange); }
.map-sale-line.month { border-left-color: var(--teal); }
.map-sale-line.later { border-left-color: var(--lime); }
.map-sale-line.unscheduled { border-left-color: var(--grey); }
.sale-marker-host {
  background: transparent;
  border: 0;
}
.map-sale-marker {
  width: 38px;
  height: 38px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1px;
  border: 3px solid var(--black);
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  box-shadow: 0 8px 18px rgba(29,29,27,.24);
}
.map-sale-marker.warning { background: var(--orange); }
.map-sale-marker.danger { background: var(--red); }
.map-sale-marker.ok { background: var(--lime); color: var(--black); }
.map-sale-marker b {
  font-size: 13px;
  line-height: 1;
}
.map-sale-marker span {
  display: block;
  margin-top: 0;
  font-size: 8px;
  font-weight: 950;
  line-height: 1;
}
.leaflet-tooltip.richHoverTooltip {
  padding: 0;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(29,29,27,.18);
}
.map-hover-card {
  display: grid;
  gap: 3px;
  min-width: 220px;
  padding: 11px 12px;
  border-radius: 16px;
  background: white;
  color: var(--black);
}
.map-hover-card b {
  font-size: 13px;
}
.map-hover-card b.machine-primary {
  font-size: 15px;
}
.map-hover-card span,
.map-hover-card em,
.map-hover-card small {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
}

.transport-map-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}
.transport-timeline {
  overflow-x: auto;
  padding: 6px 2px 10px;
}
.transport-timeline-track {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  min-width: max-content;
  padding: 8px 6px 0;
}
.transport-timeline-track::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 25px;
  height: 3px;
  border-radius: 999px;
  background: var(--line);
}
.transport-date-node {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 3px;
  width: 76px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
}
.transport-node-dot {
  display: block;
  border: 3px solid var(--black);
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 6px 14px rgba(29,29,27,.16);
}
.transport-date-node.active .transport-node-dot {
  background: var(--lime);
}
.transport-date-node b,
.transport-date-node em {
  max-width: 74px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.1;
}
.transport-date-node b {
  color: var(--black);
  font-size: 11px;
  font-weight: 950;
}
.transport-date-node em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
}
.transport-map-layout {
  display: grid;
  grid-template-columns: minmax(360px, .72fr) minmax(700px, 1.28fr);
  gap: 10px;
  min-height: 520px;
}
.transport-map-shell {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: #dfe9e7;
  box-shadow: var(--shadow);
}
.transport-map {
  position: absolute;
  inset: 0;
  min-height: 520px;
}
.transport-stops-panel {
  min-height: 520px;
  max-height: min(72vh, 640px);
  overflow: auto;
}
.transport-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.transport-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 4px 7px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}
.transport-map-legend i {
  width: 10px;
  height: 10px;
  border: 2px solid var(--black);
  border-radius: 50%;
}
.transport-map-legend b {
  color: var(--black);
}
.transport-route-candidates {
  display: grid;
  gap: 6px;
  margin: 0 0 10px;
  padding: 9px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: #fff;
}
.transport-route-candidates > b {
  color: var(--black);
  font-size: 10px;
  font-weight: 950;
}
.transport-route-candidates div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.transport-route-candidates span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 10px;
  font-weight: 900;
}
.transport-route-candidates em {
  font-style: normal;
  color: var(--black);
}
.transport-route-planner {
  display: grid;
  gap: 8px;
  margin: 0 0 10px;
}
.transport-route-head {
  display: grid;
  gap: 2px;
  padding: 9px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: #fff;
}
.transport-route-head.route-head-inline {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.transport-route-head b,
.validated-route-list > b {
  color: var(--black);
  font-size: 11px;
  font-weight: 950;
}
.transport-route-head em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}
.route-create-panel {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) repeat(4, minmax(66px, 86px)) minmax(88px, auto) minmax(60px, auto);
  gap: 6px;
  align-items: end;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-left: 6px solid var(--teal);
  border-radius: var(--radius-sm);
  background: #fff;
}
.route-create-panel > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.route-create-panel b {
  color: var(--black);
  font-size: 11px;
  font-weight: 950;
}
.route-create-panel span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
}
.route-create-panel label {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}
.route-create-panel input {
  min-height: 30px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 6px 8px;
  font: inherit;
}
.route-create-panel .primary-btn {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 10px;
  white-space: nowrap;
}
.route-create-panel .secondary-btn {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 10px;
  white-space: nowrap;
}
.transport-route-board {
  display: flex;
  gap: 8px;
  align-items: start;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
  scroll-snap-type: x proximity;
}
.route-pool-column {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  align-content: start;
  gap: 8px;
  flex: 0 0 260px;
  min-height: 180px;
  height: 420px;
  max-height: 420px;
  overflow: hidden;
  padding: 9px;
  border: 1px dashed color-mix(in srgb, var(--teal) 42%, var(--line-soft));
  border-left: 6px solid var(--teal);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--teal) 6%, #fff);
}
.route-pool-column.drag-over {
  border-color: var(--teal);
  background: color-mix(in srgb, var(--teal) 13%, #fff);
}
.route-pool-more {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-align: center;
}
.route-proposal {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-left: 6px solid var(--route-color, var(--teal));
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
}
.route-proposal.selected {
  border-color: var(--route-color, var(--teal));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--route-color, var(--teal)) 18%, transparent);
}
.route-proposal.proposed {
  background: rgba(255, 255, 255, .78);
}
.route-proposal.proposed:hover,
.route-proposal.validated:hover {
  border-color: var(--route-color, var(--teal));
  background: color-mix(in srgb, var(--route-color, var(--teal)) 7%, #fff);
}
.route-proposal.validated {
  background: var(--lime-soft);
}
.route-proposal.route-column {
  align-content: start;
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
  flex: 0 0 280px;
  min-height: 170px;
  height: 420px;
  max-height: 420px;
  overflow: hidden;
  scroll-snap-align: start;
}
.route-proposal.quality-warning {
  background: rgba(214, 128, 0, .06);
}
.route-proposal.production-danger {
  border-color: #d43c21;
  background: color-mix(in srgb, #d43c21 9%, #fff);
}
.route-proposal.production-warning {
  border-color: #d68000;
  background: color-mix(in srgb, #d68000 8%, #fff);
}
.route-proposal.quality-empty {
  border-style: dashed;
  background: #fbfcfc;
}
.route-proposal.route-column.drag-over {
  border-color: var(--route-color, var(--teal));
  background: color-mix(in srgb, var(--route-color, var(--teal)) 12%, #fff);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--route-color, var(--teal)) 35%, transparent);
}
.route-proposal-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.route-proposal-top b {
  font-size: 12px;
  font-weight: 950;
}
.route-proposal-top span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-align: right;
}
.route-metrics,
.route-quality {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.route-schedule-line {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.route-schedule-line span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border: 1px solid color-mix(in srgb, var(--route-color, var(--teal)) 25%, var(--line-soft));
  border-radius: 999px;
  background: color-mix(in srgb, var(--route-color, var(--teal)) 8%, #fff);
  color: var(--black);
  font-size: 9px;
  font-weight: 950;
}
.route-schedule-line .late {
  border-color: rgba(212, 60, 33, .24);
  background: rgba(212, 60, 33, .08);
  color: #9f2b18;
}
.route-metrics span,
.route-quality span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}
.route-quality span {
  border-color: color-mix(in srgb, var(--route-color, var(--teal)) 26%, var(--line-soft));
  background: color-mix(in srgb, var(--route-color, var(--teal)) 8%, #fff);
  color: var(--black);
}
.route-production-alert {
  display: grid;
  gap: 2px;
  padding: 7px 8px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: #fff;
}
.route-production-alert b {
  color: var(--black);
  font-size: 10px;
  font-weight: 950;
}
.route-production-alert span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  line-height: 1.25;
}
.route-production-alert.danger {
  border-color: rgba(212, 60, 33, .42);
  background: color-mix(in srgb, #d43c21 10%, #fff);
}
.route-production-alert.danger b {
  color: #9f2b18;
}
.route-production-alert.warning {
  border-color: rgba(214, 128, 0, .42);
  background: color-mix(in srgb, #d68000 10%, #fff);
}
.route-production-alert.warning b {
  color: #8a5200;
}
.transport-production-alert-panel {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: #fff;
}
.transport-production-alert-panel b {
  color: var(--black);
  font-size: 11px;
  font-weight: 950;
}
.transport-production-alert-panel div {
  display: grid;
  gap: 6px;
}
.transport-production-alert-panel span {
  display: grid;
  gap: 2px;
  padding: 7px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
  color: var(--black);
  font-size: 10px;
  font-weight: 850;
}
.transport-production-alert-panel strong {
  font-weight: 950;
}
.transport-production-alert-panel em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}
.transport-production-alert-panel.danger {
  border-color: rgba(212, 60, 33, .42);
  background: color-mix(in srgb, #d43c21 10%, #fff);
}
.transport-production-alert-panel.warning {
  border-color: rgba(214, 128, 0, .42);
  background: color-mix(in srgb, #d68000 10%, #fff);
}
.transport-production-tooltip {
  display: block;
  font-weight: 950;
}
.transport-production-tooltip.danger {
  color: #9f2b18;
}
.transport-production-tooltip.warning {
  color: #8a5200;
}
.route-proposal-stops {
  display: grid;
  gap: 5px;
}
.route-proposal-stops span {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  color: var(--black);
  font-size: 10px;
  font-weight: 900;
}
.route-proposal-stops span b {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--route-color, var(--black));
  color: #fff;
  font-size: 9px;
}
.route-proposal-stops span em {
  grid-column: 2;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 750;
}
.route-proposal-actions {
  display: grid;
  grid-template-columns: minmax(104px, 1fr) repeat(3, auto);
  gap: 6px;
  align-items: end;
}
.route-proposal-actions-single {
  grid-template-columns: auto;
  justify-content: end;
}
.route-proposal-actions label {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}
.route-proposal-actions input {
  min-height: 30px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 6px 8px;
  font: inherit;
}
.route-proposal-actions .primary-btn {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 10px;
  white-space: nowrap;
}
.route-proposal-actions .secondary-btn {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 10px;
  white-space: nowrap;
}
.route-advanced-settings {
  grid-column: 1 / -1;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 5px 6px;
  background: rgba(255, 255, 255, .62);
}
.route-advanced-settings summary {
  color: var(--muted);
  font-size: 9px;
  font-weight: 950;
  cursor: pointer;
}
.route-advanced-settings[open] {
  display: grid;
  grid-template-columns: repeat(4, minmax(62px, 1fr));
  gap: 6px;
}
.route-card-stack {
  display: grid;
  gap: 7px;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding-right: 2px;
}
.route-machine-card {
  display: grid;
  gap: 3px;
  padding: 7px;
  border: 1px solid var(--line-soft);
  border-left: 5px solid var(--type-color, var(--teal));
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: grab;
}
.route-machine-card.inspector-selected,
.route-map-stop.inspector-selected,
.transport-stop-line.inspector-selected {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}
.route-map-simple {
  display: grid;
  gap: 8px;
}
.route-map-simple > .panel-head,
.route-map-simple > .transport-timeline,
.route-map-simple > .transport-production-alert-panel,
.route-map-simple > .transport-factory-planning,
.route-map-simple .transport-month-list {
  display: none;
}
.route-map-simple .transport-map-layout {
  grid-template-columns: minmax(420px, 1fr) clamp(520px, 36vw, 640px);
  gap: 10px;
  height: min(760px, calc(100vh - 170px));
  min-height: 620px;
}
.route-map-simple .transport-map-shell,
.route-map-simple .transport-map {
  min-height: 100%;
  height: 100%;
}
.route-map-simple .transport-stops-panel {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  max-height: 100%;
  padding: 10px;
  overflow-y: auto;
  overflow-x: hidden;
}
.route-map-simple .transport-stops-panel > *,
.route-map-side-planner,
.route-map-summary,
.route-map-create-panel,
.route-map-chip-strip,
.route-map-selected-panel,
.route-map-stop-list {
  min-width: 0;
  max-width: 100%;
}
.route-map-simple .transport-stops-panel > .panel-head {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}
.route-map-simple .transport-stops-panel > .panel-head h2 {
  font-size: 14px;
}
.route-map-simple .transport-stops-panel .transport-timeline {
  display: block;
  margin: 0;
  overflow: visible;
  padding: 0;
}
.route-map-simple .transport-stops-panel .transport-timeline-track {
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
}
.route-map-simple .transport-stops-panel .transport-timeline-track::before {
  display: none;
}
.route-map-simple .transport-stops-panel .transport-date-node {
  width: auto;
  min-width: 64px;
  max-width: calc(20% - 8px);
}
.route-map-simple .transport-stops-panel .transport-node-dot {
  border-width: 2px;
}
.route-map-simple .transport-map-legend {
  margin: 0;
  gap: 4px;
}
.route-map-simple .transport-map-legend span {
  min-height: 20px;
  padding: 3px 6px;
  font-size: 8px;
}
.route-map-side-planner {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.route-map-side-planner > .transport-route-head,
.route-map-side-planner > .transport-route-board {
  display: none;
}
.route-map-summary {
  display: grid;
  gap: 2px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-left: 5px solid var(--teal);
  border-radius: var(--radius-sm);
  background: #fff;
}
.route-map-summary.warning { border-left-color: var(--orange); }
.route-map-summary.complete { border-left-color: var(--lime); }
.route-map-summary b {
  color: var(--black);
  font-size: 11px;
  font-weight: 950;
}
.route-map-summary span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
}
.route-map-create-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-left: 5px solid var(--teal);
  border-radius: var(--radius-sm);
  background: #fff;
}
.route-map-create-panel .route-create-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}
.route-map-create-panel .route-create-copy { display: grid; gap: 2px; }
.route-map-create-panel b {
  color: var(--black);
  font-size: 11px;
  font-weight: 950;
}
.route-map-create-panel span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
}
.route-map-create-panel label {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 900;
}
.route-map-create-panel .route-create-settings {
  display: grid;
  gap: 7px;
  border-top: 1px solid var(--line-soft);
  padding-top: 7px;
}
.route-map-create-panel .route-settings-title {
  display: grid;
  gap: 2px;
}
.route-map-create-panel .route-settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.route-map-create-panel .route-settings-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}
.route-map-create-panel .route-setting-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.route-map-create-panel input {
  min-height: 30px;
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 6px 7px;
  font: inherit;
}
.route-map-create-panel .primary-btn {
  min-height: 32px;
}
.route-map-create-panel .route-create-actions {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  gap: 6px;
}
.route-map-create-panel .route-create-actions .primary-btn {
  grid-column: auto;
}
.route-map-create-panel .route-create-actions button {
  min-height: 32px;
  white-space: normal;
}

.planning-field-select {
  display: inline-grid;
  grid-template-columns: auto minmax(140px, 180px);
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}
.planning-field-select select {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  padding: 5px 8px;
  color: var(--black);
  font: inherit;
}
.route-map-chip-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  max-height: 136px;
  overflow-y: auto;
  overflow-x: hidden;
}
.route-map-chip {
  position: relative;
  display: grid;
  gap: 2px;
  min-height: 58px;
  padding: 7px 8px;
  border: 1px solid var(--line-soft);
  border-left: 5px solid var(--route-color, var(--teal));
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
}
.route-map-chip.selected {
  border-color: var(--route-color, var(--teal));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--route-color, var(--teal)) 16%, transparent);
}
.route-map-chip.saved {
  background: var(--lime-soft);
}
.route-map-chip.drag-over {
  border-color: var(--black);
  box-shadow: 0 0 0 3px rgba(29, 29, 27, .12);
}
.route-map-chip b {
  color: var(--black);
  font-size: 11px;
  font-weight: 950;
}
.route-map-chip span,
.route-map-chip em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.route-map-chip strong {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(212, 60, 33, .11);
  color: #9f2b18;
  font-size: 8px;
  font-weight: 950;
}
.route-map-selected-panel {
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line-soft);
  border-left: 5px solid var(--route-color, var(--teal));
  border-radius: var(--radius-sm);
  background: #fff;
}
.route-map-selected-head {
  display: grid;
  gap: 2px;
}
.route-map-selected-head b {
  color: var(--black);
  font-size: 14px;
  font-weight: 950;
}
.route-map-selected-head span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
}
.route-map-route-meta,
.route-map-alerts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.route-map-route-meta span,
.route-map-alerts > span,
.route-map-alerts small {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}
.route-map-alerts.ok span {
  border-color: color-mix(in srgb, var(--lime) 35%, var(--line-soft));
  color: var(--black);
}
.route-map-alerts > span {
  display: grid;
  border-color: rgba(214, 128, 0, .28);
  background: rgba(214, 128, 0, .08);
  color: #8a5200;
  border-radius: 8px;
}
.route-map-alerts > span.danger {
  border-color: rgba(212, 60, 33, .32);
  background: rgba(212, 60, 33, .08);
  color: #9f2b18;
}
.route-map-alerts b {
  font-size: 9px;
}
.route-map-alerts em {
  font-size: 8px;
  font-style: normal;
}
.route-map-save-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: end;
}
.route-map-save-row label {
  display: grid;
  gap: 3px;
  flex: 1 1 180px;
  min-width: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}
.route-map-save-row input {
  min-height: 31px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 6px 8px;
  font: inherit;
}
.route-map-save-row button {
  flex: 1 1 112px;
  min-height: 31px;
  padding: 6px 9px;
  font-size: 10px;
  white-space: nowrap;
}
.route-map-stop-list {
  display: grid;
  gap: 6px;
  max-height: 230px;
  overflow-y: auto;
  overflow-x: hidden;
}
.route-map-stop {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto auto;
  gap: 7px;
  align-items: center;
  padding: 7px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: grab;
}
.route-map-stop:active { cursor: grabbing; }
.route-map-stop.late {
  border-color: rgba(212, 60, 33, .28);
  background: rgba(212, 60, 33, .06);
}
.route-map-stop > b {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--route-color, var(--teal));
  color: #fff;
  font-size: 9px;
}
.route-map-stop span {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.route-map-stop strong,
.route-map-stop em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.route-map-stop strong {
  color: var(--black);
  font-size: 10px;
  font-weight: 950;
}
.route-map-stop em,
.route-map-stop small {
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
  font-weight: 850;
}
.route-map-stop time {
  grid-column: 3;
  color: var(--black);
  font-size: 11px;
  font-weight: 950;
}
.route-map-stop small {
  grid-column: 2 / 4;
  grid-row: 2;
}
.route-map-stop-remove {
  grid-column: 4;
  grid-row: 1;
  min-height: 24px;
  border: 1px solid rgba(212, 60, 33, .22);
  border-radius: 999px;
  padding: 3px 7px;
  background: rgba(212, 60, 33, .06);
  color: #9f2b18;
  font-size: 8px;
  font-weight: 950;
}
.route-map-help {
  position: absolute;
  z-index: 700;
  top: 12px;
  left: 12px;
  display: grid;
  gap: 2px;
  width: min(330px, calc(100% - 24px));
  padding: 8px 10px;
  border: 1px solid rgba(29, 29, 27, .15);
  border-left: 5px solid var(--teal);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 8px 24px rgba(29, 29, 27, .12);
  pointer-events: none;
}
.route-map-help b {
  color: var(--black);
  font-size: 11px;
  font-weight: 950;
}
.route-map-help span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
}
.route-map-unassigned-panel {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
}
.route-map-unassigned-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.route-map-unassigned-head > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.route-map-unassigned-head b {
  color: var(--black);
  font-size: 12px;
  font-weight: 950;
}
.route-map-unassigned-head span,
.route-map-unassigned-panel > small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
}
.route-map-unassigned-head strong {
  flex: 0 0 auto;
  min-width: 44px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(249, 115, 22, .12);
  color: var(--black);
  font-size: 9px;
  text-align: center;
}
.route-map-unassigned-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}
.route-map-unassigned-search input {
  min-width: 0;
  min-height: 31px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 6px 8px;
  color: var(--black);
  font: inherit;
}
.route-map-unassigned-list {
  display: grid;
  gap: 6px;
  max-height: 250px;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
}
.route-map-unassigned-list .route-machine-card {
  grid-template-columns: minmax(0, 1fr);
  padding: 6px 7px;
}
.route-map-unassigned-list .route-machine-card[hidden] { display: none; }
.route-map-coverage-ok {
  display: grid;
  gap: 2px;
  padding: 8px;
  border-left: 5px solid var(--lime);
  background: var(--lime-soft);
}
.route-map-coverage-ok b { color: var(--black); font-size: 11px; }
.route-map-coverage-ok span { color: var(--muted); font-size: 9px; font-weight: 850; }

.route-map-commandbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(360px, .9fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.route-map-create-panel,
.route-map-summary,
.route-map-chip,
.route-map-selected-panel,
.route-map-stop,
.route-machine-card,
.route-map-alerts > span,
.route-map-alerts small {
  background: var(--paper);
  color: var(--black);
}
.route-map-create-panel input,
.route-map-save-row input,
.route-map-unassigned-search input {
  background: var(--paper);
  color: var(--black);
}
.route-map-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.route-map-title h2 {
  margin: 0;
  color: var(--black);
  font-size: 16px;
}
.route-map-title span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.route-month-picker {
  display: grid;
  grid-template-columns: 34px minmax(150px, 190px) 34px;
  gap: 6px;
  align-items: end;
  min-width: 0;
}
.route-month-picker.empty {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}
.route-month-picker label {
  display: grid;
  gap: 2px;
  min-width: 0;
  color: var(--muted);
  font-size: 8px;
  font-weight: 900;
}
.route-month-picker select {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 5px 8px;
  color: var(--black);
  font-weight: 900;
}
.route-month-picker .icon-btn {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--black);
  font-size: 15px;
  font-weight: 950;
}
.route-month-picker .icon-btn:disabled {
  cursor: default;
  opacity: .35;
}
.route-map-coverage {
  display: grid;
  grid-template-columns: repeat(4, minmax(68px, 1fr));
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-left: 5px solid var(--orange);
  border-radius: 8px;
}
.route-map-coverage.complete { border-left-color: var(--lime); }
.route-map-coverage span {
  display: grid;
  gap: 1px;
  min-width: 0;
  padding: 6px 8px;
  border-left: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 8px;
  font-weight: 900;
  text-align: center;
}
.route-map-coverage span:first-child { border-left: 0; }
.route-map-coverage b {
  color: var(--black);
  font-size: 15px;
  line-height: 1;
}
.route-map-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--paper);
}
.route-map-flow span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  border-left: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}
.route-map-flow span:first-child { border-left: 0; }
.route-map-flow span.active { background: var(--teal-soft); color: var(--black); }
.route-map-flow span.done { color: var(--black); }
.route-map-flow b {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--line);
  font-size: 8px;
}
.route-map-flow .done b { background: var(--lime); color: #1d1d1b; }
.route-map-flow .active b { background: var(--teal); color: #fff; }
.route-map-simple .transport-map-layout {
  grid-template-columns: minmax(420px, 1fr) clamp(500px, 38vw, 620px);
  height: min(760px, calc(100vh - 238px));
  min-height: 590px;
}
.route-map-simple .transport-stops-panel {
  border-radius: 8px;
  background: var(--paper);
}
.route-map-simple .transport-stops-panel > .panel-head {
  position: sticky;
  z-index: 3;
  top: -10px;
  margin: -10px -10px 0;
  padding: 10px;
  background: var(--paper);
}
.route-map-side-planner > .transport-route-head,
.route-map-side-planner > .transport-route-board { display: none; }
.route-map-route-picker {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.route-map-route-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.route-map-route-picker-head > div {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.route-map-route-picker-head b {
  color: var(--black);
  font-size: 12px;
  font-weight: 950;
}
.route-map-route-picker-head span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 850;
}
.route-map-route-picker-head > strong {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--black);
  font-size: 9px;
}
.route-map-legend-overlay {
  position: absolute;
  z-index: 700;
  top: 12px;
  right: 12px;
  width: min(300px, calc(100% - 24px));
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  box-shadow: 0 8px 24px rgba(29, 29, 27, .12);
  pointer-events: none;
}
.route-map-legend-overlay .transport-map-legend {
  gap: 4px;
  margin: 0;
}
.route-map-legend-overlay .transport-map-legend span {
  min-height: 20px;
  padding: 3px 5px;
  background: var(--paper);
  font-size: 8px;
}
.route-map-help {
  top: auto;
  bottom: 12px;
}
.route-map-selected-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}
.route-map-selected-head > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.route-map-selected-head .compact-btn {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 9px;
}
.route-map-stop {
  grid-template-columns: 24px minmax(0, 1fr) auto auto;
}
.route-map-stop-actions {
  grid-column: 4;
  grid-row: 1 / 3;
  display: flex;
  align-items: center;
  gap: 4px;
}
.route-map-stop-move,
.route-map-stop-remove {
  min-width: 26px;
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px 6px;
  background: var(--paper);
  color: var(--black);
  font-size: 9px;
  font-weight: 950;
}
.route-map-stop-move:disabled { opacity: .3; }
.route-map-stop-remove {
  grid-column: auto;
  grid-row: auto;
  border-color: rgba(212, 60, 33, .22);
  background: rgba(212, 60, 33, .06);
  color: #9f2b18;
}
.route-machine-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}
.route-card-action {
  min-height: 24px;
  border: 1px solid color-mix(in srgb, var(--type-color, var(--teal)) 34%, var(--line-soft));
  border-radius: 999px;
  padding: 3px 7px;
  background: color-mix(in srgb, var(--type-color, var(--teal)) 9%, #fff);
  color: var(--black);
  font-size: 9px;
  font-weight: 950;
  cursor: pointer;
}
.route-card-action:hover {
  background: color-mix(in srgb, var(--type-color, var(--teal)) 17%, #fff);
}
.route-card-action.danger {
  border-color: rgba(212, 60, 33, .24);
  background: rgba(212, 60, 33, .08);
  color: #9f2b18;
}
.route-card-action:disabled {
  opacity: .48;
  cursor: not-allowed;
}
.route-machine-card:active {
  cursor: grabbing;
}
.route-machine-card b,
.route-machine-card span,
.route-machine-card em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.route-machine-card b {
  color: var(--black);
  font-size: 12px;
}
.route-machine-card span,
.route-machine-card em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}
.validated-route-list {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}
.active-route-summary {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--route-color, var(--teal)) 35%, var(--line-soft));
  border-left: 7px solid var(--route-color, var(--teal));
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--route-color, var(--teal)) 7%, #fff);
}
.active-route-summary > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.active-route-summary b {
  color: var(--black);
  font-size: 13px;
  font-weight: 950;
}
.active-route-summary span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}
.active-route-stops {
  display: grid;
  gap: 5px;
}
.active-route-stops span {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  min-width: 0;
  font-size: 10px;
  font-weight: 900;
}
.active-route-stops span b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--route-color, var(--black));
  color: #fff;
  font-size: 9px;
}
.active-route-stops em {
  grid-column: 2;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 750;
}
.transport-month-list {
  margin-top: 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: #fff;
  overflow: hidden;
}
.transport-month-list summary {
  cursor: pointer;
  padding: 9px 10px;
  color: var(--black);
  font-size: 11px;
  font-weight: 950;
}
.transport-month-list .transport-stop-list {
  padding: 8px;
  border-top: 1px solid var(--line-soft);
}
.transport-stop-list {
  display: grid;
  gap: 7px;
}
.transport-stop-line {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-left: 6px solid var(--route-color, var(--teal));
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
}
.transport-stop-line > b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--route-color, var(--black));
  color: #fff;
  font-size: 10px;
}
.transport-stop-line span,
.transport-stop-line em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.transport-stop-line span {
  display: grid;
  gap: 2px;
  color: var(--black);
  font-size: 11px;
  font-weight: 950;
}
.transport-stop-line em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}
.transport-stop-line strong {
  display: grid;
  justify-items: end;
  gap: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 950;
}
.transport-stop-line strong i {
  color: var(--black);
  font-style: normal;
  white-space: nowrap;
}
.transport-stop-line strong small {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 9px;
}
.transport-stop-line strong small::before {
  content: "";
  width: 9px;
  height: 9px;
  border: 2px solid var(--black);
  border-radius: 50%;
  background: var(--type-color, var(--teal));
}
.transport-factory-planning {
  display: grid;
  gap: 10px;
}
.transport-factory-planning .panel-head {
  align-items: flex-start;
}
.transport-factory-kpis {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.transport-factory-kpis span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 9px;
  font-weight: 950;
  white-space: nowrap;
}
.transport-factory-kpis b {
  color: var(--black);
  font-size: 11px;
}
.transport-factory-kpis .validated {
  border-color: rgba(42, 157, 99, .25);
  background: var(--lime-soft);
}
.transport-factory-kpis .pending,
.transport-factory-kpis .missing {
  border-color: rgba(214, 128, 0, .26);
  background: rgba(214, 128, 0, .08);
}
.transport-factory-kpis .shifted {
  border-color: rgba(215, 48, 39, .28);
  background: rgba(215, 48, 39, .08);
}
.transport-factory-days {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}
.transport-factory-day {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 96px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: #fbfcfc;
}
.transport-factory-stack {
  display: grid;
  gap: 5px;
}
.transport-factory-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid var(--line-soft);
  border-left: 5px solid var(--orange);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
}
.transport-factory-card.validated {
  border-left-color: var(--teal);
}
.transport-factory-card.shifted {
  border-left-color: var(--red);
}
.transport-factory-card.missing {
  border-left-color: var(--orange);
  background: rgba(214, 128, 0, .04);
}
.transport-factory-card div {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.transport-factory-card b,
.transport-factory-card span,
.transport-factory-card em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.transport-factory-card b {
  color: var(--black);
  font-size: 11px;
  font-weight: 950;
}
.transport-factory-card span,
.transport-factory-card em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}
.transport-factory-card strong {
  justify-self: end;
  max-width: 96px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--black);
  font-size: 9px;
  font-weight: 950;
  text-align: center;
  white-space: nowrap;
}

.odoo-panel {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 14px;
  display: grid;
  gap: 10px;
  max-width: 100%;
}
.v0-boundary-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.v0-boundary-panel article,
.admin-source-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.v0-boundary-panel article {
  display: grid;
  gap: 5px;
  padding: 12px;
}
.v0-boundary-panel b {
  color: var(--black);
  font-size: 12px;
  font-weight: 950;
}
.v0-boundary-panel span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}
.admin-source-panel,
.reconditioning-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  overflow: hidden;
}
.reconditioning-panel .data-table {
  min-width: 0;
  max-width: 100%;
}
.reconditioning-panel table {
  min-width: 840px;
}
.admin-source-card {
  padding: 14px;
}
.admin-wide-card {
  max-width: none;
  overflow: hidden;
}
.admin-source-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.automation-journal-grid {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.automation-journal-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) minmax(150px, .7fr) minmax(130px, .6fr) minmax(120px, .6fr);
  gap: 12px;
  align-items: center;
  min-height: 54px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.automation-journal-row:last-child {
  border-bottom: 0;
}

.automation-journal-row > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.automation-journal-row > div span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.automation-journal-head {
  min-height: 40px;
  color: var(--muted);
  background: var(--soft);
  font-weight: 700;
}

@media (max-width: 760px) {
  .automation-journal-head {
    display: none;
  }

  .automation-journal-row {
    grid-template-columns: 1fr auto;
  }

  .automation-journal-row > span:nth-of-type(n + 2) {
    grid-column: 1 / -1;
  }
}
.admin-matrix-table {
  display: grid;
  gap: 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  overflow: auto;
}
.admin-matrix-row {
  min-width: 960px;
  display: grid;
  grid-template-columns: 1.45fr .72fr .9fr .86fr 1.08fr 1.12fr;
  gap: 1px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--line-soft);
}
.admin-matrix-row:last-child { border-bottom: 0; }
.admin-matrix-row span {
  background: var(--paper);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  padding: 9px;
}
.admin-matrix-head span {
  background: #f2f4f4;
  color: var(--black);
  font-weight: 950;
}
.technician-matrix-row {
  grid-template-columns: 1.2fr .55fr .65fr 1.45fr .65fr;
}
.technician-matrix-row span:first-child {
  display: grid;
  gap: 2px;
}
.technician-matrix-row small {
  color: var(--muted);
  font-size: 10px;
  overflow-wrap: anywhere;
}
.admin-role-grid,
.admin-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px;
}
.admin-role-grid article,
.admin-checklist div {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: #f8fafb;
  display: grid;
  gap: 5px;
  padding: 10px;
}
.admin-role-grid b,
.admin-checklist b {
  color: var(--black);
  font-size: 12px;
  font-weight: 950;
}
.admin-role-grid span,
.admin-checklist span {
  color: var(--black);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.35;
}
.admin-role-grid em,
.admin-checklist em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.35;
}
.admin-persona-studio {
  display: grid;
  gap: 12px;
  margin: 2px 0 18px;
  padding: 14px 0 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.admin-persona-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.admin-persona-head h3,
.admin-persona-summary h3 { margin: 0; font-size: 15px; }
.admin-persona-head p,
.admin-persona-summary p { margin: 3px 0 0; color: var(--muted); font-size: 10px; font-weight: 750; line-height: 1.4; }
.admin-persona-head > span,
.admin-persona-summary > span {
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--black);
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}
.admin-persona-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
.admin-persona-card {
  display: grid;
  gap: 3px;
  min-width: 0;
  min-height: 52px;
  padding: 8px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--paper);
  color: var(--black);
  cursor: pointer;
  text-align: left;
}
.admin-persona-card:hover,
.admin-persona-card.active {
  border-color: var(--teal);
  background: var(--teal-soft);
}
.admin-persona-card b,
.admin-persona-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-persona-card b { font-size: 11px; }
.admin-persona-card span { color: var(--muted); font-size: 9px; font-weight: 800; }
.admin-persona-brief {
  display: grid;
  grid-template-columns: minmax(210px, .8fr) repeat(2, minmax(230px, 1fr));
  gap: 16px;
  padding: 12px 0 0;
}
.admin-persona-summary { min-width: 0; }
.admin-persona-summary > span { display: inline-flex; margin-bottom: 7px; }
.admin-persona-list {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
}
.admin-persona-list > b { font-size: 11px; }
.admin-persona-list > span {
  position: relative;
  padding-left: 13px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.35;
}
.admin-persona-list > span::before {
  content: "";
  position: absolute;
  top: .45em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
}
.admin-access-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(340px, .78fr);
  gap: 18px;
  min-width: 0;
}
.admin-user-directory,
.admin-user-editor {
  min-width: 0;
}
.admin-user-directory {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.admin-user-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--line-soft);
}
.admin-user-toolbar strong { font-size: 12px; }
.admin-user-list { display: grid; max-height: 580px; overflow-y: auto; }
.admin-user-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 62px;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: var(--paper);
  color: var(--black);
  cursor: pointer;
  text-align: left;
}
.admin-user-row:last-child { border-bottom: 0; }
.admin-user-row:hover,
.admin-user-row.active { background: var(--teal-soft); }
.admin-user-row > span:first-child { min-width: 0; display: grid; gap: 2px; }
.admin-user-row strong,
.admin-user-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-user-row strong { font-size: 12px; }
.admin-user-row small { color: var(--muted); font-size: 10px; font-weight: 750; }
.admin-user-state {
  display: grid;
  justify-items: end;
  gap: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}
.admin-user-state b {
  padding: 3px 6px;
  border-radius: 999px;
  background: var(--lime-soft);
  color: var(--black);
}
.admin-user-row.inactive { opacity: .6; }
.admin-user-row.inactive .admin-user-state b { background: var(--line-soft); color: var(--muted); }
.admin-user-editor {
  display: grid;
  align-content: start;
  gap: 12px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}
.admin-user-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.admin-user-editor-head h3 { margin: 0; font-size: 15px; }
.admin-user-editor-head p { margin: 3px 0 0; color: var(--muted); font-size: 10px; font-weight: 750; }
.admin-user-form { display: grid; gap: 12px; }
.admin-user-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.admin-user-fields label,
.admin-permission-section > label {
  min-width: 0;
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}
.admin-user-fields input,
.admin-user-fields select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  background: var(--paper);
  color: var(--black);
}
.admin-user-fields .full { grid-column: 1 / -1; }
.admin-active-toggle {
  display: flex !important;
  grid-column: 1 / -1;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px !important;
  min-height: 34px;
}
.admin-active-toggle input { width: 18px; min-height: 18px; accent-color: var(--teal); }
.admin-permission-section { display: grid; gap: 8px; }
.admin-permission-section h4 { margin: 0; font-size: 12px; }
.admin-permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 10px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.admin-permission-grid label {
  min-width: 0;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  color: var(--black);
  font-size: 10px;
  font-weight: 800;
}
.admin-permission-grid input { width: 16px; height: 16px; accent-color: var(--teal); }
.admin-tab-groups { display: grid; gap: 8px; }
.admin-tab-group { display: grid; gap: 5px; }
.admin-tab-group > strong { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.admin-user-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-user-events {
  grid-column: 1 / -1;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
  margin-top: 2px;
}
.admin-user-event {
  display: grid;
  grid-template-columns: minmax(140px, .6fr) minmax(0, 1fr) auto;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 10px;
}
.admin-user-event span { color: var(--muted); }
.admin-settings-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.settings-note {
  grid-column: 1 / -1;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}
.admin-email-grid {
  display: grid;
  grid-template-columns: minmax(260px, .75fr) minmax(0, 1fr);
  gap: 12px;
}
.admin-chip-list {
  display: flex;
  align-content: flex-start;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px;
}
.admin-chip-list span {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 900;
  padding: 6px 9px;
}
.danger-text {
  color: var(--red);
}
.odoo-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 8px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 8px;
  font-size: 13px;
}

.primary-btn, .secondary-btn, .secondary-link {
  padding: 9px 12px;
  min-height: 38px;
  border-radius: 16px;
}
.primary-btn { background: var(--black); color: white; border-color: var(--black); }
.secondary-btn, .secondary-link { background: var(--paper); color: var(--black); }
.primary-btn:hover, .wide-link:hover { filter: brightness(.94); }
.icon-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-weight: 950;
  cursor: pointer;
}
.icon-btn:hover {
  border-color: rgba(24, 155, 159, .45);
  background: var(--teal-soft);
}

.empty-state {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 16px;
}
.empty-state h2 { font-family: "Sigmar", "Arial Black", sans-serif; font-size: 26px; }
.empty-state p { color: var(--muted); font-size: 13px; }
.hidden { display: none !important; }
.inspector-save-popover {
  position: sticky;
  top: 8px;
  z-index: 40;
  margin: 0 0 10px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  padding: 0;
  border: 1px solid var(--black);
  border-radius: 50%;
  background: var(--black);
  color: #fff;
  box-shadow: 0 14px 32px rgba(29, 29, 27, .24);
  cursor: pointer;
  transform: translateZ(0);
  transition: box-shadow .14s ease, transform .14s ease, filter .14s ease;
}
.inspector-save-popover:hover {
  filter: brightness(.92);
  transform: translateY(-1px);
}
.inspector-save-popover:active {
  transform: translateY(0);
}
.inspector-save-popover.is-dirty {
  background: var(--black);
  color: #fff;
  box-shadow: 0 14px 32px rgba(29, 29, 27, .26), 0 0 0 4px rgba(166, 255, 63, .22);
}
.inspector-save-popover.is-saving {
  opacity: .75;
  cursor: wait;
}
#floatingSaveBtn.inspector-save-popover,
#floatingSaveBtn.inspector-save-popover.is-dirty,
:root[data-theme="dark"] #floatingSaveBtn.inspector-save-popover {
  background: #1d1d1b;
  border-color: #1d1d1b;
  color: #fff;
}
.save-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 0;
  background: transparent;
  color: #fff;
}
.inspector-save-popover.is-dirty .save-icon {
  background: transparent;
  color: #fff;
}
.save-icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 5.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.detail-form {
  display: grid;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 14px;
  gap: 12px;
}
.detail-head h2 { font-size: 17px; }
#closeDetail, #closeNewDialog {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.detail-sections {
  display: grid;
  gap: 12px;
}
.detail-form .role-hidden,
.detail-form .role-hidden-section {
  display: none !important;
}
.excel-extra-fields {
  display: grid;
  gap: 12px;
  margin-top: 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: #fbfcfc;
  padding: 10px;
}
.excel-extra-fields summary {
  cursor: pointer;
  color: var(--black);
  font-size: 12px;
  font-weight: 950;
  list-style-position: inside;
}
.detail-section {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: #fbfcfc;
  padding: 12px;
}
.detail-section.role-editable-section,
.excel-extra-fields.has-editable-fields {
  border-left: 3px solid var(--teal);
}
.excel-extra-fields.has-editable-fields summary {
  color: var(--teal-dark);
}
.excel-extra-fields .detail-section {
  background: #fff;
}
.detail-section h3 {
  margin: 0 0 9px;
  color: var(--black);
  font-size: 13px;
  font-weight: 950;
}
.detail-section-help {
  margin: -3px 0 9px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
}
.production-owned-section {
  border-left: 3px solid var(--teal);
  background: var(--teal-soft);
}
.detail-takeback-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}
.detail-takeback-summary:empty {
  display: none;
}
.detail-takeback-summary div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--teal);
  border-radius: 7px;
  background: var(--paper);
}
.detail-takeback-summary span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
}
.detail-takeback-summary b {
  min-width: 0;
  color: var(--black);
  font-size: 11px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
@media (max-width: 520px) {
  .detail-takeback-summary { grid-template-columns: 1fr; }
}
label { min-width: 0; }
label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}
label.full { grid-column: 1 / -1; }
label input, label select, label textarea {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 7px;
  color: var(--black);
  font-size: 12px;
}
.etria-settings-panel input:disabled {
  opacity: 1;
  background: #f6f8f8;
  color: var(--black);
  cursor: default;
}
label.is-empty input,
label.is-empty select,
label.is-empty textarea {
  background: #fff8e7;
  border-color: rgba(249, 115, 22, .28);
}
label.is-required-missing {
  color: #9f241b;
}
label.is-required-missing input,
label.is-required-missing select,
label.is-required-missing textarea {
  background: rgba(215, 48, 39, .07);
  border-color: rgba(215, 48, 39, .48);
  box-shadow: 0 0 0 3px rgba(215, 48, 39, .08);
}
.address-lookup-label input {
  border-color: rgba(24, 155, 159, .34);
  background: #f7ffff;
}
.address-lookup-results {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fff;
}
.address-lookup-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: #fbfcfc;
  color: var(--black);
  cursor: pointer;
  text-align: left;
}
.address-lookup-result:hover {
  border-color: rgba(24, 155, 159, .45);
  background: var(--teal-soft);
}
.address-lookup-result span {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.address-lookup-result b,
.address-lookup-result em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.address-lookup-result b {
  font-size: 11px;
  font-weight: 950;
}
.address-lookup-result em,
.address-lookup-result strong,
.address-lookup-status {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}
.address-lookup-result strong {
  padding: 4px 6px;
  border-radius: 999px;
  background: var(--lime-soft);
  color: var(--black);
}
.address-lookup-status {
  padding: 8px;
}

.access-pole-panel {
  min-width: 0;
}
.access-layout {
  display: grid;
  grid-template-columns: minmax(210px, 260px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.access-pole-list {
  display: grid;
  gap: 8px;
  position: sticky;
  top: 92px;
}
.access-pole-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 54px;
  padding: 9px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--paper);
  color: var(--black);
  text-align: left;
  cursor: pointer;
}
.access-pole-card.active {
  border-color: rgba(24, 155, 159, .48);
  background: var(--teal-soft);
  box-shadow: 0 10px 26px rgba(24, 155, 159, .1);
}
.access-pole-card b {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--black);
  color: #fff;
  font-size: 11px;
  font-weight: 950;
}
.access-pole-card span {
  min-width: 0;
  font-size: 13px;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.access-pole-card em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}
.access-pole-detail {
  display: grid;
  gap: 12px;
}
.access-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.access-split {
  display: grid;
  grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr);
  gap: 12px;
}
.access-box {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: #fbfcfc;
  padding: 12px;
  min-width: 0;
}
.access-preview-table {
  max-width: 100%;
  overflow-x: auto;
}
.access-box h3 {
  margin: 0 0 9px;
  font-size: 13px;
}
.access-chip-list,
.access-field-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.access-chip-list span,
.access-field-list span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: #fff;
  color: var(--black);
  font-size: 11px;
  font-weight: 850;
}
.access-field-list span {
  background: var(--lime-soft);
}
textarea { resize: vertical; }
.detail-form .primary-btn { width: 100%; margin-top: 12px; }

dialog {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: 0 28px 90px rgba(0,0,0,.28);
  width: min(650px, calc(100vw - 30px));
  padding: 0;
}
dialog::backdrop { background: rgba(29,29,27,.38); }
.photo-preview-dialog {
  width: min(1120px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: hidden;
}
.photo-preview-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: calc(100vh - 30px);
  background: #fff;
}
.photo-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line-soft);
  padding: 12px 14px;
}
.photo-preview-head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.05;
}
.photo-preview-head span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}
.photo-preview-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.photo-preview-controls button,
.photo-preview-controls output {
  min-width: 36px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--black);
  display: grid;
  place-items: center;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 950;
}
.photo-preview-controls button {
  cursor: pointer;
}
.photo-preview-stage {
  min-height: 360px;
  max-height: calc(100vh - 112px);
  overflow: auto;
  display: grid;
  place-items: center;
  background: #f4f7f7;
  padding: 18px;
}
.photo-preview-stage img,
.photo-preview-stage iframe {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 150px);
  transform-origin: center center;
  transition: transform .12s ease;
}
.photo-preview-stage img {
  object-fit: contain;
}
.photo-preview-stage iframe {
  width: min(100%, 980px);
  height: calc(100vh - 155px);
  min-height: 420px;
  border: 0;
  border-radius: 12px;
  background: #fff;
}
.dialog-form { padding: 16px; }
menu { display: flex; justify-content: flex-end; gap: 8px; padding: 0; margin: 14px 0 0; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(80px);
  background: var(--black);
  color: white;
  padding: 10px 14px;
  opacity: 0;
  transition: .18s ease;
  z-index: 90;
  font-weight: 800;
  font-size: 13px;
  border-radius: 999px;
}

.completion-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.completion-metric {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 28px rgba(29, 29, 27, .04);
  padding: 13px;
}
.completion-metric span,
.completion-metric em {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}
.completion-metric b {
  display: block;
  font-size: 28px;
  line-height: 1;
  margin: 7px 0;
}
.completion-board {
  display: grid;
  gap: 10px;
}
.completion-card {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-left: 8px solid var(--orange);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 34px rgba(29, 29, 27, .05);
  padding: 14px;
  cursor: pointer;
}
.completion-card.score-missing { border-left-color: var(--red); }
.completion-card.score-partial { border-left-color: var(--orange); }
.completion-card.score-complete { border-left-color: var(--lime); }
.completion-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 48px rgba(29, 29, 27, .09);
}
.completion-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px;
  gap: 12px;
  align-items: start;
}
.completion-main h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
}
.completion-main p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.completion-score {
  text-align: right;
}
.completion-score b {
  display: block;
  font-size: 24px;
  line-height: 1;
}
.completion-score span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}
.pole-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0 9px;
}
.pole-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: #f2f4f4;
  color: var(--black);
  font-size: 11px;
  font-weight: 900;
}
.pole-chip.complete { background: var(--lime-soft); border-color: rgba(80, 150, 40, .18); }
.pole-chip.partial { background: rgba(249, 115, 22, .13); border-color: rgba(249, 115, 22, .25); }
.pole-chip.missing { background: rgba(215, 48, 39, .11); border-color: rgba(215, 48, 39, .24); }
.pole-chip em {
  color: var(--muted);
  font-style: normal;
  font-weight: 850;
}
.completion-missing {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.completion-missing-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  padding: 4px 5px;
  border-radius: 12px;
  background: rgba(215, 48, 39, .05);
}
.completion-missing-group.ok {
  background: var(--teal-soft);
}
.completion-missing-group b {
  color: var(--black);
  font-size: 10px;
  font-weight: 950;
}

.notifications-page {
  display: grid;
  gap: 12px;
}
.notification-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.notification-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 10px;
}
.notification-controls label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  min-width: 210px;
}
.notification-controls select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--black);
  padding: 6px 10px;
  font-weight: 850;
}
.notification-pole-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.notification-pole-card {
  display: grid;
  gap: 4px;
  min-height: 82px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--paper);
  color: var(--black);
  padding: 10px;
  text-align: left;
  cursor: pointer;
}
.notification-pole-card.active {
  border-color: rgba(24, 155, 159, .45);
  box-shadow: inset 0 0 0 2px var(--teal-soft);
}
.notification-pole-card span,
.notification-pole-card em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}
.notification-pole-card b {
  font-size: 24px;
  line-height: 1;
}
.notification-list {
  display: grid;
  gap: 8px;
}
.notification-card {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-left: 8px solid var(--orange);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 34px rgba(29, 29, 27, .05);
  padding: 13px;
  cursor: pointer;
}
.notification-card.severity-danger { border-left-color: var(--red); }
.notification-card.severity-info { border-left-color: var(--teal); }
.notification-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}
.notification-card-head b,
.notification-card-head span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notification-card-head b {
  font-size: 14px;
  font-weight: 950;
}
.notification-card-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  margin-top: 3px;
}
.notification-card-head em {
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
  padding: 4px 9px;
  white-space: nowrap;
}
.notification-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.notification-reasons span {
  border-radius: 999px;
  background: rgba(249, 115, 22, .12);
  border: 1px solid rgba(249, 115, 22, .18);
  color: var(--black);
  font-size: 11px;
  font-weight: 850;
  padding: 4px 8px;
}
.notification-card.severity-danger .notification-reasons span {
  background: rgba(215, 48, 39, .10);
  border-color: rgba(215, 48, 39, .20);
}
.notification-card.status-resolved,
.notification-card.status-ignored {
  opacity: .68;
}
.notification-action {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  margin-top: 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: #f8fafb;
  padding: 8px;
}
.notification-action b {
  color: var(--black);
  font-size: 11px;
  font-weight: 950;
}
.notification-action span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}
.notification-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}
.notification-source,
.notification-blocked,
.notification-ok,
.notification-status-pill {
  border-radius: 999px;
  background: #f2f4f4;
  padding: 4px 8px;
}
.notification-status-pill {
  background: var(--teal-soft);
  color: var(--teal-dark);
}
.notification-blocked {
  background: rgba(215, 48, 39, .10);
  color: var(--red);
}
.notification-ok {
  background: var(--lime-soft);
  color: var(--black);
}

.compact-kpis {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  margin-bottom: 14px;
}

.gestion-page {
  display: grid;
  gap: 14px;
}
.gestion-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
}
.gestion-action-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-left: 5px solid var(--orange);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 10px;
  cursor: pointer;
}
.gestion-action-card b,
.gestion-action-card span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}
.gestion-action-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.gestion-action-card em {
  max-width: 170px;
  border-radius: 999px;
  background: rgba(249, 115, 22, .12);
  color: var(--orange);
  padding: 4px 8px;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gestion-history-panel summary {
  cursor: pointer;
  color: var(--black);
  font-weight: 950;
}
.month-strip.compact {
  margin-top: 10px;
}

.month-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.month-strip button {
  min-height: 64px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--black);
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 3px;
}

.month-strip button:hover,
.month-strip button.active {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.month-strip span,
.month-strip b,
.month-strip em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.month-strip span {
  font-weight: 800;
}

.month-strip em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.excel-feature-map {
  display: grid;
  gap: 9px;
}

.excel-feature {
  border: 1px solid var(--line-soft);
  border-left: 7px solid var(--teal);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 12px;
}

.excel-feature.couvert_partiel { border-left-color: var(--orange); }
.excel-feature.a_generer { border-left-color: var(--red); }

.excel-feature-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.excel-feature-head b {
  display: block;
  font-size: 14px;
}

.excel-feature-head span,
.excel-feature small,
.excel-feature p {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.excel-feature-head em {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.excel-feature-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 9px 0;
}

.excel-feature-meta span,
.asset-chip {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: #f6f7f7;
  color: var(--muted);
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 900;
}

.excel-feature p {
  margin: 0 0 5px;
}

.asset-list {
  display: grid;
  gap: 8px;
  max-height: 560px;
  overflow: auto;
  padding-right: 4px;
}

.asset-summary {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(255,255,255,.96);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 9px;
}

.asset-summary b {
  display: block;
  margin-bottom: 7px;
}

.asset-summary div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.asset-card {
  border: 1px solid var(--line-soft);
  border-left: 6px solid var(--teal);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 10px;
}

.asset-card.a_traiter,
.asset-card.stock_a_verifier,
.asset-card.reserve_sans_stock,
.asset-card.a_planifier {
  border-left-color: var(--red);
}

.asset-card.pret,
.asset-card.stock,
.asset-card.parti_usine {
  border-left-color: var(--orange);
}

.asset-card.mes,
.asset-card.traite,
.asset-card.stock_ok,
.asset-card.sorti {
  border-left-color: var(--lime);
}

.asset-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.asset-top b {
  font-size: 13px;
  line-height: 1.25;
}

.asset-top span {
  font-size: 10px;
  font-weight: 950;
  color: var(--muted);
  white-space: nowrap;
}

.asset-card p,
.asset-card small {
  display: block;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
}

.mini-heading {
  margin: 14px 0 8px;
  font-size: 13px;
}

.route-panel {
  margin-bottom: 14px;
}

.delivery-planning-board {
  margin-bottom: 14px;
}

.delivery-day-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 10px;
}

.delivery-day {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: #fbfcfc;
  min-height: 210px;
  padding: 10px;
}

.delivery-day-card {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line-soft);
  border-left: 5px solid var(--orange);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 9px;
  cursor: pointer;
}

.delivery-day-card.planned {
  border-left-color: var(--teal);
}

.delivery-day-card b,
.delivery-day-card span,
.delivery-day-card em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.delivery-day-card b {
  font-size: 12px;
  font-weight: 950;
}
.delivery-day-card b.machine-primary {
  font-size: 15px;
  overflow-wrap: anywhere;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.delivery-day-card span,
.delivery-day-card em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.35;
}

.route-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.route-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(250px, .65fr);
  gap: 10px;
  align-items: start;
}

.route-list,
.route-issues,
.history-list {
  display: grid;
  gap: 7px;
}

.route-row,
.history-row {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 9px;
}

.route-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  cursor: pointer;
}

.route-row b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--lime-soft);
  font-size: 11px;
}

.route-row span,
.history-row span {
  min-width: 0;
  font-size: 12px;
  font-weight: 900;
}
.route-row .machine-primary,
.transport-stop-line .machine-primary,
.map-sale-line .machine-primary {
  display: block;
  color: var(--black);
  font-size: 14px;
  font-weight: 950;
  line-height: 1.15;
}

.route-row em,
.history-row .meta {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.35;
}

.column-history-dropdown {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.column-history-dropdown summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--black);
  font-size: 12px;
  font-weight: 950;
  list-style: none;
}

.column-history-dropdown summary::-webkit-details-marker {
  display: none;
}

.column-history-dropdown summary::after {
  content: "v";
  color: var(--muted);
  font-size: 14px;
}

.column-history-dropdown[open] summary::after {
  transform: rotate(180deg);
}

.column-history-dropdown summary span {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 11px;
}

.column-history-dropdown .list-stack {
  padding: 0 8px 8px;
}
.column-history-dropdown .notification-list,
.stock-reservation-table {
  padding: 0 8px 8px;
}
.admin-directory-details {
  grid-column: 1 / -1;
  margin-top: 0;
}
.admin-directory-details .admin-chip-list {
  padding: 0 8px 8px;
}
.stock-reservation-table {
  overflow-x: auto;
}

@media (min-width: 851px) {
  .role-flow-board .kanban-col .kanban-items,
  .etria-stage-board .etria-stage-col .kanban-items,
  .etria-parts-board,
  .notifications-page > .notification-list,
  .scoped-notifications-panel > .notification-list {
    max-height: min(64vh, 720px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
}

.route-issues h3 {
  margin: 0;
  font-size: 13px;
}

.history-row .top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.history-row time {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.status-planifie,
.status-confirme,
.status-en_transit,
.status-en_cours {
  background: rgba(37, 99, 235, .12);
  color: var(--blue);
}

.status-livre,
.status-ok {
  background: var(--lime-soft);
  color: var(--black);
}

.status-litige,
.status-casse,
.status-bloque {
  background: rgba(215, 48, 39, .12);
  color: var(--red);
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

:root[data-theme="dark"] .sidebar,
:root[data-theme="dark"] .inspector {
  background: rgba(14, 17, 18, .96);
}
:root[data-theme="dark"] .brand-block,
:root[data-theme="dark"] .topbar,
:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .kpi,
:root[data-theme="dark"] .today-card,
:root[data-theme="dark"] .today-metric,
:root[data-theme="dark"] .today-mini-list li,
:root[data-theme="dark"] .today-empty,
:root[data-theme="dark"] .metric,
:root[data-theme="dark"] .insight-tile,
:root[data-theme="dark"] .data-table,
:root[data-theme="dark"] .kanban-col,
:root[data-theme="dark"] .machine-card,
:root[data-theme="dark"] .calendar-chip,
:root[data-theme="dark"] .calendar-day,
:root[data-theme="dark"] .calendar-undated,
:root[data-theme="dark"] .delivery-day,
:root[data-theme="dark"] .delivery-day-card,
:root[data-theme="dark"] .list-item,
:root[data-theme="dark"] .journey-step,
:root[data-theme="dark"] .service-tabs button,
:root[data-theme="dark"] .sales-finance-page > .service-tabs,
:root[data-theme="dark"] .service-tab-panel,
:root[data-theme="dark"] .finance-months,
:root[data-theme="dark"] .photo-upload-card,
:root[data-theme="dark"] .quality-line,
:root[data-theme="dark"] .access-box,
:root[data-theme="dark"] .access-chip-list span,
:root[data-theme="dark"] .access-field-list span,
:root[data-theme="dark"] .month-strip button,
:root[data-theme="dark"] .route-create-panel,
:root[data-theme="dark"] .route-pool-column,
:root[data-theme="dark"] .route-proposal,
:root[data-theme="dark"] .route-card,
:root[data-theme="dark"] .stock-card,
:root[data-theme="dark"] .erp-card,
:root[data-theme="dark"] .access-card,
:root[data-theme="dark"] .dialog-form,
:root[data-theme="dark"] dialog,
:root[data-theme="dark"] .photo-preview-shell {
  background: var(--paper);
  border-color: var(--line);
  color: var(--black);
}
:root[data-theme="dark"] .today-metric,
:root[data-theme="dark"] .today-mini-list li,
:root[data-theme="dark"] .today-empty {
  background: #101416;
}
:root[data-theme="dark"] .journey-step b,
:root[data-theme="dark"] .service-tabs button em,
:root[data-theme="dark"] .sales-finance-page > .service-tabs button em,
:root[data-theme="dark"] .active-filter-bar span,
:root[data-theme="dark"] .status-pill,
:root[data-theme="dark"] .tag,
:root[data-theme="dark"] .pole-chip,
:root[data-theme="dark"] .asset-chip,
:root[data-theme="dark"] .missing-chip,
:root[data-theme="dark"] .v0-status-chip,
:root[data-theme="dark"] .tech-pill {
  background: #101416;
  border-color: var(--line);
  color: var(--black);
}
:root[data-theme="dark"] .access-field-list span,
:root[data-theme="dark"] .status-new_sale,
:root[data-theme="dark"] .status-livre,
:root[data-theme="dark"] .status-ok,
:root[data-theme="dark"] .pole-chip.complete,
:root[data-theme="dark"] .missing-chip.ok {
  background: rgba(200, 255, 105, .14);
  border-color: rgba(200, 255, 105, .24);
  color: var(--black);
}
:root[data-theme="dark"] .access-chip-list span {
  background: #111618;
}
:root[data-theme="dark"] .journey-step.active,
:root[data-theme="dark"] .access-pole-card.active {
  background: var(--teal-soft);
  border-color: rgba(38, 191, 195, .42);
}
:root[data-theme="dark"] .journey-step.active b,
:root[data-theme="dark"] .service-tabs button.active em,
:root[data-theme="dark"] .sales-finance-page > .service-tabs button.active em {
  background: rgba(14, 17, 18, .22);
  color: #0e1112;
}
:root[data-theme="dark"] .sales-finance-page > .service-tabs::before {
  box-shadow: none;
}
:root[data-theme="dark"] .sales-finance-page > .service-tabs button:hover {
  background: rgba(244, 247, 247, .06);
}
:root[data-theme="dark"] .sales-finance-page > .service-tabs button.active,
:root[data-theme="dark"] .sales-finance-page > .service-tabs button.active:hover {
  background: transparent;
  color: #0e1112;
}
:root[data-theme="dark"] .photo-upload-card.has-file,
:root[data-theme="dark"] .readonly-badge,
:root[data-theme="dark"] .factory-validation-pill.validated,
:root[data-theme="dark"] .production-validation-badge.validated {
  background: var(--lime-soft);
}
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] .multi-filter-toggle,
:root[data-theme="dark"] .search-wrap input,
:root[data-theme="dark"] .filters input {
  background: #101416;
  border-color: var(--line);
  color: var(--black);
}
:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder {
  color: rgba(244, 247, 247, .50);
}
:root[data-theme="dark"] .etria-settings-panel input:disabled {
  background: #151b1d;
}
:root[data-theme="dark"] .nav-btn,
:root[data-theme="dark"] .theme-toggle,
:root[data-theme="dark"] .secondary-btn,
:root[data-theme="dark"] .secondary-link,
:root[data-theme="dark"] .wide-btn,
:root[data-theme="dark"] .file-btn,
:root[data-theme="dark"] .photo-upload-actions a,
:root[data-theme="dark"] .photo-upload-actions button,
:root[data-theme="dark"] .photo-upload-btn,
:root[data-theme="dark"] .photo-preview-controls button,
:root[data-theme="dark"] .photo-preview-controls output {
  background: #111618;
  border-color: var(--line);
  color: var(--black);
}
:root[data-theme="dark"] .nav-btn.active,
:root[data-theme="dark"] .active-filter-bar button,
:root[data-theme="dark"] .primary-btn,
:root[data-theme="dark"] .segmented-control button.active,
:root[data-theme="dark"] .service-tabs button.active,
:root[data-theme="dark"] .mini-action-btn,
:root[data-theme="dark"] .doc-action-btn,
:root[data-theme="dark"] .mini-segmented button.active,
:root[data-theme="dark"] .convert-opportunity-btn,
:root[data-theme="dark"] .mini-choice button.active,
:root[data-theme="dark"] .factory-day-selector label.active,
:root[data-theme="dark"] .inspector-save-popover,
:root[data-theme="dark"] .access-pole-card b,
:root[data-theme="dark"] .segmented button.active {
  background: var(--black);
  border-color: var(--black);
  color: #0e1112;
}
:root[data-theme="dark"] .mini-action-btn.ghost {
  background: #111618;
  color: var(--black);
  border-color: var(--line);
}
:root[data-theme="dark"] .toast {
  background: var(--black);
  color: #0e1112;
}
:root[data-theme="dark"] .nav-btn.active span,
:root[data-theme="dark"] .map-sale-marker.ok,
:root[data-theme="dark"] .status-livre,
:root[data-theme="dark"] .status-ok {
  color: #0e1112;
}
:root[data-theme="dark"] .nav-btn span {
  background: rgba(244, 247, 247, .08);
}
:root[data-theme="dark"] table,
:root[data-theme="dark"] th,
:root[data-theme="dark"] td {
  border-color: var(--line);
  color: var(--black);
}
:root[data-theme="dark"] th {
  background: #111618;
}
:root[data-theme="dark"] td {
  background: var(--paper);
}
:root[data-theme="dark"] tbody tr:nth-child(even) td {
  background: rgba(244, 247, 247, .035);
}
:root[data-theme="dark"] tr:hover td {
  background: rgba(38, 191, 195, .13);
}
:root[data-theme="dark"] .map-side-panel,
:root[data-theme="dark"] .transport-stops-panel,
:root[data-theme="dark"] .leaflet-popup-content-wrapper {
  background: rgba(23, 27, 29, .96);
  color: var(--black);
}
:root[data-theme="dark"] .route-production-alert,
:root[data-theme="dark"] .transport-production-alert-panel {
  background: rgba(23, 27, 29, .92);
}
:root[data-theme="dark"] .route-production-alert.danger,
:root[data-theme="dark"] .transport-production-alert-panel.danger {
  border-color: rgba(255, 116, 88, .5);
  background: rgba(212, 60, 33, .17);
}
:root[data-theme="dark"] .route-production-alert.warning,
:root[data-theme="dark"] .transport-production-alert-panel.warning {
  border-color: rgba(255, 183, 77, .5);
  background: rgba(214, 128, 0, .17);
}
:root[data-theme="dark"] .route-production-alert.danger b,
:root[data-theme="dark"] .transport-production-tooltip.danger {
  color: #ff9b86;
}
:root[data-theme="dark"] .route-production-alert.warning b,
:root[data-theme="dark"] .transport-production-tooltip.warning {
  color: #ffc56b;
}
:root[data-theme="dark"] .photo-preview-stage {
  background: #0f1315;
}
:root[data-theme="dark"] .photo-preview-stage iframe,
:root[data-theme="dark"] .photo-preview-thumb,
:root[data-theme="dark"] .factory-validation-dot {
  background: #fff;
}

:root[data-theme="dark"] .multi-filter-menu,
:root[data-theme="dark"] .part-totals div,
:root[data-theme="dark"] .quality-metric,
:root[data-theme="dark"] .quality-score-card,
:root[data-theme="dark"] .quality-group,
:root[data-theme="dark"] .quality-address-panel,
:root[data-theme="dark"] .table-footnote,
:root[data-theme="dark"] .column-footnote,
:root[data-theme="dark"] .inconsistency-card,
:root[data-theme="dark"] .ticket-table-footer,
:root[data-theme="dark"] .segmented-control,
:root[data-theme="dark"] .etria-date-grid label,
:root[data-theme="dark"] .mini-segmented button,
:root[data-theme="dark"] .stock-cell,
:root[data-theme="dark"] .mrp-row,
:root[data-theme="dark"] .erp-list,
:root[data-theme="dark"] .logistics-ticket-grid div,
:root[data-theme="dark"] .excel-extra-fields,
:root[data-theme="dark"] .detail-section,
:root[data-theme="dark"] .excel-extra-fields .detail-section,
:root[data-theme="dark"] .address-lookup-results,
:root[data-theme="dark"] .address-lookup-result,
:root[data-theme="dark"] .map-delivery-legend,
:root[data-theme="dark"] .map-fallback,
:root[data-theme="dark"] .map-hover-card,
:root[data-theme="dark"] .transport-map-legend span,
:root[data-theme="dark"] .transport-route-candidates,
:root[data-theme="dark"] .transport-route-head,
:root[data-theme="dark"] .transport-factory-day,
:root[data-theme="dark"] .transport-factory-card,
:root[data-theme="dark"] .transport-factory-kpis span,
:root[data-theme="dark"] .route-create-panel,
:root[data-theme="dark"] .route-pool-column,
:root[data-theme="dark"] .route-proposal,
:root[data-theme="dark"] .completion-metric,
:root[data-theme="dark"] .completion-card,
:root[data-theme="dark"] .column-history-dropdown {
  background: var(--paper);
  border-color: var(--line);
  color: var(--black);
}
:root[data-theme="dark"] .transport-factory-card.missing,
:root[data-theme="dark"] .transport-factory-kpis .pending,
:root[data-theme="dark"] .transport-factory-kpis .missing {
  background: rgba(255, 154, 60, .10);
  border-color: rgba(255, 154, 60, .30);
}
:root[data-theme="dark"] .transport-factory-kpis .validated {
  background: rgba(200, 255, 105, .14);
  border-color: rgba(200, 255, 105, .24);
}
:root[data-theme="dark"] .transport-factory-kpis .shifted {
  background: rgba(255, 107, 97, .10);
  border-color: rgba(255, 107, 97, .32);
}
:root[data-theme="dark"] .transport-factory-card strong {
  background: #111618;
  color: var(--black);
}
:root[data-theme="dark"] .logistics-inline-form input,
:root[data-theme="dark"] .logistics-inline-form select,
:root[data-theme="dark"] .logistics-inline-form textarea {
  background: #101416;
  border-color: var(--line);
  color: var(--black);
}
:root[data-theme="dark"] .multi-filter-option:hover,
:root[data-theme="dark"] .multi-filter-clear:hover,
:root[data-theme="dark"] .address-lookup-result:hover {
  background: rgba(38, 191, 195, .13);
}
:root[data-theme="dark"] .active-filter-bar button,
:root[data-theme="dark"] .segmented-control button.active,
:root[data-theme="dark"] .mini-segmented button.active,
:root[data-theme="dark"] .factory-day-selector label.active,
:root[data-theme="dark"] .mini-choice button.active,
:root[data-theme="dark"] .segmented button.active {
  background: #f4f7f7;
  border-color: #f4f7f7;
  color: #0e1112;
}
:root[data-theme="dark"] .segmented-control button,
:root[data-theme="dark"] .mini-segmented button {
  color: var(--black);
}
:root[data-theme="dark"] .admin-matrix-head span,
:root[data-theme="dark"] .admin-role-grid article,
:root[data-theme="dark"] .admin-checklist div,
:root[data-theme="dark"] .notification-action {
  background: #111617;
}
:root[data-theme="dark"] .admin-matrix-row span {
  background: var(--paper);
}
:root[data-theme="dark"] .admin-chip-list span {
  background: rgba(38, 191, 195, .14);
  color: var(--teal-dark);
}
:root[data-theme="dark"] .finance-installations-panel .mini-choice.provision-choice button,
:root[data-theme="dark"] .attribution-month-panel .mini-choice.provision-choice button {
  background: #111618;
  border-color: rgba(244, 247, 247, .18);
  color: var(--muted);
  box-shadow: none;
}
:root[data-theme="dark"] .finance-installations-panel .mini-choice.provision-choice button:hover,
:root[data-theme="dark"] .attribution-month-panel .mini-choice.provision-choice button:hover {
  background: rgba(38, 191, 195, .13);
  border-color: rgba(38, 191, 195, .36);
  color: var(--black);
}
:root[data-theme="dark"] .finance-installations-panel .mini-choice.provision-choice button.active,
:root[data-theme="dark"] .attribution-month-panel .mini-choice.provision-choice button.active {
  background: rgba(38, 191, 195, .24);
  border-color: rgba(38, 191, 195, .70);
  color: var(--black);
}
:root[data-theme="dark"] .finance-installations-panel .mini-choice.provision-choice button[data-stock-gap="1"],
:root[data-theme="dark"] .attribution-month-panel .mini-choice.provision-choice button[data-stock-gap="1"] {
  background: rgba(255, 107, 97, .09);
  border-color: rgba(255, 107, 97, .38);
  color: #ffb0a8;
}
:root[data-theme="dark"] .finance-installations-panel .mini-choice.provision-choice button[data-stock-gap="1"]:hover,
:root[data-theme="dark"] .attribution-month-panel .mini-choice.provision-choice button[data-stock-gap="1"]:hover {
  background: rgba(255, 107, 97, .14);
  border-color: rgba(255, 107, 97, .52);
  color: #ffd0ca;
}
:root[data-theme="dark"] .finance-installations-panel .mini-choice.provision-choice button[data-stock-gap="1"].active,
:root[data-theme="dark"] .attribution-month-panel .mini-choice.provision-choice button[data-stock-gap="1"].active {
  background: rgba(255, 154, 61, .18);
  border-color: rgba(255, 154, 61, .62);
  color: var(--black);
}
:root[data-theme="dark"] .finance-installations-panel .mini-choice.provision-choice button em,
:root[data-theme="dark"] .attribution-month-panel .mini-choice.provision-choice button em {
  color: inherit;
}
:root[data-theme="dark"] .status-pipeline_contact,
:root[data-theme="dark"] .missing-chip.muted-chip,
:root[data-theme="dark"] .production-validation-badge,
:root[data-theme="dark"] .factory-validation-pill,
:root[data-theme="dark"] .role-badge {
  background: #101416;
  border-color: var(--line);
  color: var(--black);
}
:root[data-theme="dark"] .detail-next-action,
:root[data-theme="dark"] .card-next-action {
  background: rgba(245, 158, 11, .10);
}
:root[data-theme="dark"] .status-pipeline,
:root[data-theme="dark"] .status-delivery_planned,
:root[data-theme="dark"] .production-validation-badge.action,
:root[data-theme="dark"] .factory-validation-pill.action,
:root[data-theme="dark"] .v0-status-chip.ok,
:root[data-theme="dark"] .missing-focus.complete,
:root[data-theme="dark"] .etria-date-grid label.filled {
  background: rgba(38, 191, 195, .14);
  border-color: rgba(38, 191, 195, .28);
  color: var(--black);
}
:root[data-theme="dark"] .status-pipeline_hot,
:root[data-theme="dark"] .sale-done-no,
:root[data-theme="dark"] .production-validation-badge.pending,
:root[data-theme="dark"] .factory-validation-pill.pending,
:root[data-theme="dark"] .v0-status-chip.warning,
:root[data-theme="dark"] .logistics-ticket-grid .todo,
:root[data-theme="dark"] label.is-empty input,
:root[data-theme="dark"] label.is-empty select,
:root[data-theme="dark"] label.is-empty textarea {
  background: rgba(255, 154, 61, .13);
  border-color: rgba(255, 154, 61, .30);
  color: var(--black);
}
:root[data-theme="dark"] .logistics-ticket-grid .external-pending,
:root[data-theme="dark"] .machine-card .tag.external-owner {
  background: #151b1d;
  border-color: var(--line-soft);
  color: var(--muted);
}
:root[data-theme="dark"] .status-lost,
:root[data-theme="dark"] .production-validation-badge.shifted,
:root[data-theme="dark"] .v0-status-chip.danger,
:root[data-theme="dark"] .blocker-focus,
:root[data-theme="dark"] .missing-chip.danger,
:root[data-theme="dark"] label.is-required-missing input,
:root[data-theme="dark"] label.is-required-missing select,
:root[data-theme="dark"] label.is-required-missing textarea {
  background: rgba(255, 107, 97, .12);
  border-color: rgba(255, 107, 97, .30);
  color: var(--black);
}
:root[data-theme="dark"] .missing-chip,
:root[data-theme="dark"] .missing-chip.danger {
  color: #ff9a91;
}
:root[data-theme="dark"] .transport-route-candidates span,
:root[data-theme="dark"] .address-lookup-result strong {
  background: rgba(38, 191, 195, .14);
  color: var(--black);
}
:root[data-theme="dark"] .route-proposal.proposed {
  background: rgba(23, 27, 29, .86);
}
:root[data-theme="dark"] .route-proposal.proposed:hover,
:root[data-theme="dark"] .route-proposal.validated:hover {
  background: rgba(38, 191, 195, .13);
}
:root[data-theme="dark"] .route-proposal.validated,
:root[data-theme="dark"] .factory-validation-control.validated .factory-validation-dot,
:root[data-theme="dark"] .photo-upload-card.has-file {
  background: rgba(200, 255, 105, .14);
  border-color: rgba(200, 255, 105, .28);
}
:root[data-theme="dark"] .factory-validation-control.validated .factory-validation-dot,
:root[data-theme="dark"] .calendar-chip .factory-validation-control.validated .factory-validation-dot {
  background: #26bfc3;
  border-color: #26bfc3;
  box-shadow: 0 0 0 2px rgba(200, 255, 105, .22);
}
:root[data-theme="dark"] .calendar-chip .factory-validation-control.validated .factory-validation-dot {
  box-shadow: 0 0 0 2px rgba(200, 255, 105, .22);
}
:root[data-theme="dark"] .factory-validation-control.action .factory-validation-dot,
:root[data-theme="dark"] .factory-validation-control.pending .factory-validation-dot {
  background: #101416;
}
:root[data-theme="dark"] .production-ready-control.validated .factory-validation-dot {
  background: #26bfc3;
  border-color: #26bfc3;
  box-shadow: 0 0 0 2px rgba(38, 191, 195, .28);
}
:root[data-theme="dark"] .production-ready-control.action .factory-validation-dot,
:root[data-theme="dark"] .production-ready-control.pending .factory-validation-dot,
:root[data-theme="dark"] .production-ready-control.shifted .factory-validation-dot {
  background: rgba(38, 191, 195, .12);
  border-color: rgba(38, 191, 195, .5);
}
:root[data-theme="dark"] .production-ready-control.validated .factory-validation-label {
  color: #8eecef;
}
:root[data-theme="dark"] .production-ready-control.action .factory-validation-label,
:root[data-theme="dark"] .production-ready-control.pending .factory-validation-label,
:root[data-theme="dark"] .production-ready-control.shifted .factory-validation-label {
  color: #8eecef;
}
:root[data-theme="dark"] .production-ready-pill.validated,
:root[data-theme="dark"] .production-ready-pill.pending,
:root[data-theme="dark"] .production-ready-pill.action,
:root[data-theme="dark"] .production-ready-pill.shifted {
  border-color: rgba(38, 191, 195, .32);
  background: rgba(38, 191, 195, .12);
  color: #8eecef;
}
:root[data-theme="dark"] .map-delivery-legend,
:root[data-theme="dark"] .map-hover-card,
:root[data-theme="dark"] .leaflet-tooltip.richHoverTooltip {
  box-shadow: 0 18px 44px rgba(0, 0, 0, .34);
}
:root[data-theme="dark"] .photo-preview-thumb {
  background: #101416;
}
:root[data-theme="dark"] .column-history-dropdown summary {
  background: #111618;
  color: var(--black);
}
:root[data-theme="dark"] .column-history-dropdown summary span {
  background: rgba(244, 247, 247, .08);
  color: var(--muted);
}
:root[data-theme="dark"] .notification-source {
  background: #101416;
}
:root[data-theme="dark"] .notification-ok {
  background: rgba(200, 255, 105, .14);
  color: var(--black);
}
:root[data-theme="dark"] .notification-reasons span {
  background: rgba(255, 154, 61, .13);
  border-color: rgba(255, 154, 61, .30);
}
:root[data-theme="dark"] .notification-card.severity-danger .notification-reasons span,
:root[data-theme="dark"] .notification-blocked {
  background: rgba(255, 107, 97, .12);
  border-color: rgba(255, 107, 97, .30);
}
:root[data-theme="dark"] .nav-btn.active,
:root[data-theme="dark"] .service-tabs button.active,
:root[data-theme="dark"] .active-filter-bar button,
:root[data-theme="dark"] .primary-btn,
:root[data-theme="dark"] .mini-action-btn,
:root[data-theme="dark"] .doc-action-btn,
:root[data-theme="dark"] .convert-opportunity-btn,
:root[data-theme="dark"] .inspector-save-popover {
  background: rgba(38, 191, 195, .22);
  border-color: rgba(38, 191, 195, .52);
  color: var(--black);
}
:root[data-theme="dark"] .primary-btn,
:root[data-theme="dark"] .mini-action-btn,
:root[data-theme="dark"] .doc-action-btn,
:root[data-theme="dark"] .convert-opportunity-btn,
:root[data-theme="dark"] .inspector-save-popover {
  background: #1fa9ad;
  border-color: #26bfc3;
  color: #061214;
}
:root[data-theme="dark"] .nav-btn.active span,
:root[data-theme="dark"] .service-tabs button.active em,
:root[data-theme="dark"] .sales-finance-page > .service-tabs button.active em {
  background: rgba(14, 17, 18, .36);
  color: var(--black);
}
:root[data-theme="dark"] .sales-finance-page > .service-tabs::before {
  background: rgba(38, 191, 195, .24);
  box-shadow: none;
}
:root[data-theme="dark"] .sales-finance-page > .service-tabs button.active,
:root[data-theme="dark"] .sales-finance-page > .service-tabs button.active:hover {
  color: var(--black);
}
:root[data-theme="dark"] .planning-month-controls .secondary-btn,
:root[data-theme="dark"] .planning-month-controls .compact-btn,
:root[data-theme="dark"] .icon-btn {
  background: #111618;
  border-color: var(--line);
  color: var(--black);
}

@media (max-width: 1500px) {
  .app-shell { grid-template-columns: 220px minmax(600px, 1fr); }
  body.single-workspace-mode .app-shell { grid-template-columns: minmax(0, 1fr); }
  .inspector {
    position: fixed;
    z-index: 80;
    right: 0;
    top: 124px;
    bottom: 0;
    width: min(390px, 94vw);
    transform: translateX(100%);
    transition: .18s ease;
  }
  .inspector.open { transform: none; }
  .inspector.open #closeDetail {
    position: fixed;
    top: 136px;
    right: 90px;
    z-index: 95;
    box-shadow: var(--shadow);
  }
  .filters { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
  .address-audit-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1600px) and (min-width: 851px) {
  .topbar {
    grid-template-columns: minmax(180px, 1fr) 110px 112px 110px 44px minmax(130px, .45fr) auto;
  }
  .topbar-theme-toggle { grid-template-columns: 1fr; padding: 7px; }
  .topbar-theme-toggle strong { display: none; }
  .mobile-filters-toggle {
    display: flex;
    min-height: 36px;
  }
  .topbar:not(.filters-open) .filters { display: none; }
  .topbar .filters {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
  }
}

@media (min-width: 1051px) and (max-width: 1240px) {
  .route-map-simple .transport-map-layout {
    grid-template-columns: minmax(350px, 1fr) minmax(430px, .95fr);
    height: min(720px, calc(100vh - 165px));
    min-height: 590px;
  }
  .route-map-simple .transport-map-shell,
  .route-map-simple .transport-map {
    min-height: 100%;
    height: 100%;
  }
  .route-map-simple .transport-stops-panel {
    max-height: 100%;
  }
}

@media (min-width: 851px) and (max-width: 1050px) {
  .route-map-simple .transport-map-layout {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }
  .route-map-simple .transport-map-shell,
  .route-map-simple .transport-map {
    min-height: 460px;
    height: 460px;
  }
  .route-map-simple .transport-stops-panel {
    max-height: none;
  }
}

@media (max-width: 1200px) {
  .route-map-commandbar {
    grid-template-columns: minmax(220px, 1fr) auto;
  }
  .route-map-coverage { grid-column: 1 / -1; }
  .today-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .today-grid { grid-template-columns: 1fr; }
  .admin-access-layout { grid-template-columns: 1fr; }
  .admin-persona-brief { grid-template-columns: 1fr 1fr; }
  .admin-persona-summary { grid-column: 1 / -1; }
  .admin-user-editor {
    padding: 16px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .today-card .today-card-metrics:has(.today-metric:nth-child(4)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 850px) {
  .app-shell { display: block; }
  .sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 8px;
    min-height: auto;
    max-height: none;
    position: static;
    overflow: visible;
    padding: 10px 12px 0;
    border-right: 0;
  }
  .brand-block {
    min-width: 0;
    min-height: 42px;
    margin: 0;
    padding: 6px 9px;
    border-radius: 12px;
    box-shadow: none;
  }
  .brand-logo {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
  }
  .brand-logo-img {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }
  .brand-logo-type span,
  .brand-logo-type strong {
    font-size: 15px;
  }
  .brand-block p { display: none; }
  .nav-list {
    grid-column: 1 / -1;
    display: flex;
    gap: 6px;
    min-width: 0;
    margin: 0;
    padding: 0 0 8px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }
  .nav-btn {
    display: flex;
    flex: 0 0 auto;
    min-height: 36px;
    gap: 6px;
    padding: 7px 9px;
    border-radius: 12px;
    white-space: nowrap;
  }
  .nav-btn span {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    font-size: 10px;
  }
  .topbar-theme-toggle {
    width: 100%;
    min-height: 38px;
    grid-template-columns: 24px minmax(0, 1fr);
    padding: 7px 9px;
    border-radius: 12px;
  }
  .topbar-theme-toggle span {
    width: 24px;
    height: 24px;
  }
  .topbar-theme-toggle strong { display: block; }
  .inspector { top: 0; }
  .inspector.open #closeDetail { top: 14px; }
  .production-factory-board > .panel-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }
  .production-factory-board > .panel-head > * {
    min-width: 0;
    max-width: 100%;
  }
  .production-factory-board > .panel-head .planning-field-select {
    width: 100%;
    grid-template-columns: 80px minmax(0, 1fr);
  }
  .production-factory-board > .panel-head .planning-month-controls {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    width: 100%;
    gap: 6px;
  }
  .production-factory-board > .panel-head .planning-month-controls span {
    min-width: 0;
  }
  .workspace { max-height: none; padding: 12px; }
  .topbar {
    grid-template-columns: minmax(0, 1fr) minmax(118px, .72fr);
    margin: 0 0 12px;
    padding-top: 0;
  }
  .topbar > .search-wrap,
  .topbar > .role-context,
  .topbar > .filters,
  .topbar > .logout-btn,
  .topbar > .active-filter-bar { grid-column: 1 / -1; }
  .topbar > .mobile-filters-toggle { grid-column: 1; }
  .topbar > .data-refresh { grid-column: 2; }
  .topbar > .topbar-theme-toggle { grid-column: 1; }
  .topbar > .session-identity { grid-column: 2; }
  .session-identity { border-left: 0; border-top: 3px solid var(--teal); padding: 7px 9px; }
  .logout-btn { width: 100%; }
  .preview-banner { align-items: stretch; flex-direction: column; }
  .preview-banner .preview-actions { width: 100%; flex-direction: column; }
  .preview-banner .secondary-btn { width: 100%; }
  #view-dashboard > .view-head {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }
  #view-dashboard > .view-head #generatedAt {
    padding: 0;
    white-space: normal;
  }
  .split-grid, .finance-grid, .demand-grid, .ticket-toolbar, .v0-boundary-panel { grid-template-columns: 1fr; }
  .mobile-filters-toggle { display: flex; }
  .topbar:not(.filters-open) .filters { display: none; }
  .kpi-grid, .notification-kpis, .today-hero, .today-card-metrics { grid-template-columns: 1fr 1fr; }
  .insight-grid, .trust-grid { grid-template-columns: 1fr 1fr; }
  .kanban-grid, .week-grid, .opportunity-board, .sales-map-layout, .transport-map-layout, .transport-route-board, .workflow-columns, .priority-lanes, .etria-stage-grid, .it-column-board, .stock-grid, .erp-status, .erp-mini-grid, .route-grid, .journey-strip, .delivery-day-grid, .inconsistency-summary, .inconsistency-list, .access-layout, .access-split, .notification-pole-grid { grid-template-columns: 1fr; }
  .month-calendar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .action-grid { grid-template-columns: 1fr; }
  .admin-email-grid { grid-template-columns: 1fr; }
  .admin-persona-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-persona-brief { grid-template-columns: 1fr; }
  .admin-persona-summary { grid-column: auto; }
  .completion-summary, .quality-overview, .address-review-list { grid-template-columns: 1fr 1fr; }
  .address-audit-panel { grid-template-columns: 1fr; }
  .access-pole-list { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .access-summary-grid { grid-template-columns: 1fr; }
  .demand-row { grid-template-columns: minmax(66px, 1fr) repeat(4, minmax(48px, .7fr)); }
  .factory-capacity-table .demand-row { grid-template-columns: minmax(70px, .8fr) repeat(4, minmax(104px, 1fr)) minmax(126px, 1fr); }
  .sales-map-shell, .sales-map, .map-side-panel, .transport-map-shell, .transport-map, .transport-stops-panel { min-height: 460px; }
  .transport-route-board { display: grid; grid-template-columns: 1fr; overflow: visible; }
  .route-pool-column, .route-proposal.route-column { flex: initial; height: auto; max-height: none; }
  .route-map-simple .transport-map-layout { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .route-map-simple .transport-map-shell, .route-map-simple .transport-map { min-height: 420px; height: 420px; }
  .route-map-commandbar { grid-template-columns: 1fr; }
  .route-map-coverage { grid-column: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route-map-coverage span:nth-child(3) { border-left: 0; border-top: 1px solid var(--line-soft); }
  .route-map-coverage span:nth-child(4) { border-top: 1px solid var(--line-soft); }
  .route-month-picker { grid-template-columns: 34px minmax(0, 1fr) 34px; }
  .route-map-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route-map-flow span:nth-child(3) { border-left: 0; border-top: 1px solid var(--line-soft); }
  .route-map-flow span:nth-child(4) { border-top: 1px solid var(--line-soft); }
  .route-map-legend-overlay { display: none; }
  .route-map-stop { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .route-map-stop time { grid-column: 3; }
  .route-map-stop small { grid-column: 2 / 4; }
  .route-map-stop-actions { grid-column: 2 / 4; grid-row: 3; justify-content: flex-end; }
  .route-map-chip-strip { grid-template-columns: 1fr; max-height: none; }
  .route-map-create-panel,
  .route-map-create-panel .route-create-head,
  .route-map-create-panel .route-settings-footer { grid-template-columns: 1fr; }
  .route-map-create-panel .route-create-actions { grid-template-columns: 1fr; }
  .route-map-create-panel .route-settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route-map-create-panel .route-setting-actions { justify-content: stretch; }
  .route-map-create-panel .route-setting-actions button { flex: 1 1 140px; }
  .route-map-save-row { grid-template-columns: 1fr; }
  .ticket-toolbar { position: static; }
  .service-tabs {
    overflow: visible;
    flex-wrap: wrap;
    padding-bottom: 4px;
  }
  .service-tabs button {
    flex: 1 1 min(46%, 190px);
    justify-content: center;
    min-width: 0;
  }
  .sales-finance-page > .service-tabs {
    width: 100%;
  }
  .technical-grid,
  .etria-date-grid,
  .gestion-action-card {
    grid-template-columns: 1fr;
  }
  .it-machine-finder {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .it-machine-finder em {
    grid-column: 1 / -1;
  }
  .gestion-action-card em {
    max-width: 100%;
    justify-self: start;
  }
}

@media (max-width: 760px) {
  .panel > .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .filters {
    grid-template-columns: 1fr;
  }
  .admin-user-fields,
  .admin-permission-grid { grid-template-columns: 1fr; }
  .admin-user-event { grid-template-columns: 1fr; gap: 2px; }
  .multi-filter-toggle {
    min-height: 42px;
  }
  .multi-filter-toggle span,
  .multi-filter-toggle b {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }
  .today-hero,
  .today-card-metrics,
  .today-card .today-card-metrics:has(.today-metric:nth-child(4)) {
    grid-template-columns: 1fr;
  }
  .today-mini-list li {
    grid-template-columns: 1fr;
  }
  .compact-quality,
  .address-review-list {
    grid-template-columns: 1fr;
  }
  .table-footnote {
    align-items: flex-start;
    flex-direction: column;
  }
  .panel .responsive-table,
  .data-table .responsive-table,
  .finance-product-gains .responsive-table,
  .gestion-table {
    min-width: 0;
  }
  .panel .responsive-table thead,
  .data-table .responsive-table thead {
    display: none;
  }
  .panel .responsive-table tbody,
  .data-table .responsive-table tbody {
    display: grid;
    gap: 8px;
  }
  .panel .responsive-table tr,
  .data-table .responsive-table tr {
    display: grid;
    gap: 0;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-md);
    background: var(--paper);
    overflow: visible;
  }
  .panel .responsive-table td,
  .data-table .responsive-table td {
    display: grid;
    grid-template-columns: minmax(92px, .42fr) minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    border-bottom: 1px solid var(--line-soft);
    padding: 8px 10px;
    font-size: 11px;
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal;
  }
  .panel .responsive-table td *,
  .data-table .responsive-table td * {
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal;
  }
  .panel .responsive-table td:last-child,
  .data-table .responsive-table td:last-child {
    border-bottom: 0;
  }
  .panel .responsive-table td::before,
  .data-table .responsive-table td::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-weight: 950;
  }
  .ticket-data-board .responsive-table,
  .ticket-table .responsive-table {
    display: table;
    min-width: 980px;
  }
  .ticket-data-board .responsive-table thead,
  .ticket-table .responsive-table thead {
    display: table-header-group;
  }
  .ticket-data-board .responsive-table tbody,
  .ticket-table .responsive-table tbody {
    display: table-row-group;
  }
  .ticket-data-board .responsive-table tr,
  .ticket-table .responsive-table tr {
    display: table-row;
    border: 0;
    border-radius: 0;
  }
  .ticket-data-board .responsive-table td,
  .ticket-table .responsive-table td {
    display: table-cell;
    border-bottom: 1px solid var(--line-soft);
  }
  .ticket-data-board .responsive-table td::before,
  .ticket-table .responsive-table td::before {
    display: none;
  }
}
