:root {
  color-scheme: light;
  --header-surface: #ffffff;
  --header-ink: #243951;
  --header-muted: #60738a;
  --header-line: #dce5ef;
  --header-hover: #f2f5f9;
  --sidebar-surface: #071d3b;
  --sidebar-ink: #e8f0fa;
  --sidebar-active: #176df1;
  --sidebar-hover: #0b376f;
  --ink: #152033;
  --ink-strong: #0b1628;
  --muted: #647084;
  --muted-strong: #475569;
  --line: #dbe4ee;
  --line-soft: #e8eef5;
  --line-strong: #b9c7d8;
  --navy: #11324d;
  --navy-strong: #0b253c;
  --brand: #1f5c99;
  --accent: #16815f;
  --accent-soft: #dff6ec;
  --panel: #ffffff;
  --panel-raised: #fbfdff;
  --page: #f3f6fa;
  --row: #f8fbfd;
  --row-strong: #eef7fb;
  --green: #147a45;
  --green-bg: #def7ea;
  --amber: #a15c07;
  --amber-bg: #fff3c4;
  --red: #b42318;
  --red-bg: #fee8e6;
  --shadow: 0 16px 36px rgba(17, 36, 61, 0.08);
  --shadow-soft: 0 8px 20px rgba(17, 36, 61, 0.06);
  --radius: 8px;
  --radius-sm: 6px;
}

/* Customer overview: compact enterprise workbench */
.customer-management-page {
  gap: 10px;
}

.customer-management-heading {
  min-height: 58px;
  padding: 8px 14px;
  border: 1px solid #d9e3ef;
  border-left: 3px solid #2674d9;
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
}

.customer-management-title-line {
  display: flex;
  align-items: baseline;
  gap: 18px;
}

.customer-management-title h2 {
  margin: 0;
  color: #102746;
  font-size: 22px;
  line-height: 1.2;
}

.customer-management-title-line span,
.customer-management-title > span {
  color: #74859c;
  font-size: 12px;
}

.customer-management-title > span {
  display: block;
  margin-top: 4px;
}

.customer-management-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
}

.customer-management-heading-actions .text-command-button,
.customer-management-heading-actions .primary-button {
  min-height: 34px;
  padding: 0 13px;
  border: 0;
  border-left: 1px solid #dce5ef;
  border-radius: 0;
  background: transparent;
  color: #1765c1;
  box-shadow: none;
  font-size: 12px;
}

.customer-management-heading-actions button:first-child {
  border-left: 0;
}

.customer-management-heading-actions button:hover {
  background: #edf5ff;
}

.customer-management-heading-actions svg {
  width: 16px;
  height: 16px;
}

.customer-management-nav {
  min-height: 40px;
  padding: 3px 8px;
  border: 1px solid #d9e3ef;
  border-left: 3px solid #2674d9;
  border-radius: 4px;
  background: #fff;
  gap: 2px;
}

.customer-management-nav button {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 3px;
  font-size: 12px;
}

.customer-management-nav button svg {
  width: 15px;
  height: 15px;
}

#customerManagementOverviewPanel {
  display: grid;
  gap: 10px;
}

.customer-management-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid #d9e3ef;
  border-radius: 4px;
  background: #fff;
}

.customer-management-kpi {
  min-width: 0;
  min-height: 84px;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-right: 1px solid #d9e3ef;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.customer-management-kpi:last-child {
  border-right: 0;
}

.customer-management-kpi > div {
  min-width: 0;
}

.customer-management-kpi span,
.customer-management-kpi small {
  display: block;
}

.customer-management-kpi span {
  color: #41546e;
  font-size: 12px;
  font-weight: 700;
}

.customer-management-kpi strong {
  display: block;
  margin: 4px 0 3px;
  color: #126ad1;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.customer-management-kpi small {
  overflow: hidden;
  color: #7c8ba0;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-management-kpi .customer-kpi-icon {
  order: 2;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf5ff;
  color: #176ff2;
}

.customer-management-kpi:nth-child(3) .customer-kpi-icon,
.customer-management-kpi:nth-child(4) .customer-kpi-icon {
  background: #e9f8f6;
  color: #07968e;
}

.customer-management-kpi .customer-kpi-icon svg {
  width: 18px;
  height: 18px;
}

.customer-overview-main-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.03fr 1.28fr;
  gap: 10px;
  align-items: stretch;
}

.customer-overview-card,
.customer-management-panel {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d9e3ef;
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
}

.customer-overview-card-heading,
.customer-overview-table-heading {
  min-height: 46px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e1e8f0;
}

.customer-overview-card-heading h3,
.customer-overview-table-heading h3 {
  margin: 0;
  color: #142a47;
  font-size: 14px;
  line-height: 1.25;
}

.customer-overview-card-heading span,
.customer-overview-table-heading span {
  display: block;
  margin-top: 2px;
  color: #7b8aa0;
  font-size: 10px;
}

.inline-link-button,
.customer-overview-filter-toggle {
  min-height: 28px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #1765c1;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.inline-link-button:hover,
.customer-overview-filter-toggle:hover {
  background: #edf5ff;
}

.inline-link-button svg,
.customer-overview-filter-toggle svg {
  width: 14px;
  height: 14px;
}

.customer-overview-funnel {
  padding: 3px 12px 7px;
}

.customer-funnel-step {
  min-height: 42px;
  padding: 6px 0;
  display: grid;
  grid-template-columns: 14px 92px minmax(60px, 1fr) 34px;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid #e8edf3;
  background: transparent;
  cursor: pointer;
}

.customer-funnel-step:last-child {
  border-bottom: 0;
}

.customer-funnel-index {
  width: 7px;
  height: 7px;
  overflow: hidden;
  border-radius: 50%;
  background: #f59e0b;
  color: transparent;
}

.customer-funnel-step:nth-child(3) .customer-funnel-index,
.customer-funnel-step:nth-child(4) .customer-funnel-index {
  background: #07968e;
}

.customer-funnel-step:nth-child(5) .customer-funnel-index {
  background: #176ff2;
}

.customer-funnel-copy {
  min-width: 0;
}

.customer-funnel-copy strong,
.customer-funnel-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-funnel-copy strong {
  color: #31465f;
  font-size: 11px;
}

.customer-funnel-copy small {
  margin-top: 2px;
  color: #8190a3;
  font-size: 9px;
}

.customer-funnel-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 4px;
  background: #e7edf3;
}

.customer-funnel-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #f59e0b;
}

.customer-funnel-step:nth-child(3) .customer-funnel-bar i,
.customer-funnel-step:nth-child(4) .customer-funnel-bar i {
  background: #07968e;
}

.customer-funnel-step:nth-child(5) .customer-funnel-bar i {
  background: #176ff2;
}

.customer-funnel-count {
  color: #1e3552;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.customer-overview-map-card {
  position: relative;
}

.customer-overview-map {
  height: 238px;
  background: #edf3f8;
}

.customer-overview-map-legend {
  position: absolute;
  left: 10px;
  bottom: 9px;
  z-index: 500;
  padding: 5px 7px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid #d9e3ef;
  border-radius: 3px;
  background: rgb(255 255 255 / 92%);
  color: #52657e;
  font-size: 10px;
}

.customer-overview-map-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.customer-overview-map-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #176ff2;
}

.customer-overview-map-legend i.is-old {
  background: #07968e;
}

.customer-overview-today {
  min-height: 238px;
  max-height: 238px;
  overflow: auto;
}

.customer-today-row {
  min-height: 53px;
  padding: 7px 11px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #e6ecf3;
  cursor: pointer;
}

.customer-today-row:last-child {
  border-bottom: 0;
}

.customer-today-row:hover {
  background: #f5f9fe;
}

.customer-today-time {
  color: #126ad1;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.customer-today-time::before {
  content: "";
  width: 7px;
  height: 7px;
  margin: 0 auto 3px;
  display: block;
  border-radius: 50%;
  background: #176ff2;
}

.customer-today-copy {
  min-width: 0;
}

.customer-today-copy strong,
.customer-today-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-today-copy strong {
  color: #263c58;
  font-size: 11px;
}

.customer-today-copy span {
  margin-top: 3px;
  color: #78889d;
  font-size: 9px;
}

.customer-today-status {
  padding: 3px 4px;
  border: 1px solid #a8c9f2;
  border-radius: 3px;
  color: #1765c1;
  font-size: 9px;
  text-align: center;
  white-space: nowrap;
}

.customer-overview-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 10px;
  align-items: start;
}

.customer-overview-filter-toggle {
  border: 1px solid #cddded;
  padding: 0 9px;
}

.customer-management-toolbar {
  display: none;
  grid-template-columns: minmax(220px, 1fr) repeat(3, 150px) auto;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid #dfe7f0;
  background: #f7f9fc;
}

.customer-management-toolbar.is-open {
  display: grid;
}

.customer-management-toolbar label {
  min-width: 0;
}

.customer-management-toolbar label > span {
  display: block;
  margin-bottom: 3px;
  color: #65768c;
  font-size: 9px;
  font-weight: 700;
}

.customer-management-toolbar input,
.customer-management-toolbar select,
.customer-management-toolbar button {
  min-height: 32px;
}

.customer-management-search {
  position: relative;
}

.customer-management-search svg {
  position: absolute;
  left: 9px;
  bottom: 8px;
  width: 15px;
  height: 15px;
  color: #6f829a;
}

.customer-management-search input {
  width: 100%;
  padding-left: 31px;
}

.customer-management-table-wrap {
  min-height: 0;
  max-height: 386px;
  overflow: auto;
}

.customer-management-table {
  min-width: 1080px;
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.customer-management-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 34px;
  padding: 0 8px;
  border-bottom: 1px solid #dbe4ee;
  background: #f3f6fa;
  color: #60728a;
  font-size: 10px;
  text-align: left;
}

.customer-management-table td {
  height: 46px;
  padding: 6px 8px;
  border-bottom: 1px solid #e4eaf1;
  color: #31455f;
  font-size: 10px;
  vertical-align: middle;
}

.customer-management-table tbody tr:hover td {
  background: #f7faff;
}

.customer-management-table th:nth-child(1) { width: 180px; }
.customer-management-table th:nth-child(2) { width: 82px; }
.customer-management-table th:nth-child(3) { width: 65px; }
.customer-management-table th:nth-child(4) { width: 120px; }
.customer-management-table th:nth-child(5) { width: 82px; }
.customer-management-table th:nth-child(6) { width: 108px; }
.customer-management-table th:nth-child(7) { width: 90px; }
.customer-management-table th:nth-child(8) { width: 150px; }
.customer-management-table th:nth-child(9) { width: 116px; }
.customer-management-table th:nth-child(10) { width: 76px; }

.customer-management-table td strong,
.customer-management-table td small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-management-table td strong {
  color: #172d49;
  font-size: 10px;
}

.customer-management-table td small {
  margin-top: 2px;
  color: #7b8ba0;
  font-size: 9px;
}

.customer-type-tag,
.customer-stage-tag {
  width: fit-content;
  padding: 2px 5px;
  border: 1px solid #b9d3f2;
  border-radius: 3px;
  color: #1765c1;
  background: #f3f8ff;
  font-size: 9px;
  white-space: nowrap;
}

.customer-type-tag.is-old,
.customer-stage-tag.is-success {
  border-color: #a9d9cd;
  color: #137e69;
  background: #f0fbf7;
}

.customer-stage-tag.is-warning {
  border-color: #f3c37e;
  color: #c77508;
  background: #fff8ec;
}

.customer-table-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.customer-table-actions button {
  min-height: 26px;
  padding: 0 6px;
  border: 1px solid #a9c9ef;
  border-radius: 3px;
  background: #fff;
  color: #1765c1;
  font-size: 9px;
}

.customer-overview-side-stack {
  display: grid;
  gap: 10px;
}

.customer-overview-side-card {
  min-height: 180px;
}

#customerOverviewCompetitors,
#customerOverviewEquipment {
  padding: 7px 11px;
}

.customer-side-rank,
.customer-equipment-row {
  min-height: 31px;
  display: grid;
  grid-template-columns: minmax(80px, 1fr) 74px 34px;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid #e9eef4;
  color: #31455f;
  font-size: 10px;
}

.customer-side-rank:last-child,
.customer-equipment-row:last-child {
  border-bottom: 0;
}

.customer-side-rank strong,
.customer-equipment-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-side-rank span,
.customer-equipment-row span {
  height: 5px;
  overflow: hidden;
  border-radius: 4px;
  background: #e7edf3;
}

.customer-side-rank span i,
.customer-equipment-row span i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #176ff2;
}

.customer-equipment-row span i {
  background: #07968e;
}

.customer-side-rank em,
.customer-equipment-row em {
  color: #53677f;
  font-style: normal;
  text-align: right;
}

.secondary-action-button {
  min-height: 28px;
  margin: 0 11px 9px;
  padding: 0 9px;
  border: 1px solid #b7d0ee;
  border-radius: 3px;
  background: #fff;
  color: #1765c1;
  font-size: 10px;
}

.customer-overview-empty,
.customer-management-empty {
  padding: 30px 12px;
  color: #8391a3;
  font-size: 11px;
  text-align: center;
}

@media (max-width: 1450px) {
  .customer-overview-main-grid {
    grid-template-columns: 0.9fr 1fr 1.15fr;
  }

  .customer-overview-lower-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

@media (max-width: 1180px) {
  .customer-management-heading {
    align-items: flex-start;
  }

  .customer-management-heading-actions {
    flex-wrap: wrap;
  }

  .customer-management-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .customer-management-kpi:nth-child(3) {
    border-right: 0;
  }

  .customer-management-kpi:nth-child(-n + 3) {
    border-bottom: 1px solid #d9e3ef;
  }

  .customer-overview-main-grid {
    grid-template-columns: 1fr 1fr;
  }

  .customer-overview-main-grid > :last-child {
    grid-column: 1 / -1;
  }

  .customer-overview-lower-grid {
    grid-template-columns: 1fr;
  }

  .customer-overview-side-stack {
    grid-template-columns: 1fr 1fr;
  }

  .customer-management-toolbar.is-open {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Customer lifecycle and competition workspace. */
.customer-management-heading-actions,
.customer-lifecycle-toolbar,
.customer-map-toolbar,
.customer-competition-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.customer-management-heading-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.customer-management-nav,
.customer-competition-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 50px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 4px;
  background: #fff;
  overflow-x: auto;
}

.customer-management-nav button,
.customer-competition-nav button,
.segmented-control button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #52667f;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.customer-management-nav button:hover,
.customer-competition-nav button:hover,
.segmented-control button:hover {
  background: #f0f6fd;
  color: #145eaf;
}

.customer-management-nav button.is-active,
.customer-competition-nav button.is-active,
.segmented-control button.is-active {
  border-color: #176ff2;
  background: #176ff2;
  color: #fff;
  box-shadow: 0 5px 14px rgb(23 111 242 / 18%);
}

.customer-subpage-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 56px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.customer-subpage-heading h3 {
  margin: 0;
  color: #10233d;
  font-size: 17px;
  line-height: 1.25;
}

.customer-subpage-heading p {
  margin: 3px 0 0;
  color: #6b7d94;
  font-size: 12px;
}

.customer-lifecycle-toolbar,
.customer-map-toolbar,
.customer-competition-toolbar {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
}

.customer-lifecycle-toolbar,
.customer-competition-toolbar {
  justify-content: space-between;
}

.customer-lifecycle-search {
  position: relative;
  width: min(440px, 52vw);
}

.customer-map-search {
  width: min(320px, 30vw);
}

.customer-lifecycle-search svg {
  position: absolute;
  top: 50%;
  left: 11px;
  width: 17px;
  height: 17px;
  color: #6c7e95;
  transform: translateY(-50%);
  pointer-events: none;
}

.customer-lifecycle-search input,
.customer-map-toolbar select,
.customer-competition-toolbar select {
  width: 100%;
  height: 38px;
  border: 1px solid #c8d7e8;
  border-radius: 4px;
  background: #fff;
  color: #172a43;
  font: inherit;
  font-size: 13px;
}

.customer-lifecycle-search input {
  padding: 0 12px 0 36px;
}

.customer-map-toolbar select,
.customer-competition-toolbar select {
  width: 190px;
  padding: 0 10px;
}

.customer-readonly-note,
.customer-position-source {
  color: #647991;
  font-size: 12px;
}

.customer-lifecycle-list {
  min-width: 1120px;
  background: #fff;
}

.customer-lifecycle-row {
  display: grid;
  grid-template-columns: 42px minmax(250px, 1.7fr) minmax(120px, .65fr) minmax(130px, .75fr) minmax(128px, .7fr) minmax(230px, 1.25fr) 102px;
  gap: 12px;
  align-items: center;
  min-height: 82px;
  padding: 10px 14px;
  border-bottom: 1px solid #e1e9f2;
  background: #fff;
}

.customer-lifecycle-row:nth-child(even) {
  background: #fbfdff;
}

.customer-lifecycle-row:hover {
  background: #f2f7fd;
}

.customer-lifecycle-row.is-old-maintenance {
  grid-template-columns: 42px minmax(190px, 1.45fr) minmax(94px, .65fr) minmax(116px, .72fr) minmax(150px, 1.25fr) minmax(130px, 1fr) 104px;
}

#customerOldList {
  min-width: 960px;
}

.customer-row-index {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #c9dcf4;
  border-radius: 4px;
  background: #eef6ff;
  color: #176ff2;
  font-size: 13px;
  font-weight: 800;
}

.customer-row-primary,
.customer-row-metric,
.customer-row-stage,
.customer-row-follow {
  min-width: 0;
}

.customer-row-primary strong,
.customer-row-primary span,
.customer-row-primary small,
.customer-row-metric strong,
.customer-row-metric span,
.customer-row-follow strong,
.customer-row-follow small {
  display: block;
}

.customer-row-primary strong {
  overflow: hidden;
  color: #10233d;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-row-primary span,
.customer-row-primary small,
.customer-row-metric span,
.customer-row-follow small {
  margin-top: 3px;
  overflow: hidden;
  color: #718198;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-row-metric strong,
.customer-row-follow strong {
  overflow: hidden;
  color: #1b314c;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-stage-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid #bed4ef;
  border-radius: 3px;
  background: #edf5ff;
  color: #1762b7;
  font-size: 12px;
  font-weight: 700;
}

.customer-stage-tag.is-new {
  border-color: #efcf91;
  background: #fff5df;
  color: #ad6600;
}

.customer-stage-tag.is-old {
  border-color: #afe1d1;
  background: #e9f8f3;
  color: #08775d;
}

.customer-stage-tag.is-maintenance-missing,
.customer-stage-tag.is-maintenance-overdue {
  border-color: #f2c4c1;
  background: #fff0ef;
  color: #c83d36;
}

.customer-stage-tag.is-maintenance-due {
  border-color: #efd49e;
  background: #fff7e6;
  color: #a86700;
}

.customer-stage-tag.is-maintenance-normal {
  border-color: #afe1d1;
  background: #e9f8f3;
  color: #08775d;
}

.customer-row-stage small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #718198;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.customer-row-actions button {
  width: 34px;
  height: 34px;
  padding: 0;
}

.customer-row-actions .ghost-button {
  width: auto;
  min-width: 64px;
  padding: 0 9px;
}

.customer-maintenance-current {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #d5e5f6;
  border-left: 3px solid #176ff2;
  border-radius: 4px;
  background: #f6faff;
}

.customer-maintenance-current strong {
  color: #17314e;
  font-size: 14px;
}

.customer-maintenance-current span {
  color: #657b96;
  font-size: 12px;
}

.customer-workspace-empty,
.customer-workspace-error {
  display: grid;
  min-height: 250px;
  padding: 28px;
  place-items: center;
  color: #6c7e95;
  font-size: 13px;
  text-align: center;
}

.customer-workspace-error {
  color: #b42318;
}

.customer-map-toolbar {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.segmented-control {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid #c8d7e8;
  border-radius: 4px;
  background: #fff;
}

.segmented-control button {
  min-height: 32px;
  padding: 0 12px;
}

.customer-map-layout {
  display: grid;
  grid-template-columns: minmax(640px, 1fr) 340px;
  min-height: 520px;
  background: #fff;
}

.customer-map-board {
  position: relative;
  min-width: 0;
  min-height: 520px;
  border-right: 1px solid var(--line);
  background: #e9eef4;
}

.customer-map-no-results {
  position: absolute;
  z-index: 500;
  top: 50%;
  left: 50%;
  display: grid;
  gap: 4px;
  min-width: 180px;
  padding: 14px 18px;
  border: 1px solid #c8d7e8;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 4px 14px rgba(24, 62, 105, 0.12);
  color: #435a76;
  text-align: center;
  transform: translate(-50%, -50%);
}

.customer-map-no-results strong {
  color: #1b304b;
  font-size: 13px;
}

.customer-map-no-results span {
  font-size: 12px;
}

.customer-map-side {
  display: grid;
  grid-template-rows: auto minmax(180px, 1fr) auto minmax(120px, .65fr);
  min-width: 0;
  max-height: 620px;
  background: #fff;
}

.customer-map-side > header,
.customer-map-side > section > header {
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  color: #1b304b;
  font-size: 13px;
  font-weight: 800;
}

.customer-map-list,
.customer-nearby-list {
  overflow: auto;
}

.customer-map-list-item,
.customer-nearby-item {
  display: grid;
  gap: 3px;
  padding: 10px 13px;
  border: 0;
  border-bottom: 1px solid #e5ebf3;
  background: #fff;
  color: #213751;
  text-align: left;
}

.customer-map-list-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 0;
}

.customer-map-list-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0;
  min-width: 0;
  padding: 10px 6px 10px 13px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}

.customer-map-list-main:hover {
  background: #f1f7fd;
}

.customer-map-list-main > span:last-child {
  min-width: 0;
}

.customer-map-list-actions {
  display: grid;
  justify-items: end;
  gap: 4px;
  padding: 8px 11px 8px 0;
}

.customer-map-list-actions .text-button {
  min-height: 24px;
  padding: 0;
  color: #176ff2;
  font-size: 12px;
}

.customer-map-location-status {
  color: #7b8ba0 !important;
  font-size: 11px !important;
}

.customer-map-candidate-address {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #a86a00 !important;
  font-size: 11px !important;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-map-list-item.is-confirmed .customer-map-location-status {
  color: #0d8c68 !important;
}

.customer-map-locate-banner {
  position: absolute;
  z-index: 600;
  top: 12px;
  right: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid #f0c36d;
  border-radius: 4px;
  background: rgba(255, 250, 239, 0.97);
  box-shadow: 0 3px 12px rgba(125, 86, 8, 0.12);
}

.customer-map-locate-banner > div:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.customer-map-locate-banner strong {
  color: #6d4b08;
  font-size: 13px;
}

.customer-map-locate-banner span {
  color: #806a3e;
  font-size: 12px;
}

.customer-map-locate-banner > div:last-child {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 6px;
}

button.customer-map-list-item {
  width: 100%;
  cursor: pointer;
}

.customer-map-list-item:hover {
  background: #f1f7fd;
}

.customer-map-list-item strong,
.customer-nearby-item strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-map-list-item span,
.customer-map-list-item small,
.customer-nearby-item span {
  color: #718198;
  font-size: 12px;
}

.customer-map-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: #176ff2;
}

.customer-map-dot.is-old {
  background: #139a76;
}

.customer-map-dot.is-new {
  background: #e89a28;
}

.customer-map-dot.is-provisional {
  background: #e89a28;
}

.customer-equipment-kpis,
.competition-review-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
}

.customer-equipment-kpis > div,
.competition-review-kpis > div {
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid #dae5f1;
  border-left: 3px solid #176ff2;
  border-radius: 4px;
  background: #fff;
}

.customer-equipment-kpis span,
.competition-review-kpis span {
  display: block;
  color: #6d7f96;
  font-size: 12px;
}

.customer-equipment-kpis strong,
.competition-review-kpis strong {
  display: block;
  margin-top: 5px;
  color: #10233d;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.customer-equipment-table,
.competition-project-table,
.competition-equipment-table {
  min-width: 1050px;
  background: #fff;
}

.customer-equipment-table > header,
.customer-equipment-table > article,
.competition-project-table > header,
.competition-project-table > article,
.competition-equipment-table > header,
.competition-equipment-table > article {
  display: grid;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 14px;
  border-bottom: 1px solid #e1e9f2;
}

.customer-equipment-table > header,
.competition-project-table > header,
.competition-equipment-table > header {
  position: sticky;
  z-index: 2;
  top: 0;
  min-height: 40px;
  background: #f1f5fa;
  color: #52667f;
  font-size: 12px;
  font-weight: 800;
}

.customer-equipment-table > article:nth-child(odd),
.competition-project-table > article:nth-child(odd),
.competition-equipment-table > article:nth-child(odd) {
  background: #fbfdff;
}

.customer-equipment-table > header,
.customer-equipment-table > article {
  grid-template-columns: minmax(220px, 1.5fr) 100px 90px 90px 100px minmax(180px, 1fr);
}

.competition-project-table > header,
.competition-project-table > article {
  grid-template-columns: minmax(220px, 1.35fr) minmax(150px, .85fr) minmax(150px, .85fr) 110px 110px 110px 88px;
}

.competition-equipment-table > header,
.competition-equipment-table > article {
  grid-template-columns: minmax(210px, 1.2fr) repeat(3, 120px) minmax(220px, 1.1fr);
}

.customer-equipment-table strong,
.competition-project-table strong,
.competition-equipment-table strong {
  color: #172b44;
  font-size: 13px;
}

.customer-equipment-table span,
.competition-project-table span,
.competition-equipment-table span {
  overflow: hidden;
  color: #62758e;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-equipment-bar {
  height: 7px;
  border-radius: 4px;
  background: #e2e9f2;
  overflow: hidden;
}

.customer-equipment-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #176ff2, #23a7b3);
}

.customer-competition-nav {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.competition-confidence {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  min-height: 26px;
  border-radius: 3px;
  background: #edf5ff;
  color: #1762b7;
  font-size: 12px;
  font-weight: 800;
}

.competitor-profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 14px;
  background: #f8fbff;
}

.competitor-profile-grid article {
  display: grid;
  gap: 8px;
  min-height: 126px;
  padding: 12px;
  border: 1px solid #dbe5f0;
  border-top: 3px solid #176ff2;
  border-radius: 4px;
  background: #fff;
}

.competitor-profile-grid h4,
.competitor-profile-grid p {
  margin: 0;
}

.competitor-profile-grid h4 {
  color: #142941;
  font-size: 14px;
}

.competitor-profile-grid p,
.competitor-profile-grid span {
  color: #687b93;
  font-size: 12px;
  line-height: 1.5;
}

.competition-review-list {
  display: grid;
  background: #fff;
}

.competition-review-list article {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 130px minmax(260px, 1.4fr) 90px;
  gap: 14px;
  align-items: center;
  min-height: 68px;
  padding: 10px 14px;
  border-bottom: 1px solid #e1e9f2;
}

.competition-review-list strong,
.competition-review-list span,
.competition-review-list small {
  display: block;
}

.competition-review-list span,
.competition-review-list small {
  margin-top: 3px;
  color: #6c7f97;
  font-size: 12px;
}

.customer-record-dialog {
  width: min(980px, calc(100vw - 56px));
  max-width: none;
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 0;
  border-radius: 4px;
  box-shadow: 0 24px 70px rgb(12 34 61 / 28%);
}

.customer-record-dialog::backdrop {
  background: rgb(10 28 48 / 50%);
}

.customer-record-dialog-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100vh - 48px);
  background: #fff;
}

.customer-record-dialog-card.is-wide {
  width: min(1180px, calc(100vw - 56px));
}

.customer-record-dialog-card > header,
.customer-record-dialog-card > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.customer-record-dialog-card > header h2 {
  margin: 0;
  color: #10233d;
  font-size: 19px;
}

.customer-record-dialog-card > footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.customer-record-dialog-body {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  overflow: auto;
  background: #f6f9fc;
}

.customer-form-section {
  padding: 12px;
  border: 1px solid #dbe5f0;
  border-radius: 4px;
  background: #fff;
}

.customer-form-section > h3 {
  margin: 0 0 10px;
  color: #1b304a;
  font-size: 14px;
}

.customer-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.customer-form-grid.is-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.customer-form-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #536880;
  font-size: 12px;
  font-weight: 700;
}

.customer-form-grid label.is-wide {
  grid-column: 1 / -1;
}

.customer-form-grid input,
.customer-form-grid select,
.customer-form-grid textarea {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #c8d7e8;
  border-radius: 4px;
  background: #fff;
  color: #172a43;
  font: inherit;
  font-size: 13px;
}

.customer-form-grid textarea {
  min-height: 76px;
  resize: vertical;
}

.customer-form-grid :disabled {
  background: #f2f5f8;
  color: #607188;
  cursor: not-allowed;
}

.customer-form-hint {
  margin: 8px 0 0;
  color: #74869b;
  font-size: 12px;
}

@media (max-width: 1280px) {
  .customer-map-layout {
    grid-template-columns: minmax(560px, 1fr) 300px;
  }

  .customer-form-grid.is-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .competitor-profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 30-day execution is an operations board: decide priority, then act, then read the timeline. */
.production-gantt-execution-overview {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.32fr);
  gap: 0;
  margin: 0 0 8px;
  background: #ffffff;
  border: 1px solid #d6e3f0;
  border-radius: 5px;
  overflow: hidden;
}

.production-gantt-execution-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.production-gantt-execution-metrics > div {
  display: grid;
  align-content: center;
  gap: 2px;
  min-height: 66px;
  padding: 9px 14px;
  border-right: 1px solid #e2ebf4;
}

.production-gantt-execution-metrics span,
.production-gantt-execution-metrics small {
  color: #70849a;
  font-size: 0.66rem;
  font-weight: 800;
}

.production-gantt-execution-metrics strong {
  color: #123456;
  font-size: 1.22rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.production-gantt-execution-metrics .is-risk strong { color: #d64d47; }

.production-gantt-risk-brief {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 9px 14px;
  background: #fffaf7;
}

.production-gantt-risk-brief > strong {
  color: #a96119;
  font-size: 0.72rem;
  font-weight: 900;
}

.production-gantt-risk-brief > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.production-gantt-risk-brief span {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.production-gantt-risk-brief b,
.production-gantt-risk-brief small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-gantt-risk-brief b {
  color: #384f69;
  font-size: 0.68rem;
}

.production-gantt-risk-brief small {
  color: #bd5d52;
  font-size: 0.62rem;
  font-weight: 800;
}

.production-gantt-risk-brief .is-clear small { color: #4d957b; }

.production-gantt-board.is-priority-board {
  width: calc(504px + var(--gantt-width));
}

.production-gantt-board.is-priority-board .production-gantt-axis,
.production-gantt-board.is-priority-board .production-gantt-row,
.production-gantt-board.is-priority-board .production-gantt-priority-band {
  grid-template-columns: 330px 174px var(--gantt-width);
}

.production-gantt-board.is-priority-board .production-gantt-axis,
.production-gantt-board.is-priority-board .production-gantt-row {
  width: max-content;
  min-width: 100%;
}

.production-gantt-today-axis,
.production-gantt-today-work-cell {
  position: sticky;
  left: 330px;
  z-index: 8;
  min-width: 0;
  border-right: 1px solid #cfdceb;
  box-shadow: 5px 0 10px rgba(30, 61, 91, 0.05);
}

.production-gantt-today-axis {
  z-index: 13;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 0 10px;
  background: #f5f9fd;
}

.production-gantt-today-axis strong {
  color: #0b756b;
  font-size: 0.78rem;
}

.production-gantt-today-axis span {
  color: #7890a8;
  font-size: 0.62rem;
  font-weight: 750;
}

.production-gantt-today-work-cell {
  display: grid;
  align-items: stretch;
  padding: 6px 8px;
  background: #fcfffe;
}

.production-gantt-row:nth-child(odd) .production-gantt-today-work-cell { background: #f9fcff; }

.production-gantt-today-work {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
  padding-left: 7px;
  border-left: 2px solid #1a9c87;
}

.production-gantt-today-work.is-empty {
  border-left-color: #d7e2ec;
}

.production-gantt-today-work > strong,
.production-gantt-today-work.is-empty > span {
  color: #13836f;
  font-size: 0.62rem;
  font-weight: 900;
}

.production-gantt-today-work.is-empty > span { color: #8da0b2; }

.production-gantt-today-work > div {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.production-gantt-today-work-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  min-width: 0;
  max-width: 124px;
  padding: 3px 4px;
  color: #24666d;
  background: #ffffff;
  border: 1px solid #cce7df;
  border-radius: 3px;
  line-height: 1;
  white-space: nowrap;
}

.production-gantt-today-work-chip b,
.production-gantt-today-work-chip small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.production-gantt-today-work-chip b {
  font-size: 0.62rem;
  font-weight: 900;
}

.production-gantt-today-work-chip small {
  color: #74899c;
  font-size: 0.56rem;
  font-weight: 800;
}

.production-gantt-today-work-chip.bad { color: #ba4b45; border-color: #f2c5c2; background: #fff7f6; }
.production-gantt-today-work-chip.warn { color: #a16917; border-color: #f0d5a6; background: #fffaf1; }
.production-gantt-today-work-chip.blue { color: #256fb6; border-color: #bfd8f7; background: #f5f9ff; }
.production-gantt-today-work-chip.neutral { color: #708295; border-color: #d5dde7; background: #f8fafc; }

.production-gantt-today-work em {
  flex: 0 0 auto;
  color: #176ff0;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 900;
}

.production-gantt-priority-band {
  display: grid;
  width: max-content;
  min-width: 100%;
  border-bottom: 1px solid #dbe7f1;
}

.production-gantt-priority-band > div {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 12px;
  background: #f5f9fd;
  border-left: 3px solid #2b78d9;
}

.production-gantt-priority-band strong {
  color: #214868;
  font-size: 0.75rem;
  font-weight: 900;
}

.production-gantt-priority-band span {
  color: #7c90a5;
  font-size: 0.63rem;
  font-weight: 750;
}

.production-gantt-priority-band b {
  margin-left: auto;
  color: #526f8b;
  font-size: 0.65rem;
}

.production-gantt-priority-band.is-today > div { background: #fff9f7; border-left-color: #e4544c; }
.production-gantt-priority-band.is-today strong { color: #b6413b; }
.production-gantt-priority-band.is-week > div { background: #fffdf7; border-left-color: #e69d24; }
.production-gantt-priority-band.is-week strong { color: #a66b12; }
.production-gantt-priority-band.is-later > div { background: #f7fcfb; border-left-color: #169783; }
.production-gantt-priority-band.is-later strong { color: #167b6d; }

.production-gantt-board.is-priority-board .production-gantt-row,
.production-gantt-board.is-priority-board .production-gantt-row .production-gantt-lane,
.production-gantt-board.is-priority-board .production-gantt-row.has-daily-arrangement,
.production-gantt-board.is-priority-board .production-gantt-row.has-daily-arrangement .production-gantt-lane {
  min-height: 84px;
}

.production-gantt-board.is-priority-board .production-gantt-task-copy {
  grid-template-rows: auto auto auto !important;
  gap: 4px !important;
}

.production-gantt-board.is-priority-board .production-gantt-bar {
  top: 32px;
  height: 16px;
  background: #e0ecf8;
  border-color: #cbdced;
  opacity: 1;
}

.production-gantt-board.is-priority-board .production-gantt-phase {
  top: 33px;
  height: 14px;
  opacity: 0.82;
}

.production-gantt-board.is-priority-board .production-gantt-phase span { line-height: 14px; }

.production-gantt-board.is-priority-board .production-gantt-phase.is-current-phase {
  min-width: 48px;
  opacity: 1;
}

.production-gantt-board.is-priority-board .production-gantt-milestone { top: 53px; }
.production-gantt-board.is-priority-board .production-gantt-node-date { top: 64px; }
.production-gantt-board.is-priority-board .production-gantt-current-callout { top: 8px; }
.production-gantt-board.is-priority-board .production-gantt-daily-marker { top: 6px; }

@media (max-width: 860px) {
  .production-gantt-execution-overview { grid-template-columns: 1fr; }
  .production-gantt-risk-brief { display: none; }
  .production-gantt-board.is-priority-board { width: calc(440px + var(--gantt-width)); }
  .production-gantt-board.is-priority-board .production-gantt-axis,
  .production-gantt-board.is-priority-board .production-gantt-row,
  .production-gantt-board.is-priority-board .production-gantt-priority-band { grid-template-columns: 280px 160px var(--gantt-width); }
  .production-gantt-today-axis,
  .production-gantt-today-work-cell { left: 280px; }
}

/* Customer management: dense CRM workspace built on the existing collection ledger. */
.customer-management-page {
  gap: 12px;
}

.customer-management-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 11px 18px;
  border: 1px solid #d9e3ef;
  border-left: 4px solid #1976d2;
  border-radius: 4px;
  background: #fff;
}

.customer-management-heading h2 {
  margin: 0;
  color: #10233d;
  font-size: 22px;
  line-height: 1.2;
}

.customer-management-heading span {
  display: block;
  margin-top: 4px;
  color: #64758d;
  font-size: 13px;
}

.customer-management-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.customer-management-kpi {
  min-height: 88px;
  padding: 13px 16px;
  border: 1px solid #dce5f0;
  border-left: 4px solid #2f74d0;
  border-radius: 4px;
  background: #fff;
}

.customer-management-kpi.is-2 {
  border-left-color: #159d78;
}

.customer-management-kpi.is-3 {
  border-left-color: #e79a27;
}

.customer-management-kpi.is-4 {
  border-left-color: #0e8f99;
}

.customer-management-kpi.is-5 {
  border-left-color: #7559c9;
}

.customer-management-kpi span,
.customer-management-kpi small {
  display: block;
  color: #667992;
  font-size: 12px;
}

.customer-management-kpi strong {
  display: block;
  margin: 5px 0 3px;
  color: #10233d;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}

.customer-management-panel {
  overflow: hidden;
  padding: 0;
  border-radius: 4px;
}

.customer-management-toolbar {
  display: grid;
  grid-template-columns: minmax(320px, 1.6fr) repeat(3, minmax(145px, 0.65fr)) auto;
  gap: 10px;
  align-items: end;
  padding: 12px 14px;
  border-bottom: 1px solid #dce5f0;
  background: #fff;
}

.customer-management-toolbar label {
  position: relative;
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #52667f;
  font-size: 12px;
  font-weight: 600;
}

.customer-management-toolbar input,
.customer-management-toolbar select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #cbd8e8;
  border-radius: 4px;
  background: #fff;
  color: #14283f;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
}

.customer-management-toolbar input:focus,
.customer-management-toolbar select:focus {
  border-color: #3480df;
  box-shadow: 0 0 0 3px rgb(52 128 223 / 12%);
  outline: 0;
}

.customer-management-search svg {
  position: absolute;
  z-index: 1;
  left: 12px;
  bottom: 12px;
  width: 17px;
  height: 17px;
  color: #60758e;
  pointer-events: none;
}

.customer-management-search input {
  padding-left: 38px;
}

.customer-management-toolbar > button {
  height: 42px;
  border-radius: 4px;
}

.customer-management-table-wrap {
  min-height: 360px;
  max-height: calc(100vh - 340px);
  overflow: auto;
  background: #fff;
}

.customer-management-table {
  width: 100%;
  min-width: 1540px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.customer-management-table th,
.customer-management-table td {
  text-align: left;
}

.customer-management-table thead th {
  position: sticky;
  z-index: 2;
  top: 0;
  height: 42px;
  padding: 0 12px;
  border-bottom: 1px solid #d6e0ec;
  background: #f1f5fa;
  color: #4f647e;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.customer-management-table td {
  height: 62px;
  padding: 8px 12px;
  border-bottom: 1px solid #e3eaf2;
  color: #20344e;
  font-size: 13px;
  vertical-align: middle;
}

.customer-management-table tbody tr:nth-child(even) {
  background: #fbfcfe;
}

.customer-management-table tbody tr:hover {
  background: #f3f8fe;
}

.customer-management-table th:nth-child(1),
.customer-management-table td:nth-child(1) { width: 270px; }
.customer-management-table th:nth-child(2),
.customer-management-table td:nth-child(2) { width: 130px; }
.customer-management-table th:nth-child(3),
.customer-management-table td:nth-child(3) { width: 90px; }
.customer-management-table th:nth-child(4),
.customer-management-table td:nth-child(4) { width: 90px; }
.customer-management-table th:nth-child(5),
.customer-management-table td:nth-child(5) { width: 120px; }
.customer-management-table th:nth-child(6),
.customer-management-table td:nth-child(6) { width: 125px; }
.customer-management-table th:nth-child(7),
.customer-management-table td:nth-child(7) { width: 180px; }
.customer-management-table th:nth-child(8),
.customer-management-table td:nth-child(8) { width: 205px; }
.customer-management-table th:nth-child(9),
.customer-management-table td:nth-child(9) { width: 200px; }
.customer-management-table th:nth-child(10),
.customer-management-table td:nth-child(10) { width: 90px; }

.customer-management-table td > strong,
.customer-management-table td > small,
.customer-management-table td > time {
  display: block;
}

.customer-management-table td > strong {
  color: #10233d;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.customer-management-table td > small {
  max-width: 100%;
  margin-top: 3px;
  overflow: hidden;
  color: #718198;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-management-table td > time {
  color: #4c6480;
  font-size: 12px;
  font-weight: 600;
}

.customer-management-table .text-button.compact {
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid #bdd3ee;
  border-radius: 4px;
  white-space: nowrap;
}

.customer-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
}

.customer-status.is-active {
  border-color: #b7e5d5;
  background: #eaf8f2;
  color: #08775d;
}

.customer-status.is-pending {
  border-color: #f0d49e;
  background: #fff6e7;
  color: #a96700;
}

.customer-status.is-overdue {
  border-color: #f4bcb7;
  background: #fff0ef;
  color: #c43c31;
}

.customer-status.is-settled {
  border-color: #b9dfca;
  background: #edf8f1;
  color: #177144;
}

.customer-management-empty {
  display: grid;
  min-height: 260px;
  place-items: center;
  color: #718198;
  font-size: 14px;
}

.customer-management-dialog {
  width: min(1180px, calc(100vw - 56px));
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 4px;
  box-shadow: 0 24px 70px rgb(12 34 61 / 26%);
}

.customer-management-dialog::backdrop {
  background: rgb(10 28 48 / 48%);
}

.customer-management-dialog-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100vh - 70px);
  background: #fff;
}

.customer-management-dialog-card > header,
.customer-management-dialog-card > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #dce5ef;
}

.customer-management-dialog-card > header h2 {
  margin: 0;
  color: #10233d;
  font-size: 20px;
}

.customer-management-dialog-card > header span {
  display: block;
  margin-bottom: 3px;
  color: #718198;
  font-size: 12px;
}

.customer-management-dialog-card > footer {
  justify-content: flex-end;
  border-top: 1px solid #dce5ef;
  border-bottom: 0;
}

.customer-management-dialog-body {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  overflow: auto;
  background: #f6f8fb;
}

.customer-detail-metrics,
.customer-detail-profile {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.customer-detail-metrics > span,
.customer-detail-profile > div {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #dce5ef;
  border-radius: 4px;
  background: #fff;
  color: #64758d;
  font-size: 12px;
}

.customer-detail-metrics strong,
.customer-detail-profile strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #10233d;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-detail-section {
  overflow: hidden;
  border: 1px solid #dce5ef;
  border-radius: 4px;
  background: #fff;
}

.customer-detail-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 13px;
  border-bottom: 1px solid #dce5ef;
}

.customer-detail-section > header h3 {
  margin: 0;
  color: #152a43;
  font-size: 15px;
}

.customer-detail-section > header > span {
  color: #6f8198;
  font-size: 12px;
}

.customer-detail-table-wrap {
  overflow: auto;
}

.customer-detail-table-wrap table {
  width: 100%;
  min-width: 930px;
  border-collapse: collapse;
}

.customer-detail-table-wrap th,
.customer-detail-table-wrap td {
  padding: 9px 11px;
  border-bottom: 1px solid #e4eaf2;
  color: #263a54;
  font-size: 12px;
  text-align: left;
}

.customer-detail-table-wrap th {
  background: #f1f5fa;
  color: #576b84;
  font-weight: 700;
}

.customer-detail-activity {
  display: grid;
}

.customer-detail-activity article {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px;
  padding: 11px 13px;
  border-bottom: 1px solid #e4eaf2;
}

.customer-detail-activity article:last-child {
  border-bottom: 0;
}

.customer-detail-activity time,
.customer-detail-activity small {
  color: #718198;
  font-size: 12px;
}

.customer-detail-activity p {
  margin: 4px 0;
  color: #263a54;
  line-height: 1.45;
}

@media (max-width: 1400px) {
  .customer-management-toolbar {
    grid-template-columns: minmax(280px, 1.5fr) repeat(3, minmax(128px, 0.7fr)) auto;
  }
}

/* Visual refresh: enterprise blue console inspired by the supplied reference. */
:root {
  color-scheme: light;
  --ink: #1d2a3d;
  --ink-strong: #07172b;
  --muted: #728199;
  --muted-strong: #526276;
  --line: #d8e2ef;
  --line-soft: #eaf0f7;
  --line-strong: #a9bdd5;
  --navy: #12355b;
  --navy-strong: #071d36;
  --brand: #176ff2;
  --brand-strong: #0e5ed8;
  --accent: #20b7a6;
  --accent-soft: #e5fbf8;
  --panel: #ffffff;
  --panel-raised: #f8fbff;
  --page: #f3f7fc;
  --row: #f7fbff;
  --row-strong: #fbfdff;
  --green: #10a36a;
  --green-bg: #e6f8ee;
  --amber: #f1992e;
  --amber-bg: #fff4df;
  --red: #e2433f;
  --red-bg: #fff0f0;
  --shadow: 0 10px 28px rgba(30, 57, 94, 0.08);
  --shadow-soft: 0 6px 18px rgba(30, 57, 94, 0.06);
}

body {
  background:
    linear-gradient(180deg, rgba(232, 239, 248, 0.92) 0, rgba(243, 247, 252, 0.96) 280px),
    repeating-linear-gradient(135deg, rgba(23, 111, 242, 0.035) 0 1px, transparent 1px 34px),
    var(--page);
}

.app-header {
  min-height: 66px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 42px),
    linear-gradient(135deg, #061a32 0%, #0e3156 58%, #123b68 100%);
  border-bottom: 1px solid rgba(147, 181, 218, 0.24);
  box-shadow: 0 10px 26px rgba(7, 29, 54, 0.24);
}

.app-header .eyebrow,
.access-line {
  color: rgba(224, 239, 255, 0.82);
}

.icon-button {
  color: var(--brand);
  border-color: rgba(23, 111, 242, 0.14);
  box-shadow: 0 8px 18px rgba(7, 29, 54, 0.12);
}

.icon-button.secondary,
.session-card,
.session-logout {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(221, 236, 255, 0.22);
  box-shadow: none;
}

.workspace-layout {
  width: min(1860px, calc(100% - 18px));
  gap: 10px;
  padding-top: 10px;
}

.sidebar-nav {
  top: 76px;
  gap: 8px;
  padding: 10px;
  background:
    linear-gradient(180deg, rgba(33, 83, 138, 0.22), transparent 44%),
    linear-gradient(180deg, #08203b 0%, #102f52 100%);
  border: 1px solid rgba(127, 166, 214, 0.18);
  border-radius: var(--radius);
  box-shadow: 0 14px 28px rgba(7, 29, 54, 0.16);
}

.sidebar-title {
  padding: 8px 10px 10px;
  color: #f6fbff;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.sidebar-title span {
  color: rgba(212, 231, 252, 0.68);
}

.view-tabs {
  gap: 3px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.view-tab {
  min-height: 34px;
  padding: 0 10px;
  color: rgba(226, 240, 255, 0.82);
  border-radius: 4px;
}

.view-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.view-tab.is-active {
  background: linear-gradient(90deg, #1774ff 0%, #1164df 100%);
  border-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(13, 96, 216, 0.28);
}

.sidebar-notification-module {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-items: stretch;
  width: 100%;
  min-height: 156px;
  height: var(--sidebar-notification-height, 260px);
  padding: 8px;
  color: var(--ink-strong);
  text-align: left;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #d8e5f2;
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.sidebar-notification-module:hover,
.sidebar-notification-module.is-active {
  border-color: #a9ccfb;
  border-left-color: var(--brand);
  background: #f7fbff;
  box-shadow: 0 10px 24px rgba(30, 73, 119, 0.14);
}

.sidebar-notification-module.is-active {
  background: #edf5ff;
}

.sidebar-utility-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 2px 2px 8px;
  border-bottom: 1px solid #e2ebf5;
}

.sidebar-utility-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  height: 32px;
  padding: 0 6px;
  color: #5a6f88;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  font-size: 0.75rem;
  font-weight: 850;
}

.sidebar-utility-tab svg { width: 15px; height: 15px; flex: 0 0 15px; }
.sidebar-utility-tab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-utility-tab b {
  display: inline-grid;
  min-width: 17px;
  height: 17px;
  padding: 0 3px;
  place-items: center;
  color: #1767b3;
  border-radius: 50%;
  background: #e6f1ff;
  font-size: 0.65rem;
  line-height: 1;
}
.sidebar-utility-tab.is-active { color: var(--brand); border-color: #c8ddf6; background: #edf5ff; }
.sidebar-utility-tab.is-active b { color: #08734e; background: #d9f5e7; }
.sidebar-utility-panel { display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; }
.sidebar-online-accounts-icon { color: #08734e; background: #e2f8ec; border-color: #bfe9d2; }
.sidebar-online-account-preview-item.is-online { border-left-color: #19a56d; }
.sidebar-online-account-preview-item.is-offline { border-left-color: #b7c5d4; }
.sidebar-online-account-preview-item small { display: flex; align-items: center; }
.sidebar-online-account-preview-item .account-presence { padding: 0; font-size: 0.68rem; background: transparent; }

.sidebar-notification-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--brand);
  background: #e7f1ff;
  border: 1px solid #cce0fb;
  border-radius: 6px;
}

.sidebar-notification-launch {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 44px;
  padding: 3px 2px 7px;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #e2ebf5;
}

.sidebar-notification-launch:hover .sidebar-notification-copy strong {
  color: var(--brand);
}

.sidebar-notification-icon svg {
  width: 17px;
  height: 17px;
}

.sidebar-notification-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.sidebar-notification-copy strong {
  color: var(--ink-strong);
  font-size: 0.84rem;
  font-weight: 900;
}

.sidebar-notification-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-notification-arrow {
  width: 16px;
  height: 16px;
  color: #7e91a8;
}

.sidebar-notification-preview {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 0;
  padding: 8px 1px 1px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sidebar-notification-preview-item {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 8px 7px;
  color: var(--ink-strong);
  text-align: left;
  background: #f8fbff;
  border: 1px solid #e2ebf5;
  border-left: 3px solid #8eb7ec;
  border-radius: 5px;
}

.sidebar-notification-preview-item.is-danger {
  border-left-color: #dc5149;
}

.sidebar-notification-preview-item.is-warning {
  border-left-color: #e7a32a;
}

.sidebar-notification-preview-item.is-green {
  border-left-color: #1d9a75;
}

.sidebar-notification-preview-item:hover {
  background: #eef6ff;
  border-color: #b8d3f2;
}

.sidebar-notification-preview-item span {
  color: #627893;
  font-size: 0.66rem;
  font-weight: 800;
}

.sidebar-notification-preview-item strong {
  overflow: hidden;
  color: var(--ink-strong);
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-notification-preview-item small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sidebar-online-account-preview-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.sidebar-online-account-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.sidebar-online-account-copy > span,
.sidebar-online-account-copy > strong {
  min-width: 0;
}

.sidebar-online-account-preview-item > small {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  align-self: center;
  overflow: visible;
  color: inherit;
  -webkit-line-clamp: unset;
}

.sidebar-online-account-preview-item .account-presence {
  white-space: nowrap;
}

.workspace-main {
  padding-left: 2px;
}

.toolbar,
.role-notice,
.login-panel,
.account-panel {
  background: rgba(255, 255, 255, 0.96);
  border-color: var(--line-soft);
  box-shadow: var(--shadow-soft);
}

.toolbar {
  padding: 12px;
}

select,
input,
textarea {
  background: #fbfdff;
  border-color: #cfdced;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

select:focus,
input:focus,
textarea:focus {
  border-color: rgba(23, 111, 242, 0.72);
  box-shadow: 0 0 0 3px rgba(23, 111, 242, 0.12);
}

.text-button,
.ghost-button {
  color: var(--brand);
  background: #fbfdff;
  border-color: #d6e2f1;
}

.text-button:hover,
.ghost-button:hover {
  background: #eef6ff;
  border-color: rgba(23, 111, 242, 0.34);
}

.kpi-card,
.panel,
.chart-summary article,
.chart-card,
.sales-daily-kpi-card,
.production-overview-card,
.production-project-card,
.production-alert-card,
.rectification-chart-card,
.account-row {
  background: rgba(255, 255, 255, 0.98);
  border-color: var(--line-soft);
  box-shadow: var(--shadow-soft);
}

.kpi-card {
  min-height: 86px;
}

.kpi-card::before {
  width: 3px;
  background: linear-gradient(180deg, var(--brand), #72adff);
}

.kpi-card .value,
.chart-summary strong,
.chart-card-head strong,
.follow-owner strong,
.follow-action strong {
  color: #07172b;
}

.panel-heading {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.chart-summary,
.follow-summary-grid {
  background: #fbfdff;
}

.chart-rank {
  background: #edf5ff;
  border-color: #d4e6fb;
  color: #225f9c;
}

.chart-card-head em {
  color: var(--brand);
  background: #eaf4ff;
}

.chart-scale,
.chart-track,
.rate-bar {
  background: #e8f0f9;
  border-color: #d5e3f2;
}

.chart-scale-fill {
  background: linear-gradient(90deg, #1164df, #3291ff);
}

.data-table th {
  background: #f7fbff;
  color: #334861;
  border-bottom: 1px solid #dce8f5;
}

.data-table tbody tr:nth-child(odd),
.data-table tbody tr:nth-child(even) {
  background: #ffffff;
}

.data-table tbody tr:hover {
  background: #edf6ff;
}

.data-table input,
.data-table select,
.data-table textarea {
  background: #fbfdff;
  box-shadow: inset 0 0 0 1px rgba(207, 220, 237, 0.56);
}

.delete-button {
  background: #fff8f8;
  border-color: #ffd4d4;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 14px;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  background:
    linear-gradient(180deg, #edf3f8 0, var(--page) 320px),
    var(--page);
  color: var(--ink);
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    "Segoe UI",
    Arial,
    sans-serif;
  text-rendering: geometricPrecision;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
label.icon-button {
  cursor: pointer;
}

button:focus-visible,
label.icon-button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(31, 92, 153, 0.24);
  outline-offset: 2px;
}

.app-shell {
  min-height: 100dvh;
}

.app-shell.is-locked,
.login-screen.is-hidden,
[hidden] {
  display: none !important;
}

.login-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px 18px;
  background:
    linear-gradient(180deg, #eaf1f7 0, #f4f7fa 52%, #edf3f8 100%),
    var(--page);
}

.login-panel {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.4fr);
  gap: 16px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.login-copy {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 10px;
}

.login-copy h1 {
  color: var(--ink-strong);
  font-size: 1.8rem;
}

.login-copy p:last-child {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.55;
}

.login-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.login-account {
  display: grid;
  gap: 5px;
  min-height: 118px;
  padding: 13px;
  text-align: left;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.login-account:hover {
  transform: translateY(-2px);
  border-color: #9fb8d2;
  box-shadow: var(--shadow);
}

.login-role {
  width: fit-content;
  min-height: 22px;
  padding: 2px 8px;
  color: var(--brand);
  background: #eaf3fb;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 850;
}

.login-account strong {
  color: var(--ink-strong);
  font-size: 1.05rem;
}

.login-account small {
  color: var(--muted-strong);
  font-weight: 800;
}

.login-account em {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
  line-height: 1.4;
}

.single-login-panel {
  width: min(820px, 100%);
  grid-template-columns: minmax(260px, 0.82fr) minmax(360px, 1fr);
  gap: 0;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
  border-color: #d9e5f2;
}

.single-login-panel .login-copy {
  min-height: 400px;
  padding: 42px;
  color: #ffffff;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 38px),
    linear-gradient(145deg, #071d36 0%, #103b67 100%);
}

.single-login-panel .login-copy .eyebrow {
  color: #8fc1ff;
  font-weight: 850;
}

.single-login-panel .login-copy h1 {
  margin: 0;
  color: #ffffff;
  font-size: 2rem;
}

.single-login-panel .login-copy p:last-child {
  max-width: 280px;
  color: rgba(226, 239, 253, 0.78);
}

.single-login-card {
  display: grid;
  align-content: center;
  gap: 24px;
  min-width: 0;
  padding: 42px;
  background: #ffffff;
}

.single-login-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.single-login-head strong {
  display: block;
  color: var(--ink-strong);
  font-size: 1.22rem;
  font-weight: 900;
}

.single-login-head span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.single-login-head > svg {
  width: 34px;
  height: 34px;
  padding: 7px;
  color: var(--brand);
  background: #edf5ff;
  border-radius: 6px;
}

.single-login-form {
  display: grid;
  gap: 14px;
}

.single-login-form label {
  display: grid;
  gap: 6px;
}

.single-login-form label span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.single-login-form input {
  min-height: 44px;
}

.single-login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 0 18px;
  color: #fff;
  background: linear-gradient(90deg, var(--brand), var(--brand-strong));
  border: 1px solid rgba(23, 111, 242, 0.46);
  border-radius: var(--radius-sm);
  font-weight: 900;
  box-shadow: var(--shadow-soft);
}

.single-login-button:hover {
  background: #0e5ed8;
}

.single-login-button svg {
  width: 16px;
  height: 16px;
}

.login-access-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.login-access-note svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.login-error {
  margin: 0;
  padding: 9px 11px;
  color: var(--red);
  background: var(--red-bg);
  border: 1px solid rgba(211, 68, 57, 0.22);
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 800;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 74px;
  padding: 13px 24px;
  background: linear-gradient(135deg, var(--navy-strong), var(--navy));
  color: #fff;
  box-shadow: 0 12px 28px rgba(12, 31, 51, 0.2);
}

.app-header > div:first-child {
  min-width: 220px;
}

.eyebrow {
  margin: 0 0 3px;
  color: #bcd7ea;
  font-size: 0.8rem;
  font-weight: 700;
}

.access-line {
  display: none;
  margin: 5px 0 0;
  color: #d9e7f1;
  font-size: 0.8rem;
  line-height: 1.35;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 1.48rem;
  line-height: 1.15;
  font-weight: 800;
}

h2 {
  font-size: 1rem;
  color: var(--ink-strong);
  font-weight: 800;
}

.header-actions,
.panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.session-card {
  display: grid;
  grid-template-columns: auto minmax(90px, auto) auto;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 5px 7px 5px 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius-sm);
}

.session-card > svg {
  width: 16px;
  height: 16px;
}

.session-card div {
  display: grid;
  gap: 1px;
}

.session-card strong {
  font-size: 0.86rem;
  line-height: 1.15;
}

.session-card span {
  color: #cfe0ed;
  font-size: 0.75rem;
  line-height: 1.15;
}

.session-logout {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
}

.session-logout:hover {
  background: rgba(255, 255, 255, 0.2);
}

.session-logout svg {
  width: 15px;
  height: 15px;
}

.icon-button,
.text-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.icon-button:hover,
.text-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.icon-button:active,
.text-button:active,
.ghost-button:active,
.delete-button:active {
  transform: translateY(0);
}

.icon-button svg,
.text-button svg,
.ghost-button svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.1;
}

.icon-button i:empty::before,
.text-button i:empty::before,
.ghost-button i:empty::before {
  content: "";
}

.icon-button {
  padding: 0 13px;
  background: #ffffff;
  color: var(--navy);
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(5, 17, 31, 0.12);
}

.icon-button.secondary {
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: none;
}

.icon-button.secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.36);
}

.text-button,
.ghost-button {
  padding: 0 11px;
  background: #fff;
  color: var(--brand);
  border-color: var(--line);
  font-weight: 800;
}

.text-button:hover,
.ghost-button:hover {
  background: #f6fafc;
  border-color: #c4d4e5;
  box-shadow: var(--shadow-soft);
}

.ghost-button {
  min-height: 32px;
  background: var(--panel-raised);
}

.text-button.compact,
.ghost-button.compact {
  min-height: 30px;
  padding: 0 9px;
  font-size: 0.82rem;
}

.workspace-layout {
  width: min(1840px, calc(100% - 24px));
  margin: 0 auto;
  padding: 18px 0 30px;
  display: grid;
  grid-template-columns: 206px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.workspace-layout.is-account-layout {
  grid-template-columns: minmax(0, 1fr);
}

.workspace-main {
  min-width: 0;
}

.work-notice-ticker {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 38px;
  margin: 0 0 8px;
  overflow: hidden;
  color: #385471;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #d8e5f2;
  border-left: 3px solid var(--brand);
  border-radius: 5px;
  box-shadow: 0 6px 18px rgba(20, 62, 105, 0.08);
}

/* Notifications remain available from the top bar and notification center. */
#workNoticeTicker {
  display: none !important;
}

.work-notice-ticker-label,
.work-notice-ticker-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  color: #174f88;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 900;
  background: transparent;
  border: 0;
  white-space: nowrap;
}

.work-notice-ticker-label {
  padding: 0 12px;
  border-right: 1px solid #e3ecf6;
}

.work-notice-ticker-label svg {
  width: 15px;
  height: 15px;
  color: var(--brand);
}

.work-notice-ticker-label b {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  color: #ffffff;
  background: var(--brand);
  border-radius: 50%;
  font-size: 0.62rem;
  line-height: 1;
}

.work-notice-ticker-viewport {
  min-width: 0;
  overflow: hidden;
}

.work-notice-ticker-track {
  display: flex;
  width: max-content;
  min-width: 100%;
  align-items: center;
}

.work-notice-ticker-track.is-looping {
  animation: work-notice-ticker-scroll 120s linear infinite;
}

.work-notice-ticker:hover .work-notice-ticker-track.is-looping,
.work-notice-ticker:focus-within .work-notice-ticker-track.is-looping {
  animation-play-state: paused;
}

.work-notice-ticker-set {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding-right: 24px;
}

.work-notice-ticker-item {
  display: inline-flex;
  flex: 0 0 auto;
  min-width: 0;
  max-width: 380px;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 9px;
  color: #445f7d;
  background: #f8fbff;
  border: 1px solid #e2ebf5;
  border-left: 3px solid #76a7df;
  border-radius: 4px;
  font: inherit;
  text-align: left;
  white-space: nowrap;
}

.work-notice-ticker-item.is-danger { border-left-color: #dc5149; }
.work-notice-ticker-item.is-warn { border-left-color: #dfa126; }
.work-notice-ticker-item.is-green { border-left-color: #1f9a76; }

.work-notice-ticker-item:hover {
  background: #edf6ff;
  border-color: #b7d2ee;
}

.work-notice-ticker-item span {
  color: #57718e;
  font-size: 0.62rem;
  font-weight: 850;
}

.work-notice-ticker-item strong {
  max-width: 130px;
  overflow: hidden;
  color: #203d5c;
  font-size: 0.68rem;
  font-weight: 900;
  text-overflow: ellipsis;
}

.work-notice-ticker-item small {
  max-width: 165px;
  overflow: hidden;
  color: #7388a1;
  font-size: 0.64rem;
  font-weight: 750;
  text-overflow: ellipsis;
}

.work-notice-ticker-open {
  padding: 0 11px;
  border-left: 1px solid #e3ecf6;
}

.work-notice-ticker-open svg {
  width: 14px;
  height: 14px;
}

.work-notice-ticker-label:hover,
.work-notice-ticker-open:hover {
  color: var(--brand);
  background: #f3f8ff;
}

.work-notice-ticker-empty {
  padding: 0 12px;
  color: #72859c;
  font-size: 0.7rem;
  font-weight: 750;
}

@keyframes work-notice-ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .work-notice-ticker-track.is-looping { animation: none; }
}

.sidebar-nav {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 10px;
  align-self: start;
}

.sidebar-title {
  display: grid;
  gap: 3px;
  padding: 12px 13px;
  color: var(--ink-strong);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.sidebar-title strong {
  font-size: 0.95rem;
  font-weight: 950;
}

.sidebar-title span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 820;
}

.toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(132px, 1fr)) minmax(240px, 1.7fr) auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.notification-toolbar {
  display: grid;
  grid-template-columns: minmax(190px, 0.62fr) minmax(0, 2.4fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 76px;
  padding: 10px 14px;
  color: var(--ink-strong);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.notification-toolbar-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.notification-toolbar-icon {
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #1765be;
  background: #eaf3ff;
  border: 1px solid #c8dff6;
  border-radius: 6px;
}

.notification-toolbar-icon svg {
  width: 19px;
  height: 19px;
}

.notification-toolbar-head > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.notification-toolbar-head strong {
  font-size: 0.9rem;
}

.notification-toolbar-head span:not(.notification-toolbar-icon) {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.invoice-notification-list {
  display: flex;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.invoice-notification-empty {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.invoice-notification-item {
  display: flex;
  flex: 1 0 min(430px, 100%);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 8px 10px;
  background: #f8fbfe;
  border: 1px solid #dce7f1;
  border-left: 3px solid #f0a93d;
  border-radius: 6px;
}

.invoice-notification-item.is-issued {
  border-left-color: #1c9d76;
}

.invoice-notification-item.is-green {
  border-left-color: #1c9d76;
}

.invoice-notification-item.is-blue {
  border-left-color: #3b75e6;
}

.invoice-notification-item.is-danger {
  border-left-color: #dc5149;
}

.invoice-notification-item-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.invoice-notification-item-title {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.invoice-notification-item-title strong {
  color: var(--ink-strong);
  font-size: 0.8rem;
}

.invoice-notification-item-title span {
  padding: 2px 6px;
  color: #9b5a08;
  background: #fff6df;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.invoice-notification-item.is-issued .invoice-notification-item-title span {
  color: #17734d;
  background: #e8f8f0;
}

.invoice-notification-item.is-green .invoice-notification-item-title span {
  color: #17734d;
  background: #e8f8f0;
}

.invoice-notification-item.is-blue .invoice-notification-item-title span {
  color: #285dbd;
  background: #eaf2ff;
}

.invoice-notification-item.is-danger .invoice-notification-item-title span {
  color: #bd3932;
  background: #fff0ef;
}

.invoice-notification-item p,
.invoice-notification-item small {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-notification-item small {
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 650;
}

.invoice-notification-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.compact-button {
  min-height: 32px;
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 0.72rem;
  white-space: nowrap;
}

.compact-button svg {
  width: 15px;
  height: 15px;
}

.notification-center-button {
  align-self: center;
}

.view-page.invoice-notification-center-page.is-active {
  display: grid;
  gap: 14px;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 520px;
  height: var(--invoice-notification-page-height, auto);
}

.view-page.operation-log-page.is-active {
  display: grid;
  gap: 14px;
}

.operation-log-command {
  display: flex;
  align-items: center;
  min-height: 132px;
  padding: 22px 26px;
  color: #fff;
  background: linear-gradient(105deg, #102d55 0%, #17547d 58%, #177c73 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(21, 53, 84, 0.16);
}

.operation-log-command span {
  color: #a9dfff;
  font-size: 0.78rem;
  font-weight: 700;
}

.operation-log-command h2 {
  margin: 4px 0 6px;
  font-size: 1.38rem;
}

.operation-log-command p {
  max-width: 760px;
  margin: 0;
  color: #d5e9f7;
  font-size: 0.86rem;
}

.operation-log-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.operation-log-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 84px;
  padding: 15px 17px;
  background: #fff;
  border: 1px solid #dce8f4;
  border-radius: 7px;
}

.operation-log-stat > i {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #1c6eed;
  background: #eaf3ff;
  border-radius: 6px;
}

.operation-log-stat > div { display: grid; gap: 2px; }
.operation-log-stat span { color: #74859c; font-size: 0.8rem; }
.operation-log-stat strong { color: #11263f; font-size: 1.35rem; }

.operation-log-heading { align-items: flex-start; gap: 16px; }
.operation-log-controls { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.operation-log-search { display: flex; align-items: center; width: 235px; height: 36px; padding: 0 10px; gap: 7px; border: 1px solid #d7e3ef; border-radius: 6px; background: #fff; }
.operation-log-search i { width: 16px; color: #7a8ea7; }
.operation-log-search input { min-width: 0; width: 100%; border: 0; outline: 0; color: #1e334b; background: transparent; font: inherit; font-size: 0.82rem; }
.operation-log-list { border-top: 1px solid #e7eef5; }

.operation-log-item {
  display: grid;
  grid-template-columns: 145px 150px 96px 118px minmax(220px, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 70px;
  padding: 12px 18px;
  border-bottom: 1px solid #e7eef5;
}

.operation-log-item:hover { background: #f8fbff; }
.operation-log-item time { color: #6d819a; font-size: 0.79rem; }
.operation-log-actor { display: grid; gap: 2px; min-width: 0; }
.operation-log-actor strong, .operation-log-action { color: #172b45; font-size: 0.86rem; }
.operation-log-actor span { color: #7890aa; font-size: 0.76rem; }
.operation-log-module { width: fit-content; padding: 4px 8px; color: #1b67ce; background: #edf5ff; border-radius: 4px; font-size: 0.76rem; font-weight: 700; white-space: nowrap; }
.operation-log-item p { margin: 0; color: #536a85; font-size: 0.82rem; line-height: 1.45; }

.invoice-notification-center-command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  color: #ffffff;
  background: linear-gradient(105deg, #123d69 0%, #176d8a 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.invoice-notification-center-command > div {
  min-width: 0;
}

.invoice-notification-center-command > div > span {
  color: #9fdcff;
  font-size: 0.76rem;
  font-weight: 800;
}

.invoice-notification-center-command h2 {
  margin: 3px 0 5px;
  font-size: 1.25rem;
}

.invoice-notification-center-command p {
  margin: 0;
  color: #d7ebf8;
  font-size: 0.82rem;
  font-weight: 700;
}

.invoice-notification-center-command .ghost-button {
  flex: 0 0 auto;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.32);
}

.invoice-notification-center-command .ghost-button:hover {
  background: rgba(255, 255, 255, 0.22);
}

.invoice-notification-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 12px;
}

.invoice-notification-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 82px;
  padding: 13px 15px;
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-left: 4px solid #e8a22b;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
}

.invoice-notification-stat.is-issued {
  border-left-color: #1d9a75;
}

.invoice-notification-stat.is-completed {
  border-left-color: #3b75e6;
}

.invoice-notification-stat.is-production,
.invoice-notification-stat.is-receivable {
  border-left-color: #dc5149;
}

.invoice-notification-stat.is-service {
  border-left-color: #3b75e6;
}

.invoice-notification-stat.is-rectification {
  border-left-color: #168c87;
}

.invoice-notification-stat.is-daily {
  border-left-color: #e8a22b;
}

.invoice-notification-stat > i {
  width: 30px;
  height: 30px;
  padding: 7px;
  color: #99600a;
  background: #fff4dc;
  border-radius: 6px;
}

.invoice-notification-stat.is-issued > i {
  color: #167452;
  background: #e8f8f0;
}

.invoice-notification-stat.is-completed > i {
  color: #275fca;
  background: #eaf2ff;
}

.invoice-notification-stat.is-production > i,
.invoice-notification-stat.is-receivable > i {
  color: #bd3932;
  background: #fff0ef;
}

.invoice-notification-stat.is-service > i {
  color: #285dbd;
  background: #eaf2ff;
}

.invoice-notification-stat.is-rectification > i {
  color: #10716c;
  background: #e5f7f4;
}

.invoice-notification-stat div {
  display: grid;
  gap: 2px;
}

.invoice-notification-stat span {
  color: var(--muted);
  font-size: 0.77rem;
  font-weight: 750;
}

.invoice-notification-stat strong {
  color: var(--ink-strong);
  font-size: 1.45rem;
  font-variant-numeric: tabular-nums;
}

.invoice-notification-history-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.invoice-notification-history {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding: 12px;
}

.invoice-workflow-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #fbfdff;
  border: 1px solid #dce7f1;
  border-left: 4px solid #e8a22b;
  border-radius: var(--radius-sm);
}

.invoice-workflow-card.is-issued {
  border-left-color: #1d9a75;
}

.invoice-workflow-card.is-completed {
  border-left-color: #3b75e6;
}

.invoice-workflow-card.is-green {
  border-left-color: #1d9a75;
}

.invoice-workflow-card.is-blue {
  border-left-color: #3b75e6;
}

.invoice-workflow-card.is-danger {
  border-left-color: #dc5149;
}

.invoice-workflow-card > header,
.invoice-workflow-card > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.invoice-workflow-card header > div {
  min-width: 0;
}

.invoice-workflow-card header span,
.invoice-workflow-card header small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 750;
}

.invoice-workflow-card h3 {
  margin: 3px 0;
  color: var(--ink-strong);
  font-size: 1rem;
}

.invoice-workflow-card header em {
  flex: 0 0 auto;
  padding: 5px 8px;
  color: #985c08;
  background: #fff4dc;
  border-radius: 5px;
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 850;
}

.invoice-workflow-card.is-issued header em {
  color: #17734d;
  background: #e8f8f0;
}

.invoice-workflow-card.is-completed header em {
  color: #285dbd;
  background: #eaf2ff;
}

.invoice-workflow-card.is-green header em {
  color: #17734d;
  background: #e8f8f0;
}

.invoice-workflow-card.is-blue header em {
  color: #285dbd;
  background: #eaf2ff;
}

.invoice-workflow-card.is-danger header em {
  color: #bd3932;
  background: #fff0ef;
}

.work-notification-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.work-notification-filter .sort-tab {
  min-height: 32px;
  padding: 5px 9px;
  border-radius: 5px;
  font-size: 0.73rem;
}

.invoice-workflow-card-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.invoice-workflow-card-meta > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px 10px;
  background: #ffffff;
  border: 1px solid #e1eaf3;
  border-radius: 5px;
}

.invoice-workflow-card-meta span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 750;
}

.invoice-workflow-card-meta strong {
  overflow: hidden;
  color: var(--ink-strong);
  font-size: 0.78rem;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-workflow-card-info {
  padding: 9px 10px;
  color: var(--muted-strong);
  background: #f3f8fd;
  border-radius: 5px;
}

.invoice-workflow-card-info summary {
  color: #215f9c;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.invoice-workflow-card-info p,
.invoice-workflow-card-note {
  margin: 8px 0 0;
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.55;
  white-space: pre-wrap;
}

.invoice-workflow-card-note {
  margin: 0;
}

.invoice-workflow-card > footer {
  justify-content: flex-end;
}

.invoice-workflow-complete {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #18714d;
  font-size: 0.75rem;
  font-weight: 800;
}

.invoice-workflow-complete svg {
  width: 16px;
  height: 16px;
}

.invoice-request-option {
  align-items: start;
}

.invoice-request-checkbox {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  min-height: 42px;
  padding: 8px 10px;
  color: var(--ink);
  background: #f7fbff;
  border: 1px solid #d7e5f2;
  border-radius: 6px;
}

.invoice-request-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

.invoice-request-checkbox b {
  color: var(--ink-strong);
  font-size: 0.8rem;
}

.invoice-request-checkbox small {
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 650;
}

.toolbar label {
  display: grid;
  gap: 5px;
}

.toolbar span,
.field-label {
  color: var(--muted-strong);
  font-size: 0.81rem;
  font-weight: 800;
}

.view-tabs {
  display: grid;
  gap: 7px;
  margin-top: 0;
  padding: 5px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.view-tab {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  min-height: 38px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted-strong);
  font-weight: 850;
  white-space: nowrap;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.view-tab:hover {
  transform: translateY(-1px);
  color: var(--ink-strong);
}

.view-tab.is-active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 8px 18px rgba(31, 92, 153, 0.18);
}

.view-tab svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.1;
}

.view-page {
  display: none;
}

.view-page.is-active {
  display: block;
}

.role-notice {
  margin-top: 12px;
  padding: 10px 12px;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line-soft);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  font-size: 0.86rem;
  font-weight: 750;
}

.role-notice.is-production-navigation {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px;
  border-left-color: var(--brand);
}

.role-notice.is-production-navigation #productionPageNav { flex: 1; }

.production-entry-launch {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  color: #fff;
  background: var(--brand);
  border: 1px solid var(--brand);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  border-radius: 4px;
  cursor: pointer;
}

.production-entry-launch svg { width: 16px; height: 16px; flex: 0 0 16px; }
.production-entry-launch:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.production-entry-launch:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

.role-notice.is-collection-navigation {
  padding: 6px;
  border-left-color: var(--brand);
}

.role-notice.is-rectification-navigation {
  padding: 6px;
  border-left-color: var(--brand);
}

.production-page-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.collection-page-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.collection-page-nav::-webkit-scrollbar {
  display: none;
}

.production-page-nav::-webkit-scrollbar {
  display: none;
}

.production-page-tab {
  min-width: 112px;
  min-height: 36px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 11px;
  color: var(--muted-strong);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.production-page-tab:hover {
  color: var(--brand);
  background: #eef5fb;
  border-color: #d5e4f1;
}

.production-page-tab.is-active {
  color: #ffffff;
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 5px 12px rgba(31, 92, 153, 0.18);
}

.production-page-tab svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  stroke-width: 2.1;
}

.collection-page-tab {
  min-width: 112px;
  min-height: 36px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 11px;
  color: var(--muted-strong);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.collection-page-tab:hover {
  color: var(--brand);
  background: #eef5fb;
  border-color: #d5e4f1;
}

.collection-page-tab.is-active {
  color: #ffffff;
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 5px 12px rgba(31, 92, 153, 0.18);
}

.collection-page-tab svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  stroke-width: 2.1;
}

.production-section[hidden] {
  display: none !important;
}

.account-admin-page {
  max-width: 1120px;
  margin: 0 auto;
}

.account-panel {
  margin-top: 14px;
}

.account-page-heading {
  align-items: flex-start;
}

.account-page-heading > div {
  display: grid;
  gap: 4px;
}

.account-manager {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.account-online-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid #cfe5dd;
  border-radius: var(--radius-sm);
  background: #f5fcf8;
}

.account-online-summary strong {
  color: #17533e;
  font-size: 0.84rem;
  font-weight: 900;
}

.account-online-summary strong b {
  color: #07855a;
  font-size: 1.05rem;
}

.account-online-summary strong small,
.account-online-summary strong i,
.account-online-summary > span:last-child {
  color: #6b7f78;
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 750;
}

.account-online-dot,
.account-presence i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #17a673;
  box-shadow: 0 0 0 3px rgba(23, 166, 115, 0.12);
}

.account-form {
  display: grid;
  gap: 12px;
}

.account-form label,
.account-form-basic,
.account-form-footer {
  display: grid;
  gap: 6px;
}

.account-form-basic {
  grid-template-columns: minmax(220px, 1.15fr) minmax(180px, 0.78fr) minmax(210px, 1fr) minmax(190px, 0.92fr);
  gap: 12px;
}

.account-form label span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.account-view-picker {
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: #f8fbff;
}

.account-view-picker legend {
  padding: 0 4px;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 850;
}

.account-edit-picker {
  border-color: #f0d9a8;
  background: #fffaf0;
}

.account-edit-picker .account-permission-preview {
  color: #a96700;
}

.account-permission-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.account-permission-preview {
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 850;
}

.view-permission-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.view-permission-option {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 750;
  white-space: nowrap;
}

.view-permission-option.is-disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.account-form .view-permission-option {
  display: flex;
  min-height: 38px;
  padding: 8px 10px;
  gap: 7px;
  border: 1px solid #d7e3f2;
  border-radius: 6px;
  background: #ffffff;
}

.account-form .view-permission-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(132px, 1fr));
  gap: 8px;
}

.account-form .view-permission-option:has(input:checked) {
  color: #115fb8;
  border-color: #80b6f5;
  background: #edf6ff;
}

.account-form-footer {
  grid-template-columns: auto;
  align-items: end;
  justify-content: end;
}

.account-form-footer .text-button {
  min-height: 42px;
  justify-self: end;
}

.account-role-library {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: #f8fbff;
}

.account-role-library-head,
.account-role-library-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.account-role-library-head h3,
.account-role-library-heading h3 {
  margin: 0;
  font-size: 0.98rem;
}

.account-role-library-head p,
.account-role-library-heading p,
.role-definition-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.role-definition-form {
  display: grid;
  grid-template-columns: minmax(170px, 0.8fr) minmax(150px, 0.6fr) minmax(210px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.role-definition-form > label,
.role-definition-row > label {
  display: grid;
  gap: 6px;
}

.role-definition-form > label > span,
.role-definition-row > label > span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.role-definition-form .role-definition-view-picker {
  grid-column: 1 / -1;
}

.role-definition-list {
  display: grid;
  gap: 8px;
}

.role-definition-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.45fr) minmax(150px, 0.65fr) minmax(135px, 0.5fr) minmax(180px, 0.9fr) auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: #fff;
}

.role-definition-row-heading {
  display: grid;
  gap: 3px;
  align-self: center;
}

.role-definition-row-heading strong {
  color: var(--ink);
  font-size: 0.88rem;
}

.role-definition-row-heading span {
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 800;
}

.role-definition-row-views {
  grid-column: 1 / -2;
  margin: 0;
}

.role-definition-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

@media (max-width: 980px) {
  .role-definition-form,
  .role-definition-row {
    grid-template-columns: 1fr 1fr;
  }

  .role-definition-row-heading,
  .role-definition-row-views {
    grid-column: 1 / -1;
  }

  .role-definition-row-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .role-definition-form,
  .role-definition-row {
    grid-template-columns: 1fr;
  }

  .role-definition-row-heading,
  .role-definition-row-views {
    grid-column: auto;
  }
}

.view-permission-option input {
  width: 15px;
  min-width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--brand);
}

.view-permission-picker.is-compact {
  gap: 4px 8px;
}

.view-permission-picker.is-compact .view-permission-option {
  font-size: 0.74rem;
  font-weight: 700;
}

.view-permission-picker.is-compact .view-permission-option input {
  width: 13px;
  min-width: 13px;
  height: 13px;
}

.account-permission-preview {
  min-height: 18px;
  color: var(--brand);
  font-size: 0.74rem;
  font-weight: 750;
  line-height: 1.35;
}

.account-list {
  display: grid;
  gap: 14px;
}

.account-department-group {
  display: grid;
  gap: 8px;
}

.account-department-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
}

.account-department-heading strong {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 900;
}

.account-department-heading span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.account-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.58fr) minmax(150px, 0.55fr) minmax(0, 1.1fr) auto;
  grid-template-areas:
    "role main edit delete"
    "role access access delete";
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px;
  background: var(--panel-raised);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
}

.account-role {
  grid-area: role;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.account-role.admin {
  color: #fff;
  background: var(--brand);
}

.account-role-control {
  grid-area: role;
  display: grid;
  gap: 3px;
  min-width: 0;
  align-content: center;
}

.account-role-control > span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
}

.account-role-control input {
  min-width: 0;
  min-height: 30px;
  padding: 4px 5px;
  font-size: 0.74rem;
  font-weight: 850;
  line-height: 1.1;
}

.account-role.finance {
  color: #8a4f00;
  background: #fff3c4;
}

.account-role.sales {
  color: #0f766e;
  background: #d9f7ed;
}

.account-role.repair_manager {
  color: #075985;
  background: #e0f2fe;
}

.account-role.repair_worker {
  color: #6d3f05;
  background: #fef3c7;
}

.account-main {
  grid-area: main;
  display: grid;
  gap: 3px;
  min-width: 0;
}

.account-main strong {
  color: var(--ink-strong);
  font-weight: 900;
}

.account-main small,
.account-desc {
  color: var(--muted-strong);
  font-size: 0.82rem;
  line-height: 1.35;
}

.account-presence {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 5px;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 850;
}

.account-presence i {
  width: 6px;
  height: 6px;
  box-shadow: none;
}

.account-presence.is-online {
  color: #087653;
  background: #e9f9f1;
}

.account-presence.is-offline {
  color: #718096;
  background: #f0f4f7;
}

.account-presence.is-offline i {
  background: #98a6b5;
}

.account-desc {
  overflow-wrap: anywhere;
}

.account-access {
  grid-area: access;
  display: grid;
  gap: 7px;
  min-width: 0;
}

.account-inline-views,
.account-inline-edits {
  display: grid;
  gap: 4px;
}

.account-inline-views > span,
.account-inline-edits > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.account-edit-grid {
  grid-area: edit;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 8px;
}

.account-edit-grid label {
  display: grid;
  gap: 4px;
}

.account-edit-grid label span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.account-field-control {
  position: relative;
}

.account-field-control input {
  padding-right: 40px;
}

.account-clear-button {
  display: grid;
  place-items: center;
  position: absolute;
  top: 50%;
  right: 3px;
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  color: var(--muted-strong);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  transform: translateY(-50%);
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.account-clear-button:hover {
  color: var(--brand);
  background: #f6fafc;
  border-color: #c4d4e5;
}

.account-clear-button:disabled {
  color: var(--muted);
  cursor: not-allowed;
  background: transparent;
}

.account-clear-button svg {
  width: 15px;
  height: 15px;
}

.account-inline-edit {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  margin-top: 4px;
  padding: 3px 7px;
  gap: 4px;
  color: #1765be;
  border: 1px solid #c7ddef;
  border-radius: 4px;
  background: #f7fbff;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 850;
  cursor: pointer;
}

.account-inline-edit:hover {
  color: #0d4f94;
  border-color: #9fc4e7;
  background: #edf6ff;
}

.account-inline-edit svg { width: 14px; height: 14px; }

.account-save-button {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  gap: 5px;
  padding: 4px 9px;
  color: #1765be;
  border: 1px solid #bdd7ef;
  border-radius: 4px;
  background: #f6fbff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 850;
  cursor: pointer;
}

.account-save-button:hover {
  color: #fff;
  border-color: #1f6fd1;
  background: #1f6fd1;
}

.account-save-button svg {
  width: 15px;
  height: 15px;
}

.account-admin-note {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.35;
}

.account-row > .delete-button { grid-area: delete; }

@media (max-width: 1120px) {
  .account-row {
    grid-template-columns: minmax(150px, 0.55fr) minmax(0, 1fr) auto;
    grid-template-areas:
      "role main delete"
      "role edit delete"
      "role access delete";
  }
}

@media (max-width: 760px) {
  .account-row {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "role"
      "main"
      "edit"
      "access"
      "delete";
  }
}

.account-edit-grid input:disabled {
  color: var(--muted);
  background: #edf3f8;
}

select,
input,
textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  padding: 7px 9px;
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

textarea {
  min-width: 220px;
  resize: vertical;
}

select:focus,
input:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(31, 92, 153, 0.13);
}

select:disabled,
input:disabled,
textarea:disabled {
  cursor: not-allowed;
  color: var(--muted);
  background: #eef3f7;
  border-color: var(--line-soft);
  box-shadow: none;
  opacity: 1;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(126px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

#performanceKpiGrid {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.kpi-card {
  position: relative;
  min-height: 90px;
  padding: 14px 15px 13px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.kpi-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--brand);
  opacity: 0.9;
}

.kpi-card:nth-child(4)::before,
.kpi-card:nth-child(7)::before {
  background: var(--amber);
}

.kpi-card:nth-child(5)::before,
.kpi-card:nth-child(6)::before {
  background: var(--accent);
}

.kpi-card.good::before {
  background: var(--accent);
}

.kpi-card.warning::before {
  background: var(--amber);
}

.kpi-card.danger::before {
  background: var(--red);
}

.kpi-card .label {
  color: var(--muted-strong);
  font-size: 0.82rem;
  font-weight: 800;
}

.kpi-card .value {
  display: block;
  margin-top: 7px;
  color: var(--ink-strong);
  font-size: 1.48rem;
  line-height: 1.1;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.kpi-card .note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.performance-chart-panel {
  margin-top: 14px;
}

.follow-panel {
  margin-top: 14px;
}

.performance-chart {
  display: grid;
  gap: 0;
}

.chart-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--panel-raised);
}

.chart-summary article {
  display: grid;
  gap: 4px;
  min-height: 82px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.chart-summary span {
  color: var(--muted-strong);
  font-size: 0.8rem;
  font-weight: 850;
}

.chart-summary strong {
  color: var(--ink-strong);
  font-size: 1.24rem;
  line-height: 1.15;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.chart-summary small {
  color: var(--muted);
  line-height: 1.35;
}

.chart-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.chart-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  min-height: 158px;
  padding: 13px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.chart-card.muted {
  background: var(--row);
  opacity: 0.72;
}

.chart-rank {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--muted-strong);
  background: #edf3f8;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.chart-rank.gold {
  color: #6f4200;
  background: #fff2bf;
  border-color: #f2cd69;
}

.chart-rank.silver {
  color: #3f556f;
  background: #edf2f7;
  border-color: #cbd5e1;
}

.chart-rank.bronze {
  color: #7a3f12;
  background: #ffe8d5;
  border-color: #f2b27f;
}

.chart-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.chart-card-head,
.chart-card-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.chart-card-head div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.chart-card-head strong {
  color: var(--ink-strong);
  font-size: 1.08rem;
  font-weight: 850;
  line-height: 1.2;
}

.chart-card-head span,
.chart-card-foot span {
  color: var(--muted-strong);
  font-size: 0.82rem;
  line-height: 1.35;
}

.chart-card-head em {
  min-height: 24px;
  padding: 3px 9px;
  color: var(--brand);
  background: #eaf3fb;
  border-radius: 999px;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.chart-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.chart-metrics span {
  display: grid;
  gap: 3px;
  min-height: 50px;
  padding: 8px;
  color: var(--muted);
  background: var(--row);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  line-height: 1.2;
}

.chart-metrics b {
  color: var(--ink-strong);
  font-size: 0.98rem;
  line-height: 1.15;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.chart-metrics .good b {
  color: var(--green);
}

.chart-metrics .warn b {
  color: var(--amber);
}

.chart-metrics .bad b {
  color: var(--red);
}

.chart-metrics .neutral b {
  color: var(--muted-strong);
}

.chart-scale {
  position: relative;
  height: 14px;
  overflow: visible;
  background: #e7edf4;
  border: 1px solid #d4dee9;
  border-radius: 999px;
}

.chart-scale-fill {
  display: block;
  height: 100%;
  min-width: 2px;
  background: var(--brand);
  border-radius: inherit;
  transition: width 220ms ease;
}

.chart-target-marker {
  position: absolute;
  top: -5px;
  bottom: -5px;
  width: 2px;
  background: var(--amber);
  border-radius: 999px;
  box-shadow: 0 0 0 3px rgba(161, 92, 7, 0.16);
}

.chart-card-foot {
  color: var(--muted-strong);
}

.chart-muted-note {
  padding: 0 14px 14px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.chart-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.22fr) minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border-bottom: 1px solid var(--line-soft);
}

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

.chart-person {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
}

.chart-person strong {
  color: var(--ink-strong);
  font-size: 1rem;
  font-weight: 850;
}

.chart-person span,
.chart-meta {
  color: var(--muted-strong);
  font-size: 0.84rem;
  line-height: 1.35;
}

.chart-lines {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.chart-line {
  display: grid;
  grid-template-columns: 38px minmax(120px, 1fr) 54px;
  align-items: center;
  gap: 10px;
}

.chart-label {
  color: var(--muted-strong);
  font-size: 0.82rem;
  font-weight: 850;
}

.chart-track {
  height: 12px;
  overflow: hidden;
  background: #e7edf4;
  border: 1px solid #d4dee9;
  border-radius: 999px;
}

.chart-fill {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  transition: width 220ms ease;
}

.chart-fill.good-fill {
  background: linear-gradient(90deg, #18a765, #86efac);
}

.chart-fill.ok-fill {
  background: linear-gradient(90deg, #2181ad, #93d5ef);
}

.chart-fill.warn-fill {
  background: linear-gradient(90deg, #d97706, #fde68a);
}

.chart-fill.bad-fill {
  background: linear-gradient(90deg, #dc2626, #fecaca);
}

.chart-line strong {
  color: var(--ink-strong);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.chart-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-left: 48px;
}

.follow-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(132px, 1fr));
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.follow-summary-grid .kpi-card {
  min-height: 76px;
  box-shadow: none;
}

.follow-list {
  display: grid;
}

.follow-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.24fr) minmax(300px, 0.42fr) minmax(220px, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
}

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

.follow-row.priority {
  background: linear-gradient(90deg, rgba(254, 232, 230, 0.72), rgba(255, 255, 255, 0.9));
}

.follow-owner,
.follow-action {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.follow-owner strong,
.follow-action strong {
  color: var(--ink-strong);
  font-weight: 850;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.follow-owner span,
.follow-action span {
  color: var(--muted-strong);
  font-size: 0.84rem;
  line-height: 1.35;
}

.follow-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(70px, 1fr));
  gap: 8px;
}

.follow-metrics span {
  display: grid;
  gap: 3px;
  min-height: 44px;
  padding: 7px 8px;
  background: var(--row);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  color: var(--muted-strong);
  font-size: 0.78rem;
  line-height: 1.2;
}

.follow-metrics b {
  color: var(--ink-strong);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.08fr);
  gap: 14px;
  margin-top: 14px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--panel-raised);
}

.save-status {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.attention-list {
  display: grid;
  gap: 0;
}

.attention-row,
.progress-row {
  display: grid;
  align-items: center;
  gap: 7px 12px;
  min-height: 54px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.attention-row {
  grid-template-columns: minmax(120px, 1fr) auto;
  grid-template-areas:
    "name value"
    "rule action";
}

.attention-row:last-child,
.progress-row:last-child {
  border-bottom: 0;
}

.attention-row.high {
  background: linear-gradient(90deg, rgba(254, 232, 230, 0.86), rgba(255, 255, 255, 0.9));
}

.attention-row.medium {
  background: linear-gradient(90deg, rgba(255, 243, 196, 0.82), rgba(255, 255, 255, 0.9));
}

.attention-name,
.progress-name {
  color: var(--ink-strong);
  font-weight: 850;
}

.attention-name {
  grid-area: name;
}

.attention-value {
  grid-area: value;
  justify-self: end;
  color: var(--ink-strong);
  text-align: right;
  font-size: 1.12rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.attention-rule,
.attention-action {
  color: var(--muted-strong);
  font-size: 0.88rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.attention-rule {
  grid-area: rule;
}

.attention-action {
  grid-area: action;
  justify-self: end;
  max-width: 24em;
  text-align: right;
}

.attention-focus {
  padding: 12px;
  background: #f8fbfe;
  border-top: 1px solid var(--line-soft);
}

.attention-focus-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.attention-focus-head strong {
  color: var(--ink-strong);
  font-size: 0.96rem;
  font-weight: 900;
}

.attention-focus-head span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.attention-focus-list {
  display: grid;
  gap: 8px;
}

.attention-focus-row {
  display: grid;
  grid-template-columns: 54px minmax(170px, 1.2fr) minmax(94px, 0.55fr) minmax(150px, 0.9fr) minmax(210px, 1.2fr);
  gap: 10px;
  align-items: center;
  min-height: 64px;
  padding: 10px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 22px rgba(35, 64, 92, 0.06);
}

.attention-focus-row:hover {
  background: #f2f8fd;
  transform: translateY(-1px);
}

.attention-focus-rank {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 28px;
  color: #fff;
  background: #b91c1c;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 900;
}

.attention-focus-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.attention-focus-main strong,
.attention-focus-money strong {
  color: var(--ink-strong);
  font-weight: 900;
}

.attention-focus-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attention-focus-main small,
.attention-focus-money small,
.attention-focus-action {
  color: var(--muted-strong);
  font-size: 0.82rem;
  line-height: 1.35;
}

.attention-focus-money {
  display: grid;
  gap: 3px;
  font-variant-numeric: tabular-nums;
}

.attention-focus-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.attention-focus-tags i {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  color: #9f1239;
  background: #ffe4e6;
  border-radius: 999px;
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 900;
}

.attention-focus-action {
  overflow-wrap: anywhere;
}

.progress-list {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.debt-queue-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.debt-queue-summary button {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 10px;
  text-align: left;
  background: var(--panel-raised);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
}

.debt-queue-summary button:hover,
button.progress-row:hover,
.debt-home-more:hover {
  background: #f2f8fd;
  transform: translateY(-1px);
}

.debt-queue-summary span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.debt-queue-summary strong {
  color: var(--ink-strong);
  font-size: 1.12rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.debt-queue-head {
  display: grid;
  grid-template-columns: 34px minmax(160px, 1fr) minmax(106px, 0.42fr) minmax(106px, 0.42fr) minmax(170px, 1.1fr);
  gap: 10px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.debt-home-list {
  display: grid;
  gap: 6px;
}

button.progress-row {
  width: 100%;
  text-align: left;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
}

.progress-row {
  grid-template-columns: 34px minmax(160px, 1fr) minmax(106px, 0.42fr) minmax(106px, 0.42fr) minmax(170px, 1.1fr);
  grid-template-areas:
    "rank name money status action"
    "bar bar bar bar bar";
  min-height: 70px;
}

.progress-rank {
  grid-area: rank;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: var(--brand);
  background: #e8f2fb;
  border: 1px solid #c9dced;
  border-radius: var(--radius-sm);
  font-weight: 900;
}

.progress-money {
  grid-area: money;
  display: grid;
  gap: 2px;
  justify-items: end;
  min-width: 0;
  text-align: right;
}

.progress-money small,
.progress-name small,
.progress-status small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.progress-money strong {
  color: var(--ink-strong);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.progress-status {
  grid-area: status;
  display: grid;
  gap: 4px;
  justify-self: end;
  justify-items: end;
  text-align: right;
}

.progress-action {
  grid-area: action;
  color: var(--muted-strong);
  font-size: 0.84rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.debt-home-more {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
  padding: 0 12px;
  color: var(--brand);
  background: #f7fbff;
  border: 1px dashed #bfd2e5;
  border-radius: var(--radius-sm);
  font-weight: 850;
}

.debt-home-more span {
  color: var(--muted);
  font-size: 0.8rem;
}

.bar-track {
  grid-area: bar;
  position: relative;
  height: 14px;
  overflow: hidden;
  background: #e7edf4;
  border: 1px solid #d4dee9;
  border-radius: 999px;
}

.bar-fill {
  height: 100%;
  min-width: 2px;
  background: linear-gradient(90deg, #1fb86d, #7ee3a5);
  border-radius: inherit;
  transition: width 220ms ease;
}

.bar-fill.warn-fill {
  background: linear-gradient(90deg, #d97706, #fde68a);
}

.bar-fill.bad-fill {
  background: linear-gradient(90deg, #dc2626, #fecaca);
}

.empty-state {
  padding: 18px 14px;
  color: var(--muted-strong);
  line-height: 1.5;
}

.progress-name {
  grid-area: name;
  display: grid;
  gap: 3px;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.progress-name strong {
  color: var(--ink-strong);
}

.progress-meta {
  grid-area: meta;
  justify-self: start;
  min-width: 0;
  color: var(--muted-strong);
  font-size: 0.88rem;
  text-align: left;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.debt-ranking-panel {
  margin-top: 14px;
}

/* Owner assignment needs to sit above the next row and category total when expanded. */
.debt-ranking-panel.is-owner-picker-open,
.debt-ranking-panel:has(.debt-owner-picker[open]) {
  position: relative;
  z-index: 8;
  overflow: visible;
}

.attention-scope-tabs,
.debt-sort-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: #eef4fa;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.sort-tab {
  min-height: 30px;
  padding: 0 10px;
  color: var(--muted-strong);
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  font-weight: 850;
}

.sort-tab.is-active {
  color: #fff;
  background: var(--brand);
  box-shadow: var(--shadow-soft);
}

.debt-source-order {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 10px;
  color: #a15c00;
  background: #fff4d9;
  border: 1px solid #f0ce8c;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 850;
  white-space: nowrap;
}

.debt-source-order svg {
  width: 16px;
  height: 16px;
}

.debt-ranking-list {
  display: grid;
  gap: 12px;
}

.debt-ranking-section {
  overflow: hidden;
  border: 1px solid #cbdde7;
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: 0 6px 18px rgba(30, 74, 102, 0.05);
}

.debt-ranking-section.is-owner-picker-open,
.debt-ranking-section:has(.debt-owner-picker[open]) {
  position: relative;
  z-index: 12;
  overflow: visible;
}

.debt-ranking-section-heading,
.debt-ranking-section-heading.is-orange {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 14px;
  color: #12475c;
  background: #e2f2f5;
  border-bottom: 1px solid #9fcbd4;
  box-shadow: inset 4px 0 0 #15949a;
}

.debt-ranking-section-title {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
  grid-column: 1;
}

.debt-ranking-section-heading span {
  color: #487489;
  font-size: 0.74rem;
  font-weight: 850;
}

.debt-ranking-section-heading strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.96rem;
}

.debt-ranking-section-heading small {
  grid-column: 2;
  flex: 0 0 auto;
  color: #2f6d7b;
  font-weight: 850;
}

@media (max-width: 1120px) {
  .debt-ranking-section-heading,
  .debt-ranking-section-heading.is-orange {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .debt-ranking-section-title {
    grid-column: 1;
  }

  .debt-ranking-section-heading small {
    grid-column: 2;
  }
}

.debt-ranking-section-heading.is-yellow {
  color: #194d78;
  background: #e8f1fd;
  border-bottom-color: #aac7e9;
  box-shadow: inset 4px 0 0 #337bd0;
}

.debt-ranking-section-heading.is-yellow span,
.debt-ranking-section-heading.is-yellow small {
  color: #4d729a;
}

.debt-ranking-section-heading.is-green {
  color: #145e4b;
  background: #e4f5ed;
  border-bottom-color: #acd9c4;
  box-shadow: inset 4px 0 0 #29916a;
}

.debt-ranking-section-heading.is-green span,
.debt-ranking-section-heading.is-green small {
  color: #397c69;
}

.debt-ranking-section-heading.is-neutral {
  color: #35536d;
  background: #edf3f8;
  border-bottom-color: #c6d8e7;
  box-shadow: inset 4px 0 0 #6d89a1;
}

.debt-ranking-section-heading.is-neutral span,
.debt-ranking-section-heading.is-neutral small {
  color: #58738c;
}

.debt-ranking-row {
  display: grid;
  grid-template-columns: 44px minmax(260px, 1.32fr) 104px minmax(130px, 0.58fr) minmax(130px, 0.58fr) 82px minmax(144px, 0.62fr) minmax(260px, 1fr) minmax(280px, 1.08fr) 92px;
  column-gap: 18px;
  row-gap: 10px;
  align-items: center;
  min-height: 76px;
  padding: 13px 20px;
  border-bottom: 1px solid #dce8ef;
  background: #fff;
}

/* Keep the follow-up action visible when the expanded work-module sidebar narrows the content area. */
@media (min-width: 861px) {
  .workspace-layout:not(.sidebar-collapsed) .debt-ranking-row {
    grid-template-columns: 40px minmax(220px, 1.18fr) 88px minmax(108px, 0.52fr) minmax(108px, 0.52fr) 70px minmax(118px, 0.56fr) minmax(190px, 0.8fr) minmax(200px, 0.84fr) 88px;
    column-gap: 12px;
    padding-inline: 16px;
  }

  .workspace-layout:not(.sidebar-collapsed) .debt-follow-action {
    justify-self: stretch;
  }

  .workspace-layout:not(.sidebar-collapsed) .debt-follow-action .ghost-button {
    width: 100%;
    min-width: 0;
    justify-content: center;
    padding-inline: 7px;
  }
}

.debt-ranking-section .debt-ranking-row:last-child {
  border-bottom: 0;
}

.debt-ranking-section-total {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 22px;
  min-height: 48px;
  padding: 9px 18px;
  color: #33566e;
  background: #f6fafc;
  border-top: 1px solid #d6e4ec;
  font-variant-numeric: tabular-nums;
}

.debt-ranking-section-total > span {
  margin-right: 8px;
  color: #6a8194;
  font-size: 0.78rem;
  font-weight: 850;
}

.debt-ranking-section-total strong {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  color: #123b59;
  font-size: 0.92rem;
  white-space: nowrap;
}

.debt-ranking-section-total strong small {
  color: #6a8194;
  font-size: 0.76rem;
  font-weight: 850;
}

.debt-ranking-section-total strong.is-unpaid {
  color: #bc6a0b;
}

.debt-ranking-section-total strong.is-unpaid small {
  color: #a66b24;
}

.debt-ranking-row:nth-child(odd) {
  background: #f8fbfd;
}

.debt-ranking-row.is-selected {
  background: #e7f4ff;
  box-shadow: inset 4px 0 0 var(--brand);
}

.debt-ranking-row:last-child {
  border-bottom: 0;
}

.debt-rank {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--brand);
  background: #e8f2fb;
  border: 1px solid #c9dced;
  border-radius: var(--radius-sm);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.debt-customer,
.debt-money,
.debt-payment,
.debt-owner {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.debt-ranking-row .debt-owner,
.debt-ranking-row .debt-money {
  justify-items: center;
  text-align: center;
}

.debt-ranking-row .debt-owner > span,
.debt-ranking-row .debt-money > span,
.debt-ranking-row .debt-money > strong {
  width: 100%;
  text-align: center;
}

.debt-ranking-row .debt-payment,
.debt-ranking-row .debt-action {
  justify-items: start;
  text-align: left;
}

.debt-ranking-row .debt-payment > strong {
  width: 100%;
  text-align: left;
}

.debt-status {
  align-content: center;
  align-items: start;
  gap: 6px;
}

.debt-status .tag {
  justify-self: start;
  min-height: 25px;
  padding: 0 10px;
}

.debt-status small {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  color: #687f95;
  background: #f1f6fa;
  border-radius: 4px;
  white-space: nowrap;
}

.debt-customer strong {
  color: var(--ink-strong);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.debt-customer span,
.debt-money span,
.debt-status small,
.debt-owner span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.35;
}

.debt-money strong {
  color: var(--ink-strong);
  font-size: 1.02rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.debt-payment strong {
  display: -webkit-box;
  overflow: hidden;
  color: #294c6a;
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.debt-owner strong {
  color: var(--ink-strong);
  font-size: 0.92rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.debt-owner-picker {
  position: relative;
  z-index: 1;
  justify-self: center;
  width: 72px;
  max-width: 72px;
  flex: 0 0 72px;
  min-width: 0;
}

.debt-owner-picker > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  width: 72px;
  min-width: 0;
  min-height: 34px;
  padding: 4px 6px 4px 8px;
  color: var(--ink-strong);
  background: #fff;
  border: 1px solid #9fc7eb;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.debt-owner-picker > summary::-webkit-details-marker {
  display: none;
}

.debt-owner-picker-value {
  display: grid;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}

.debt-owner-picker-value > span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
}

.debt-owner-picker-value .is-historical {
  color: #8a671e;
  font-size: 0.78rem;
  font-weight: 750;
}

.debt-owner-picker > summary > svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.debt-owner-picker > summary:hover,
.debt-owner-picker[open] > summary {
  border-color: var(--brand);
}

.debt-owner-picker[open] {
  z-index: 30;
}

.debt-owner-picker > summary:focus-visible {
  outline: 2px solid rgba(31, 111, 235, 0.16);
  outline-offset: 3px;
}

.debt-owner-picker-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  display: grid;
  gap: 8px;
  width: max(264px, 100%);
  max-height: min(360px, calc(100vh - 140px));
  padding: 10px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #b8d3eb;
  border-radius: 6px;
  box-shadow: 0 12px 26px rgba(21, 66, 104, 0.2);
}

.debt-owner-picker-menu > p,
.debt-owner-picker-menu > small {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.debt-owner-picker-menu > small {
  color: #8a671e;
}

.debt-owner-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.debt-owner-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 6px 7px;
  color: var(--ink-strong);
  background: #f6faff;
  border: 1px solid #d7e5f2;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 750;
  cursor: pointer;
}

.debt-owner-options input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--brand);
}

.debt-owner-picker-menu .text-button {
  justify-self: end;
}

.debt-owner-select {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 5px 28px 5px 9px;
  color: var(--ink-strong);
  background-color: #fff;
  border: 1px solid #9fc7eb;
  border-radius: 5px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
}

.debt-owner-select:hover,
.debt-owner-select:focus-visible {
  border-color: var(--brand);
  outline: 2px solid rgba(31, 111, 235, 0.16);
  outline-offset: 1px;
}

.debt-rate .rate-bar {
  min-width: 0;
  width: 100%;
  max-width: 108px;
}

.debt-age strong {
  font-size: 0.92rem;
  line-height: 1.3;
}

.debt-action {
  display: grid;
  grid-template-rows: 18px 42px;
  align-content: center;
  gap: 4px;
  min-width: 0;
  color: var(--muted-strong);
  font-size: 0.88rem;
  line-height: 1.45;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.debt-action-head > span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.debt-action > strong {
  display: -webkit-box;
  min-width: 0;
  max-height: calc(1.45em * 2);
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 0.88rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.debt-follow-action {
  justify-self: end;
}

.debt-follow-action .ghost-button {
  white-space: nowrap;
}

.customer-follow-dialog {
  width: min(920px, calc(100vw - 32px));
  max-height: min(780px, calc(100dvh - 32px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  color: var(--ink-strong);
  background: #fff;
  border: 1px solid #d3e0ed;
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(12, 42, 73, 0.3);
}

.customer-follow-dialog::backdrop {
  background: rgba(8, 30, 52, 0.45);
}

.customer-follow-dialog-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: inherit;
}

.customer-follow-dialog-card > header,
.customer-follow-dialog-card > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: #fff;
}

.customer-follow-dialog-card > header {
  border-bottom: 1px solid #deebf6;
}

.customer-follow-dialog-card > header > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.customer-follow-dialog-card > header span,
.customer-follow-section-heading span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.customer-follow-dialog-card h2,
.customer-follow-section-heading h3 {
  margin: 0;
  color: var(--ink-strong);
}

.customer-follow-dialog-card h2 {
  font-size: 1.2rem;
  overflow-wrap: anywhere;
}

.customer-follow-dialog-content {
  display: grid;
  gap: 16px;
  min-height: 240px;
  padding: 16px 20px;
  overflow: auto;
  background: #f6f9fc;
}

.customer-follow-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #dce8f3;
  border-radius: var(--radius-sm);
}

.customer-follow-summary span {
  display: grid;
  gap: 2px;
  color: var(--muted-strong);
  font-size: 0.82rem;
  font-weight: 800;
}

.customer-follow-summary b,
.customer-follow-summary strong {
  color: var(--ink-strong);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.customer-follow-summary .is-good {
  color: #078960;
}

.customer-follow-summary .is-warn {
  color: #c47000;
}

.customer-follow-latest {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  background: #edf7ff;
  border: 1px solid #cce1f2;
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
}

.customer-follow-current {
  background: #fff;
  border: 1px solid #dce8f3;
  border-radius: var(--radius-sm);
}

.customer-follow-current-form {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
}

.customer-follow-current-head > div,
.customer-follow-current-readonly {
  display: grid;
  gap: 3px;
}

.customer-follow-current-head strong,
.customer-follow-current-readonly strong {
  color: var(--ink-strong);
  font-size: 0.96rem;
}

.customer-follow-current-head span,
.customer-follow-current-readonly span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.customer-follow-current-fields {
  display: grid;
  grid-template-columns: minmax(190px, 0.7fr) minmax(0, 1.8fr) auto auto;
  gap: 10px;
  align-items: end;
}

.customer-follow-current-fields label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.customer-follow-current-fields label > span {
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 800;
}

.customer-follow-current-fields select,
.customer-follow-current-fields textarea {
  width: 100%;
  color: var(--ink-strong);
  font: inherit;
  background: #f8fbfe;
  border: 1px solid #ccdae8;
  border-radius: 6px;
}

.customer-follow-current-fields select {
  height: 38px;
  padding: 0 9px;
}

.customer-follow-current-fields textarea {
  min-height: 54px;
  padding: 8px 9px;
  resize: vertical;
}

.customer-follow-current-fields .text-button {
  min-height: 38px;
  white-space: nowrap;
}

.customer-follow-current-readonly {
  padding: 12px 14px;
  background: #f7fafc;
}

.customer-follow-latest-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.customer-follow-latest-head > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.customer-follow-latest-head span,
.customer-follow-latest small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.customer-follow-latest-head strong {
  color: var(--ink-strong);
  font-size: 0.92rem;
}

.customer-follow-latest-head time {
  flex: 0 0 auto;
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.customer-follow-latest p {
  margin: 0;
  color: var(--ink-strong);
  font-size: 0.9rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.customer-follow-latest-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.customer-follow-latest-actions {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
}

.customer-follow-latest-actions .text-button {
  min-height: 32px;
  padding: 0 10px;
}

.customer-follow-withdraw {
  color: #bf3f37;
  border-color: #efc5c1;
  background: #fff9f8;
}

.customer-follow-withdraw:hover {
  color: #a52e29;
  border-color: #e69e99;
  background: #fff1ef;
}

.customer-follow-section {
  display: grid;
  gap: 8px;
}

.customer-follow-details-section {
  display: block;
  min-height: 59px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dce8f3;
  border-radius: var(--radius-sm);
}

.customer-follow-details-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 11px 12px;
  color: var(--ink-strong);
  text-align: left;
  cursor: pointer;
  background: #fff;
  border: 0;
}

.customer-follow-details-toggle > span {
  display: grid;
  gap: 2px;
}

.customer-follow-details-toggle strong {
  font-size: 0.96rem;
}

.customer-follow-details-toggle small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.customer-follow-details-toggle svg {
  width: 17px;
  height: 17px;
  color: var(--muted-strong);
  transition: transform 160ms ease;
}

.customer-follow-details-section.is-open .customer-follow-details-toggle {
  border-bottom: 1px solid #dce8f3;
  background: #f7fbff;
}

.customer-follow-details-section.is-open .customer-follow-details-toggle svg {
  transform: rotate(180deg);
}

.customer-follow-details-section .customer-follow-records {
  padding: 10px;
}

.customer-follow-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.customer-follow-section-heading h3 {
  font-size: 0.98rem;
}

.customer-follow-records,
.customer-follow-history {
  display: grid;
  gap: 8px;
}

.customer-follow-record,
.customer-follow-history-item {
  background: #fff;
  border: 1px solid #dce8f3;
  border-radius: var(--radius-sm);
}

.customer-follow-record {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.customer-follow-record > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.customer-follow-record > header > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.customer-follow-record > header strong {
  color: var(--ink-strong);
  font-size: 0.94rem;
}

.customer-follow-record > header span,
.customer-follow-record-action span,
.customer-follow-history-item p,
.customer-follow-history-item span {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.customer-follow-record-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.customer-follow-record-metrics span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px 9px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  background: #f4f8fc;
  border: 1px solid #e4edf5;
  border-radius: 6px;
}

.customer-follow-record-metrics b {
  color: var(--ink-strong);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.customer-follow-record-metrics .is-warn {
  color: #c47000;
}

.customer-follow-record-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding-top: 8px;
  border-top: 1px solid #e7eef5;
}

.customer-follow-record-action > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.customer-follow-record-action p,
.customer-follow-history-item p {
  margin: 0;
  overflow-wrap: anywhere;
}

.customer-follow-record-action p {
  color: var(--ink-strong);
  font-size: 0.86rem;
  line-height: 1.45;
}

.customer-follow-history-item {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  padding: 11px 12px;
  border-left: 3px solid var(--brand);
}

.customer-follow-history-item.is-warning {
  border-left-color: #e49a1f;
}

.customer-follow-history-item.is-danger {
  border-left-color: #df4e4e;
}

.customer-follow-history-item.is-system {
  border-left-color: #7b8ea3;
}

.customer-follow-history-item time {
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 800;
}

.customer-follow-history-item > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.customer-follow-history-item strong {
  color: var(--ink-strong);
  font-size: 0.88rem;
}

.customer-follow-dialog-card > footer {
  justify-content: flex-end;
  border-top: 1px solid #deebf6;
}

.production-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.75fr);
  gap: 14px;
  margin-top: 14px;
}

.production-command-band {
  display: grid;
  grid-template-columns: minmax(210px, 0.72fr) minmax(0, 1.28fr);
  gap: 20px;
  align-items: center;
  padding: 16px 18px;
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.production-command-copy {
  display: grid;
  gap: 4px;
}

.production-command-copy > span {
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 900;
}

.production-command-copy h2 {
  color: var(--ink-strong);
  font-size: 1.18rem;
  line-height: 1.2;
}

.production-command-copy p {
  color: var(--muted-strong);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.45;
}

.production-command-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
  border: 1px solid #dfe8f3;
  border-radius: var(--radius-sm);
}

.production-command-stats button {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 11px 13px;
  color: var(--ink-strong);
  text-align: left;
  background: #ffffff;
  border: 0;
  border-right: 1px solid #e5edf5;
  cursor: pointer;
}

.production-command-stats button:last-child {
  border-right: 0;
}

.production-command-stats button:hover {
  background: #f5f9fe;
}

.production-command-stats span,
.production-command-stats small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-command-stats strong {
  color: var(--brand);
  font-size: 1.38rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}

.production-command-stats strong.danger {
  color: var(--red);
}

.production-command-stats strong.warn {
  color: #bc7600;
}

.production-work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.78fr);
  gap: 14px;
}

.production-work-panel {
  min-width: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.production-work-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 58px;
  padding: 11px 15px;
  border-bottom: 1px solid #e5edf5;
}

.production-work-panel > header > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.production-work-panel > header h2 {
  color: var(--ink-strong);
  font-size: 1rem;
}

.production-work-panel > header span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.35;
}

.production-action-list,
.production-risk-list,
.production-project-work-list {
  display: grid;
}

.production-action-row-item {
  display: grid;
  grid-template-columns: 48px minmax(88px, 0.78fr) minmax(150px, 1.5fr) minmax(62px, 0.58fr) minmax(64px, 0.56fr) 88px;
  gap: 9px;
  align-items: center;
  min-height: 74px;
  padding: 9px 12px;
  border-bottom: 1px solid #e8eef5;
}

.production-action-row-item:last-child,
.production-risk-item:last-child,
.production-project-work-row:last-child {
  border-bottom: 0;
}

.production-action-row-item.danger {
  background: #fffdfc;
  box-shadow: inset 3px 0 0 var(--red);
}

.production-action-row-item.warn {
  background: #fffefa;
  box-shadow: inset 3px 0 0 #e9a11c;
}

.production-action-priority,
.production-action-project,
.production-action-issue,
.production-action-owner,
.production-action-deadline {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.production-action-priority span {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  color: var(--brand);
  background: #edf5ff;
  border: 1px solid #d3e4f7;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 900;
}

.production-action-priority em {
  color: var(--muted-strong);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.production-action-project strong,
.production-action-issue strong,
.production-action-owner strong,
.production-action-deadline strong {
  overflow: hidden;
  color: var(--ink-strong);
  font-size: 0.82rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-action-project span,
.production-action-issue span,
.production-action-owner span,
.production-action-deadline span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.71rem;
  font-weight: 700;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-action-controls,
.production-project-work-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.production-action-controls .compact,
.production-project-work-actions .compact {
  min-height: 30px;
  padding: 0 8px;
  font-size: 0.76rem;
}

.production-action-controls .icon-button {
  width: 30px;
  height: 30px;
}

.production-risk-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 76px;
  padding: 11px 13px;
  border-bottom: 1px solid #e8eef5;
}

.production-risk-item.danger {
  box-shadow: inset 3px 0 0 var(--red);
}

.production-risk-item.warn {
  box-shadow: inset 3px 0 0 #e9a11c;
}

.production-risk-item > div:first-child,
.production-risk-item > div:last-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.production-risk-item strong {
  overflow: hidden;
  color: var(--ink-strong);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-risk-item span {
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 0.74rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-risk-item > div:last-child {
  justify-items: end;
}

.production-risk-item .compact {
  min-height: 29px;
  padding: 0 8px;
  font-size: 0.75rem;
}

.production-project-work-panel {
  margin-top: 14px;
}

.production-project-work-head,
.production-project-work-row {
  display: grid;
  grid-template-columns: minmax(168px, 1.25fr) minmax(108px, 0.78fr) minmax(86px, 0.58fr) minmax(160px, 1.05fr) minmax(82px, 0.58fr) 76px;
  gap: 11px;
  align-items: center;
  padding: 10px 14px;
}

.production-project-work-head {
  min-height: 34px;
  color: var(--muted);
  background: #f6f9fc;
  border-bottom: 1px solid #e5edf5;
  font-size: 0.72rem;
  font-weight: 900;
}

.production-project-work-row {
  min-height: 67px;
  border-bottom: 1px solid #e8eef5;
}

.production-project-work-row:hover {
  background: #f8fbfe;
}

.production-project-work-row > div:not(.production-project-work-actions) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.production-project-work-row strong {
  overflow: hidden;
  color: var(--ink-strong);
  font-size: 0.8rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-project-work-row span,
.production-project-work-row small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-project-work-row .production-inline-status {
  width: max-content;
  max-width: 100%;
  padding: 3px 6px;
  border: 1px solid #bdd5ed;
  border-radius: 3px;
  color: var(--brand);
  background: #edf5ff;
}

.production-project-work-row .production-inline-status.danger {
  color: var(--red);
  background: #fff0ef;
  border-color: #f2c4c1;
}

.production-project-work-row .production-inline-status.warn {
  color: #ad6b00;
  background: #fff7e7;
  border-color: #f0d49b;
}

.production-project-work-row .production-inline-status.green {
  color: #08775d;
  background: #e9f8f3;
  border-color: #afe1d1;
}

.production-capacity-brief {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr));
  margin-top: 14px;
  overflow: hidden;
  background: #eef7ff;
  border: 1px solid #cfe3f5;
  border-radius: var(--radius);
}

.production-capacity-brief > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 13px 16px;
  border-right: 1px solid #d6e7f5;
}

.production-capacity-brief > div:last-child {
  border-right: 0;
}

.production-capacity-brief span,
.production-capacity-brief small {
  overflow: hidden;
  color: #60758d;
  font-size: 0.75rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-capacity-brief strong {
  overflow: hidden;
  color: #153451;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-capacity-brief.has-variance > div:nth-child(3) strong,
.production-capacity-brief.has-variance > div:first-child strong {
  color: var(--red);
}

.production-work-empty {
  display: grid;
  place-items: center;
  gap: 7px;
  min-height: 230px;
  padding: 24px;
  color: var(--muted-strong);
  text-align: center;
}

.production-work-empty svg {
  width: 24px;
  height: 24px;
  color: var(--green);
}

.production-work-empty strong {
  color: var(--ink-strong);
  font-size: 0.88rem;
}

.production-work-empty span {
  font-size: 0.78rem;
}

.production-work-empty.is-compact {
  min-height: 320px;
}

.production-capacity-card {
  display: grid;
  gap: 16px;
  grid-column: 1 / -1;
  padding: 18px;
  color: #eaf4ff;
  background: linear-gradient(118deg, #0b3156 0%, #155a96 58%, #19736f 100%);
  border: 1px solid #1e6399;
  border-radius: var(--radius);
  box-shadow: 0 12px 26px rgba(13, 53, 87, 0.18);
}

.production-capacity-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.production-capacity-head > div:first-child {
  display: grid;
  gap: 4px;
}

.production-capacity-head span {
  color: #a8d9ff;
  font-size: 0.78rem;
  font-weight: 900;
}

.production-capacity-head h2 {
  color: #fff;
  font-size: 1.2rem;
  line-height: 1.25;
}

.production-capacity-head p {
  color: #c3ddf1;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.45;
}

.production-capacity-scope {
  flex: 0 0 auto;
  padding: 7px 10px;
  color: #e5f7ff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(210, 238, 255, 0.25);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.production-capacity-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(210, 238, 255, 0.2);
  border-radius: var(--radius-sm);
}

.production-capacity-metrics > div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px 16px;
  background: rgba(4, 28, 51, 0.16);
  border-right: 1px solid rgba(210, 238, 255, 0.18);
}

.production-capacity-metrics > div:last-child {
  border-right: 0;
}

.production-capacity-metrics span,
.production-capacity-metrics small {
  color: #c6dfef;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.production-capacity-metrics strong {
  color: #fff;
  font-size: 1.28rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  white-space: nowrap;
}

.production-capacity-metrics .forecast {
  background: rgba(7, 79, 124, 0.28);
}

.production-capacity-metrics .variance strong {
  color: #ffe09b;
}

.production-capacity-card:not(.has-variance) .variance strong {
  color: #a5f1cf;
}

.production-capacity-metrics .recommendation {
  background: rgba(15, 101, 91, 0.3);
}

.production-overview-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

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

.production-chart-head div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.production-chart-head h2 {
  color: var(--ink-strong);
  font-size: 1rem;
  line-height: 1.25;
}

.production-chart-head span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
}

.production-chart-head > strong {
  color: var(--brand);
  font-size: 1.45rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

.order-progress-chart {
  display: grid;
  align-content: start;
  gap: 10px;
  max-height: 236px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-color: #9fb6ce #e7edf4;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.order-progress-chart::-webkit-scrollbar {
  width: 8px;
}

.order-progress-chart::-webkit-scrollbar-track {
  background: #e7edf4;
  border-radius: 999px;
}

.order-progress-chart::-webkit-scrollbar-thumb {
  background: #9fb6ce;
  border-radius: 999px;
}

.order-progress-chart::-webkit-scrollbar-thumb:hover {
  background: #7793ad;
}

.order-progress-row {
  display: grid;
  grid-template-columns: 34px minmax(190px, 0.78fr) minmax(220px, 1.35fr) minmax(76px, auto);
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 11px 12px;
  background: var(--panel-raised);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
}

.order-progress-index {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--brand);
  background: #e8f2fb;
  border: 1px solid #d4e4f3;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.order-progress-row.danger {
  background: #fffdfc;
  border-color: #f0beb9;
  border-left-color: var(--red);
}

.order-progress-row.green {
  background: var(--green-bg);
  border-color: #b9e2d3;
  border-left-color: var(--green);
}

.order-progress-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.order-progress-title strong {
  color: var(--brand);
  font-size: 0.9rem;
  font-weight: 900;
}

.order-progress-title span {
  color: var(--ink-strong);
  font-size: 0.96rem;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.order-progress-main {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.order-progress-track {
  height: 12px;
  overflow: hidden;
  background: #e7edf4;
  border: 1px solid #d4dee9;
  border-radius: 999px;
}

.order-progress-track span {
  display: block;
  width: var(--progress);
  height: 100%;
  min-width: 3px;
  background: linear-gradient(90deg, var(--brand), #7bd0ee);
  border-radius: inherit;
}

.order-progress-row.green .order-progress-track span {
  background: linear-gradient(90deg, var(--green), #78d9b6);
}

.order-progress-main small {
  color: var(--muted-strong);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.order-progress-value {
  display: grid;
  justify-items: end;
  gap: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.25;
  text-align: right;
}

.order-progress-value strong {
  color: var(--ink-strong);
  font-size: 1.14rem;
  font-variant-numeric: tabular-nums;
}

.production-risk-body {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.production-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 138px;
  height: 138px;
  overflow: hidden;
  background: conic-gradient(var(--brand) calc(var(--avg) * 1%), #e7edf4 0);
  border-radius: 50%;
}

.production-ring::before {
  content: "";
  position: absolute;
  inset: 13px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: inherit;
}

.production-ring strong,
.production-ring span {
  position: relative;
  z-index: 1;
}

.production-ring strong {
  color: var(--ink-strong);
  font-size: 1.38rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.production-ring span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.production-risk-bars {
  display: grid;
  gap: 10px;
}

.production-risk-row {
  display: grid;
  gap: 6px;
}

.production-risk-row div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.production-risk-row span {
  color: var(--muted-strong);
  font-size: 0.8rem;
  font-weight: 900;
}

.production-risk-row strong {
  color: var(--ink-strong);
  font-size: 0.98rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.production-risk-row i {
  display: block;
  height: 9px;
  overflow: hidden;
  background: #e7edf4;
  border-radius: 999px;
}

.production-risk-row b {
  display: block;
  width: var(--value);
  height: 100%;
  min-width: 3px;
  background: var(--brand);
  border-radius: inherit;
}

.production-risk-row.danger b {
  background: var(--red);
}

.production-risk-row.green b {
  background: var(--green);
}

.production-risk-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 12px;
  padding-top: 4px;
  color: var(--muted-strong);
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.35;
}

.production-risk-foot strong {
  color: var(--ink-strong);
  font-variant-numeric: tabular-nums;
}

.production-panel,
.production-alert-panel {
  margin-top: 14px;
}

.production-gantt-panel {
  margin-top: 14px;
  overflow: hidden;
}

.production-daily-panel {
  margin-top: 14px;
  overflow: hidden;
}

.production-daily-heading {
  align-items: center;
}

.production-daily-plan {
  display: grid;
  gap: 14px;
  padding: 14px;
  background: #f7faff;
}

.production-daily-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.production-daily-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted-strong);
  font-size: 0.8rem;
  font-weight: 900;
}

.production-daily-toolbar select {
  min-height: 34px;
  padding: 0 30px 0 10px;
  color: var(--ink-strong);
  background: #ffffff;
  border: 1px solid #cddceb;
  border-radius: 4px;
  font: inherit;
}

.production-daily-toolbar > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.production-daily-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
}

.production-daily-kpis article {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px 14px;
  border-right: 1px solid var(--line-soft);
}

.production-daily-kpis article:last-child { border-right: 0; }
.production-daily-kpis span { color: var(--muted); font-size: 0.76rem; font-weight: 800; }
.production-daily-kpis strong { color: var(--ink-strong); font-size: 1.34rem; font-variant-numeric: tabular-nums; line-height: 1; }
.production-daily-kpis .good strong { color: var(--green); }
.production-daily-kpis .blue strong { color: var(--brand); }
.production-daily-kpis .bad strong { color: var(--red); }

.production-daily-create-form {
  display: grid;
  grid-template-columns: 136px 120px minmax(120px, 0.7fr) minmax(132px, 0.8fr) minmax(150px, 1fr) minmax(170px, 1.15fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  background: #edf5ff;
  border: 1px solid #bed5ef;
  border-radius: var(--radius-sm);
}

.production-daily-create-form label { display: grid; gap: 5px; min-width: 0; }
.production-daily-create-form label > span { color: var(--muted-strong); font-size: 0.72rem; font-weight: 900; }
.production-daily-create-form input,
.production-daily-create-form select,
.production-daily-row input,
.production-daily-row select {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 0 9px;
  color: var(--ink-strong);
  background: #ffffff;
  border: 1px solid #ccdaea;
  border-radius: 4px;
  font: inherit;
  font-size: 0.78rem;
}

.production-daily-create-actions { display: flex; gap: 6px; align-items: center; }

.production-daily-department {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
}

.production-daily-department > header {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 9px 13px;
  border-bottom: 1px solid var(--line-soft);
  box-shadow: inset 3px 0 0 var(--brand);
}

.production-daily-department h3 { color: var(--ink-strong); font-size: 0.96rem; }
.production-daily-department header span { margin-left: 8px; color: var(--muted); font-size: 0.75rem; font-weight: 800; }
.production-daily-project-group > header {
  display: grid;
  grid-template-columns: minmax(210px, 1.25fr) minmax(220px, 0.9fr) minmax(260px, 1fr);
  gap: 12px;
  align-items: center;
}
.production-daily-project-group.is-risk > header { box-shadow: inset 3px 0 0 var(--red); }
.production-daily-project-title { display: grid; gap: 3px; min-width: 0; }
.production-daily-project-title strong { color: var(--brand); font-size: 0.98rem; }
.production-daily-project-title span { overflow: hidden; margin: 0; color: var(--muted-strong); font-size: 0.76rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.production-daily-project-status { display: flex; flex-wrap: wrap; gap: 5px 9px; min-width: 0; }
.production-daily-project-status span { margin: 0; color: var(--muted); font-size: 0.71rem; font-weight: 850; white-space: nowrap; }
.production-daily-project-status .danger { color: var(--red); }
.production-daily-project-progress { display: flex; align-items: center; justify-content: flex-end; gap: 7px; min-width: 0; }
.production-daily-project-progress > div { display: grid; gap: 1px; text-align: right; }
.production-daily-project-progress > div span,
.production-daily-project-progress > div small { margin: 0; color: var(--muted); font-size: 0.65rem; font-weight: 800; }
.production-daily-project-progress > div strong { color: var(--ink-strong); font-size: 1.1rem; line-height: 1; }
.production-daily-project-progress label { display: inline-flex; align-items: center; gap: 3px; color: var(--muted-strong); font-size: 0.72rem; font-weight: 900; }
.production-daily-project-progress input { width: 56px; min-height: 30px; padding: 0 6px; color: var(--ink-strong); background: #ffffff; border: 1px solid #bcd4ee; border-radius: 4px; font: inherit; font-size: 0.78rem; font-weight: 850; text-align: center; }
.production-daily-project-progress .primary-button { min-height: 30px; padding: 0 8px; font-size: 0.72rem; }
.production-daily-project-progress.is-unlinked { justify-content: flex-end; color: #a96a16; font-size: 0.75rem; font-weight: 900; }
.production-daily-table { min-width: 0; }
.production-daily-table-head,
.production-daily-row {
  display: grid;
  grid-template-columns: minmax(145px, 1.03fr) minmax(135px, 0.9fr) minmax(145px, 1fr) minmax(205px, 1.38fr) minmax(215px, 1.42fr) 70px;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.production-daily-table-head {
  min-height: 36px;
  padding: 0 13px;
  color: var(--muted);
  background: #f7faff;
  border-bottom: 1px solid #e5edf5;
  font-size: 0.72rem;
  font-weight: 900;
}

.production-daily-row {
  min-height: 80px;
  padding: 10px 13px;
  border-bottom: 1px solid #e7eef6;
}

.production-daily-row:last-child { border-bottom: 0; }
.production-daily-source-content { grid-column: 3 / -1; min-width: 0; }
.production-daily-table-head.is-source-head > :last-child { grid-column: 3 / -1; }
.production-daily-source-content p { margin: 0 0 5px; font-size: 0.8rem; line-height: 1.55; overflow-wrap: anywhere; }
.production-daily-source { margin-top: 5px; color: var(--muted); font-size: 0.72rem; line-height: 1.5; overflow-wrap: anywhere; }
.production-daily-source summary { cursor: pointer; width: fit-content; max-width: 100%; }
.production-daily-source p { margin: 4px 0; font-size: inherit; }
.production-daily-row.is-source-record { align-items: start; }
.production-daily-row.is-source-record .tag { width: fit-content; }
.production-daily-task,
.production-daily-progress,
.production-daily-followup { display: grid; gap: 5px; min-width: 0; }
.production-daily-task strong { color: var(--ink-strong); font-size: 0.86rem; }
.production-daily-task span,
.production-daily-target,
.production-daily-workers { overflow: hidden; color: var(--muted-strong); font-size: 0.76rem; font-weight: 750; line-height: 1.4; text-overflow: ellipsis; }
.production-daily-progress p,
.production-daily-followup p { margin: 0; color: var(--ink-strong); font-size: 0.76rem; font-weight: 750; line-height: 1.35; }
.production-daily-followup small { overflow: hidden; color: var(--muted); font-size: 0.72rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.production-daily-actions { display: flex; justify-content: flex-end; }
.production-daily-actions .ghost-button { min-height: 32px; padding: 0 8px; }
.production-daily-empty { padding: 18px 13px; color: var(--muted); font-size: 0.82rem; font-weight: 750; }

.production-daily-project-summary {
  display: grid;
  gap: 10px;
  padding-top: 2px;
}

.production-daily-summary-title h3 { color: var(--ink-strong); font-size: 0.95rem; }
.production-daily-summary-title span { color: var(--muted); font-size: 0.74rem; font-weight: 750; }
.production-daily-project-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.production-daily-project-card { display: grid; gap: 8px; min-width: 0; padding: 11px; background: #ffffff; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); }
.production-daily-project-card.is-risk { border-color: #f2c6c7; box-shadow: inset 3px 0 0 var(--red); }
.production-daily-project-card header { display: grid; gap: 3px; min-width: 0; }
.production-daily-project-card header strong { color: var(--brand); font-size: 0.9rem; }
.production-daily-project-card header span,
.production-daily-project-card p { overflow: hidden; margin: 0; color: var(--muted-strong); font-size: 0.75rem; font-weight: 750; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.production-daily-project-card footer { display: flex; flex-wrap: wrap; gap: 5px 8px; color: var(--muted); font-size: 0.69rem; font-weight: 800; }
.production-daily-project-card footer .danger { color: var(--red); }

@media (max-width: 1260px) {
  .production-daily-create-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .production-daily-project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .production-daily-table { overflow-x: auto; }
  .production-daily-table-head,
  .production-daily-row { min-width: 920px; }
  .production-daily-project-group > header { grid-template-columns: 1fr; }
  .production-daily-project-progress { justify-content: flex-start; }
}

.production-gantt-panel[data-production-section="gantt"] {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 460px;
  height: var(--production-gantt-panel-height, auto);
}

.rectification-gantt-panel {
  margin-top: 0;
}

.rectification-gantt-panel .production-gantt-scroll {
  max-height: 690px;
}

.rectification-gantt-row,
.rectification-gantt-row .production-gantt-lane {
  min-height: 122px;
}

.rectification-gantt-row .production-gantt-task {
  align-items: start;
  padding-top: 18px;
}

.production-gantt-heading {
  gap: 16px;
}

.production-gantt-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.production-gantt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.production-gantt-range-actions {
  padding-right: 8px;
  border-right: 1px solid var(--line-soft);
}

.production-gantt-actions .sort-tab {
  min-height: 32px;
  padding: 0 12px;
}

.production-gantt-actions .sort-tab.is-active {
  color: #ffffff;
  background: var(--brand);
  border-color: var(--brand);
}

.production-gantt-zoom {
  display: grid;
  grid-template-columns: 32px minmax(86px, auto) 32px;
  align-items: center;
  min-height: 32px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.production-gantt-zoom button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--brand);
  background: #ffffff;
  border: 0;
  cursor: pointer;
}

.production-gantt-zoom button:first-child { border-right: 1px solid var(--line-soft); }
.production-gantt-zoom button:last-child { border-left: 1px solid var(--line-soft); }
.production-gantt-zoom button:hover:not(:disabled) { background: #edf5fd; }
.production-gantt-zoom button:disabled { color: #a9b7c5; cursor: not-allowed; }
.production-gantt-zoom button svg { width: 16px; height: 16px; }

.production-gantt-zoom span {
  padding: 0 9px;
  color: var(--ink-strong);
  font-size: 0.72rem;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

.production-gantt-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  min-height: 42px;
  padding: 8px 14px;
  color: var(--muted-strong);
  background: #f8fbff;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.76rem;
  font-weight: 800;
}

.production-gantt-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.production-gantt-legend i {
  display: inline-block;
  width: 20px;
  height: 7px;
  background: #dce7f4;
  border-radius: 2px;
}

.production-gantt-legend i.progress { background: var(--green); }
.production-gantt-legend i.doing { background: var(--brand); }
.production-gantt-legend i.pending { background: #c8d5e3; }
.production-gantt-legend i.risk { background: var(--red); }
.production-gantt-legend i.stage-order { background: linear-gradient(90deg, #245eaf, #68a5f0); }
.production-gantt-legend i.stage-design { background: linear-gradient(90deg, #5840a5, #a18bdd); }
.production-gantt-legend i.stage-material { background: linear-gradient(90deg, #b36f0b, #efba4f); }
.production-gantt-legend i.stage-production { background: linear-gradient(90deg, #0b6f7a, #47b9bd); }
.production-gantt-legend i.stage-complete { background: linear-gradient(90deg, #23724e, #63ba91); }
.production-gantt-legend i.forecast {
  height: 2px;
  background: repeating-linear-gradient(to right, var(--red) 0 4px, transparent 4px 7px);
  border-radius: 0;
}
.production-gantt-legend i.deadline {
  width: 9px;
  height: 9px;
  background: var(--red);
  border-radius: 1px;
  transform: rotate(45deg);
}
.production-gantt-legend i.today {
  width: 2px;
  height: 14px;
  background: var(--accent);
  border-radius: 0;
}

.production-gantt-legend em {
  margin-left: auto;
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

.production-gantt-date-key b {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: #41566c;
  background: #ffffff;
  border: 1px solid #9babbc;
  border-radius: 2px;
  font-size: 0.65rem;
  line-height: 1;
}

.production-gantt-date-key b.actual {
  color: #ffffff;
  background: #53677d;
  border-color: #53677d;
}

.production-gantt-date-key b.required {
  color: #ffffff;
  background: #c94b42;
  border-color: #c94b42;
}

.production-gantt {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: #ffffff;
}

.production-gantt-x-scroll {
  width: 100%;
  height: 15px;
  overflow-x: auto;
  overflow-y: hidden;
  background: #edf3f9;
  border-bottom: 1px solid #dbe5ef;
  scrollbar-color: #7895b3 #dfe8f1;
  scrollbar-width: thin;
}

.production-gantt-x-scroll-spacer {
  width: calc(330px + var(--gantt-width));
  min-width: 100%;
  height: 1px;
}

.production-gantt-x-scroll::-webkit-scrollbar {
  height: 12px;
}

.production-gantt-x-scroll::-webkit-scrollbar-track {
  background: #dfe8f1;
}

.production-gantt-x-scroll::-webkit-scrollbar-thumb {
  background: #7895b3;
  border: 2px solid #dfe8f1;
  border-radius: 6px;
}

.production-gantt-x-scroll:focus-visible {
  outline: 3px solid rgba(23, 111, 242, 0.22);
  outline-offset: -3px;
}

.production-gantt-x-scroll.is-execution-scroll {
  display: none;
}

.production-gantt-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
  scrollbar-color: #9fb6ce #e7edf4;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.production-gantt-scroll:focus-visible {
  outline: 3px solid rgba(23, 111, 242, 0.22);
  outline-offset: -3px;
}

.production-gantt-scroll.is-execution-scroll {
  overflow-x: hidden;
  scrollbar-gutter: auto;
}

.production-gantt-board {
  width: calc(330px + var(--gantt-width));
  min-width: 100%;
  min-height: 100%;
  background: #ffffff;
}

.production-gantt-axis,
.production-gantt-row {
  display: grid;
  grid-template-columns: 330px var(--gantt-width);
  width: max-content;
  min-width: 100%;
}

.production-gantt-axis {
  position: sticky;
  top: 0;
  z-index: 7;
  min-height: 67px;
  background: #f7fafd;
  border-bottom: 1px solid #cfdceb;
}

.production-gantt-axis-title,
.production-gantt-task {
  position: sticky;
  left: 0;
  z-index: 8;
  background: #ffffff;
  border-right: 1px solid #cfdceb;
  box-shadow: 5px 0 10px rgba(30, 61, 91, 0.08);
}

.production-gantt-axis-title {
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  background: #f5f9fd;
}

.production-gantt-axis-title-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.production-gantt-axis-title strong {
  color: var(--ink-strong);
  font-size: 0.84rem;
}

.production-gantt-axis-title span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.production-gantt-scale,
.production-gantt-months,
.production-gantt-weeks,
.production-gantt-month-grid {
  display: flex;
  min-width: 0;
}

.production-gantt-scale {
  position: relative;
  display: grid;
  grid-template-rows: 28px 19px 20px;
  background: #f7fafd;
}

.production-gantt-today-rail {
  position: relative;
  min-height: 20px;
  background: #fbfdff;
  border-top: 1px solid #e5edf5;
}

.production-gantt-today-label {
  position: absolute;
  z-index: 6;
  top: 2px;
  min-width: 54px;
  padding: 2px 5px;
  color: #ffffff;
  background: #129f9d;
  border: 1px solid #0f8584;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(10, 99, 99, 0.22);
  font-size: 0.6rem;
  font-weight: 850;
  line-height: 15px;
  text-align: center;
  white-space: nowrap;
  transform: translateX(-50%);
}

.production-gantt-delivery-label {
  position: absolute;
  z-index: 6;
  top: 2px;
  min-width: 112px;
  padding: 2px 5px;
  color: #ffffff;
  background: var(--delivery-color, #dd5a52);
  border: 1px solid var(--delivery-color, #c7443e);
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(157, 43, 39, 0.24);
  font-size: 0.6rem;
  font-weight: 850;
  line-height: 15px;
  text-align: center;
  white-space: nowrap;
  transform: translateX(calc(-50% + var(--delivery-label-offset, 0px)));
}

.production-gantt-delivery-label.is-overdue {
  background: #bf3e38;
  border-color: #9e2d28;
}

.production-gantt-months span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  min-width: 0;
  overflow: hidden;
  color: #314b65;
  background: #f2f7fb;
  border-right: 1px solid #cfdae7;
  border-bottom: 1px solid #d8e3ed;
  font-size: 0.74rem;
  font-weight: 850;
  white-space: nowrap;
}

.production-gantt-weeks span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  min-width: 0;
  overflow: hidden;
  color: #73869a;
  background: #ffffff;
  border-right: 1px solid #e5edf5;
  font-size: 0.61rem;
  font-weight: 750;
  white-space: nowrap;
}

.production-gantt-weeks span.major {
  box-shadow: inset 1px 0 0 #c3d2e1;
}

.production-gantt-weeks span.minor {
  background: #fbfdff;
}

.production-gantt-weeks span.day {
  color: #62778e;
  background: #fbfdff;
  font-size: 0.6rem;
  font-variant-numeric: tabular-nums;
}

.production-gantt-weeks span.day.weekend {
  color: #a26c29;
  background: #fffaf1;
}

.production-gantt-row {
  min-height: 78px;
  border-bottom: 1px solid var(--line-soft);
}

.production-gantt-row[data-production-gantt-project-id] {
  cursor: pointer;
}

.production-gantt-row[data-production-gantt-project-id]:focus-visible {
  position: relative;
  z-index: 6;
  outline: 2px solid rgba(221, 90, 82, 0.55);
  outline-offset: -2px;
}

.production-gantt-row.is-delivery-focused .production-gantt-task,
.production-gantt-row.is-delivery-focused .production-gantt-lane {
  background-color: #fff8f7 !important;
}

.production-gantt-row.is-delivery-focused .production-gantt-task {
  box-shadow: inset 3px 0 0 #dd5a52, 5px 0 10px rgba(30, 61, 91, 0.08);
}

.production-gantt-row:last-child { border-bottom: 0; }

.production-gantt-task {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 42px;
  gap: 9px;
  align-items: center;
  min-width: 0;
  padding: 7px 10px;
}

.production-gantt-row:nth-child(odd) .production-gantt-task,
.production-gantt-row:nth-child(odd) .production-gantt-lane {
  background-color: #fbfdff;
}

.production-gantt-rank {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: var(--brand);
  background: #eaf3ff;
  border: 1px solid #d5e6fa;
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 900;
}

.production-gantt-task > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.production-gantt-task strong,
.production-gantt-task > div > span,
.production-gantt-task small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-gantt-task strong {
  color: var(--ink-strong);
  font-size: 0.94rem;
  font-weight: 900;
}

.production-gantt-task > div > span {
  color: var(--muted-strong);
  font-size: 0.84rem;
  font-weight: 850;
}

.production-gantt-task-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  margin-top: 2px;
}

.production-gantt-compare-option,
.production-gantt-select-all {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #536d88;
  font-size: 0.62rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.production-gantt-compare-option {
  flex: 0 0 auto;
}

.production-gantt-compare-option input,
.production-gantt-select-all input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--brand);
  cursor: pointer;
}

.production-gantt-view-delivery {
  flex: 0 0 auto;
  min-width: 54px;
  min-height: 20px;
  padding: 1px 6px;
  color: #236bc0;
  background: #ffffff;
  border: 1px solid #bfd7f2;
  border-radius: 3px;
  font: inherit;
  font-size: 0.62rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.production-gantt-view-delivery:hover {
  color: #ffffff;
  background: var(--brand);
  border-color: var(--brand);
}

.production-gantt-view-delivery.is-return {
  color: #ffffff;
  background: #5c73a5;
  border-color: #5c73a5;
}

.production-gantt-countdown {
  min-width: 0;
  overflow: hidden;
  color: var(--delivery-color, #dd5a52);
  font-size: 0.62rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-gantt-task small {
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 750;
}

.production-gantt-task em {
  color: var(--ink-strong);
  font-size: 0.78rem;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  text-align: right;
}

.production-gantt-lane {
  position: relative;
  z-index: 1;
  min-height: 78px;
  overflow: hidden;
  background: #ffffff;
}

.production-gantt-month-grid {
  position: absolute;
  inset: 0;
}

.production-gantt-month-grid i {
  flex: 0 0 auto;
  height: 100%;
  border-right: 1px solid #e3ebf4;
}

.production-gantt-month-grid i.day {
  border-right-color: #edf2f7;
}

.production-gantt-month-grid i.day.weekend {
  background: rgba(255, 188, 83, 0.07);
}

.production-gantt-today {
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(32, 183, 166, 0.08);
}

.production-gantt-selected-delivery {
  position: absolute;
  z-index: 4;
  top: 0;
  bottom: 0;
  width: 0;
  border-left: 2px dashed var(--delivery-color, #dd5a52);
  opacity: 0.95;
}

.production-gantt-bar {
  position: absolute;
  z-index: 2;
  top: 27px;
  height: 24px;
  overflow: hidden;
  color: #24405d;
  background: #dce7f4;
  border: 1px solid #c4d4e5;
  border-radius: 3px;
}

.production-gantt-phase {
  position: absolute;
  z-index: 3;
  top: 28px;
  height: 22px;
  overflow: hidden;
  background: linear-gradient(90deg, #aebfd1 0%, #c8d5e3 54%, #dce6ef 100%);
  border-right: 2px solid rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), inset 0 -1px 0 rgba(16, 48, 78, 0.16);
}

.production-gantt-phase.stage-order,
.production-gantt-phase.stage-0 {
  background: linear-gradient(90deg, #245eaf 0%, #3478d4 54%, #68a5f0 100%);
}
.production-gantt-phase.stage-design,
.production-gantt-phase.stage-1 {
  background: linear-gradient(90deg, #5840a5 0%, #7459bf 54%, #a18bdd 100%);
}
.production-gantt-phase.stage-material,
.production-gantt-phase.stage-2 {
  background: linear-gradient(90deg, #b36f0b 0%, #d89614 54%, #efba4f 100%);
}
.production-gantt-phase.stage-production,
.production-gantt-phase.stage-3 {
  background: linear-gradient(90deg, #0b6f7a 0%, #168f9c 54%, #47b9bd 100%);
}
.production-gantt-phase.stage-pending {
  background: repeating-linear-gradient(-45deg, #758ba4 0 7px, #8fa3b9 7px 14px);
}
.production-gantt-phase.stage-complete,
.production-gantt-phase.stage-4 {
  background: linear-gradient(90deg, #23724e 0%, #2f8f64 54%, #63ba91 100%);
}

.production-gantt-phase.doing {
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.72), inset 0 -2px 0 rgba(255, 255, 255, 0.72);
}

.production-gantt-phase.late {
  box-shadow: inset 0 0 0 2px #d14d45;
}

.production-gantt-phase span {
  display: block;
  overflow: hidden;
  padding: 0 5px;
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 850;
  line-height: 22px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-gantt-board.is-execution-view .production-gantt-row,
.production-gantt-board.is-execution-view .production-gantt-lane {
  min-height: 72px;
}

.production-gantt-board.is-execution-view .production-gantt-bar {
  top: 34px;
  height: 16px;
  opacity: 0.7;
}

.production-gantt-board.is-execution-view .production-gantt-phase {
  top: 28px;
  height: 28px;
  opacity: 0.7;
}

.production-gantt-board.is-execution-view .production-gantt-phase span {
  line-height: 28px;
}

.production-gantt-board.is-execution-view .production-gantt-phase.is-current-phase {
  z-index: 5;
  min-width: 48px;
  opacity: 1;
  border: 2px solid #ffffff;
  border-radius: 4px;
  box-shadow: 0 0 0 2px var(--brand), 0 3px 8px rgba(20, 84, 150, 0.22);
}

.production-gantt-board.is-execution-view .production-gantt-phase.is-current-phase.late {
  box-shadow: 0 0 0 2px var(--red), 0 3px 8px rgba(190, 66, 59, 0.24);
}

.production-gantt-board.is-execution-view .production-gantt-milestone {
  top: 57px;
}

.production-gantt-current-callout {
  position: absolute;
  z-index: 7;
  top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 66px;
  height: 22px;
  padding: 0 6px;
  color: #9a5d00;
  background: #fff6e6;
  border: 1px solid #e8b252;
  border-radius: 3px;
  box-shadow: 2px 2px 5px rgba(126, 81, 10, 0.15);
  font-size: 0.62rem;
  font-weight: 850;
  white-space: nowrap;
}

.production-gantt-current-callout.late {
  color: #ffffff;
  background: var(--red);
  border-color: var(--red);
}

.production-gantt-current-callout b {
  font-size: 0.58rem;
}

.production-gantt-current-callout span {
  overflow: hidden;
  max-width: 74px;
  text-overflow: ellipsis;
}

.production-gantt-board.is-execution-view .production-gantt-today {
  z-index: 6;
  width: 3px;
  background: #119d9b;
  box-shadow: 0 0 0 1px rgba(17, 157, 155, 0.15);
}

.production-gantt-board.is-execution-view .production-gantt-deadline {
  z-index: 7;
}

.production-gantt-board.is-execution-view .production-gantt-task {
  padding-top: 6px;
  padding-bottom: 6px;
}

.production-gantt-board.is-execution-view .production-gantt-task-meta .production-gantt-stage {
  color: #0f619d;
  font-weight: 900;
}

.production-gantt-bar b {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  background: var(--brand);
}

.production-gantt-row.danger .production-gantt-bar b { background: var(--red); }
.production-gantt-row.warn .production-gantt-bar b { background: var(--amber); }
.production-gantt-row.green .production-gantt-bar b { background: var(--green); }

.production-gantt-bar span {
  position: relative;
  z-index: 1;
  display: block;
  width: fit-content;
  overflow: hidden;
  margin: 1px 4px;
  padding: 0 5px;
  color: #17324d;
  background: rgba(255, 255, 255, 0.84);
  border-radius: 2px;
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-gantt-milestone,
.production-gantt-deadline,
.production-gantt-forecast {
  position: absolute;
  z-index: 4;
  top: 49px;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  background: #ffffff;
  border: 2px solid #7b8da1;
  border-radius: 50%;
}

.production-gantt-milestone.done { border-color: var(--green); background: var(--green); }
.production-gantt-milestone.doing { border-color: var(--brand); background: #ffffff; }
.production-gantt-milestone.late { border-color: var(--red); background: #ffffff; }

.production-gantt-node-date {
  --node-color: #3478d4;
  --node-soft: #edf4fd;
  position: absolute;
  z-index: 5;
  top: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 42px;
  padding: 1px 3px 1px 2px;
  color: var(--node-color);
  background: var(--node-soft);
  border: 1px solid var(--node-color);
  border-radius: 2px;
  font-size: 0.58rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  line-height: 12px;
  text-align: center;
  white-space: nowrap;
  transform: translateX(calc(-50% + var(--date-track-offset, 0px)));
}

.production-gantt-node-date b {
  display: inline-grid;
  place-items: center;
  width: 12px;
  height: 12px;
  color: #ffffff;
  background: var(--node-color);
  border-radius: 2px;
  font-size: 0.5rem;
  line-height: 1;
}

.production-gantt-node-date.stage-order,
.production-gantt-node-date.stage-0 {
  --node-color: #3478d4;
  --node-soft: #edf4fd;
}

.production-gantt-node-date.stage-design,
.production-gantt-node-date.stage-1 {
  --node-color: #7459bf;
  --node-soft: #f2effa;
}

.production-gantt-node-date.stage-material,
.production-gantt-node-date.stage-2 {
  --node-color: #d89614;
  --node-soft: #fff6e3;
}

.production-gantt-node-date.stage-production,
.production-gantt-node-date.stage-3 {
  --node-color: #168f9c;
  --node-soft: #e9f7f8;
}

.production-gantt-node-date.stage-complete,
.production-gantt-node-date.stage-4 {
  --node-color: #2f8f64;
  --node-soft: #edf8f3;
}

.production-gantt-node-date.stage-required {
  --node-color: #c94b42;
  --node-soft: #fff1ef;
}

.production-gantt-node-date.actual {
  color: #ffffff;
  background: var(--node-color);
  border-color: var(--node-color);
}

.production-gantt-node-date.actual b {
  color: var(--node-color);
  background: #ffffff;
}

.production-gantt-node-date.actual.stage-material,
.production-gantt-node-date.actual.stage-2 {
  color: #342809;
}

.production-gantt-node-date.required {
  color: var(--node-color);
  background: var(--node-soft);
  border-color: var(--node-color);
}

.production-gantt-node-date.required b { background: var(--node-color); }

.production-gantt-node-date.doing { color: var(--brand); border-color: #b8d5f0; }
.production-gantt-node-date.done { color: #157451; border-color: #b9e2d3; }
.production-gantt-node-date.late,
.production-gantt-node-date.deadline { color: var(--red); border-color: #efc1bd; }

.production-gantt-deadline {
  top: 50px;
  width: 9px;
  height: 9px;
  background: var(--red);
  border: 0;
  border-radius: 1px;
  transform: rotate(45deg);
}

.production-gantt-forecast {
  top: 11px;
  bottom: 11px;
  width: 2px;
  height: auto;
  margin-left: 0;
  background: repeating-linear-gradient(to bottom, var(--red) 0 4px, transparent 4px 7px);
  border: 0;
  border-radius: 0;
}

.production-gantt-undated {
  position: absolute;
  top: 25px;
  left: 12px;
  min-height: 22px;
  padding: 3px 9px;
  color: var(--amber);
  background: var(--amber-bg);
  border: 1px solid #f1d5a5;
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 850;
}

.production-analysis-panel {
  margin-top: 14px;
  overflow: hidden;
}

.production-analysis-heading {
  gap: 16px;
}

.production-analysis-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.production-analysis-tabs .sort-tab {
  min-height: 32px;
  padding: 0 12px;
}

.production-analysis-tabs .sort-tab.is-active {
  color: #ffffff;
  background: var(--brand);
  border-color: var(--brand);
}

.production-analysis {
  min-width: 0;
  background: #ffffff;
}

.production-analysis-note {
  padding: 9px 14px;
  color: #496176;
  background: #f5f9fd;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.45;
}

.production-analysis-note.warn {
  color: #7c5209;
  background: #fff8e9;
}

.production-analysis-note.danger {
  color: #9b2c25;
  background: #fff3f1;
}

.production-analysis-scroll {
  max-height: 620px;
  overflow: auto;
  scrollbar-color: #9fb6ce #e7edf4;
  scrollbar-width: thin;
}

.production-analysis-scroll:focus-visible {
  outline: 3px solid rgba(23, 111, 242, 0.22);
  outline-offset: -3px;
}

.production-analysis-table {
  width: 100%;
  min-width: 1220px;
  border-collapse: separate;
  border-spacing: 0;
  color: #314a61;
  font-size: 0.76rem;
}

.production-analysis-table th,
.production-analysis-table td {
  padding: 9px 10px;
  background: #ffffff;
  border-right: 1px solid #e3ebf3;
  border-bottom: 1px solid #e3ebf3;
  line-height: 1.4;
  text-align: left;
  vertical-align: middle;
}

.production-analysis-table th {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 40px;
  color: #3f566d;
  background: #eef4fa;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.production-analysis-table tbody tr:nth-child(even) td {
  background: #fbfdff;
}

.production-analysis-table tbody tr:hover td {
  background: #f1f7fd;
}

.production-analysis-table td strong,
.production-analysis-table td small {
  display: block;
}

.production-analysis-table td strong {
  color: var(--ink-strong);
  font-size: 0.79rem;
}

.production-analysis-table td small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
}

.production-analysis-table .sticky-rank {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 54px;
  min-width: 54px;
  text-align: center;
}

.production-analysis-table .sticky-project {
  position: sticky;
  left: 54px;
  z-index: 3;
  width: 178px;
  min-width: 178px;
  box-shadow: 1px 0 0 #d7e2ed;
}

.production-analysis-table th.sticky-rank,
.production-analysis-table th.sticky-project {
  z-index: 6;
  background: #eaf2f9;
}

.production-analysis-table tbody tr:nth-child(even) td.sticky-rank,
.production-analysis-table tbody tr:nth-child(even) td.sticky-project {
  background: #fbfdff;
}

.production-analysis-table tbody tr:hover td.sticky-rank,
.production-analysis-table tbody tr:hover td.sticky-project {
  background: #f1f7fd;
}

.production-schedule-table {
  min-width: 1680px;
}

.production-schedule-table th:nth-child(3) { min-width: 260px; }
.production-schedule-table th:nth-child(4) { min-width: 150px; }
.production-schedule-table th:nth-child(5) { min-width: 120px; }
.production-schedule-table th:nth-child(n + 6):nth-child(-n + 8) { min-width: 116px; }
.production-schedule-table th:nth-child(11) { min-width: 220px; }

.production-table-clamp,
.production-next-action {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.production-next-action {
  color: #294f70;
  font-weight: 800;
}

.production-table-progress {
  width: 76px;
  height: 6px;
  margin-bottom: 4px;
  overflow: hidden;
  background: #dfe8f1;
  border-radius: 999px;
}

.production-table-progress span {
  display: block;
  height: 100%;
  background: var(--brand);
  border-radius: inherit;
}

.production-table-status,
.production-exception-level {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 900;
  white-space: nowrap;
}

.production-table-status.blue { color: #155d99; background: #e7f1fb; }
.production-table-status.green { color: #087551; background: #e6f6ef; }
.production-table-status.warn,
.production-exception-level.warn { color: #8b5900; background: #fff1cf; }
.production-table-status.danger,
.production-exception-level.danger { color: #b42318; background: #fee9e7; }

.numeric {
  font-variant-numeric: tabular-nums;
  text-align: right !important;
}

.danger-text {
  color: var(--red) !important;
  font-weight: 900;
}

.production-milestone-table {
  min-width: 1120px;
}

.production-milestone-table th:not(.sticky-rank):not(.sticky-project) {
  min-width: 130px;
  text-align: center;
}

.production-milestone-cell {
  display: grid;
  gap: 2px;
  min-height: 56px;
  padding: 7px 8px;
  background: #f2f5f8;
  border-left: 3px solid #a9bac9;
  border-radius: 3px;
}

.production-milestone-cell span,
.production-milestone-cell small {
  font-size: 0.67rem;
  font-style: normal;
  font-weight: 800;
}

.production-milestone-cell.done { color: #087551; background: #e8f7f0; border-left-color: var(--green); }
.production-milestone-cell.doing { color: #155d99; background: #e8f2fc; border-left-color: var(--brand); }
.production-milestone-cell.late { color: #b42318; background: #feefed; border-left-color: var(--red); }
.production-milestone-cell.pending { color: #52687c; background: #f1f5f8; border-left-color: #a9bac9; }
.production-milestone-cell.missing { color: #8b5900; background: #fff7e7; border-left-color: var(--amber); }

.production-milestone-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.production-milestone-legend span {
  padding: 3px 7px;
  border-left: 3px solid #a9bac9;
  font-size: 0.68rem;
  font-weight: 850;
}

.production-milestone-legend .done { border-color: var(--green); }
.production-milestone-legend .doing { border-color: var(--brand); }
.production-milestone-legend .late { border-color: var(--red); }
.production-milestone-legend .missing { border-color: var(--amber); }

.production-exception-table {
  min-width: 1120px;
}

.production-exception-table th:nth-child(4),
.production-exception-table th:nth-child(7) {
  min-width: 230px;
}

.production-load-cell {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 32px;
  gap: 8px;
  align-items: center;
}

.production-load-cell > div {
  height: 8px;
  overflow: hidden;
  background: #e2eaf2;
  border-radius: 999px;
}

.production-load-cell span {
  display: block;
  height: 100%;
  background: var(--green);
}

.production-load-cell span.warn { background: var(--amber); }
.production-load-cell span.danger { background: var(--red); }
.production-load-cell strong::after { content: "%"; }

.production-project-list {
  display: grid;
  gap: 12px;
  padding: 12px;
  background: #f8fbfe;
}

.production-project-card {
  display: grid;
  gap: 12px;
  padding: 13px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.production-project-card.danger {
  border-left-color: var(--red);
}

.production-project-card.green {
  border-left-color: var(--accent);
}

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

.production-head-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
  flex: 0 0 auto;
}

.production-action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.production-action-row .delete-button {
  width: 30px;
  height: 30px;
}

.production-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.production-title span {
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 900;
}

.production-title strong {
  color: var(--ink-strong);
  font-size: 1.05rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.production-title small,
.production-note {
  color: var(--muted-strong);
  line-height: 1.45;
}

.production-equipment {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 10px;
  color: var(--muted-strong);
  background: #f5f8fb;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  font-size: 0.8rem;
  line-height: 1.5;
}

.production-equipment strong {
  color: var(--ink-strong);
  font-size: 0.76rem;
}

.production-edit-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
  padding: 12px;
  background: #f6fafc;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
}

.production-edit-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.production-edit-form label span {
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 900;
}

.production-edit-form input,
.production-edit-form textarea,
.production-edit-form select {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  color: var(--ink-strong);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
}

.production-edit-form textarea {
  min-height: 64px;
  resize: vertical;
}

.production-edit-form select {
  cursor: pointer;
}

.production-edit-wide {
  grid-column: span 2;
}

.production-edit-actions {
  display: flex;
  align-self: end;
  justify-content: flex-end;
  gap: 8px;
}

.production-save-error {
  grid-column: 1 / -1;
  margin: 0;
  color: #b42318;
  overflow-wrap: anywhere;
}

.production-exception-tag {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 8px;
  border: 1px solid #f0c683;
  border-radius: 999px;
  color: #965c00;
  background: #fff5db;
  font-size: 0.75rem;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
}

.production-exception-tag.paused {
  color: #a63a1d;
  background: #fff0e9;
  border-color: #f2b18c;
}

.production-exception-note {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 9px 11px;
  color: #7d5300;
  background: #fff9ea;
  border: 1px solid #f0d49c;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.4;
}

.production-exception-note strong {
  color: #8c5700;
  font-weight: 950;
}

.production-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 8px;
}

.production-metrics span {
  display: grid;
  gap: 4px;
  min-height: 54px;
  padding: 9px 10px;
  color: var(--muted-strong);
  background: var(--panel-raised);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
}

.production-metrics span.danger {
  color: var(--red);
  background: var(--red-bg);
  border-color: #f0beb9;
}

.production-metrics b {
  color: var(--ink-strong);
  font-size: 1rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.production-progress-line {
  height: 12px;
  overflow: hidden;
  background: #e7edf4;
  border: 1px solid #d4dee9;
  border-radius: 999px;
}

.production-progress-line span {
  display: block;
  height: 100%;
  min-width: 3px;
  background: linear-gradient(90deg, var(--brand), #72c9ec);
  border-radius: inherit;
}

.production-step-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
}

.production-step {
  display: grid;
  gap: 4px;
  min-height: 112px;
  padding: 9px;
  background: #f7fbff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
}

.production-step i {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--brand);
  background: #e8f2fb;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 900;
}

.production-step strong {
  color: var(--ink-strong);
  font-size: 0.86rem;
  line-height: 1.25;
}

.production-step small,
.production-step em {
  color: var(--muted);
  font-size: 0.76rem;
  font-style: normal;
  line-height: 1.3;
}

.production-step span {
  align-self: end;
  justify-self: start;
  min-height: 22px;
  padding: 2px 7px;
  color: var(--muted-strong);
  background: #edf3f8;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 900;
}

.production-step.done span,
.production-step.green span {
  color: var(--green);
  background: var(--green-bg);
}

.production-step.blue span {
  color: #075985;
  background: #e0f2fe;
}

.production-step.warn span {
  color: var(--amber);
  background: var(--amber-bg);
}

.production-step.danger {
  background: #fff8f7;
  border-color: #f0beb9;
}

.production-step.danger span {
  color: var(--red);
  background: var(--red-bg);
}

.production-alert-list {
  display: grid;
}

.production-alert-card {
  display: grid;
  grid-template-columns: 38px minmax(180px, 0.85fr) minmax(92px, 0.28fr) minmax(260px, 1.5fr);
  gap: 10px;
  align-items: center;
  min-height: 66px;
  padding: 11px 14px;
  background: #fff;
  border-bottom: 1px solid var(--line-soft);
}

.production-alert-card:last-child {
  border-bottom: 0;
}

.production-alert-card.danger {
  background: linear-gradient(90deg, rgba(254, 232, 230, 0.75), rgba(255, 255, 255, 0.95));
}

.production-alert-card.warn {
  background: linear-gradient(90deg, rgba(255, 243, 196, 0.75), rgba(255, 255, 255, 0.95));
}

.production-alert-rank {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--brand);
  background: #e8f2fb;
  border: 1px solid #c9dced;
  border-radius: var(--radius-sm);
  font-weight: 900;
}

.production-alert-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.production-alert-main strong {
  color: var(--ink-strong);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.production-alert-main small,
.production-alert-desc {
  color: var(--muted-strong);
  font-size: 0.82rem;
  line-height: 1.4;
}

.production-alert-delay {
  color: var(--red);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.module-kpi-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.sales-daily-page {
  gap: 16px;
}

.view-page.sales-daily-page.is-active {
  display: grid;
}

.sales-daily-command {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(238, 247, 251, 0.94)),
    var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.sales-daily-command-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
}

.sales-daily-eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 0 9px;
  color: var(--brand);
  background: #e4f0fb;
  border: 1px solid #c8ddec;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
}

.sales-daily-command-copy h2 {
  margin: 12px 0 0;
  color: var(--ink-strong);
  font-size: 1.58rem;
  line-height: 1.12;
}

.sales-daily-command-copy p {
  margin: 8px 0 0;
  color: var(--muted-strong);
  font-size: 0.9rem;
  font-weight: 760;
  line-height: 1.5;
}

.sales-daily-command-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sales-daily-command-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 850;
}

.sales-daily-kpi-grid {
  gap: 10px;
  margin-top: 0;
}

.sales-daily-kpi-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  grid-template-areas:
    "icon label"
    "icon value"
    "note note";
  gap: 4px 10px;
  align-items: center;
  min-width: 0;
  min-height: 104px;
  padding: 13px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.sales-daily-kpi-icon {
  grid-area: icon;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  background: #e4f0fb;
  border: 1px solid #c7ddeb;
  border-radius: var(--radius-sm);
}

.sales-daily-kpi-icon i {
  width: 19px;
  height: 19px;
}

.sales-daily-kpi-card.good .sales-daily-kpi-icon {
  color: var(--green);
  background: var(--green-bg);
  border-color: #b8e6ce;
}

.sales-daily-kpi-card.warning .sales-daily-kpi-icon {
  color: var(--amber);
  background: var(--amber-bg);
  border-color: #ead488;
}

.sales-daily-kpi-card .label {
  grid-area: label;
  color: var(--muted-strong);
  font-size: 0.8rem;
  font-weight: 880;
}

.sales-daily-kpi-card .value {
  grid-area: value;
  display: block;
  color: var(--ink-strong);
  font-size: 1.56rem;
  line-height: 1.05;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.sales-daily-kpi-card .note {
  grid-area: note;
  min-width: 0;
  margin-top: 7px;
  padding-top: 9px;
  color: var(--muted);
  border-top: 1px solid var(--line-soft);
  font-size: 0.78rem;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.module-grid,
.repair-action-grid {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.module-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
}

.sales-daily-workbench {
  grid-template-columns: minmax(500px, 1.18fr) minmax(330px, 0.82fr);
  gap: 16px;
  margin-top: 0;
}

.sales-daily-readonly-grid {
  grid-template-columns: minmax(300px, 0.76fr) minmax(480px, 1.24fr);
  align-items: start;
  gap: 16px;
  margin-top: 0;
}

.sales-daily-readonly-grid > .panel {
  min-width: 0;
}

.sales-daily-calendar-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1.1fr) minmax(300px, 0.75fr);
  gap: 14px;
  margin-top: 14px;
}

.sales-daily-workbench,
.sales-daily-review-grid {
  margin-top: 16px;
}

.sales-daily-status-panel {
  overflow: hidden;
  border-color: #d7e3ef;
  box-shadow: 0 12px 28px rgba(17, 36, 61, 0.07);
}

.sales-daily-status-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: #e2eaf2;
}

.sales-daily-status-card {
  min-height: 118px;
  padding: 16px;
  background: #fff;
}

.sales-daily-status-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sales-daily-status-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
}

.sales-daily-status-icon i { width: 18px; height: 18px; }
.sales-daily-status-head > div { display: flex; align-items: baseline; gap: 8px; }
.sales-daily-status-head span:not(.sales-daily-status-icon) { color: #667f94; font-size: 0.8rem; font-weight: 820; }
.sales-daily-status-head strong { color: #142e46; font-size: 1.55rem; font-variant-numeric: tabular-nums; }

.sales-daily-status-names {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.sales-daily-status-names span,
.sales-daily-status-names em {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 800;
}

.sales-daily-status-card.travel .sales-daily-status-icon,
.sales-daily-status-card.travel .sales-daily-status-names span { color: #145f9e; background: #e7f1fb; }
.sales-daily-status-card.office .sales-daily-status-icon,
.sales-daily-status-card.office .sales-daily-status-names span { color: #13704b; background: #e7f6ee; }
.sales-daily-status-card.pending .sales-daily-status-icon,
.sales-daily-status-card.pending .sales-daily-status-names span { color: #9a6100; background: #fff3db; }
.sales-daily-status-names em { color: #8293a2; background: #f1f4f6; }

@media (max-width: 760px) {
  .sales-daily-status-board { grid-template-columns: 1fr; }
  .sales-daily-status-card { min-height: 0; }
}

.sales-daily-location-panel {
  overflow: hidden;
  border-color: #d7e3ef;
  box-shadow: 0 12px 28px rgba(17, 36, 61, 0.07);
}

.sales-location-sync {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #146c4b;
  font-size: 0.78rem;
  font-weight: 850;
}

.sales-location-sync i {
  width: 15px;
  height: 15px;
}

.sales-location-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(300px, 0.65fr);
  min-height: 480px;
  border-top: 1px solid #e2eaf2;
}

.sales-location-map {
  position: relative;
  min-width: 0;
  min-height: 480px;
  overflow: hidden;
  background: #eaf2f8;
}

.sales-daily-leaflet-map {
  width: 100%;
  min-height: 480px;
  background: #edf2f5;
}

.sales-location-map .leaflet-control-zoom {
  margin: 0 16px 16px 0;
  border: 1px solid #cbdbe8;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(19, 48, 76, 0.14);
}

.sales-location-map .leaflet-control-zoom a {
  width: 36px;
  height: 36px;
  color: #1b568a;
  background: #fff;
  border-bottom-color: #dce6ef;
  font-size: 22px;
  line-height: 34px;
}

.sales-location-map .leaflet-control-attribution {
  padding: 2px 5px;
  color: #687d8f;
  background: rgba(255, 255, 255, 0.82);
  font-size: 10px;
}

.sales-daily-leaflet-marker-wrap {
  width: 156px;
  height: 84px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: transparent;
  border: 0;
}

.sales-daily-leaflet-marker {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #1876d1;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 12px;
  box-shadow: 0 8px 18px rgba(16, 72, 125, 0.3);
  font-size: 0.9rem;
  font-weight: 900;
}

.sales-daily-leaflet-marker-label {
  width: max-content;
  max-width: 142px;
  display: grid;
  gap: 1px;
  margin-top: 5px;
  padding: 4px 7px;
  color: #173754;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #bfd2e2;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(23, 55, 84, 0.16);
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.sales-daily-leaflet-marker-label strong { font-size: 0.78rem; }
.sales-daily-leaflet-marker-label small { color: #668196; font-size: 0.66rem; font-weight: 750; }

.sales-daily-map-popup { min-width: 170px; display: grid; gap: 4px; color: #294860; }
.sales-daily-map-popup strong { color: #142e46; font-size: 0.9rem; }
.sales-daily-map-popup span { color: #618095; font-size: 0.74rem; }
.sales-daily-map-popup p { margin: 2px 0; font-size: 0.76rem; line-height: 1.45; }
.sales-daily-map-popup a { color: #1766ad; font-size: 0.76rem; font-weight: 800; text-decoration: none; }

.sales-location-map-canvas {
  position: relative;
  min-height: 480px;
  overflow: hidden;
  isolation: isolate;
  background: #e8f1f7;
}

.sales-location-map-scene {
  position: absolute;
  inset: 0;
  z-index: 1;
  min-height: 100%;
  overflow: hidden;
  transform: scale(var(--sales-map-zoom, 1));
  transform-origin: center;
  transition: transform 180ms ease;
  background:
    repeating-linear-gradient(0deg, transparent 0 46px, rgba(215, 213, 207, 0.52) 46px 47px, transparent 47px 94px),
    repeating-linear-gradient(90deg, transparent 0 62px, rgba(215, 213, 207, 0.52) 62px 63px, transparent 63px 126px),
    #f6f5f1;
}

.sales-location-map-scene::before,
.sales-location-map-scene::after {
  content: "";
  position: absolute;
  z-index: -1;
  border: 0;
  border-radius: 0;
}

.sales-location-map-scene::before {
  width: 80px;
  height: 760px;
  top: -140px;
  left: 43%;
  background: #dbeaf2;
  box-shadow: inset 0 0 0 1px rgba(137, 177, 201, 0.38);
  transform: rotate(14deg);
}

.sales-location-map-scene::after {
  width: 150px;
  height: 104px;
  right: 9%;
  bottom: 13%;
  background: rgba(228, 234, 224, 0.88);
  box-shadow: inset 0 0 0 1px rgba(186, 198, 180, 0.42);
  border-radius: 24px 46px 30px 42px;
}

.sales-location-map-title {
  position: absolute;
  z-index: 4;
  top: 16px;
  left: 16px;
  display: grid;
  gap: 3px;
  padding: 9px 11px;
  color: #173754;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #d4e1eb;
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(19, 48, 76, 0.1);
}

.sales-location-map-title strong { font-size: 0.86rem; }
.sales-location-map-title span { color: #60788e; font-size: 0.74rem; }

.sales-location-road {
  position: absolute;
  height: 11px;
  background: #fff;
  border: 1px solid #d6d4cf;
  border-radius: 999px;
  box-shadow: 0 1px 0 rgba(193, 191, 185, 0.46);
  transform-origin: center;
}

.sales-location-map-controls {
  position: absolute;
  z-index: 5;
  right: 16px;
  bottom: 16px;
  display: grid;
  overflow: hidden;
  background: #fff;
  border: 1px solid #cbdbe8;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(19, 48, 76, 0.14);
}

.sales-location-map-controls button {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #1b568a;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #dce6ef;
  border-radius: 0;
  box-shadow: none;
}

.sales-location-map-controls button:last-child { border-bottom: 0; }
.sales-location-map-controls button:hover { color: #0f4a7d; background: #edf5fc; }
.sales-location-map-controls button:active { transform: scale(0.96); }
.sales-location-map-controls i { width: 18px; height: 18px; }

.sales-location-road.road-a { width: 92%; left: -5%; top: 46%; transform: rotate(-5deg); }
.sales-location-road.road-b { width: 74%; left: 9%; top: 70%; transform: rotate(21deg); }
.sales-location-road.road-c { width: 66%; left: 22%; top: 23%; transform: rotate(82deg); }

.sales-location-pin {
  position: absolute;
  z-index: 3;
  left: var(--x);
  top: var(--y);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #123454;
  text-decoration: none;
  transform: translate(-50%, -50%);
  transition: transform 160ms ease;
}

.sales-location-pin:hover,
.sales-location-pin.focused {
  z-index: 5;
  transform: translate(-50%, -50%) scale(1.08);
}

.sales-location-pin > span {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #1876d1;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 12px;
  box-shadow: 0 8px 18px rgba(16, 72, 125, 0.28);
  font-weight: 900;
}

.sales-location-pin > b {
  margin-top: 6px;
  padding: 4px 8px;
  color: #153550;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #cbdbe8;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(18, 52, 84, 0.12);
  font-size: 0.78rem;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
}

.sales-location-pin > b small {
  display: block;
  margin-top: 2px;
  color: #678197;
  font-size: 0.66rem;
  font-weight: 760;
}

.sales-location-map-caption {
  position: absolute;
  z-index: 4;
  left: 16px;
  bottom: 16px;
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #d4e1eb;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(19, 48, 76, 0.12);
}

.sales-location-map-caption strong { color: #102d48; font-size: 0.86rem; }
.sales-location-map-caption span { color: #60788e; font-size: 0.72rem; }

.sales-location-map-empty {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #6b8194;
}

.sales-location-map-empty i { width: 34px; height: 34px; color: #7d9ab2; }
.sales-location-map-empty strong { color: #284761; font-size: 0.94rem; }
.sales-location-map-empty span { font-size: 0.8rem; }

.sales-location-roster {
  max-height: 480px;
  overflow: auto;
  padding: 10px;
  background: #f8fafc;
  border-left: 1px solid #e2eaf2;
}

.sales-location-person {
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  color: #193550;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #e4ebf2;
  border-radius: 0;
  box-shadow: none;
}

.sales-location-person:not(:disabled):hover { background: #eef5fb; }
.sales-location-person:disabled { cursor: default; opacity: 1; }

.sales-location-avatar {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1766ad;
  background: #e5f1fb;
  border: 1px solid #c8ddec;
  border-radius: 5px;
  font-weight: 900;
}

.sales-location-person-copy { min-width: 0; display: grid; gap: 4px; }
.sales-location-person-copy strong { font-size: 0.86rem; }
.sales-location-person-copy small { color: #72869a; font-size: 0.74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sales-location-status {
  min-width: 52px;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 850;
  text-align: center;
}

.sales-location-status.located { color: #13714c; background: #e2f4eb; }
.sales-location-status.no-location { color: #a66500; background: #fff1d7; }
.sales-location-status.missing { color: #bf3b32; background: #fde9e7; }
.sales-location-status.legacy { color: #5f7182; background: #e9eef3; }

@media (max-width: 980px) {
  .sales-location-layout { grid-template-columns: 1fr; }
  .sales-location-roster { max-height: 300px; border-left: 0; border-top: 1px solid #e2eaf2; }
}

@media (max-width: 640px) {
  .sales-location-map,
  .sales-location-map-canvas,
  .sales-location-map-empty { min-height: 340px; }
  .sales-daily-leaflet-map { min-height: 340px; }
  .sales-location-map-controls { right: 12px; bottom: 12px; }
  .sales-location-person { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .sales-location-avatar { width: 34px; height: 34px; }
}

.sales-daily-calendar-panel,
.sales-daily-selected-panel {
  min-width: 0;
}

.sales-daily-calendar-panel,
.sales-daily-selected-panel,
.sales-daily-review-grid > .panel {
  border-color: #dde8f1;
  box-shadow: 0 12px 28px rgba(17, 36, 61, 0.07);
}

.sales-daily-page .panel-heading {
  min-height: 56px;
  padding: 13px 15px;
}

.sales-daily-page .panel-heading h2 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 1rem;
  line-height: 1.25;
}

.sales-calendar-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.sales-calendar-actions .ghost-button {
  min-width: 38px;
}

.sales-calendar-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 15px 12px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 860;
}

.legend-item.daily {
  color: var(--green);
  background: var(--green-bg);
}

.legend-item.checkin {
  color: var(--brand);
  background: #e4f0fb;
}

.sales-calendar-weekdays,
.sales-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  padding: 0 15px;
}

.sales-calendar-weekdays {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-align: center;
}

.sales-calendar-grid {
  padding-bottom: 15px;
  margin-top: 8px;
}

.sales-calendar-day {
  min-width: 0;
  min-height: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 9px 4px 8px;
  color: var(--ink);
  background: #f7faf8;
  border: 1px solid #dde8e1;
  border-radius: var(--radius);
  box-shadow: none;
}

.sales-calendar-day:hover {
  border-color: #bdd9ce;
  background: #ffffff;
}

.sales-calendar-day.muted-day {
  opacity: 0.46;
}

.sales-calendar-day.today {
  border-color: var(--accent);
  background: #edf8f3;
}

.sales-calendar-day.selected {
  color: #ffffff;
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: 0 10px 22px rgba(31, 92, 153, 0.22);
}

.sales-calendar-day.marked:not(.selected) {
  background: #ffffff;
}

.sales-calendar-number {
  font-size: 0.94rem;
  font-weight: 900;
  line-height: 1;
}

.sales-calendar-marks {
  min-height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.sales-calendar-mark {
  width: 24px;
  min-width: 24px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.sales-calendar-mark.daily {
  background: var(--green);
}

.sales-calendar-mark.checkin {
  background: var(--brand);
}

.sales-calendar-day.selected .sales-calendar-mark {
  color: var(--brand);
  background: #ffffff;
}

.sales-daily-selected-list {
  min-height: 390px;
  max-height: 560px;
  overflow: auto;
}

.sales-daily-page .daily-log-list,
.sales-daily-page .module-stat-list {
  gap: 10px;
  padding: 12px;
  background: #f4f8fb;
}

.sales-daily-page .daily-log-card {
  border-left: 3px solid #6caed0;
  box-shadow: none;
}

.sales-daily-page .daily-log-head {
  align-items: flex-start;
}

.sales-daily-history-panel .daily-log-list {
  max-height: 640px;
  overflow: auto;
}

.sales-person-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  grid-template-areas:
    "rank main"
    "rank values"
    "bar bar";
  align-items: center;
  gap: 8px 10px;
  padding: 12px;
  box-shadow: none;
}

.sales-person-rank {
  grid-area: rank;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  background: #e4f0fb;
  border: 1px solid #c7ddeb;
  border-radius: var(--radius-sm);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.sales-person-main {
  grid-area: main;
  min-width: 0;
}

.sales-person-values {
  grid-area: values;
}

.sales-person-bar {
  grid-area: bar;
  height: 7px;
  overflow: hidden;
  background: #e8eef5;
  border-radius: 999px;
}

.sales-person-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  border-radius: inherit;
}

.repair-action-grid {
  grid-template-columns: repeat(3, minmax(260px, 1fr));
}

.repair-operation-panel {
  margin-top: 14px;
}

.view-page > .repair-operation-panel:first-child {
  margin-top: 0;
}

.repair-operation-shell {
  background: #fbfdff;
  border-top: 1px solid var(--line-soft);
}

.repair-operation-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px 0;
}

.repair-operation-form-head strong {
  display: block;
  color: var(--ink-strong);
  font-size: 0.96rem;
}

.repair-operation-form-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.repair-operation-shell .repair-action-grid {
  margin-top: 0;
  padding: 12px;
}

.repair-operation-shell .module-form-panel {
  box-shadow: none;
}

.module-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.module-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted-strong);
  font-size: 0.82rem;
  font-weight: 800;
}

.module-form input,
.module-form select,
.module-form textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
}

.module-form textarea {
  resize: vertical;
  line-height: 1.5;
}

.module-form input:disabled,
.module-form select:disabled,
.module-form textarea:disabled,
.module-form button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.wide-field {
  grid-column: 1 / -1;
}

.module-form .text-button {
  justify-self: start;
  min-height: 38px;
}

.daily-log-list,
.repair-ticket-list,
.module-stat-list,
.repair-location-list {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #f8fbfe;
}

.daily-log-card,
.repair-ticket-card,
.module-stat-row,
.repair-location-card {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.daily-log-card,
.repair-ticket-card {
  display: grid;
  gap: 10px;
  padding: 13px;
}

.daily-log-head,
.repair-ticket-head,
.repair-ticket-bottom,
.module-stat-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.daily-log-head strong,
.repair-ticket-head strong,
.module-stat-row strong {
  display: block;
  color: var(--ink-strong);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.daily-log-head small,
.repair-ticket-head small,
.repair-ticket-bottom small,
.module-stat-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.daily-log-card p,
.repair-ticket-card p {
  margin: 0;
  color: var(--ink);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.daily-log-meta,
.repair-ticket-meta,
.module-stat-values,
.repair-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.daily-log-meta span,
.repair-ticket-meta span,
.module-stat-values span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 4px 8px;
  color: var(--muted-strong);
  background: var(--panel-raised);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.daily-log-meta i {
  width: 14px;
  height: 14px;
}

.repair-log-extra {
  display: grid;
  gap: 6px;
  color: var(--muted-strong);
  font-size: 0.82rem;
  font-weight: 780;
  line-height: 1.45;
}

.repair-log-extra span {
  padding-left: 9px;
  border-left: 3px solid #9bd5ef;
}

.repair-location-map {
  padding: 12px 12px 0;
  background: #f8fbfe;
}

.repair-map-canvas {
  position: relative;
  min-height: 238px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(31, 92, 153, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(31, 92, 153, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 18% 24%, rgba(44, 174, 128, 0.18), transparent 24%),
    radial-gradient(circle at 78% 66%, rgba(95, 190, 228, 0.22), transparent 26%),
    #eef6fb;
  background-size: 34px 34px, 34px 34px, auto, auto, auto;
}

.repair-map-canvas.empty {
  display: grid;
  place-items: center;
  padding: 22px;
  text-align: center;
}

.repair-map-canvas.empty strong {
  display: block;
  color: var(--ink-strong);
  font-size: 1rem;
}

.repair-map-canvas.empty span,
.repair-map-caption span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 820;
}

.repair-map-pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 180px;
  transform: translate(-18px, -50%);
  color: var(--ink-strong);
  text-decoration: none;
}

.repair-map-pin span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  color: #fff;
  background: var(--brand);
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(20, 63, 49, 0.24);
  font-size: 0.72rem;
  font-weight: 950;
}

.repair-map-pin b {
  max-width: 140px;
  padding: 4px 7px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.repair-map-caption {
  position: absolute;
  right: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
}

.repair-map-caption strong {
  color: var(--ink-strong);
}

.repair-location-card {
  display: grid;
  gap: 9px;
  padding: 12px;
  border-left: 4px solid #c8d8e8;
}

.repair-location-card.located {
  border-left-color: var(--brand);
}

.repair-location-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.repair-location-head strong {
  color: var(--ink-strong);
  line-height: 1.35;
}

.repair-location-card p {
  margin: 0;
  color: var(--ink);
  font-weight: 850;
  line-height: 1.4;
}

.repair-map-link,
.repair-location-empty {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 6px;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 900;
}

.repair-map-link {
  color: var(--brand);
  background: #e8f2fb;
  border: 1px solid #cfe2f5;
  text-decoration: none;
}

.repair-map-link i {
  width: 14px;
  height: 14px;
}

.repair-location-empty {
  color: var(--muted);
  background: var(--panel-raised);
  border: 1px solid var(--line-soft);
}

.module-stat-row {
  align-items: center;
  padding: 11px 12px;
}

.module-stat-values b {
  color: var(--ink-strong);
  font-variant-numeric: tabular-nums;
}

.repair-ticket-card {
  border-left: 4px solid var(--brand);
}

.repair-ticket-card.good {
  border-left-color: var(--accent);
}

.repair-ticket-card.warning {
  border-left-color: var(--amber);
}

.repair-ticket-card.danger {
  border-left-color: var(--red);
}

.repair-ticket-card.blue {
  border-left-color: #0ea5e9;
}

.repair-ticket-meta .status {
  color: var(--brand);
  background: #e8f2fb;
}

.repair-ticket-meta .status.good {
  color: var(--green);
  background: var(--green-bg);
}

.repair-ticket-meta .status.warning {
  color: var(--amber);
  background: var(--amber-bg);
}

.repair-ticket-meta .status.blue {
  color: #075985;
  background: #e0f2fe;
}

.repair-progress {
  height: 10px;
  overflow: hidden;
  background: #e7edf4;
  border: 1px solid #d4dee9;
  border-radius: 999px;
}

.repair-progress span {
  display: block;
  height: 100%;
  min-width: 3px;
  background: linear-gradient(90deg, #1f5c99, #38bdf8);
  border-radius: inherit;
}

.repair-card-actions button {
  min-height: 30px;
  padding: 4px 10px;
  color: var(--brand);
  background: #edf5fb;
  border: 1px solid #c9dced;
  border-radius: var(--radius-sm);
  font-weight: 900;
}

.repair-rectification-panel {
  margin-top: 14px;
}

.rectification-dashboard {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.6fr);
  gap: 12px;
  padding: 12px;
  background: #f8fbfe;
  border-bottom: 1px solid var(--line-soft);
}

.rectification-chart-card {
  min-width: 0;
  padding: 13px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.rect-chart-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.rect-chart-title strong {
  color: var(--ink-strong);
  font-size: 0.96rem;
  line-height: 1.35;
}

.rect-chart-title span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.4;
  text-align: right;
}

.rect-ring-wrap {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.rect-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 128px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--green) 0 calc(var(--value) * 1%), #78c6e8 0 calc(var(--scheduled) * 1%), #e6eef5 0 100%);
  isolation: isolate;
}

.rect-ring::after {
  content: "";
  position: absolute;
  inset: 14px;
  z-index: -1;
  background: #fff;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--line-soft);
}

.rect-ring strong {
  color: var(--ink-strong);
  font-size: 1.8rem;
  line-height: 1;
}

.rect-ring span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.rect-ring-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.rect-ring-stats span,
.rect-chart-foot span,
.rect-dept-values span {
  min-width: 0;
  color: var(--muted-strong);
  background: var(--panel-raised);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 850;
}

.rect-ring-stats span {
  display: grid;
  gap: 2px;
  padding: 8px;
}

.rect-ring-stats b {
  color: var(--ink-strong);
  font-size: 1.12rem;
}

.rect-chart-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.rect-chart-foot span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
}

.rect-dept-chart {
  display: grid;
  gap: 10px;
}

.rect-dept-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 46px;
  gap: 10px;
  align-items: center;
}

.rect-dept-label strong {
  display: block;
  color: var(--ink-strong);
  line-height: 1.25;
}

.rect-dept-label span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.rect-dept-main {
  min-width: 0;
}

.rect-dept-bar {
  display: flex;
  width: 100%;
  height: 13px;
  overflow: hidden;
  background: #e6eef5;
  border: 1px solid #d8e4ef;
  border-radius: 999px;
}

.rect-dept-bar span {
  display: block;
  min-width: 0;
}

.rect-dept-bar .done {
  background: var(--green);
}

.rect-dept-bar .active {
  background: #3e86c7;
}

.rect-dept-bar .pending {
  background: #dce7f1;
}

.rect-dept-bar .danger {
  background: var(--red);
}

.rect-dept-values {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.rect-dept-values span {
  padding: 3px 6px;
  font-size: 0.72rem;
}

.rect-dept-percent {
  color: var(--ink-strong);
  font-size: 0.95rem;
  font-weight: 950;
  text-align: right;
}

.rectification-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.rectification-form-shell {
  background: #fbfdff;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.rectification-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px 0;
}

.rectification-form-head strong {
  display: block;
  color: var(--ink-strong);
  font-size: 0.96rem;
}

.rectification-form-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.rectification-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  padding: 12px;
}

.rectification-form-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted-strong);
  font-size: 0.82rem;
  font-weight: 800;
}

.rectification-form-grid input,
.rectification-form-grid textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
}

.rectification-form-grid textarea {
  resize: vertical;
  line-height: 1.5;
}

.rectification-form-grid input:disabled,
.rectification-form-grid textarea:disabled,
.rectification-form-grid button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.rectification-form-grid .text-button {
  align-self: end;
  justify-self: start;
  min-height: 38px;
}

.repair-rectification-list {
  display: grid;
  gap: 10px;
  max-height: 620px;
  overflow-y: auto;
  padding: 12px;
  background: #f8fbfe;
  scrollbar-color: #9fb6ce #e7edf4;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.repair-rectification-list::-webkit-scrollbar {
  width: 8px;
}

.repair-rectification-list::-webkit-scrollbar-track {
  background: #e7edf4;
  border-radius: 999px;
}

.repair-rectification-list::-webkit-scrollbar-thumb {
  background: #9fb6ce;
  border-radius: 999px;
}

.rect-card {
  display: grid;
  gap: 11px;
  padding: 13px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-left: 4px solid var(--amber);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.rect-card.good {
  border-left-color: var(--green);
}

.rect-card.danger {
  background: #fff8f7;
  border-color: #f0beb9;
  border-left-color: var(--red);
}

.rect-card-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.rect-rank {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--brand);
  background: #e8f2fb;
  border: 1px solid #d4e4f3;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 950;
}

.rect-card-head strong {
  display: block;
  color: var(--ink-strong);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.rect-card-head small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.rect-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rect-card-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  color: var(--muted-strong);
  background: var(--panel-raised);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.rect-inline-field,
.rect-card-bottom label,
.rect-node label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 850;
}

.rect-inline-field textarea,
.rect-card-bottom textarea,
.rect-node input,
.rect-node select {
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
}

.rect-node select {
  appearance: none;
}

.rect-inline-field textarea,
.rect-card-bottom textarea {
  resize: vertical;
  line-height: 1.45;
}

.rect-node-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 9px;
}

.rect-node {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: var(--panel-raised);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
}

.rect-node.done {
  background: var(--green-bg);
  border-color: #b9e2d3;
}

.rect-node-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rect-node-head > strong {
  color: var(--ink-strong);
  font-size: 0.86rem;
  line-height: 1.3;
}

.rect-step-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.rect-step-status.pending {
  color: #7c4a03;
  background: #fff3d8;
}

.rect-step-status.claimed,
.rect-step-status.active {
  color: var(--brand);
  background: #e8f2fb;
}

.rect-step-status.done {
  color: #08724f;
  background: #dcf7eb;
}

.rect-step-status.danger {
  color: #b42318;
  background: #ffe3df;
}

.rect-card-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 9px;
  align-items: end;
}

.rect-card-bottom .delete-button {
  align-self: center;
}

.rectification-readonly-block {
  display: grid;
  gap: 9px;
  padding: 11px;
  background: #f8fbfe;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
}

.rectification-readonly-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rectification-readonly-head strong {
  color: var(--ink-strong);
  font-size: 0.88rem;
}

.rectification-readonly-head span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.rectification-readonly-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(138px, 1fr));
  gap: 8px;
}

.rectification-readonly-node {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 9px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  border-left: 3px solid #b8c6d6;
}

.rectification-readonly-node.done {
  border-left-color: var(--green);
}

.rectification-readonly-node.active {
  border-left-color: var(--brand);
}

.rectification-readonly-node.danger {
  border-left-color: var(--red);
}

.rectification-readonly-node > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}

.rectification-readonly-node strong {
  min-width: 0;
  color: var(--ink-strong);
  font-size: 0.82rem;
  line-height: 1.3;
}

.rectification-readonly-node p {
  display: grid;
  gap: 2px;
  margin: 0;
}

.rectification-readonly-node p span {
  color: var(--muted);
  font-size: 0.72rem;
}

.rectification-readonly-node p b {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.35;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rectification-readonly-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.rectification-readonly-notes > div {
  min-width: 0;
  padding: 9px 10px;
  background: var(--panel-raised);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
}

.rectification-readonly-notes span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.rectification-readonly-notes p {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 0.8rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.records-panel,
.targets-panel,
.collections-panel {
  margin-top: 14px;
}

.table-wrap {
  overflow: auto;
  max-height: 62vh;
  scrollbar-color: #9fb3c7 #edf2f7;
  scrollbar-width: thin;
}

.table-wrap.compact {
  max-height: 460px;
}

.mobile-record-list {
  display: none;
}

.data-table {
  width: 100%;
  min-width: 2200px;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.target-table {
  min-width: 1120px;
}

.collection-table {
  min-width: 1720px;
}

.collection-table .customer-input {
  min-width: 150px;
}

.data-table th,
.data-table td {
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 7px;
  vertical-align: middle;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 40px;
  background: var(--brand);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 850;
  text-align: center;
  white-space: nowrap;
}

.data-table tbody tr:nth-child(odd) {
  background: var(--row-strong);
}

.data-table tbody tr:nth-child(even) {
  background: #fff;
}

.data-table tbody tr:hover {
  background: #eaf5ff;
}

.data-table input,
.data-table select,
.data-table textarea {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 0 0 1px rgba(185, 199, 216, 0.28);
}

.data-table input:focus,
.data-table select:focus,
.data-table textarea:focus {
  background: #fff;
}

.data-table textarea {
  height: 38px;
}

.money,
.rate,
.days {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.strong-cell {
  color: var(--ink-strong);
  font-weight: 850;
}

.action-cell {
  min-width: 220px;
  max-width: 320px;
  color: var(--muted-strong);
  line-height: 1.4;
}

.empty-table-cell {
  padding: 18px !important;
  color: var(--muted-strong);
  text-align: center;
}

.rate-bar {
  position: relative;
  min-width: 76px;
  height: 24px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #f4f7fa;
  border: 1px solid var(--line);
}

.rate-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, #20b96e, #b8f4cf);
  transition: width 220ms ease;
}

.rate-bar strong {
  position: relative;
  display: block;
  height: 100%;
  padding-right: 6px;
  color: #102033;
  line-height: 22px;
  text-align: right;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 850;
  white-space: nowrap;
}

.tag.good {
  color: var(--green);
  background: var(--green-bg);
}

.tag.warn {
  color: var(--amber);
  background: var(--amber-bg);
}

.tag.warning {
  color: var(--amber);
  background: var(--amber-bg);
}

.tag.bad {
  color: var(--red);
  background: var(--red-bg);
}

.tag.danger {
  color: var(--red);
  background: var(--red-bg);
}

.tag.neutral {
  color: #075985;
  background: #e0f2fe;
}

.tag.blue {
  color: #075985;
  background: #e0f2fe;
}

.danger-cell {
  background: var(--red-bg);
  color: var(--red);
  font-weight: 850;
}

.warn-cell {
  background: var(--amber-bg);
  color: var(--amber);
  font-weight: 850;
}

.delete-button {
  display: inline-grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid #f0beb9;
  border-radius: var(--radius-sm);
  background: #fff8f7;
  color: var(--red);
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease;
}

.delete-button:hover {
  background: #ffecea;
  border-color: #e9aaa3;
}

.delete-button svg {
  width: 16px;
  height: 16px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #d9e4ee;
    --ink-strong: #f4f8fb;
    --muted: #9fb0c3;
    --muted-strong: #c2cfdb;
    --line: #284258;
    --line-soft: #21384e;
    --line-strong: #3c5870;
    --navy: #0d2d45;
    --navy-strong: #071d31;
    --brand: #3e86c7;
    --accent: #3cc08b;
    --panel: #0f2234;
    --panel-raised: #142b40;
    --page: #071521;
    --row: #11283b;
    --row-strong: #153047;
    --green-bg: rgba(34, 197, 94, 0.16);
    --amber-bg: rgba(245, 158, 11, 0.18);
    --red-bg: rgba(239, 68, 68, 0.17);
    --shadow: 0 16px 34px rgba(0, 0, 0, 0.32);
    --shadow-soft: 0 8px 20px rgba(0, 0, 0, 0.22);
  }

  body {
    background:
      linear-gradient(180deg, #0a2236 0, var(--page) 320px),
      var(--page);
  }

  .login-screen {
    background:
      linear-gradient(180deg, #071d31 0, var(--page) 58%, #0a1f32 100%),
      var(--page);
  }

  .login-panel,
  .role-notice {
    background: rgba(15, 34, 52, 0.96);
  }

  .login-role {
    color: #b9dcff;
    background: rgba(62, 134, 199, 0.18);
  }

  .account-row {
    background: var(--panel-raised);
    border-color: var(--line);
  }

  .account-role.finance {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.2);
  }

  .account-role.sales {
    color: #99f6e4;
    background: rgba(20, 184, 166, 0.18);
  }

  .account-role.repair_manager {
    color: #bae6fd;
    background: rgba(14, 165, 233, 0.18);
  }

  .account-role.repair_worker {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.2);
  }

  select,
  input,
  textarea,
  .text-button,
  .ghost-button,
  .kpi-card,
  .panel {
    background: var(--panel);
    color: var(--ink);
  }

  .toolbar,
  .sidebar-title {
    background: rgba(15, 34, 52, 0.96);
  }

  .view-tabs {
    background: rgba(15, 34, 52, 0.96);
  }

  .data-table tbody tr:nth-child(even) {
    background: var(--row);
  }

  .data-table tbody tr:hover {
    background: #183955;
  }

  .data-table input,
  .data-table select,
  .data-table textarea {
    background: rgba(10, 24, 38, 0.75);
  }

  select:disabled,
  input:disabled,
  textarea:disabled {
    color: var(--muted);
    background: rgba(28, 51, 70, 0.84);
  }

  .rate-bar {
    background: #10263a;
  }

  .chart-track {
    background: #10263a;
    border-color: var(--line);
  }

  .chart-summary {
    background: var(--panel-raised);
  }

  .chart-summary article,
  .chart-card {
    background: var(--panel);
  }

  .chart-card.muted {
    background: var(--row);
  }

  .chart-rank {
    background: #18324a;
  }

  .chart-card-head em {
    color: #b9dcff;
    background: rgba(62, 134, 199, 0.18);
  }

  .chart-scale {
    background: #10263a;
    border-color: var(--line);
  }

  .rate-bar strong {
    color: var(--ink-strong);
  }

  .attention-row.high {
    background: linear-gradient(90deg, rgba(127, 29, 29, 0.28), rgba(15, 34, 52, 0.9));
  }

  .attention-row.medium {
    background: linear-gradient(90deg, rgba(120, 75, 10, 0.28), rgba(15, 34, 52, 0.9));
  }

  .attention-focus {
    background: #0b1d2d;
  }

  .attention-focus-row {
    background: var(--panel);
    border-color: var(--line);
  }

  .attention-focus-row:hover {
    background: #183955;
  }

  .attention-focus-tags i {
    color: #fecdd3;
    background: rgba(190, 18, 60, 0.22);
  }

  .follow-row.priority {
    background: linear-gradient(90deg, rgba(127, 29, 29, 0.26), rgba(15, 34, 52, 0.92));
  }

  .tag.neutral {
    color: #a9dfff;
    background: rgba(14, 116, 144, 0.24);
  }

  .production-project-list {
    background: #0b1d2d;
  }

  .production-overview-card,
  .production-project-card,
  .order-progress-row,
  .production-step,
  .production-alert-card {
    background: var(--panel);
    border-color: var(--line);
  }

  .order-progress-row.danger,
  .production-step.danger,
  .production-alert-card.danger {
    background: linear-gradient(90deg, rgba(127, 29, 29, 0.28), rgba(15, 34, 52, 0.92));
  }

  .order-progress-row.green {
    background: rgba(6, 95, 70, 0.22);
    border-color: rgba(52, 211, 153, 0.35);
  }

  .production-edit-form {
    background: #10263a;
    border-color: var(--line);
  }

  .production-edit-form input,
  .production-edit-form textarea {
    color: var(--ink-strong);
    background: var(--panel);
    border-color: var(--line);
  }

  .order-progress-track,
  .production-risk-row i {
    background: #10263a;
    border-color: var(--line);
  }

  .order-progress-chart {
    scrollbar-color: #45657f #10263a;
  }

  .order-progress-chart::-webkit-scrollbar-track {
    background: #10263a;
  }

  .order-progress-chart::-webkit-scrollbar-thumb {
    background: #45657f;
  }

  .order-progress-index {
    color: #b9dcff;
    background: rgba(62, 134, 199, 0.18);
    border-color: var(--line-strong);
  }

  .production-ring {
    background: conic-gradient(#5ebbe4 calc(var(--avg) * 1%), #10263a 0);
  }

  .production-ring::before {
    background: var(--panel);
    border-color: var(--line);
  }

  .production-progress-line {
    background: #10263a;
    border-color: var(--line);
  }

  .production-alert-card.warn {
    background: linear-gradient(90deg, rgba(120, 75, 10, 0.28), rgba(15, 34, 52, 0.92));
  }

  .daily-log-list,
  .repair-ticket-list,
  .rectification-dashboard,
  .repair-rectification-list,
  .module-stat-list,
  .repair-location-list {
    background: #0b1d2d;
  }

  .sales-daily-command {
    background:
      linear-gradient(135deg, rgba(15, 34, 52, 0.96), rgba(12, 40, 55, 0.94)),
      var(--panel);
    border-color: var(--line);
  }

  .sales-daily-eyebrow,
  .sales-daily-kpi-icon,
  .sales-person-rank {
    background: rgba(62, 134, 199, 0.18);
    border-color: var(--line-strong);
  }

  .sales-daily-command-meta span,
  .sales-daily-kpi-card {
    background: var(--panel);
    border-color: var(--line);
  }

  .sales-daily-calendar-panel,
  .sales-daily-selected-panel,
  .sales-daily-review-grid > .panel {
    border-color: var(--line);
  }

  .sales-person-bar {
    background: #10263a;
  }

  .repair-location-map {
    background: #0b1d2d;
  }

  .repair-map-canvas {
    background:
      linear-gradient(90deg, rgba(96, 165, 250, 0.1) 1px, transparent 1px),
      linear-gradient(rgba(96, 165, 250, 0.1) 1px, transparent 1px),
      radial-gradient(circle at 18% 24%, rgba(52, 211, 153, 0.12), transparent 24%),
      radial-gradient(circle at 78% 66%, rgba(96, 165, 250, 0.14), transparent 26%),
      #10263a;
    border-color: var(--line);
  }

  .repair-map-pin span {
    border-color: #10263a;
  }

  .repair-map-pin b,
  .repair-map-caption {
    background: rgba(15, 34, 52, 0.92);
    border-color: var(--line);
  }

  .rectification-chart-card {
    background: var(--panel);
    border-color: var(--line);
  }

  .rect-ring {
    background: conic-gradient(#34d399 0 calc(var(--value) * 1%), #60a5fa 0 calc(var(--scheduled) * 1%), #10263a 0 100%);
  }

  .rect-ring::after {
    background: var(--panel);
    box-shadow: inset 0 0 0 1px var(--line);
  }

  .rect-dept-bar {
    background: #10263a;
    border-color: var(--line);
  }

  .rect-dept-bar .pending {
    background: #243b53;
  }

  .rectification-form-shell,
  .repair-operation-shell {
    background: #0b1d2d;
    border-color: var(--line);
  }

  .module-form input,
  .module-form select,
  .module-form textarea,
  .rectification-form-grid input,
  .rectification-form-grid textarea,
  .rect-node input,
  .rect-node select,
  .rect-card-bottom textarea,
  .rect-inline-field textarea,
  .daily-log-card,
  .repair-ticket-card,
  .rect-card,
  .module-stat-row,
  .repair-location-card {
    background: var(--panel);
    border-color: var(--line);
  }

  .rect-card.danger {
    background: linear-gradient(90deg, rgba(127, 29, 29, 0.28), rgba(15, 34, 52, 0.92));
  }

  .daily-log-meta span,
  .repair-ticket-meta span,
  .rect-card-meta span,
  .rect-ring-stats span,
  .rect-chart-foot span,
  .rect-dept-values span,
  .module-stat-values span,
  .repair-location-empty,
  .rect-node {
    background: var(--panel-raised);
    border-color: var(--line);
  }

  .repair-map-link {
    color: #b9dcff;
    background: rgba(62, 134, 199, 0.18);
    border-color: var(--line);
  }

  .rect-node.done {
    background: rgba(6, 95, 70, 0.22);
    border-color: rgba(52, 211, 153, 0.35);
  }

  .rect-step-status.pending {
    color: #ffd27a;
    background: rgba(120, 75, 10, 0.3);
  }

  .rect-step-status.claimed,
  .rect-step-status.active {
    color: #b9dcff;
    background: rgba(62, 134, 199, 0.22);
  }

  .rect-step-status.done {
    color: #a7f3d0;
    background: rgba(6, 95, 70, 0.32);
  }

  .repair-log-extra span {
    border-left-color: rgba(125, 211, 252, 0.7);
  }

  .rect-step-status.danger {
    color: #fecaca;
    background: rgba(127, 29, 29, 0.32);
  }

  .rect-rank {
    color: #b9dcff;
    background: rgba(62, 134, 199, 0.18);
    border-color: var(--line-strong);
  }

  .repair-rectification-list {
    scrollbar-color: #45657f #10263a;
  }

  .repair-rectification-list::-webkit-scrollbar-track {
    background: #10263a;
  }

  .repair-rectification-list::-webkit-scrollbar-thumb {
    background: #45657f;
  }

  .repair-progress {
    background: #10263a;
    border-color: var(--line);
  }

  .repair-card-actions button {
    color: #b9dcff;
    background: rgba(62, 134, 199, 0.18);
    border-color: var(--line-strong);
  }
}

@media (max-width: 1180px) {
  .workspace-layout {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .toolbar {
    grid-template-columns: repeat(3, minmax(132px, 1fr));
  }

  .chart-summary {
    grid-template-columns: repeat(2, minmax(132px, 1fr));
  }

  .chart-board {
    grid-template-columns: 1fr;
  }

  .kpi-grid {
    grid-template-columns: repeat(4, minmax(132px, 1fr));
  }

  #performanceKpiGrid {
    grid-template-columns: repeat(2, minmax(132px, 1fr));
  }

  .production-overview-grid {
    grid-template-columns: 1fr;
  }

  .production-capacity-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .production-capacity-metrics > div:nth-child(2) {
    border-right: 0;
  }

  .production-capacity-metrics > div:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(210, 238, 255, 0.18);
  }

  .production-risk-body {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .production-step-strip {
    grid-template-columns: repeat(4, minmax(112px, 1fr));
  }

  .production-edit-form {
    grid-template-columns: repeat(2, minmax(132px, 1fr));
  }

  .production-edit-wide {
    grid-column: 1 / -1;
  }

  .production-metrics {
    grid-template-columns: repeat(2, minmax(132px, 1fr));
  }

  .production-alert-card {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    grid-template-areas:
      "rank main delay"
      "rank desc desc";
  }

  .production-alert-rank {
    grid-area: rank;
  }

  .production-alert-main {
    grid-area: main;
  }

  .production-alert-delay {
    grid-area: delay;
  }

  .production-alert-desc {
    grid-area: desc;
  }

  .module-grid,
  .sales-daily-calendar-layout,
  .repair-action-grid {
    grid-template-columns: 1fr;
  }

  .sales-daily-command {
    grid-template-columns: 1fr;
  }

  .rectification-form-grid,
  .rect-node-grid {
    grid-template-columns: repeat(2, minmax(132px, 1fr));
  }

  .rectification-dashboard {
    grid-template-columns: 1fr;
  }

  .rect-card-bottom {
    grid-template-columns: 1fr;
  }

  .rect-card-bottom .delete-button {
    justify-self: start;
  }

  .module-kpi-grid {
    grid-template-columns: repeat(2, minmax(132px, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .attention-focus-row {
    grid-template-columns: 54px minmax(0, 1.2fr) minmax(104px, 0.5fr);
    grid-template-areas:
      "rank main money"
      "rank tags tags"
      "rank action action";
  }

  .attention-focus-rank {
    grid-area: rank;
  }

  .attention-focus-main {
    grid-area: main;
  }

  .attention-focus-money {
    grid-area: money;
  }

  .attention-focus-tags {
    grid-area: tags;
  }

  .attention-focus-action {
    grid-area: action;
  }

  .progress-row {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    grid-template-areas:
      "rank name money"
      "rank meta tag"
      "bar bar bar";
  }

  .debt-queue-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .follow-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

@media (max-width: 860px) {
  .login-panel,
  .login-grid,
  .single-login-panel {
    grid-template-columns: 1fr;
  }

  .login-panel {
    padding: 14px;
  }

  .single-login-panel {
    padding: 0;
  }

  .single-login-panel .login-copy {
    min-height: auto;
    padding: 28px;
  }

  .single-login-card {
    padding: 28px;
  }

  .app-header {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    padding: 14px;
  }

  .header-actions {
    width: 100%;
  }

  .header-actions .icon-button,
  .header-actions label.icon-button {
    flex: 1 1 96px;
  }

  .session-card {
    width: 100%;
    grid-template-columns: auto 1fr auto;
  }

  main {
    width: 100%;
    padding: 14px 12px 24px;
  }

  .workspace-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .sidebar-nav {
    position: static;
  }

  .sidebar-title {
    display: none;
  }

  .toolbar,
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  #performanceKpiGrid {
    grid-template-columns: 1fr;
  }

  .view-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .view-tab {
    justify-content: center;
  }

  .text-button {
    width: 100%;
  }

  .chart-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .chart-line {
    grid-template-columns: 36px minmax(0, 1fr) 50px;
  }

  .chart-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
    padding-left: 0;
  }

  .chart-board {
    grid-template-columns: 1fr;
  }

  .chart-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
  }

  .chart-summary article {
    min-height: 72px;
    padding: 10px;
  }

  .chart-summary strong {
    font-size: 1.08rem;
  }

  .chart-board {
    padding: 10px;
  }

  .chart-card {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
    min-height: 0;
    padding: 10px;
  }

  .chart-rank {
    width: 30px;
    height: 30px;
  }

  .chart-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chart-card-head,
  .chart-card-foot {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .follow-summary-grid,
  .follow-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .follow-row {
    gap: 10px;
  }

  .attention-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "name value"
      "rule rule"
      "action action";
  }

  .attention-value,
  .attention-action {
    text-align: left;
  }

  .attention-action {
    justify-self: start;
    max-width: none;
  }

  .account-form-basic,
  .account-form-footer,
  .account-row {
    grid-template-columns: 1fr;
  }

  .account-permission-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .account-form .view-permission-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-edit-grid {
    grid-template-columns: 1fr;
  }

  .account-admin-page {
    max-width: none;
  }

  .account-row .delete-button {
    justify-self: start;
  }

  .attention-focus-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .attention-focus-row {
    grid-template-columns: 46px minmax(0, 1fr);
    grid-template-areas:
      "rank main"
      "rank money"
      "tags tags"
      "action action";
    min-height: 0;
  }

  .attention-focus-rank {
    width: 40px;
    height: 28px;
  }

  .attention-focus-main strong {
    white-space: normal;
  }

  .progress-row {
    grid-template-columns: 32px minmax(0, 1fr);
    grid-template-areas:
      "rank name"
      "rank money"
      "rank payment"
      "bar bar"
      "action action";
  }

  .debt-queue-head {
    display: none;
  }

  .progress-money,
  .progress-status {
    justify-self: start;
    justify-items: start;
    text-align: left;
  }

  .progress-action {
    padding-top: 2px;
  }

  .attention-scope-tabs,
  .debt-sort-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .production-project-head {
    flex-direction: column;
  }

  .production-gantt-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .production-gantt-controls {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .production-gantt-actions {
    width: 100%;
  }

  .production-gantt-actions .sort-tab {
    flex: 1;
  }

  .production-gantt-zoom {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    width: 100%;
  }

  .production-gantt-zoom button {
    width: 38px;
  }

  .production-gantt-legend em {
    width: 100%;
    margin-left: 0;
  }

  .production-gantt-board {
    width: calc(280px + var(--gantt-width));
  }

  .production-gantt-x-scroll-spacer {
    width: calc(280px + var(--gantt-width));
  }

  .production-gantt-axis,
  .production-gantt-row {
    grid-template-columns: 280px var(--gantt-width);
  }

  .production-gantt-task {
    grid-template-columns: 28px minmax(0, 1fr) 38px;
  }

  .production-analysis-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .production-analysis-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .production-analysis-tabs .sort-tab {
    width: 100%;
  }

  .production-analysis-scroll {
    max-height: 560px;
  }

  .production-risk-body {
    grid-template-columns: 1fr;
  }

  .production-capacity-head {
    flex-direction: column;
  }

  .production-capacity-metrics {
    grid-template-columns: 1fr;
  }

  .production-capacity-metrics > div,
  .production-capacity-metrics > div:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid rgba(210, 238, 255, 0.18);
  }

  .production-capacity-metrics > div:last-child {
    border-bottom: 0;
  }

  .order-progress-row {
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-areas:
      "index title"
      "main main"
      "value value";
  }

  .order-progress-index {
    grid-area: index;
  }

  .order-progress-title {
    grid-area: title;
  }

  .order-progress-main {
    grid-area: main;
  }

  .order-progress-value {
    grid-area: value;
  }

  .production-ring {
    justify-self: center;
  }

  .order-progress-value {
    justify-items: start;
    text-align: left;
  }

  .production-head-actions {
    justify-items: start;
  }

  .production-action-row {
    justify-content: flex-start;
  }

  .production-edit-form {
    grid-template-columns: 1fr;
  }

  .production-edit-actions {
    justify-content: stretch;
  }

  .production-edit-actions button {
    flex: 1;
  }

  .production-step-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .production-equipment {
    grid-template-columns: 1fr;
  }

  .production-alert-card {
    grid-template-columns: 30px minmax(0, 1fr);
    grid-template-areas:
      "rank main"
      "rank delay"
      "desc desc";
  }

  .module-kpi-grid,
  .module-form,
  .rectification-form-grid,
  .rect-node-grid {
    grid-template-columns: 1fr;
  }

  .sales-daily-command {
    padding: 12px;
  }

  .sales-daily-command-copy h2 {
    font-size: 1.36rem;
  }

  .sales-daily-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sales-daily-selected-list {
    min-height: 260px;
    max-height: 420px;
  }

  .sales-daily-history-panel .daily-log-list {
    max-height: none;
  }

  .rectification-dashboard {
    padding: 10px;
  }

  .rect-chart-title,
  .rectification-form-head,
  .repair-operation-form-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .rect-chart-title span {
    text-align: left;
  }

  .rect-ring-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .rect-ring-stats {
    width: 100%;
  }

  .rect-dept-row {
    grid-template-columns: 1fr;
  }

  .rect-dept-percent {
    text-align: left;
  }

  .rect-card-head {
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-areas:
      "rank main"
      "tag tag";
  }

  .rect-rank {
    grid-area: rank;
  }

  .rect-card-head > div {
    grid-area: main;
  }

  .rect-card-head .tag {
    grid-area: tag;
    justify-self: start;
  }

  .daily-log-head,
  .repair-ticket-head,
  .repair-ticket-bottom,
  .module-stat-row {
    flex-direction: column;
    align-items: stretch;
  }

  .module-stat-values,
  .repair-card-actions {
    width: 100%;
  }

  .repair-card-actions button {
    flex: 1 1 120px;
  }

  .debt-ranking-row {
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-areas:
      "rank customer"
      "rank owner"
      "rank unpaid"
      "rank amount"
      "rank age"
      "rank rate"
      "rank status"
      "rank action"
      "rank follow";
    align-items: start;
    min-height: 0;
    padding: 10px;
  }

  .debt-rank {
    grid-area: rank;
    width: 28px;
    height: 28px;
  }

  .debt-customer {
    grid-area: customer;
  }

  .debt-unpaid {
    grid-area: unpaid;
  }

  .debt-owner {
    grid-area: owner;
  }

  .debt-owner-picker {
    width: 72px;
    max-width: 72px;
    flex-basis: 72px;
  }

  .debt-amount {
    grid-area: amount;
  }

  .debt-age {
    grid-area: age;
  }

  .debt-payment {
    grid-area: payment;
  }

  .debt-rate {
    grid-area: rate;
  }

  .debt-action {
    grid-area: action;
  }

  .debt-follow-action {
    grid-area: follow;
    justify-self: start;
  }

  .customer-follow-dialog {
    width: min(100vw - 20px, 920px);
    max-height: min(100dvh - 20px, 780px);
  }

  .customer-follow-dialog-card > header,
  .customer-follow-dialog-card > footer,
  .customer-follow-dialog-content {
    padding-right: 14px;
    padding-left: 14px;
  }

  .customer-follow-record-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-follow-current-fields {
    grid-template-columns: 1fr;
  }

  .customer-follow-current-fields .text-button {
    width: 100%;
  }

  .customer-follow-latest-foot {
    align-items: flex-start;
    flex-direction: column;
  }

  .customer-follow-latest-actions {
    width: 100%;
  }

  .customer-follow-latest-actions .text-button {
    flex: 1 1 0;
  }

  .customer-follow-history-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .records-panel .table-wrap {
    display: none;
  }

  .mobile-record-list {
    display: grid;
    gap: 10px;
    padding: 10px;
  }

  .record-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
  }

  .record-card.high-risk {
    border-color: #f1b5af;
  }

  .record-card-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: start;
    padding: 10px;
    background: var(--panel-raised);
    border-bottom: 1px solid var(--line-soft);
  }

  .record-card-title {
    display: grid;
    gap: 3px;
    min-width: 0;
  }

  .record-card-title strong {
    font-size: 1rem;
  }

  .record-card-title span {
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.4;
  }

  .record-card-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
  }

  .mini-metric {
    display: grid;
    gap: 3px;
    padding: 8px;
    background: var(--panel-raised);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
  }

  .mini-metric span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
  }

  .mini-metric strong {
    font-size: 1.05rem;
  }

  .record-card-actions {
    display: grid;
    gap: 8px;
    padding: 0 10px 10px;
  }

  .record-card-actions textarea {
    min-width: 0;
  }

  .record-card-foot {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
    padding: 9px 10px;
    border-top: 1px solid var(--line-soft);
    background: var(--panel-raised);
    color: var(--muted-strong);
    line-height: 1.4;
  }
}

/* Personal workbench: task first, collaboration second, projects last. */
.view-page.personal-workbench-page.is-active {
  gap: 12px;
}

.personal-workbench-main-grid {
  display: grid;
  grid-template-columns: minmax(720px, 2.1fr) minmax(310px, 0.86fr);
  gap: 12px;
  align-items: stretch;
}

.personal-workbench-task-panel {
  grid-column: 1;
  grid-row: auto;
  overflow: hidden;
}

.personal-workbench-side {
  display: block;
  min-width: 0;
}

.personal-workbench-collaboration-panel {
  display: flex;
  grid-column: auto;
  grid-row: auto;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.personal-workbench-message-section {
  min-width: 0;
}

.personal-workbench-message-section + .personal-workbench-message-section {
  border-top: 1px solid #e1eaf3;
}

.personal-workbench-message-heading {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  color: #6b7f99;
  background: #f7fafd;
}

.personal-workbench-message-heading strong {
  color: #27415f;
  font-size: 12px;
}

.personal-workbench-message-heading span {
  font-size: 10px;
}

.personal-workbench-task-columns,
.personal-workbench-task {
  grid-template-columns: 64px minmax(210px, 1.1fr) minmax(240px, 1.25fr) 96px 74px;
  gap: 12px;
}

.personal-workbench-task-columns {
  padding: 8px 14px;
}

.personal-workbench-task {
  display: grid;
  min-height: 82px;
  align-items: center;
  padding: 10px 14px;
}

.personal-workbench-task-priority {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #536a87;
  font-size: 11px;
  font-weight: 800;
}

.personal-workbench-task-priority b {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2aa88a;
}

.personal-workbench-task.is-danger .personal-workbench-task-priority b {
  background: #df5148;
}

.personal-workbench-task.is-warn .personal-workbench-task-priority b {
  background: #e3a126;
}

.personal-workbench-task-main,
.personal-workbench-task-context {
  min-width: 0;
}

.personal-workbench-task-main h3 {
  line-height: 1.35;
}

.personal-workbench-task-context {
  display: grid;
  gap: 3px;
}

.personal-workbench-task-context strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.personal-workbench-task-context span {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.personal-workbench-task-control {
  display: flex;
  justify-content: flex-end;
}

.personal-workbench-task-control .ghost-button,
.personal-workbench-task-control .text-button {
  white-space: nowrap;
}

.personal-workbench-priority-items {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.personal-workbench-priority-item strong,
.personal-workbench-priority-item small {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.personal-workbench-priority-item strong {
  -webkit-line-clamp: 1;
}

.personal-workbench-priority-item small {
  -webkit-line-clamp: 1;
}

.personal-workbench-reply-item > div,
.personal-workbench-collaboration-item > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.personal-workbench-reply-item small,
.personal-workbench-collaboration-item small {
  color: #8a9ab0;
  font-size: 10px;
}

.personal-workbench-reply-item strong,
.personal-workbench-reply-item span,
.personal-workbench-collaboration-item strong,
.personal-workbench-collaboration-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.personal-workbench-message-section .empty-state {
  min-height: 72px;
  padding: 16px;
}

.personal-workbench-project-columns,
.personal-workbench-project {
  grid-template-columns: minmax(210px, 1.25fr) 110px minmax(135px, 0.75fr) 110px 120px minmax(180px, 1fr) 70px;
  gap: 12px;
}

@media (max-width: 1400px) {
  .personal-workbench-main-grid {
    grid-template-columns: minmax(650px, 1fr) 300px;
  }

  .personal-workbench-task-columns,
  .personal-workbench-task {
    grid-template-columns: 58px minmax(190px, 1.05fr) minmax(180px, 1fr) 92px 70px;
    gap: 10px;
  }

  .personal-workbench-project-columns,
  .personal-workbench-project {
    grid-template-columns: minmax(190px, 1.15fr) 100px minmax(120px, 0.7fr) 102px 108px minmax(150px, 0.9fr) 64px;
    gap: 10px;
  }
}

/* Personal workbench reference layout: an action-first desktop operating page. */
.personal-workbench-heading-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.personal-workbench-all-button {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}

.personal-workbench-heading-link {
  color: #2f68b7;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.personal-workbench-task-priority,
.personal-workbench-task-module,
.personal-workbench-task-owner,
.personal-workbench-task-control,
.personal-workbench-project-actions,
.personal-workbench-project-next {
  min-width: 0;
}

.personal-workbench-task-priority {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #59718f;
  font-size: 11px;
  font-weight: 800;
}

.personal-workbench-task-priority b {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1aa694;
}

.personal-workbench-task.is-red .personal-workbench-task-priority b {
  background: #e24b45;
}

.personal-workbench-task.is-amber .personal-workbench-task-priority b,
.personal-workbench-task.is-orange .personal-workbench-task-priority b {
  background: #e89a20;
}

.personal-workbench-task-module,
.personal-workbench-task-owner {
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #46637f;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.personal-workbench-task-control {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.personal-workbench-task-control .compact-button,
.personal-workbench-task-control .ghost-button,
.personal-workbench-task-control .text-button {
  min-height: 27px;
  padding: 0 7px;
  font-size: 11px;
}

.personal-workbench-project-next {
  display: grid;
  min-width: 0;
  gap: 3px;
  align-content: center;
}

.personal-workbench-project-next strong {
  overflow: hidden;
  color: #526d8b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.personal-workbench-project-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

@media (min-width: 1221px) {
  .view-page.personal-workbench-page.is-active {
    gap: 12px;
    min-height: calc(100vh - 82px);
    padding-bottom: 18px;
  }

  .personal-workbench-command {
    min-height: 58px;
    padding: 0 4px;
    border: 0;
    border-bottom: 1px solid #dce6f1;
    border-left: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .personal-workbench-title-line {
    display: flex;
    align-items: baseline;
    gap: 16px;
  }

  .personal-workbench-command h2 {
    font-size: 26px;
    font-weight: 850;
    letter-spacing: 0;
  }

  .personal-workbench-command-actions {
    gap: 0;
  }

  .personal-workbench-quick-action {
    min-height: 34px;
    padding: 0 13px;
    border: 0;
    border-left: 1px solid #e7edf5;
    border-radius: 0;
    color: #3f5f80;
    background: transparent;
    box-shadow: none;
    font-size: 12px;
  }

  .personal-workbench-quick-action:hover {
    color: #1769d8;
    background: #f4f8fd;
  }

  .personal-workbench-stats {
    grid-template-columns: 176px minmax(0, 1fr);
    min-height: 66px;
    border: 1px solid #dce7f3;
    border-left: 4px solid #1f6fea;
    border-radius: 4px;
    box-shadow: none;
  }

  .personal-workbench-priority-label {
    gap: 8px;
    padding: 0 16px;
    font-size: 16px;
  }

  .personal-workbench-priority-label b {
    font-size: 24px;
  }

  .personal-workbench-priority-items {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 9px 12px;
  }

  .personal-workbench-priority-item {
    display: flex;
    min-height: 38px;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    border-radius: 4px;
  }

  .personal-workbench-priority-item span {
    flex: 0 0 auto;
    margin: 0;
    font-size: 11px;
  }

  .personal-workbench-priority-item strong {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .personal-workbench-priority-item small,
  .personal-workbench-priority-meta {
    display: none;
  }

  .personal-workbench-main-grid {
    grid-template-columns: minmax(650px, 1.55fr) minmax(255px, 0.58fr) minmax(300px, 0.72fr);
    gap: 10px;
  }

  .personal-workbench-task-panel {
    grid-row: span 2;
    min-height: 448px;
  }

  .personal-workbench-side {
    grid-template-rows: 232px minmax(190px, 1fr);
    gap: 10px;
  }

  .personal-workbench-collaboration-panel {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .personal-workbench-heading,
  .compact-panel-heading {
    min-height: 55px;
    padding: 11px 15px;
  }

  .personal-workbench-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .compact-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .personal-workbench-heading h2,
  .compact-panel-heading h2 {
    font-size: 16px;
  }

  .personal-workbench-heading span,
  .compact-panel-heading span {
    font-size: 11px;
  }

  .personal-workbench-task-columns,
  .personal-workbench-task {
    grid-template-columns: 53px minmax(108px, 1.05fr) 72px minmax(118px, 1.14fr) 78px 58px 61px 58px;
    gap: 8px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .personal-workbench-task-columns {
    padding-top: 8px;
    padding-bottom: 8px;
    color: #7b8da5;
  }

  .personal-workbench-task {
    min-height: 65px;
    padding-top: 9px;
    padding-bottom: 9px;
    border-left: 0;
  }

  .personal-workbench-task-main h3 {
    margin: 0;
    font-size: 12px;
  }

  .personal-workbench-task-main small {
    font-size: 10px;
  }

  .personal-workbench-task-context {
    font-size: 11px;
  }

  .personal-workbench-task-deadline strong {
    font-size: 11px;
  }

  .personal-workbench-task-action {
    align-content: center;
  }

  .personal-workbench-task-action em {
    padding: 3px 5px;
    font-size: 10px;
    white-space: nowrap;
  }

  .personal-workbench-agenda-item {
    position: relative;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 8px;
    padding: 8px 14px;
  }

  .personal-workbench-agenda-item:not(:last-child)::after {
    position: absolute;
    top: 30px;
    bottom: -3px;
    left: 32px;
    width: 1px;
    background: #d6e3f2;
    content: "";
  }

  .personal-workbench-agenda-item > span {
    width: auto;
    height: auto;
    padding-top: 1px;
    color: #245da4;
    background: transparent;
    border-radius: 0;
    font-weight: 850;
  }

  .personal-workbench-agenda-item > div::before {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin: 0 7px 1px -5px;
    border-radius: 50%;
    background: #1b70dd;
    content: "";
  }

  .personal-workbench-agenda-item strong {
    font-size: 11px;
  }

  .personal-workbench-agenda-item small {
    padding-left: 8px;
    font-size: 10px;
    line-height: 1.35;
  }

  .personal-workbench-reply-item {
    padding: 8px 12px;
  }

  .personal-workbench-reply-item strong,
  .personal-workbench-reply-item span {
    font-size: 10px;
  }

  .personal-workbench-collaboration {
    grid-template-columns: 1fr;
  }

  .personal-workbench-collaboration-item {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 8px;
    padding: 13px 14px;
    border-top: 1px solid #e4ecf5;
  }

  .personal-workbench-collaboration-item:first-child {
    border-top: 0;
  }

  .personal-workbench-collaboration-item > i {
    width: 28px;
    height: 28px;
    padding: 6px;
  }

  .personal-workbench-collaboration-item strong {
    font-size: 12px;
  }

  .personal-workbench-collaboration-item span {
    display: -webkit-box;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .personal-workbench-project-columns,
  .personal-workbench-project {
    grid-template-columns: minmax(205px, 1.2fr) minmax(84px, 0.68fr) minmax(130px, 0.83fr) minmax(84px, 0.64fr) minmax(84px, 0.64fr) minmax(150px, 0.9fr) 62px;
    gap: 12px;
  }

  .personal-workbench-project-columns {
    padding: 8px 14px;
  }

  .personal-workbench-project {
    min-height: 59px;
    padding: 8px 14px;
  }

  .personal-workbench-project-title strong,
  .personal-workbench-project-title span,
  .personal-workbench-project strong {
    font-size: 11px;
  }

  .personal-workbench-project small {
    font-size: 10px;
  }

  .personal-workbench-project-progress > span {
    height: 5px;
  }
}

/* Notifications and account presence have dedicated header and full-page entry points. */
.sidebar-notification-module {
  display: none !important;
}

@media (max-width: 520px) {
  html {
    font-size: 13px;
  }

  .debt-queue-summary {
    grid-template-columns: 1fr 1fr;
  }

  .app-header {
    position: static;
  }

  .header-actions {
    gap: 7px;
  }

  .icon-button,
  .text-button,
  .ghost-button {
    min-height: 38px;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-actions,
  .attention-scope-tabs,
  .sales-calendar-actions {
    width: 100%;
  }

  .sales-calendar-actions .ghost-button {
    flex: 1;
  }

  .sales-calendar-weekdays,
  .sales-calendar-grid {
    gap: 5px;
    padding-inline: 10px;
  }

  .sales-daily-kpi-card {
    grid-template-columns: 32px minmax(0, 1fr);
    min-height: 94px;
    padding: 11px;
  }

  .sales-daily-kpi-icon {
    width: 32px;
    height: 32px;
  }

  .sales-daily-kpi-icon i {
    width: 17px;
    height: 17px;
  }

  .sales-calendar-day {
    min-height: 58px;
    padding: 7px 2px 6px;
  }

  .sales-calendar-mark {
    width: 20px;
    min-width: 20px;
    height: 19px;
    font-size: 0.68rem;
  }

  .record-card-head {
    grid-template-columns: 1fr;
  }

  .record-card-foot {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Collapsible desktop navigation and mobile module drawer */
.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.app-brand > div {
  min-width: 0;
}

.header-sidebar-toggle,
.sidebar-collapse-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  padding: 0;
  color: #dceaff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(216, 232, 252, 0.24);
  border-radius: 4px;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.header-sidebar-toggle:hover,
.sidebar-collapse-button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(216, 232, 252, 0.44);
}

.header-sidebar-toggle:focus-visible,
.sidebar-collapse-button:focus-visible {
  outline: 2px solid #82b4ff;
  outline-offset: 2px;
}

.header-sidebar-toggle svg,
.sidebar-collapse-button svg {
  width: 17px;
  height: 17px;
}

.sidebar-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sidebar-title-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.sidebar-collapse-button {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
}

.sidebar-backdrop {
  display: none;
}

.workspace-layout,
.sidebar-nav,
.view-tab span,
.sidebar-title-copy {
  transition: grid-template-columns 180ms ease, width 180ms ease, transform 180ms ease, opacity 140ms ease;
}

.workspace-layout.sidebar-collapsed {
  grid-template-columns: 68px minmax(0, 1fr);
}

.workspace-layout.sidebar-collapsed .sidebar-nav {
  width: 68px;
  padding: 8px 7px;
}

.workspace-layout.sidebar-collapsed .sidebar-title {
  justify-content: center;
  padding: 6px 0 8px;
}

.workspace-layout.sidebar-collapsed .sidebar-title-copy,
.workspace-layout.sidebar-collapsed .view-tab span {
  display: none;
}

.workspace-layout.sidebar-collapsed .view-tab {
  justify-content: center;
  min-width: 0;
  padding: 0;
}

.workspace-layout.sidebar-collapsed .view-tab svg {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
}

.workspace-layout.sidebar-collapsed .sidebar-collapse-button svg {
  transform: rotate(180deg);
}

.workspace-layout.sidebar-collapsed .sidebar-notification-module {
  display: block;
  min-height: 42px;
  height: 42px;
  padding: 5px;
}

.workspace-layout.sidebar-collapsed .sidebar-utility-tabs { height: 30px; padding: 0; border: 0; }
.workspace-layout.sidebar-collapsed .sidebar-utility-tab { height: 30px; padding: 0; }
.workspace-layout.sidebar-collapsed .sidebar-utility-tab span,
.workspace-layout.sidebar-collapsed .sidebar-utility-tab b,
.workspace-layout.sidebar-collapsed .sidebar-utility-panel { display: none; }

.workspace-layout.sidebar-collapsed .sidebar-notification-copy,
.workspace-layout.sidebar-collapsed .sidebar-notification-arrow,
.workspace-layout.sidebar-collapsed .sidebar-notification-preview {
  display: none;
}

.workspace-layout.sidebar-collapsed .sidebar-notification-launch {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  min-height: 30px;
  padding: 0;
  border: 0;
}

@media (max-width: 860px) {
  .workspace-layout,
  .workspace-layout.sidebar-collapsed {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar-nav,
  .workspace-layout.sidebar-collapsed .sidebar-nav {
    position: fixed;
    z-index: 60;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(280px, calc(100vw - 48px));
    max-height: 100dvh;
    padding: 14px 12px;
    overflow-y: auto;
    border-radius: 0 8px 8px 0;
    transform: translateX(calc(-100% - 18px));
    box-shadow: 18px 0 48px rgba(4, 18, 36, 0.28);
  }

  .workspace-layout.sidebar-drawer-open .sidebar-nav {
    transform: translateX(0);
  }

  .sidebar-notification-module {
    position: static;
    margin-top: 8px;
    height: auto;
    max-height: min(440px, 54dvh);
  }

  .workspace-layout.sidebar-collapsed .sidebar-title {
    justify-content: space-between;
    padding: 8px 10px 10px;
  }

  .workspace-layout.sidebar-collapsed .sidebar-title-copy {
    display: grid;
  }

  .workspace-layout.sidebar-collapsed .view-tab span {
    display: inline;
  }

  .workspace-layout.sidebar-collapsed .view-tab {
    justify-content: flex-start;
    padding: 0 10px;
  }

  .workspace-layout.sidebar-collapsed .sidebar-collapse-button svg {
    transform: none;
  }

  .sidebar-title {
    display: flex !important;
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    z-index: 55;
    inset: 0;
    padding: 0;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    background: rgba(4, 18, 36, 0.52);
    border: 0;
    border-radius: 0;
    transition: opacity 180ms ease, visibility 180ms ease;
  }

  .workspace-layout.sidebar-drawer-open .sidebar-backdrop {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  body.sidebar-drawer-active {
    overflow: hidden;
  }
}

/* Final theme layer: keep this after responsive rules so the enterprise-blue skin wins. */
:root {
  color-scheme: light;
  --ink: #1d2a3d;
  --ink-strong: #07172b;
  --muted: #728199;
  --muted-strong: #526276;
  --line: #d8e2ef;
  --line-soft: #eaf0f7;
  --line-strong: #a9bdd5;
  --navy: #12355b;
  --navy-strong: #071d36;
  --brand: #176ff2;
  --brand-strong: #0e5ed8;
  --accent: #20b7a6;
  --accent-soft: #e5fbf8;
  --panel: #ffffff;
  --panel-raised: #f8fbff;
  --page: #f3f7fc;
  --row: #f7fbff;
  --row-strong: #fbfdff;
  --green: #10a36a;
  --green-bg: #e6f8ee;
  --amber: #f1992e;
  --amber-bg: #fff4df;
  --red: #e2433f;
  --red-bg: #fff0f0;
  --shadow: 0 10px 28px rgba(30, 57, 94, 0.08);
  --shadow-soft: 0 6px 18px rgba(30, 57, 94, 0.06);
}

body {
  background:
    linear-gradient(180deg, rgba(232, 239, 248, 0.92) 0, rgba(243, 247, 252, 0.96) 280px),
    repeating-linear-gradient(135deg, rgba(23, 111, 242, 0.035) 0 1px, transparent 1px 34px),
    var(--page);
}

.app-header {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 42px),
    linear-gradient(135deg, #061a32 0%, #0e3156 58%, #123b68 100%);
  border-bottom: 1px solid rgba(147, 181, 218, 0.24);
  box-shadow: 0 10px 26px rgba(7, 29, 54, 0.24);
  flex-wrap: wrap;
}

.app-header > div:first-child {
  flex: 1 1 390px;
  min-width: 260px;
}

.header-actions {
  flex: 1 1 560px;
  justify-content: flex-end;
  min-width: 0;
}

.app-header .eyebrow,
.access-line {
  color: rgba(224, 239, 255, 0.82);
}

.icon-button {
  color: var(--brand);
  border-color: rgba(23, 111, 242, 0.14);
  box-shadow: 0 8px 18px rgba(7, 29, 54, 0.12);
}

.icon-button.secondary,
.session-card,
.session-logout {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(221, 236, 255, 0.22);
  box-shadow: none;
}

.workspace-layout {
  width: min(1860px, calc(100% - 18px));
  gap: 10px;
}

.sidebar-nav {
  top: 76px;
  gap: 8px;
  padding: 10px;
  background:
    linear-gradient(180deg, rgba(33, 83, 138, 0.22), transparent 44%),
    linear-gradient(180deg, #08203b 0%, #102f52 100%);
  border: 1px solid rgba(127, 166, 214, 0.18);
  border-radius: var(--radius);
  box-shadow: 0 14px 28px rgba(7, 29, 54, 0.16);
}

.sidebar-title {
  padding: 8px 10px 10px;
  color: #f6fbff;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.sidebar-title span {
  color: rgba(212, 231, 252, 0.68);
}

.view-tabs {
  gap: 3px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.view-tab {
  min-height: 34px;
  padding: 0 10px;
  color: rgba(226, 240, 255, 0.82);
  border-radius: 4px;
}

.view-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.view-tab.is-active {
  background: linear-gradient(90deg, #1774ff 0%, #1164df 100%);
  border-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(13, 96, 216, 0.28);
}

.toolbar,
.role-notice,
.login-panel,
.account-panel {
  background: rgba(255, 255, 255, 0.96);
  border-color: var(--line-soft);
  box-shadow: var(--shadow-soft);
}

select,
input,
textarea {
  background: #fbfdff;
  border-color: #cfdced;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

select:focus,
input:focus,
textarea:focus {
  border-color: rgba(23, 111, 242, 0.72);
  box-shadow: 0 0 0 3px rgba(23, 111, 242, 0.12);
}

.text-button,
.ghost-button {
  color: var(--brand);
  background: #fbfdff;
  border-color: #d6e2f1;
}

.text-button:hover,
.ghost-button:hover {
  background: #eef6ff;
  border-color: rgba(23, 111, 242, 0.34);
}

.kpi-card,
.panel,
.chart-summary article,
.chart-card,
.sales-daily-kpi-card,
.production-overview-card,
.production-project-card,
.production-alert-card,
.rectification-chart-card,
.account-row {
  background: rgba(255, 255, 255, 0.98);
  border-color: var(--line-soft);
  box-shadow: var(--shadow-soft);
}

.kpi-card::before {
  width: 3px;
  background: linear-gradient(180deg, var(--brand), #72adff);
}

.kpi-card .value,
.chart-summary strong,
.chart-card-head strong,
.follow-owner strong,
.follow-action strong {
  color: #07172b;
}

.panel-heading {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.chart-summary,
.follow-summary-grid {
  background: #fbfdff;
}

.chart-rank {
  background: #edf5ff;
  border-color: #d4e6fb;
  color: #225f9c;
}

.chart-card-head em {
  color: var(--brand);
  background: #eaf4ff;
}

.chart-scale,
.chart-track,
.rate-bar {
  background: #e8f0f9;
  border-color: #d5e3f2;
}

.chart-scale-fill {
  background: linear-gradient(90deg, #1164df, #3291ff);
}

.data-table th {
  background: #f7fbff;
  color: #334861;
  border-bottom: 1px solid #dce8f5;
}

.data-table tbody tr:nth-child(odd),
.data-table tbody tr:nth-child(even) {
  background: #ffffff;
}

.data-table tbody tr:hover {
  background: #edf6ff;
}

.data-table input,
.data-table select,
.data-table textarea {
  background: #fbfdff;
  box-shadow: inset 0 0 0 1px rgba(207, 220, 237, 0.56);
}

@media (max-width: 1320px) {
  .header-actions {
    justify-content: flex-start;
  }
}

/* Receivables operations workbench */
.receivable-command {
  /* Keep the workbench focused on filters and actionable receivable views. */
  display: none !important;
}

.receivable-command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 11px 16px;
  color: #eaf4ff;
  background: linear-gradient(112deg, #092b4e 0%, #15598f 64%, #14756b 100%);
  border: 1px solid rgba(65, 139, 201, 0.55);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(7, 40, 75, 0.17);
}

.workspace-main > .receivable-command {
  margin-bottom: 12px;
}

.receivable-command > div:first-child {
  display: grid;
  gap: 2px;
}

.receivable-command > div:first-child > span {
  color: #a9d7fb;
  font-size: 0.76rem;
  font-weight: 900;
}

.receivable-command h2 {
  color: #ffffff;
  font-size: 1.22rem;
  line-height: 1.2;
}

.receivable-command p {
  margin: 0;
  color: #c8deef;
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.3;
}

.receivable-command-meta {
  display: flex;
  gap: 8px;
}

.receivable-command-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  color: #e9f7ff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(220, 240, 255, 0.2);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

.receivable-command-meta svg {
  width: 15px;
  height: 15px;
}

#collectionKpiGrid {
  grid-template-columns: repeat(4, minmax(156px, 1fr));
  gap: 12px;
}

.is-invoice-page #collectionKpiGrid {
  grid-template-columns: repeat(5, minmax(146px, 1fr));
}

.collection-kpi-card {
  min-height: 104px;
  padding: 16px 18px;
  width: 100%;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.collection-kpi-card:hover {
  border-color: #9fc2eb;
  box-shadow: 0 10px 22px rgba(25, 77, 127, 0.14);
}

.collection-kpi-card:focus-visible {
  outline: 3px solid rgba(23, 111, 242, 0.24);
  outline-offset: 2px;
}

.collection-kpi-card-action {
  position: absolute;
  right: 13px;
  top: 12px;
  color: #2f70c4;
  font-size: 0.72rem;
  font-weight: 850;
  opacity: 0;
  transition: opacity 160ms ease;
}

.collection-kpi-card:hover .collection-kpi-card-action,
.collection-kpi-card:focus-visible .collection-kpi-card-action {
  opacity: 1;
}

.collection-kpi-detail-panel {
  margin-top: 14px;
}

.collection-kpi-detail-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 14px 12px;
  overflow: hidden;
  border: 1px solid #dfe9f2;
  border-radius: 6px;
  background: #f8fbfe;
}

.collection-kpi-detail-metrics span {
  display: grid;
  gap: 3px;
  min-height: 62px;
  padding: 10px 14px;
  border-right: 1px solid #dfe9f2;
}

.collection-kpi-detail-metrics span:last-child {
  border-right: 0;
}

.collection-kpi-detail-metrics small {
  color: #6b8198;
  font-size: 0.76rem;
  font-weight: 750;
}

.collection-kpi-detail-metrics strong {
  color: #112b47;
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
}

.collection-kpi-detail-table-wrap {
  max-height: min(62dvh, 540px);
  margin: 0 14px 14px;
  border: 1px solid #dfe9f2;
  border-radius: 6px;
}

.collection-kpi-detail-table {
  min-width: 900px;
}

.collection-detail-risk {
  display: inline-flex;
  min-width: 48px;
  justify-content: center;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 850;
}

.collection-detail-risk.high {
  color: #c83f36;
  background: #fff0ef;
}

.collection-detail-risk.medium {
  color: #b87512;
  background: #fff6df;
}

.collection-detail-risk.low {
  color: #21865e;
  background: #eaf8f0;
}

.receivable-category-switcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.receivable-category-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  min-height: 76px;
  padding: 12px 14px;
  color: var(--ink);
  text-align: left;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: 0 5px 16px rgba(22, 61, 103, 0.06);
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.receivable-category-card:hover {
  background: #f7fbff;
  border-color: #9bc3e8;
}

.receivable-category-card.is-active {
  background: #f2f8ff;
  border-color: #3d76dc;
  box-shadow: inset 3px 0 0 #2f68d8, 0 7px 18px rgba(28, 90, 171, 0.1);
}

.receivable-category-icon {
  display: grid;
  grid-row: span 2;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
}

.receivable-category-icon svg {
  width: 17px;
  height: 17px;
}

.receivable-category-icon.open { color: #1568c7; background: #e7f2ff; }
.receivable-category-icon.bad { color: #d54c45; background: #fff0ee; }
.receivable-category-icon.settled { color: #1b9060; background: #e9f8f0; }

.receivable-category-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.receivable-category-copy b {
  color: var(--ink-strong);
  font-size: 0.92rem;
  font-weight: 900;
}

.receivable-category-copy small,
.receivable-category-card em {
  color: var(--muted);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 750;
}

.receivable-category-card strong {
  align-self: end;
  color: var(--ink-strong);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.receivable-category-card em {
  grid-column: 3;
  justify-self: end;
}

.receivable-workbench-grid {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.receivable-workbench-grid .attention-panel {
  grid-column: 1 / -1;
}

.collection-task-list {
  display: grid;
}

.collection-task-row {
  display: grid;
  grid-template-columns: 34px minmax(170px, 1.05fr) minmax(86px, 0.44fr) minmax(100px, 0.48fr) minmax(155px, 0.7fr) minmax(210px, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 78px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  box-shadow: inset 3px 0 0 #8bb4d8;
}

.collection-task-row:last-child {
  border-bottom: 0;
}

.collection-task-row.danger {
  background: #fffafa;
  box-shadow: inset 3px 0 0 var(--red);
}

.collection-task-row.warning {
  background: #fffdf7;
  box-shadow: inset 3px 0 0 var(--amber);
}

.collection-task-row.is-followed {
  background: #f7fcfa;
  box-shadow: inset 3px 0 0 var(--green);
}

.collection-task-rank {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: var(--brand);
  background: #eaf4ff;
  border: 1px solid #d0e2f3;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 900;
}

.collection-task-customer,
.collection-task-owner,
.collection-task-money,
.collection-task-status,
.collection-task-action {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.collection-task-customer strong,
.collection-task-owner strong,
.collection-task-money strong {
  color: var(--ink-strong);
  font-weight: 900;
  line-height: 1.3;
}

.collection-task-money strong {
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.collection-task-customer small,
.collection-task-owner span,
.collection-task-money span,
.collection-task-status small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.35;
}

.collection-task-status {
  justify-items: start;
}

.collection-task-action > span {
  color: var(--muted-strong);
  font-size: 0.8rem;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.collection-follow-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: fit-content;
  min-height: 28px;
  padding: 0 8px;
  color: var(--brand);
  background: #eef6ff;
  border: 1px solid #cfe1f5;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 900;
}

.collection-follow-button svg {
  width: 14px;
  height: 14px;
}

.collection-follow-button.done {
  color: var(--green);
  background: var(--green-bg);
  border-color: #bde4d1;
}

.collection-alert-list {
  display: grid;
  gap: 8px;
}

.collection-alert-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto 16px;
  gap: 9px;
  align-items: center;
  min-height: 58px;
  padding: 9px 10px;
  color: inherit;
  text-align: left;
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
}

.collection-alert-row:hover,
.collection-risk-customer:hover {
  background: #f2f8fd;
}

.collection-alert-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #a95b00;
  background: var(--amber-bg);
  border-radius: var(--radius-sm);
}

.collection-alert-row.danger .collection-alert-icon {
  color: var(--red);
  background: var(--red-bg);
}

.collection-alert-icon svg {
  width: 16px;
  height: 16px;
}

.collection-alert-main {
  display: grid;
  gap: 2px;
}

.collection-alert-main strong,
.collection-alert-money {
  color: var(--ink-strong);
  font-weight: 900;
}

.collection-alert-main small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.collection-alert-money {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.collection-alert-arrow {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.collection-risk-focus {
  display: grid;
  gap: 6px;
  padding-top: 2px;
}

.collection-risk-focus-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 2px;
}

.collection-risk-focus-head strong {
  color: var(--ink-strong);
  font-size: 0.86rem;
}

.collection-risk-focus-head span {
  color: var(--muted);
  font-size: 0.74rem;
}

.collection-risk-customer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 8px 10px;
  color: inherit;
  text-align: left;
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
}

.collection-risk-customer > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.collection-risk-customer strong {
  color: var(--ink-strong);
  font-weight: 900;
}

.collection-risk-customer small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 750;
}

.collection-risk-customer > strong {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.collection-follow-time {
  min-width: 130px;
}

.collection-table {
  min-width: var(--collection-table-min-width, 2320px);
}

.collection-field-filter {
  position: relative;
}

.collection-column-picker {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  width: min(356px, calc(100vw - 36px));
  padding: 12px;
  color: #1d3650;
  background: #ffffff;
  border: 1px solid #cfdeec;
  border-radius: 7px;
  box-shadow: 0 14px 30px rgba(21, 49, 77, 0.2);
}

.collection-column-picker-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid #e5edf5;
  font-size: 0.9rem;
}

.collection-columns-reset {
  padding: 2px 0;
  color: #2167bb;
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.collection-column-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
  padding: 10px 0 8px;
}

.collection-column-option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 27px;
  color: #425c76;
  font-size: 0.8rem;
  font-weight: 750;
  cursor: pointer;
}

.collection-column-option input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #286eed;
}

.collection-column-picker p {
  margin: 0;
  padding-top: 8px;
  color: #71859b;
  border-top: 1px solid #e5edf5;
  font-size: 0.74rem;
  line-height: 1.35;
}

.collection-table [data-collection-column][hidden] {
  display: none;
}

.collection-x-scroll {
  height: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  background: #eef4fa;
  border: 1px solid #d6e3ef;
  border-radius: 5px;
  scrollbar-color: #5f82a7 #e4edf6;
  scrollbar-width: thin;
}

.collection-x-scroll-spacer {
  min-width: 100%;
  height: 1px;
}

.collection-x-scroll::-webkit-scrollbar {
  height: 12px;
}

.collection-x-scroll::-webkit-scrollbar-track {
  background: #e4edf6;
}

.collection-x-scroll::-webkit-scrollbar-thumb {
  min-width: 88px;
  border: 2px solid #e4edf6;
  border-radius: 6px;
  background: #5f82a7;
}

.collection-x-scroll::-webkit-scrollbar-thumb:hover {
  background: #3d658f;
}

.collection-x-scroll:focus-visible {
  outline: 3px solid rgba(23, 111, 242, 0.22);
  outline-offset: -2px;
}

.collection-table th:nth-child(1),
.collection-table td:nth-child(1) {
  position: sticky;
  left: 0;
  width: 76px;
  min-width: 76px;
}

.collection-table th:nth-child(2),
.collection-table td:nth-child(2) {
  position: sticky;
  left: 76px;
  width: 224px;
  min-width: 224px;
  box-shadow: 7px 0 12px rgba(33, 63, 96, 0.08);
}

.collection-table thead th:nth-child(1),
.collection-table thead th:nth-child(2) {
  z-index: 8;
}

.collection-table tbody td:nth-child(1),
.collection-table tbody td:nth-child(2) {
  z-index: 2;
  background: #ffffff;
}

.collection-table tbody tr:nth-child(odd) > td:nth-child(1),
.collection-table tbody tr:nth-child(odd) > td:nth-child(2) {
  background: var(--row-strong);
}

#collectionsView.is-collection-ledger-page #collectionLedgerPanel {
  height: calc(100dvh - 252px);
  min-height: 0;
}

#collectionsView.is-collection-ledger-page .collections-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

#collectionsView.is-collection-ledger-page .collections-panel .table-wrap.compact {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-x: scroll;
  overflow-y: auto;
  scrollbar-gutter: stable;
  scrollbar-color: #5f82a7 #e4edf6;
  scrollbar-width: auto;
}

#collectionsView.is-collection-ledger-page .collections-panel .table-wrap.compact::-webkit-scrollbar {
  width: 10px;
  height: 14px;
}

#collectionsView.is-collection-ledger-page .collections-panel .table-wrap.compact::-webkit-scrollbar-track {
  background: #e4edf6;
  border-top: 1px solid #ceddea;
}

#collectionsView.is-collection-ledger-page .collections-panel .table-wrap.compact::-webkit-scrollbar-thumb {
  min-width: 88px;
  border: 3px solid #e4edf6;
  border-radius: 8px;
  background: #5f82a7;
}

#collectionsView.is-collection-ledger-page .collections-panel .table-wrap.compact::-webkit-scrollbar-thumb:hover {
  background: #3d658f;
}

.collection-text {
  display: block;
  min-width: 64px;
  max-width: 220px;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 720;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
}

.collection-customer-text {
  min-width: 150px;
  max-width: 200px;
  color: var(--ink-strong);
  font-weight: 850;
}

.collection-product-text {
  min-width: 140px;
  max-width: 220px;
}

.collection-note-text {
  min-width: 150px;
  max-width: 260px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.collection-rate-text {
  min-width: 64px;
  color: var(--green);
  font-weight: 900;
  text-align: center;
}

.invoice-ledger-search,
.debt-ranking-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: min(320px, 30vw);
  min-width: 220px;
  height: 36px;
  padding: 0 10px;
  color: #58708c;
  border: 1px solid #cbdced;
  border-radius: 6px;
  background: #ffffff;
}

.invoice-ledger-search svg,
.debt-ranking-search svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.invoice-ledger-search input,
.debt-ranking-search input {
  min-width: 0;
  width: 100%;
  padding: 0;
  color: var(--ink);
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
}

.invoice-ledger-search:focus-within,
.debt-ranking-search:focus-within {
  border-color: #2f72e8;
  box-shadow: 0 0 0 3px rgba(47, 114, 232, 0.14);
}

.debt-ranking-owner-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 176px;
  height: 36px;
  padding: 0 10px;
  color: #58708c;
  border: 1px solid #cbdced;
  border-radius: 6px;
  background: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
}

.debt-ranking-owner-filter select {
  min-width: 0;
  flex: 1;
  height: 100%;
  padding: 0 2px;
  color: var(--ink);
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
}

.debt-ranking-owner-filter:focus-within {
  border-color: #2f72e8;
  box-shadow: 0 0 0 3px rgba(47, 114, 232, 0.14);
}

.debt-ranking-owner-filter-top {
  margin-left: 28px;
  margin-right: auto;
}

@media (max-width: 1120px) {
  .debt-ranking-owner-filter-top {
    margin: 0;
  }
}

.invoice-status-wrap {
  display: grid;
  gap: 4px;
  min-width: 108px;
}

.invoice-status-badge {
  width: fit-content;
  padding: 2px 7px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 850;
  line-height: 1.25;
  white-space: nowrap;
}

.invoice-status-badge.is-unissued {
  color: #a65d00;
  border-color: #f2d5a1;
  background: #fff7e8;
}

.invoice-status-badge.is-partial {
  color: #1b5f9d;
  border-color: #b9d5ee;
  background: #edf6ff;
}

.invoice-status-badge.is-full {
  color: #14734a;
  border-color: #b9e2cd;
  background: #edf9f1;
}

.invoice-status-badge.is-missing,
.invoice-status-badge.is-review {
  color: #b73b32;
  border-color: #f0c3bd;
  background: #fff2f0;
}

.invoice-status-detail {
  display: block;
  max-width: 190px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-rate {
  display: inline-flex;
  align-items: center;
  min-width: 60px;
  min-height: 25px;
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.invoice-rate.is-good {
  color: #14734a;
  background: #edf9f1;
}

.invoice-rate.is-partial {
  color: #1b5f9d;
  background: #edf6ff;
}

.invoice-rate.is-warning {
  color: #a65d00;
  background: #fff7e8;
}

.invoice-rate.is-muted {
  color: var(--muted);
  background: #f2f5f8;
}

#collectionsView.is-invoice-page .collection-table {
  table-layout: fixed;
}

#collectionsView.is-invoice-page .collection-table th:nth-child(3),
#collectionsView.is-invoice-page .collection-table td:nth-child(3) {
  width: 180px;
  min-width: 180px;
}

#collectionsView.is-invoice-page .collection-table th:nth-child(4),
#collectionsView.is-invoice-page .collection-table td:nth-child(4) {
  width: 250px;
  min-width: 250px;
}

#collectionsView.is-invoice-page .collection-table th:nth-child(14),
#collectionsView.is-invoice-page .collection-table td:nth-child(14) {
  width: 110px;
  min-width: 110px;
}

#collectionsView.is-invoice-page .collection-table th:nth-child(15),
#collectionsView.is-invoice-page .collection-table td:nth-child(15) {
  width: 150px;
  min-width: 150px;
}

#collectionsView.is-invoice-page .collection-table th:nth-child(16),
#collectionsView.is-invoice-page .collection-table td:nth-child(16) {
  width: 138px;
  min-width: 138px;
}

.invoice-info-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 122px;
}

.invoice-info-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 3px 7px;
  color: #2667ad;
  border: 1px solid #cbdced;
  border-radius: 4px;
  background: #f8fbfe;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 850;
  cursor: pointer;
}

.invoice-info-action:hover {
  color: #124b84;
  border-color: #9ec0e1;
  background: #edf6ff;
}

.invoice-info-action svg {
  width: 14px;
  height: 14px;
}

.invoice-info-empty {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.invoice-request-action { white-space: nowrap; }

.invoice-request-state {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 850;
  white-space: nowrap;
}

.invoice-request-state.is-pending { color: #9a5a00; background: #fff4de; }
.invoice-request-state.is-issued { color: #16704b; background: #e8f8ef; }
.invoice-request-state.is-complete { color: #14734a; background: #e6f7ee; }
.invoice-request-state.is-muted { color: var(--muted); background: #f0f4f7; }

.invoice-info-dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: min(620px, calc(100dvh - 32px));
  margin: auto;
  padding: 0;
  color: var(--ink-strong);
  border: 1px solid #c9d9e8;
  border-radius: 8px;
  box-shadow: 0 20px 56px rgba(9, 36, 69, 0.25);
}

.invoice-info-dialog::backdrop {
  background: rgba(8, 30, 55, 0.42);
}

.invoice-info-dialog-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: inherit;
}

.invoice-info-dialog-card header,
.invoice-info-dialog-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}

.invoice-info-dialog-card header {
  border-bottom: 1px solid var(--line-soft);
}

.invoice-info-dialog-card header span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.invoice-info-dialog-card h2 {
  margin: 3px 0 0;
  font-size: 1rem;
}

.online-account-badge {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  place-items: center;
  color: #0c714d;
  border-radius: 50%;
  background: #d9f5e7;
  font-size: 0.68rem;
  line-height: 1;
}

.online-accounts-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: min(680px, calc(100dvh - 32px));
  margin: auto;
  padding: 0;
  color: var(--ink-strong);
  border: 1px solid #c9d9e8;
  border-radius: 8px;
  box-shadow: 0 20px 56px rgba(9, 36, 69, 0.25);
}

.online-accounts-dialog::backdrop { background: rgba(8, 30, 55, 0.42); }

.online-accounts-dialog-card {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  max-height: inherit;
}

.online-accounts-dialog-card header,
.online-accounts-dialog-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}

.online-accounts-dialog-card header { border-bottom: 1px solid var(--line-soft); }
.online-accounts-dialog-card header span { color: var(--muted); font-size: 0.76rem; font-weight: 800; }
.online-accounts-dialog-card h2 { margin: 3px 0 0; font-size: 1.05rem; }
.online-accounts-dialog-card footer { justify-content: flex-end; border-top: 1px solid var(--line-soft); }

.online-accounts-dialog-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  color: var(--muted-strong);
  border-bottom: 1px solid var(--line-soft);
  background: #f7fbf9;
  font-size: 0.82rem;
}

.online-accounts-dialog-summary strong { color: var(--ink-strong); }
.online-accounts-dialog-summary strong b { color: #0c8a5a; font-size: 1rem; }
.online-accounts-dialog-summary i { font-style: normal; }
.online-accounts-dialog-summary small { margin-left: auto; color: var(--muted); font-weight: 700; }

.online-accounts-dialog-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 180px;
  padding: 14px 16px;
  overflow: auto;
  background: #f8fbfe;
}

.online-account-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid #dce7f1;
  border-radius: 6px;
  background: #fff;
}

.online-account-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #1767b3;
  border-radius: 6px;
  background: #e9f3ff;
  font-size: 0.9rem;
  font-weight: 850;
}

.online-account-copy { display: grid; min-width: 0; gap: 3px; }
.online-account-copy strong { overflow: hidden; color: var(--ink-strong); font-size: 0.92rem; text-overflow: ellipsis; white-space: nowrap; }
.online-account-copy span { overflow: hidden; color: var(--muted); font-size: 0.77rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.online-account-empty { padding: 36px 12px; color: var(--muted); text-align: center; font-weight: 700; }

@media (max-width: 640px) {
  .online-accounts-dialog { width: calc(100vw - 20px); }
  .online-accounts-dialog-summary small { display: none; }
}

.invoice-info-dialog-content {
  min-height: 180px;
  margin: 0;
  padding: 16px;
  overflow: auto;
  color: var(--ink);
  background: #f8fbfe;
  overflow-wrap: anywhere;
}

.invoice-info-status-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  color: var(--muted-strong);
  border: 1px solid #dce7f1;
  border-radius: 6px;
  background: #ffffff;
  font-size: 0.82rem;
  font-weight: 760;
  line-height: 1.45;
}

.invoice-info-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 0;
}

.invoice-info-detail-row {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #dce7f1;
  border-radius: 6px;
  background: #ffffff;
}

.invoice-info-detail-row dt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.invoice-info-field-copy {
  display: inline-grid;
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  padding: 0;
  place-items: center;
  color: #4f6f91;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}

.invoice-info-field-copy:hover {
  color: #1765be;
  border-color: #c8dcef;
  background: #edf6ff;
}

.invoice-info-field-copy.is-copied {
  color: #14734a;
  border-color: #b9e2cd;
  background: #edf9f1;
}

.invoice-info-field-copy svg {
  width: 14px;
  height: 14px;
}

.invoice-info-detail-row dd {
  margin: 0;
  color: var(--ink-strong);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.invoice-info-detail-row:first-child,
.invoice-info-detail-row:nth-child(3) {
  grid-column: 1 / -1;
}

.invoice-info-empty-state,
.invoice-info-raw-text {
  margin: 0;
  color: var(--ink);
  font: 700 0.88rem/1.65 var(--font-sans);
  white-space: pre-wrap;
}

.invoice-info-empty-state {
  color: var(--muted);
}

@media (max-width: 640px) {
  .invoice-info-detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.invoice-info-dialog-card footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line-soft);
}

.invoice-request-dialog {
  width: min(650px, calc(100vw - 32px));
  margin: auto;
  padding: 0;
  color: var(--ink-strong);
  border: 1px solid #c9d9e8;
  border-radius: 8px;
  box-shadow: 0 20px 56px rgba(9, 36, 69, 0.25);
}

.invoice-request-dialog::backdrop { background: rgba(8, 30, 55, 0.42); }
.invoice-request-dialog-card { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.invoice-request-dialog-card header,
.invoice-request-dialog-card footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; }
.invoice-request-dialog-card header { border-bottom: 1px solid var(--line-soft); }
.invoice-request-dialog-card header span { color: var(--muted); font-size: 0.76rem; font-weight: 800; }
.invoice-request-dialog-card h2 { margin: 3px 0 0; font-size: 1.08rem; }
.invoice-request-dialog-card footer { justify-content: flex-end; border-top: 1px solid var(--line-soft); }
.invoice-request-dialog-content { display: grid; gap: 14px; padding: 16px; background: #f7fafc; }
.invoice-request-record { display: grid; gap: 5px; padding: 12px 13px; border: 1px solid #d6e3ef; border-radius: 6px; background: #fff; }
.invoice-request-record strong { color: var(--ink-strong); font-size: 0.92rem; }

.contract-change-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: min(800px, calc(100dvh - 32px));
  margin: auto;
  padding: 0;
  color: var(--ink-strong);
  border: 1px solid #c9d9e8;
  border-radius: 8px;
  box-shadow: 0 20px 56px rgba(9, 36, 69, 0.25);
}

.contract-change-dialog::backdrop { background: rgba(8, 30, 55, 0.42); }
.contract-change-dialog-card { display: grid; grid-template-rows: auto minmax(0, 1fr); max-height: inherit; }
.contract-change-dialog-card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.contract-change-dialog-card > header span { color: var(--muted); font-size: 0.76rem; font-weight: 800; }
.contract-change-dialog-card > header h2 { margin: 3px 0 0; color: var(--ink-strong); font-size: 1.08rem; }
.contract-change-dialog-content { display: grid; min-height: 0; gap: 14px; padding: 16px; overflow: auto; background: #f7fafc; }
.contract-change-record { display: grid; gap: 8px; padding: 12px 13px; background: #fff; border: 1px solid #d6e3ef; border-radius: 6px; }
.contract-change-record > strong { color: var(--ink-strong); font-size: 0.94rem; }
.contract-change-amounts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.contract-change-amounts > span { display: grid; min-width: 0; gap: 4px; padding: 9px; background: #f7fbfe; border: 1px solid #e1eaf3; border-radius: 6px; }
.contract-change-amounts > span.is-remaining { background: #fffaf0; border-color: #f1d69b; }
.contract-change-amounts b { color: #71849b; font-size: 0.72rem; font-weight: 800; }
.contract-change-amounts em { overflow-wrap: anywhere; color: var(--ink-strong); font-size: 0.9rem; font-style: normal; font-weight: 850; font-variant-numeric: tabular-nums; }
.contract-change-amounts em.is-positive { color: #16865b; }
.contract-change-amounts em.is-negative { color: #ce4b44; }
.contract-change-form,
.contract-change-history-section { display: grid; gap: 11px; padding: 13px; background: #fff; border: 1px solid #d6e3ef; border-radius: 6px; }
.contract-change-form-heading,
.contract-change-history-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.contract-change-form-heading strong,
.contract-change-history-heading strong { color: var(--ink-strong); font-size: 0.92rem; }
.contract-change-form-heading span,
.contract-change-history-heading span { color: var(--muted); font-size: 0.76rem; font-weight: 700; text-align: right; }
.contract-change-form label { display: grid; min-width: 0; gap: 6px; color: var(--muted-strong); font-size: 0.8rem; font-weight: 800; }
.contract-change-form textarea { width: 100%; resize: vertical; line-height: 1.5; }
.contract-change-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.contract-change-form-actions { display: flex; justify-content: flex-end; gap: 9px; }
.contract-change-history { display: grid; gap: 9px; }
.contract-change-history-item { display: grid; gap: 8px; padding: 11px 12px; border: 1px solid #dce7f1; border-left: 4px solid #9aafc3; border-radius: 6px; background: #fbfdff; }
.contract-change-history-item.is-good { border-left-color: #24a06f; }
.contract-change-history-item.is-warn { border-left-color: #e39a21; }
.contract-change-history-item.is-bad { border-left-color: #df4f4c; }
.contract-change-history-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.contract-change-history-top > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.contract-change-history-top strong { color: var(--ink-strong); font-size: 0.88rem; }
.contract-change-history-top span { color: var(--brand); font-size: 0.9rem; font-weight: 850; font-variant-numeric: tabular-nums; }
.contract-change-status { padding: 3px 8px; font-size: 0.74rem; white-space: nowrap; border-radius: 999px; }
.contract-change-status.good { color: #13764f; background: #e7f7ef; }
.contract-change-status.warn { color: #9a6100; background: #fff2d8; }
.contract-change-status.bad { color: #b73434; background: #fff0ef; }
.contract-change-status.muted { color: #62758b; background: #eef3f7; }
.contract-change-history-meta { display: flex; flex-wrap: wrap; gap: 5px 12px; color: var(--muted); font-size: 0.75rem; font-weight: 700; }
.contract-change-history-item p,
.contract-change-history-item small,
.contract-change-history-review { margin: 0; color: var(--muted-strong); font-size: 0.8rem; line-height: 1.5; overflow-wrap: anywhere; }
.contract-change-history-review { padding-top: 7px; border-top: 1px solid #e7eef5; }
.contract-change-review-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: end; }
.contract-change-review-actions textarea { min-height: 42px; resize: vertical; }
.contract-change-edit-actions { display: flex; justify-content: flex-end; gap: 8px; }

@media (max-width: 700px) {
  .contract-change-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .contract-change-amounts,
  .contract-change-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contract-change-review-actions { grid-template-columns: 1fr 1fr; }
  .contract-change-review-actions textarea { grid-column: 1 / -1; }
}

/* 客户欠款排列：摘要行负责快速判断，展开后展示收款与跟进全量信息。 */
.debt-project-detail {
  margin: 0;
  background: #fff;
}

.debt-project-detail > summary {
  list-style: none;
  cursor: pointer;
}

.debt-project-detail > summary::-webkit-details-marker {
  display: none;
}

.debt-project-detail:nth-of-type(odd) > .debt-ranking-row {
  background: #f8fbfd;
}

.debt-project-detail.is-selected > .debt-ranking-row,
.debt-project-detail[open] > .debt-ranking-row {
  background: #eef7ff;
  box-shadow: inset 4px 0 0 var(--brand);
}

.debt-project-detail:last-of-type > .debt-ranking-row {
  border-bottom: 0;
}

.debt-row-disclosure {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  gap: 4px;
  min-width: 58px;
  min-height: 32px;
  padding: 0 8px;
  color: var(--brand);
  background: #fff;
  border: 1px solid #bdd9f1;
  border-radius: 5px;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 850;
}

.debt-row-disclosure svg {
  width: 15px;
  height: 15px;
  transition: transform 160ms ease;
}

.debt-row-disclosure em {
  font-style: normal;
}

.debt-project-detail[open] .debt-row-disclosure svg {
  transform: rotate(180deg);
}

.debt-project-detail-body {
  display: grid;
  grid-template-columns: minmax(255px, 1.08fr) minmax(270px, 1.1fr) minmax(290px, 1.2fr) minmax(172px, 0.62fr);
  gap: 0;
  padding: 14px 20px 18px 82px;
  color: var(--ink-strong);
  background: #fbfdff;
  border-top: 1px solid #cfe1ef;
}

.debt-detail-group {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
  padding: 2px 16px;
  border-left: 1px solid #dce8ef;
}

.debt-project-detail-body:not(:has(.debt-detail-owner)) {
  grid-template-columns: minmax(255px, 1.08fr) minmax(285px, 1.12fr) minmax(310px, 1.26fr);
}

.debt-detail-group:first-child {
  padding-left: 0;
  border-left: 0;
}

.debt-detail-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 9px;
  min-width: 0;
}

.debt-detail-heading strong {
  color: #214762;
  font-size: 0.86rem;
}

.debt-detail-heading span {
  min-width: 0;
  overflow: hidden;
  color: #71859a;
  font-size: 0.76rem;
  font-weight: 750;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.debt-detail-payment p,
.debt-detail-follow p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #36556f;
  font-size: 0.83rem;
  font-weight: 700;
  line-height: 1.55;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
}

.debt-collection-milestones {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 14px;
}

.debt-collection-milestones > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.debt-collection-milestones span,
.debt-invoice-summary > span {
  color: #778ca1;
  font-size: 0.74rem;
  font-weight: 750;
}

.debt-collection-milestones strong {
  overflow: hidden;
  color: #234963;
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.debt-detail-empty {
  margin: 0;
  color: #8295a8;
  font-size: 0.8rem;
  font-weight: 700;
}

.debt-invoice-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px dashed #d7e4ee;
}

.debt-invoice-summary strong {
  min-width: 0;
  overflow: hidden;
  color: #a85a00;
  font-size: 0.82rem;
  font-weight: 850;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.debt-detail-follow .ghost-button {
  justify-self: start;
  margin-top: 2px;
}

.debt-detail-owner .debt-owner-picker {
  justify-self: start;
  width: min(210px, 100%);
  max-width: 100%;
}

.debt-detail-owner .debt-owner-picker > summary {
  width: 100%;
}

.debt-detail-owner > strong {
  color: var(--ink-strong);
  font-size: 0.9rem;
}

@media (min-width: 861px) {
  .workspace-layout:not(.sidebar-collapsed) .debt-row-disclosure {
    width: 100%;
    min-width: 0;
  }

  .workspace-layout:not(.sidebar-collapsed) .debt-project-detail-body {
    grid-template-columns: minmax(220px, 1.03fr) minmax(240px, 1.04fr) minmax(248px, 1.14fr) minmax(150px, 0.56fr);
    padding-left: 68px;
  }

  .workspace-layout:not(.sidebar-collapsed) .debt-project-detail-body:not(:has(.debt-detail-owner)) {
    grid-template-columns: minmax(230px, 1.05fr) minmax(250px, 1.06fr) minmax(270px, 1.18fr);
  }
}

@media (max-width: 860px) {
  .debt-ranking-row {
    grid-template-areas:
      "rank customer"
      "rank owner"
      "rank amount"
      "rank unpaid"
      "rank age"
      "rank rate"
      "rank payment"
      "rank action"
      "rank disclosure";
  }

  .debt-row-disclosure {
    grid-area: disclosure;
    justify-self: start;
  }

  .debt-project-detail-body {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px;
  }

  .debt-detail-group {
    padding: 0;
    border-top: 1px solid #dce8ef;
    border-left: 0;
  }

  .debt-detail-group:first-child {
    padding-top: 0;
    border-top: 0;
  }

  .debt-detail-group:not(:first-child) {
    padding-top: 14px;
  }
}

@media (max-width: 480px) {
  .contract-change-amounts,
  .contract-change-form-grid { grid-template-columns: 1fr; }
  .contract-change-form-heading,
  .contract-change-history-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
  .contract-change-form-heading span,
  .contract-change-history-heading span { text-align: left; }
}

.work-toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1000;
  display: grid;
  width: min(380px, calc(100vw - 32px));
  gap: 10px;
  pointer-events: none;
}

.work-toast {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 30px;
  gap: 10px;
  align-items: start;
  padding: 13px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #a9dfc7;
  border-left: 4px solid var(--green);
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 34px rgba(7, 29, 54, 0.2);
  pointer-events: auto;
}

.work-toast.is-warning {
  border-color: #f0cf9c;
  border-left-color: var(--amber);
}

.work-toast-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--green);
  background: var(--green-bg);
  border-radius: 50%;
}

.work-toast.is-warning .work-toast-icon {
  color: var(--amber);
  background: var(--amber-bg);
}

.work-toast-icon svg { width: 18px; height: 18px; }

.work-toast-copy { min-width: 0; padding-top: 1px; }
.work-toast-copy strong { display: block; color: var(--ink-strong); font-size: 0.9rem; }
.work-toast-copy p { margin: 4px 0 0; color: var(--muted-strong); font-size: 0.78rem; font-weight: 650; line-height: 1.45; }

.work-toast-close {
  display: grid;
  place-items: center;
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  color: var(--muted-strong);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.work-toast-close:hover { color: var(--brand); background: #f3f8fd; border-color: #d4e3f2; }
.work-toast-close svg { width: 16px; height: 16px; }
.invoice-request-record span { color: var(--muted-strong); font-size: 0.8rem; }
.invoice-request-amounts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 5px; }
.invoice-request-amounts span { display: grid; gap: 3px; padding: 8px 9px; border: 1px solid #e2eaf2; border-radius: 5px; background: #f8fbfe; }
.invoice-request-amounts b { color: #71849b; font-size: 0.72rem; }
.invoice-request-amounts em { color: #1d3149; font-size: 0.86rem; font-style: normal; font-weight: 850; }
.invoice-request-amounts .is-remaining { border-color: #bce8d8; background: #eefaf5; }
.invoice-request-amounts .is-remaining em { color: #13764f; }
.invoice-request-amount-input { display: grid; gap: 7px; }
.invoice-request-amount-input > span { color: var(--ink-strong); font-size: 0.84rem; font-weight: 850; }
.invoice-request-amount-input > div { display: flex; align-items: center; gap: 9px; }
.invoice-request-amount-input input { min-width: 0; flex: 1 1 auto; }
.invoice-request-amount-input b { color: var(--muted-strong); font-size: 0.82rem; }
.invoice-request-amount-input small { color: var(--muted); font-size: 0.76rem; }
.invoice-request-input { display: grid; gap: 7px; }
.invoice-request-input > span { color: var(--ink-strong); font-size: 0.84rem; font-weight: 850; }
.invoice-request-input textarea { width: 100%; resize: vertical; line-height: 1.55; }
.invoice-request-input small { color: var(--muted); font-size: 0.76rem; line-height: 1.45; }

@media (max-width: 560px) {
  .invoice-request-amounts { grid-template-columns: 1fr; }
}

.invoice-workflow-dialog {
  width: min(640px, calc(100vw - 32px));
  margin: auto;
  padding: 0;
  color: var(--ink-strong);
  border: 1px solid #c9d9e8;
  border-radius: 8px;
  box-shadow: 0 20px 56px rgba(9, 36, 69, 0.25);
}

.invoice-workflow-dialog::backdrop {
  background: rgba(8, 30, 55, 0.42);
}

.invoice-workflow-dialog-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.invoice-workflow-dialog-card header,
.invoice-workflow-dialog-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}

.invoice-workflow-dialog-card header {
  border-bottom: 1px solid var(--line-soft);
}

.invoice-workflow-dialog-card header span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.invoice-workflow-dialog-card h2 {
  margin: 3px 0 0;
  font-size: 1rem;
}

.invoice-workflow-dialog-content {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: #f8fbfe;
}

.invoice-workflow-request {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  background: #ffffff;
  border: 1px solid #dce7f1;
  border-radius: 6px;
}

.invoice-workflow-request strong {
  color: var(--ink-strong);
  font-size: 0.9rem;
}

.invoice-workflow-request span,
.invoice-workflow-request p {
  margin: 0;
  color: var(--muted);
  font-size: 0.77rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: pre-wrap;
}

.invoice-file-upload,
.invoice-workflow-note {
  display: grid;
  gap: 6px;
}

.invoice-file-upload > span,
.invoice-workflow-note > span {
  color: var(--muted-strong);
  font-size: 0.8rem;
  font-weight: 800;
}

.invoice-file-upload input {
  padding: 9px;
  color: var(--ink);
  background: #ffffff;
  border: 1px dashed #a9c5df;
  border-radius: 6px;
}

.invoice-file-upload small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.invoice-workflow-note textarea {
  min-height: 76px;
  resize: vertical;
}

.invoice-workflow-dialog-card footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line-soft);
}

.collection-view-only {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 750;
}

@media (max-width: 1180px) {
  #collectionKpiGrid {
    grid-template-columns: repeat(2, minmax(132px, 1fr));
  }

  .receivable-workbench-grid {
    grid-template-columns: 1fr;
  }

  .receivable-category-switcher {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .receivable-command {
    align-items: flex-start;
    flex-direction: column;
  }

  .receivable-command-meta {
    width: 100%;
  }

  .receivable-command-meta span {
    flex: 1;
    justify-content: center;
  }

  #collectionKpiGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .collection-task-row {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    grid-template-areas:
      "rank customer money"
      "rank owner status"
      "action action action";
  }

  .collection-task-rank { grid-area: rank; }
  .collection-task-customer { grid-area: customer; }
  .collection-task-owner { grid-area: owner; }
  .collection-task-money { grid-area: money; }
  .collection-task-status { grid-area: status; justify-items: end; text-align: right; }
  .collection-task-action { grid-area: action; padding-top: 4px; }
}

@media (max-width: 520px) {
  #collectionKpiGrid {
    grid-template-columns: 1fr;
  }

  .collection-alert-row {
    grid-template-columns: 32px minmax(0, 1fr) 16px;
  }

  .collection-alert-money {
    grid-column: 2;
  }
}

/* Keep the module drawer above all later theme and workbench overrides. */
@media (max-width: 860px) {
  .workspace-layout .sidebar-nav {
    position: fixed;
    z-index: 60;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(280px, calc(100vw - 48px));
    height: 100dvh;
    max-height: 100dvh;
    box-sizing: border-box;
    align-content: start;
    grid-template-rows: auto auto;
    padding: 14px 12px;
    overflow-y: auto;
    border-radius: 0 8px 8px 0;
    transform: translateX(calc(-100% - 18px));
    box-shadow: 18px 0 48px rgba(4, 18, 36, 0.28);
  }

  .workspace-layout.sidebar-drawer-open .sidebar-nav {
    transform: translateX(0);
  }

  .workspace-layout .sidebar-title {
    display: flex !important;
    justify-content: space-between;
    padding: 8px 10px 10px;
  }

  .workspace-layout .view-tabs {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: 42px;
    align-content: start;
  }

  .workspace-layout .view-tab {
    justify-content: flex-start;
    min-height: 42px;
    padding: 0 10px;
  }
}

/* Project assistant entry workspace */
.account-role.assistant {
  color: #155f96;
  background: #e5f3ff;
  border-color: #badcf5;
}

.project-entry-page {
  gap: 12px;
}

/* The original order form is a modal, not a separate workbench page. */
dialog.production-entry-dialog {
  width: 1120px;
  max-width: calc(100vw - 64px);
  max-height: calc(100vh - 64px);
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scroll-padding-block: 84px;
  color: var(--ink-strong);
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
}

dialog.production-entry-dialog:not([open]) { display: none; }
dialog.production-entry-dialog[open] { display: block; }
dialog.production-entry-dialog::backdrop { background: rgb(15 23 42 / 36%); }

.production-entry-dialog .project-entry-command {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 68px;
  padding: 12px 20px;
  color: var(--ink-strong);
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  box-shadow: none;
}

.production-entry-dialog .project-entry-command h2 { color: var(--ink-strong); font-size: 1.12rem; }
.production-entry-dialog .project-entry-command > div:first-child > span { color: var(--muted); }
.production-entry-dialog .project-entry-command-meta > span { display: none; }
.production-entry-dialog .project-entry-sheet { overflow: visible; border: 0; box-shadow: none; border-radius: 0; }
.production-entry-dialog .project-entry-section { grid-template-columns: 130px minmax(0, 1fr); }
.production-entry-dialog .project-entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.production-entry-dialog .project-entry-actions { position: sticky; bottom: 0; z-index: 1; background: #fff; }
.production-entry-dialog .project-entry-feedback { max-width: 65%; white-space: normal; }
.production-entry-dialog .invoice-request-checkbox input[type="checkbox"] {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
}
#productionEntryOrdersList { padding: 0 20px 20px; }

.project-entry-command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 92px;
  padding: 18px 22px;
  color: #ffffff;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 46px),
    linear-gradient(110deg, #0a2a4e 0%, #164f82 68%, #147f83 100%);
  border: 1px solid rgba(162, 205, 238, 0.2);
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(8, 39, 72, 0.14);
}

.project-entry-command > div:first-child {
  display: grid;
  gap: 3px;
}

.project-entry-command > div:first-child > span {
  color: #9fd2ff;
  font-size: 0.76rem;
  font-weight: 800;
}

.project-entry-command h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.project-entry-command-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-entry-command-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  color: #eaf6ff;
  font-size: 0.78rem;
  font-weight: 750;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(221, 240, 255, 0.18);
  border-radius: 4px;
}

.project-entry-command-meta svg {
  width: 15px;
  height: 15px;
}

.project-entry-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 12px;
  align-items: start;
}

.project-entry-page.is-direct-create .project-entry-layout {
  grid-template-columns: minmax(0, 1fr);
}

.project-entry-page.is-direct-create .project-entry-sheet {
  width: 100%;
}

.project-entry-sheet {
  overflow: hidden;
}

.project-entry-sheet-head {
  min-height: 58px;
}

.project-entry-feedback {
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 800;
}

.project-entry-feedback[data-tone="success"] {
  color: var(--green);
}

.project-entry-feedback[data-tone="error"] {
  color: var(--red);
}

.project-entry-section {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 20px;
  padding: 20px;
  border-top: 1px solid var(--line-soft);
}

.project-entry-section-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.project-entry-section-head > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 900;
  background: #edf5ff;
  border: 1px solid #d4e5fa;
  border-radius: 4px;
}

.project-entry-section-head h3 {
  margin: 1px 0 3px;
  color: var(--ink-strong);
  font-size: 0.92rem;
}

.project-entry-section-head small {
  color: var(--muted);
  font-size: 0.72rem;
}

.project-entry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.project-entry-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.project-entry-grid label > span {
  color: var(--muted-strong);
  font-size: 0.75rem;
  font-weight: 800;
}

.project-entry-grid input,
.project-entry-grid select,
.project-entry-grid textarea {
  width: 100%;
  min-width: 0;
}

.project-entry-span-2 {
  grid-column: span 2;
}

.project-schedule-table {
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.project-schedule-header,
.project-schedule-row {
  display: grid;
  grid-template-columns: minmax(130px, 1.25fr) repeat(3, minmax(126px, 1fr));
  gap: 10px;
  align-items: center;
  min-width: 620px;
  padding: 8px 10px;
}

.project-schedule-header {
  color: #425671;
  font-size: 0.72rem;
  font-weight: 850;
  background: #edf3fa;
  border-bottom: 1px solid var(--line);
}

.project-schedule-row {
  min-height: 52px;
  background: #ffffff;
  border-bottom: 1px solid var(--line-soft);
}

.project-schedule-row:last-child {
  border-bottom: 0;
}

.project-schedule-row:nth-child(odd) {
  background: #fbfdff;
}

.project-schedule-row.is-deadline {
  background: #fff9f8;
}

.project-schedule-row strong {
  color: var(--ink-strong);
  font-size: 0.8rem;
}

.project-schedule-row input,
.project-schedule-row select {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 8px;
  font-size: 0.76rem;
}

.project-entry-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 20px;
  background: #f8fbff;
  border-top: 1px solid var(--line);
}

.project-entry-actions button {
  min-width: 126px;
}

.project-entry-recent {
  position: sticky;
  top: 76px;
  overflow: hidden;
}

.project-entry-recent-list {
  display: grid;
}

.project-entry-recent-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 64px;
  padding: 10px 12px;
  border-top: 1px solid var(--line-soft);
}

.project-entry-recent-item > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 900;
  background: #edf5ff;
  border-radius: 4px;
}

.project-entry-recent-item > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.project-entry-recent-item strong,
.project-entry-recent-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-entry-recent-item strong {
  color: var(--ink-strong);
  font-size: 0.82rem;
}

.project-entry-recent-item small {
  color: var(--muted);
  font-size: 0.7rem;
}

.project-entry-recent-item em {
  color: var(--muted-strong);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 750;
  white-space: nowrap;
}

@media (max-width: 1280px) {
  .project-entry-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
  }

  .project-entry-section {
    grid-template-columns: 130px minmax(0, 1fr);
  }

  .project-entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .project-entry-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .project-entry-recent {
    position: static;
  }
}

@media (max-width: 680px) {
  .project-entry-command {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .project-entry-command-meta {
    width: 100%;
  }

  .project-entry-command-meta span {
    flex: 1;
    justify-content: center;
  }

  .project-entry-section {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
  }

  .project-entry-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .project-entry-span-2 {
    grid-column: auto;
  }

  .project-entry-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 14px 16px;
  }

  .project-entry-actions button {
    min-width: 0;
    width: 100%;
  }
}

/* Production overview uses a comparison-first layout instead of an uneven split column. */
.production-overview-grid {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.production-capacity-card {
  order: 1;
}

.production-risk-chart {
  order: 2;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "risk-head"
    "risk-body"
    "risk-foot";
  gap: 14px;
  padding: 16px 18px;
}

.production-risk-chart .production-chart-head {
  grid-area: risk-head;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.production-chart-head .production-risk-status {
  min-width: 90px;
  min-height: 34px;
  display: inline-flex;
  grid-auto-flow: column;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  padding: 6px 10px;
  color: var(--green);
  background: var(--green-bg);
  border: 1px solid #b9e2d3;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.production-risk-status.has-alert {
  color: var(--red);
  background: var(--red-bg);
  border-color: #f0beb9;
}

.production-risk-status strong {
  color: currentColor;
  font-size: 1rem;
  line-height: 1;
}

.production-risk-status span {
  color: currentColor;
  font-size: 0.76rem;
  font-weight: 850;
}

.production-risk-chart .production-risk-body {
  grid-area: risk-body;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
}

.production-upcoming-card {
  display: grid;
  align-content: center;
  gap: 7px;
  min-height: 132px;
  padding: 12px;
  color: var(--muted-strong);
  background: #edf6ff;
  border: 1px solid #cfe1f3;
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
}

.production-upcoming-card > span {
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 900;
}

.production-upcoming-card > strong {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: var(--brand);
  font-size: 1.55rem;
  line-height: 1;
}

.production-upcoming-card > strong small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.production-upcoming-card > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.production-upcoming-card em {
  padding: 3px 6px;
  color: var(--green);
  background: var(--green-bg);
  border-radius: 3px;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 850;
}

.production-upcoming-card em.risk {
  color: var(--red);
  background: var(--red-bg);
}

.production-upcoming-card > small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
  line-height: 1.3;
}

.production-upcoming-card > .production-risk-project-list,
.production-risk-row > .production-risk-project-list {
  display: -webkit-box;
  min-height: 1.35em;
  overflow: hidden;
  padding-top: 7px;
  color: var(--muted-strong);
  border-top: 1px solid var(--line-soft);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.production-risk-chart .production-risk-bars {
  display: contents;
}

.production-risk-chart .production-risk-row {
  align-content: center;
  min-height: 132px;
  padding: 12px;
  background: #f7faff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
}

.production-risk-chart .production-risk-foot {
  grid-area: risk-foot;
  justify-content: flex-start;
  gap: 24px;
  margin-left: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}

.production-order-chart {
  order: 3;
}

.production-order-chart .order-progress-chart {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.production-order-chart .order-progress-row {
  grid-template-columns: 30px minmax(132px, 0.9fr) minmax(155px, 1.2fr) minmax(58px, auto);
  gap: 10px;
  min-height: 70px;
  padding: 10px;
}

@media (max-width: 1080px) {
  .production-order-chart .order-progress-chart {
    grid-template-columns: minmax(0, 1fr);
  }

  .production-risk-chart .production-risk-body {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .production-upcoming-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .production-risk-chart .production-risk-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .production-risk-chart .production-risk-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .production-upcoming-card {
    grid-column: auto;
  }

  .production-risk-chart .production-risk-foot {
    margin-left: 0;
  }

  .production-order-chart .order-progress-row {
    grid-template-columns: 30px minmax(0, 1fr) minmax(56px, auto);
    grid-template-areas:
      "index title value"
      "main main main";
  }

  .production-order-chart .order-progress-index {
    grid-area: index;
  }

  .production-order-chart .order-progress-title {
    grid-area: title;
  }

  .production-order-chart .order-progress-main {
    grid-area: main;
  }

  .production-order-chart .order-progress-value {
    grid-area: value;
  }
}

/* Compact production Gantt keeps project details while showing more rows per screen. */
.production-gantt-panel .panel-heading {
  min-height: 54px;
  padding: 10px 12px;
}

.production-gantt-panel .panel-heading h2 {
  font-size: 0.98rem;
}

.production-gantt-legend {
  gap: 6px 12px;
  min-height: 34px;
  padding: 6px 12px;
  font-size: 0.72rem;
}

.production-gantt-legend i {
  width: 17px;
  height: 6px;
}

.production-gantt-axis {
  min-height: 64px;
}

.production-gantt-scale {
  grid-template-rows: 27px 18px 19px;
}

.production-gantt-today-rail {
  min-height: 19px;
}

.production-gantt-axis-title {
  padding: 0 10px;
}

.production-gantt-axis-title strong {
  font-size: 0.8rem;
}

.production-gantt-axis-title span {
  font-size: 0.67rem;
}

.production-gantt-row,
.production-gantt-lane {
  min-height: 78px;
}

.production-gantt-task {
  grid-template-columns: 27px minmax(0, 1fr) 40px;
  gap: 7px;
  padding: 5px 8px;
}

.production-gantt-rank {
  width: 24px;
  height: 24px;
  font-size: 0.7rem;
}

.production-gantt-task > div {
  gap: 1px;
}

.production-gantt-task strong {
  font-size: 0.94rem;
}

.production-gantt-task div span {
  font-size: 0.84rem;
}

.production-gantt-task small {
  font-size: 0.64rem;
}

.production-gantt-task em {
  font-size: 0.74rem;
}

/* Production Gantt task rows prioritize scan order: project, context, then actions. */
.production-gantt-row,
.production-gantt-lane {
  min-height: 100px;
}

.production-gantt-task {
  grid-template-columns: 27px minmax(0, 1fr);
  align-items: stretch;
  gap: 9px;
  padding: 9px 10px;
}

.production-gantt-rank {
  align-self: center;
}

.production-gantt-task-copy {
  display: grid !important;
  grid-template-rows: auto auto auto;
  align-content: center;
  gap: 5px !important;
  min-width: 0;
}

.production-gantt-task-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
  min-width: 0;
}

.production-gantt-project-identity {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.production-gantt-task .production-gantt-project-identity strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 1.03rem;
  font-weight: 900;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-gantt-task .production-gantt-project-identity span {
  overflow: hidden;
  color: #516b88;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-gantt-progress {
  display: grid;
  flex: 0 0 auto;
  gap: 1px;
  justify-items: end;
  color: #17273d;
  font-style: normal;
  line-height: 1;
}

.production-gantt-progress b {
  font-size: 0.82rem;
  font-weight: 900;
}

.production-gantt-task .production-gantt-progress small {
  color: #7890aa;
  font-size: 0.56rem;
  font-weight: 800;
}

.production-gantt-task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.production-gantt-task .production-gantt-task-meta span {
  max-width: 100%;
  overflow: hidden;
  padding: 2px 5px;
  color: #617895;
  background: #eef4fb;
  border-radius: 3px;
  font-size: 0.62rem;
  font-weight: 850;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-gantt-task .production-gantt-task-meta .production-gantt-stage {
  color: #1e68ad;
  background: #e5f0ff;
}

.production-gantt-task-actions {
  min-height: 20px;
  margin-top: 0;
}

/* Daily execution stays attached to its project instead of becoming a competing task list. */
.production-gantt-row.has-daily-arrangement,
.production-gantt-row.has-daily-arrangement .production-gantt-lane {
  min-height: 126px;
}

.production-gantt-row.has-daily-arrangement .production-gantt-task-copy {
  grid-template-rows: auto auto auto auto;
}

.production-gantt-daily-summary {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 3px 5px;
  background: #f1faf7;
  border-left: 2px solid #159b85;
  border-radius: 2px;
}

.production-gantt-daily-label {
  flex: 0 0 auto;
  color: #11816f;
  font-size: 0.59rem;
  font-weight: 900;
  white-space: nowrap;
}

.production-gantt-daily-chips {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}

.production-gantt-daily-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  min-width: 0;
  max-width: 116px;
  padding: 2px 4px;
  color: #27666a;
  background: #ffffff;
  border: 1px solid #cce7df;
  border-radius: 2px;
  line-height: 1.05;
  white-space: nowrap;
}

.production-gantt-daily-chip b,
.production-gantt-daily-chip small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.production-gantt-daily-chip b {
  flex: 0 1 auto;
  color: inherit;
  font-size: 0.61rem;
  font-weight: 900;
}

.production-gantt-daily-chip small {
  flex: 0 1 auto;
  color: #718596;
  font-size: 0.55rem;
  font-weight: 800;
}

.production-gantt-daily-chip.bad { border-color: #f2c5c2; color: #ba4b45; background: #fff7f6; }
.production-gantt-daily-chip.warn { border-color: #f0d5a6; color: #a16917; background: #fffaf1; }
.production-gantt-daily-chip.blue { border-color: #bfd8f7; color: #256fb6; background: #f5f9ff; }
.production-gantt-daily-chip.neutral { border-color: #d5dde7; color: #708295; background: #f8fafc; }

.production-gantt-daily-more {
  flex: 0 0 auto;
  color: #176ff0;
  font-size: 0.61rem;
  font-weight: 900;
}

.production-gantt-daily-marker {
  position: absolute;
  z-index: 5;
  top: 5px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: #ffffff;
  background: #0f9d8b;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(14, 121, 108, 0.32);
  font-size: 0.58rem;
  font-weight: 900;
  transform: translateX(-50%);
}

.production-gantt-daily-callout {
  position: absolute;
  z-index: 6;
  top: 57px;
  width: 174px;
  min-height: 42px;
  padding: 4px 6px 5px 8px;
  color: #225863;
  background: #ffffff;
  border: 1px solid #bde2d9;
  border-left: 3px solid #109984;
  border-radius: 3px;
  box-shadow: 0 3px 8px rgba(28, 96, 90, 0.14);
}

.production-gantt-daily-callout::before {
  position: absolute;
  top: -7px;
  left: -3px;
  width: 0;
  height: 0;
  border-right: 6px solid transparent;
  border-bottom: 7px solid #109984;
  content: "";
}

.production-gantt-daily-callout > strong {
  display: block;
  margin-bottom: 3px;
  color: #10806f;
  font-size: 0.61rem;
  font-weight: 900;
  line-height: 1;
}

.production-gantt-daily-callout > div {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.production-gantt-daily-callout span {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  min-width: 0;
  max-width: 74px;
  overflow: hidden;
  white-space: nowrap;
}

.production-gantt-daily-callout b,
.production-gantt-daily-callout small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.production-gantt-daily-callout b {
  color: #245662;
  font-size: 0.63rem;
  font-weight: 900;
}

.production-gantt-daily-callout small {
  color: #72879a;
  font-size: 0.56rem;
  font-weight: 800;
}

.production-gantt-daily-callout em {
  flex: 0 0 auto;
  color: #1677d2;
  font-size: 0.61rem;
  font-style: normal;
  font-weight: 900;
}

.production-gantt-bar {
  top: 18px;
  height: 20px;
}

.production-gantt-phase {
  top: 19px;
  height: 18px;
}

.production-gantt-phase span {
  padding: 0 4px;
  font-size: 0.58rem;
  line-height: 18px;
}

.production-gantt-milestone,
.production-gantt-deadline {
  top: 36px;
  width: 9px;
  height: 9px;
  margin-left: -4px;
}

.production-gantt-deadline {
  top: 37px;
  width: 8px;
  height: 8px;
}

.production-gantt-node-date {
  top: 49px;
}

.production-gantt-forecast {
  top: 8px;
  bottom: 8px;
  width: 2px;
  height: auto;
  margin-left: 0;
}

.production-gantt-undated {
  top: 15px;
  min-height: 20px;
  padding: 2px 8px;
  font-size: 0.68rem;
}

/* Admin order maintenance from the production overview. */
.production-chart-actions {
  display: flex !important;
  grid-auto-flow: column;
  align-items: center;
  justify-content: end;
  gap: 10px !important;
  min-width: max-content !important;
}

.production-chart-actions > strong {
  color: var(--brand);
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.production-add-order {
  min-height: 36px;
  padding: 7px 12px;
}

.order-progress-row.is-editable {
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.order-progress-row.is-editable:hover {
  border-color: #7faee0;
  box-shadow: 0 7px 18px rgba(26, 76, 123, 0.12);
  transform: translateY(-1px);
}

.order-progress-row.is-editable:focus-visible {
  outline: 3px solid rgba(47, 111, 235, 0.24);
  outline-offset: 2px;
}

.production-edit-schedule {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
}

.production-edit-schedule-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px 5px;
}

.production-edit-schedule-title strong {
  color: var(--ink-strong);
  font-size: 0.88rem;
}

.production-edit-schedule-title span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.production-edit-schedule-header,
.production-edit-schedule-row {
  display: grid;
  grid-template-columns: minmax(112px, 1.15fr) minmax(100px, 0.9fr) minmax(128px, 1fr) minmax(128px, 1fr) minmax(104px, 0.8fr);
  gap: 7px;
  align-items: center;
}

.production-edit-schedule-header {
  padding: 4px 8px;
  color: var(--muted);
  background: #eef4f9;
  font-size: 0.7rem;
  font-weight: 900;
}

.production-edit-schedule-row {
  padding: 5px 0;
  border-bottom: 1px solid var(--line-soft);
}

.production-edit-schedule-row:last-child {
  border-bottom: 0;
}

.production-edit-schedule-row > strong {
  padding-left: 8px;
  color: var(--ink-strong);
  font-size: 0.78rem;
  line-height: 1.3;
}

.production-edit-schedule-row input,
.production-edit-schedule-row select {
  min-width: 0;
}

@media (max-width: 760px) {
  .rectification-readonly-grid,
  .rectification-readonly-notes {
    grid-template-columns: 1fr;
  }

  .rectification-readonly-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .production-chart-head {
    align-items: center;
  }

  .production-chart-actions {
    grid-auto-flow: row;
    justify-items: end;
  }

  .production-edit-schedule {
    overflow-x: auto;
  }

  .production-edit-schedule-title,
  .production-edit-schedule-header,
  .production-edit-schedule-row {
    min-width: 650px;
  }

  .notification-toolbar {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  .invoice-notification-list {
    padding-bottom: 2px;
  }

  .invoice-notification-item {
    flex-basis: min(360px, 92vw);
    align-items: flex-start;
    flex-direction: column;
  }

  .invoice-notification-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .notification-center-button {
    justify-self: start;
  }

  .invoice-notification-center-command {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .invoice-notification-stats,
  .invoice-workflow-card-meta {
    grid-template-columns: 1fr;
  }

  .work-notification-filter {
    justify-content: flex-start;
  }

  .invoice-workflow-card > header,
  .invoice-workflow-card > footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .invoice-workflow-card > footer {
    width: 100%;
  }
}

/* Personal workbench: one focused page for each signed-in account. */
.view-page.personal-workbench-page.is-active {
  display: grid;
  gap: 14px;
  min-height: calc(100vh - 152px);
  align-content: start;
}

.personal-workbench-command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px;
  color: #f8fbff;
  background: linear-gradient(110deg, #103c6b 0%, #12557d 56%, #147d78 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(14, 51, 86, 0.16);
}

.personal-workbench-command > div {
  min-width: 0;
}

.personal-workbench-command span {
  display: block;
  margin-bottom: 4px;
  color: rgba(235, 247, 255, 0.8);
  font-size: 13px;
  font-weight: 700;
}

.personal-workbench-command h2 {
  margin: 0;
  color: #ffffff;
  font-size: 25px;
}

.personal-workbench-command p {
  margin: 8px 0 0;
  color: rgba(240, 250, 255, 0.88);
  font-size: 14px;
}

.personal-workbench-command .ghost-button {
  flex: 0 0 auto;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.1);
}

.personal-workbench-command .ghost-button:hover {
  background: rgba(255, 255, 255, 0.18);
}

.personal-workbench-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.personal-workbench-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 88px;
  padding: 16px 18px;
  background: #ffffff;
  border: 1px solid #dbe7f3;
  border-left: 4px solid #2d72ea;
  border-radius: 7px;
  box-shadow: 0 8px 20px rgba(23, 59, 97, 0.07);
}

.personal-workbench-stat > i {
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #1769e9;
  background: #eaf3ff;
  border-radius: 6px;
}

.personal-workbench-stat div {
  display: grid;
  gap: 3px;
}

.personal-workbench-stat span {
  color: #6d819c;
  font-size: 13px;
  font-weight: 700;
}

.personal-workbench-stat strong {
  color: #0b2340;
  font-size: 25px;
  line-height: 1;
}

.personal-workbench-stat.is-danger {
  border-left-color: #e14b45;
}

.personal-workbench-stat.is-danger > i {
  color: #d9433d;
  background: #fff0ef;
}

.personal-workbench-stat.is-warn {
  border-left-color: #e9a829;
}

.personal-workbench-stat.is-warn > i {
  color: #c17a00;
  background: #fff6dd;
}

.personal-workbench-stat.is-green {
  border-left-color: #23a67c;
}

.personal-workbench-stat.is-green > i {
  color: #148765;
  background: #eaf9f3;
}

.personal-workbench-task-panel,
.personal-workbench-recent-panel {
  overflow: hidden;
}

.personal-workbench-heading {
  align-items: center;
}

.personal-workbench-tabs {
  display: flex;
  gap: 5px;
  padding: 4px;
  background: #edf3f9;
  border: 1px solid #d7e3f0;
  border-radius: 7px;
}

.personal-workbench-tabs .sort-tab {
  min-height: 34px;
  padding: 0 13px;
}

.personal-workbench-list {
  display: grid;
}

.personal-workbench-list-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  color: #667f9d;
  font-size: 13px;
  font-weight: 700;
  background: #f7fafd;
  border-top: 1px solid #e2ebf4;
}

.personal-workbench-list-footer .text-button {
  flex: 0 0 auto;
}

.personal-workbench-task {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 20px;
  border-top: 1px solid #e2ebf4;
  border-left: 4px solid #2d72ea;
}

.personal-workbench-task.is-danger {
  border-left-color: #e14b45;
  background: #fffdfd;
}

.personal-workbench-task.is-warn {
  border-left-color: #e9a829;
}

.personal-workbench-task.is-green {
  border-left-color: #23a67c;
}

.personal-workbench-task-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #1769e9;
  background: #eaf3ff;
  border-radius: 6px;
}

.personal-workbench-task.is-danger .personal-workbench-task-icon {
  color: #d9433d;
  background: #fff0ef;
}

.personal-workbench-task.is-warn .personal-workbench-task-icon {
  color: #bd7806;
  background: #fff5dd;
}

.personal-workbench-task.is-green .personal-workbench-task-icon {
  color: #148765;
  background: #eaf9f3;
}

.personal-workbench-task-main {
  min-width: 0;
}

.personal-workbench-task-main > span {
  display: block;
  color: #66809f;
  font-size: 12px;
  font-weight: 700;
}

.personal-workbench-task-main h3 {
  margin: 2px 0;
  color: #102a48;
  font-size: 17px;
}

.personal-workbench-task-main p,
.personal-workbench-task-main small {
  display: block;
  margin: 0;
  overflow: hidden;
  color: #5e7391;
  font-size: 13px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.personal-workbench-task-main small {
  margin-top: 3px;
  color: #8091a8;
}

.personal-workbench-task-action {
  display: grid;
  min-width: 110px;
  justify-items: end;
  gap: 8px;
}

.personal-workbench-task-action em {
  padding: 3px 8px;
  color: #5f7490;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  background: #edf3f9;
  border-radius: 999px;
}

.personal-workbench-task.is-danger .personal-workbench-task-action em {
  color: #c93e39;
  background: #fff0ef;
}

.personal-workbench-recent-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
}

.personal-workbench-recent-item {
  display: grid;
  gap: 7px;
  min-height: 96px;
  padding: 15px 17px;
  border-top: 1px solid #e2ebf4;
  border-right: 1px solid #e2ebf4;
}

.personal-workbench-recent-item:last-child {
  border-right: 0;
}

.personal-workbench-recent-item time {
  color: #7589a4;
  font-size: 12px;
  font-weight: 700;
}

.personal-workbench-recent-item div {
  display: grid;
  gap: 3px;
}

.personal-workbench-recent-item strong {
  color: #183451;
  font-size: 14px;
}

.personal-workbench-recent-item span {
  display: -webkit-box;
  overflow: hidden;
  color: #627995;
  font-size: 13px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@media (max-width: 1100px) {
  .personal-workbench-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .personal-workbench-recent-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .personal-workbench-recent-item:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 700px) {
  .personal-workbench-list-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .view-page.personal-workbench-page.is-active {
    min-height: 0;
  }

  .personal-workbench-command,
  .personal-workbench-heading,
  .personal-workbench-task {
    align-items: flex-start;
    flex-direction: column;
  }

  .personal-workbench-command {
    padding: 20px;
  }

  .personal-workbench-command h2 {
    font-size: 22px;
  }

  .personal-workbench-stats,
  .personal-workbench-recent-list {
    grid-template-columns: 1fr;
  }

  .personal-workbench-task {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .personal-workbench-task-action {
    grid-column: 2;
    justify-items: start;
  }

  .personal-workbench-recent-item {
    border-right: 0;
  }
}

/* Personal workbench trial: work context stays compact beside the priority queue. */
.personal-workbench-command {
  background: #0f3f70;
  border-radius: 8px;
}

.personal-workbench-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.9fr);
  gap: 14px;
  align-items: start;
}

.personal-workbench-side {
  display: grid;
  gap: 14px;
}

.personal-workbench-agenda-panel,
.personal-workbench-collaboration-panel,
.personal-workbench-project-panel {
  overflow: hidden;
}

.compact-panel-heading {
  min-height: 68px;
}

.personal-workbench-agenda,
.personal-workbench-collaboration {
  display: grid;
}

.personal-workbench-agenda-item,
.personal-workbench-collaboration-item {
  display: grid;
  align-items: center;
  min-width: 0;
  border-top: 1px solid #e5edf5;
}

.personal-workbench-agenda-item {
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 16px;
}

.personal-workbench-agenda-item > span {
  color: #4e6e91;
  font-size: 12px;
  font-weight: 800;
}

.personal-workbench-agenda-item > div,
.personal-workbench-collaboration-item > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.personal-workbench-agenda-item strong,
.personal-workbench-collaboration-item strong {
  overflow: hidden;
  color: #112c4b;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.personal-workbench-agenda-item small,
.personal-workbench-collaboration-item span {
  overflow: hidden;
  color: #70839b;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.personal-workbench-agenda-item.is-danger {
  box-shadow: inset 3px 0 0 #df4b44;
}

.personal-workbench-agenda-item.is-warn {
  box-shadow: inset 3px 0 0 #e7a126;
}

.personal-workbench-collaboration-item {
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 16px;
}

.personal-workbench-collaboration-item > i {
  color: #286edf;
}

.personal-workbench-projects {
  display: grid;
}

.personal-workbench-project {
  display: grid;
  grid-template-columns: minmax(180px, 1.35fr) minmax(130px, 0.9fr) minmax(125px, 0.8fr) minmax(130px, 0.85fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 76px;
  padding: 12px 18px;
  border-top: 1px solid #e5edf5;
}

.personal-workbench-project.is-danger {
  box-shadow: inset 3px 0 0 #df4b44;
}

.personal-workbench-project > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.personal-workbench-project small {
  color: #71839b;
  font-size: 12px;
  font-weight: 700;
}

.personal-workbench-project strong {
  overflow: hidden;
  color: #112c4b;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.personal-workbench-project-title span {
  overflow: hidden;
  color: #5f7693;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.personal-workbench-project-progress > span {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: #e4edf6;
}

.personal-workbench-project-progress > span > b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2879e6;
}

@media (max-width: 1100px) {
  .personal-workbench-main-grid {
    grid-template-columns: 1fr;
  }

  .personal-workbench-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .personal-workbench-project {
    grid-template-columns: minmax(180px, 1.2fr) minmax(130px, 0.8fr) minmax(125px, 0.75fr) minmax(130px, 0.8fr);
  }

  .personal-workbench-project > .ghost-button {
    grid-column: 4;
    justify-self: start;
  }
}

@media (max-width: 700px) {
  .personal-workbench-side {
    grid-template-columns: 1fr;
  }

  .personal-workbench-project {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .personal-workbench-project-title,
  .personal-workbench-project > .ghost-button {
    grid-column: 1 / -1;
  }
}

/* Personal workbench V1.1: action-first desktop layout. */
.view-page.personal-workbench-page.is-active {
  gap: 12px;
  min-height: calc(100vh - 136px);
}

.personal-workbench-command {
  min-height: 88px;
  padding: 16px 20px;
  color: #102b48;
  background: #ffffff;
  border: 1px solid #d9e5f1;
  border-left: 4px solid #216ee6;
  box-shadow: 0 6px 18px rgba(23, 59, 97, 0.07);
}

.personal-workbench-command span,
.personal-workbench-command p {
  color: #6e829b;
}

.personal-workbench-command h2 {
  color: #102b48;
  font-size: 23px;
}

.personal-workbench-command p {
  margin-top: 5px;
}

.personal-workbench-command-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.personal-workbench-command .personal-workbench-date {
  margin: 0;
  color: #58718f;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.personal-workbench-command .ghost-button {
  color: #176be4;
  border-color: #bdd4f5;
  background: #f7fbff;
}

.personal-workbench-command .ghost-button:hover {
  background: #eef6ff;
}

/* Desktop enterprise shell: shared visual system for every workbench module. */
@media (min-width: 861px) {
  body {
    background: #edf2f8;
  }

  .app-header {
    min-height: 56px;
    padding: 0 20px;
    gap: 16px;
    background: #061f43;
    border-bottom: 1px solid #163b66;
    box-shadow: 0 2px 10px rgba(6, 31, 67, 0.16);
  }

  .app-header > div:first-child {
    flex: 0 1 auto;
    min-width: 0;
  }

  .app-brand {
    gap: 12px;
  }

  .app-brand h1 {
    font-size: 20px;
    letter-spacing: 0;
  }

  .header-sidebar-toggle {
    width: 32px;
    height: 32px;
    border-color: rgba(218, 235, 255, 0.27);
    border-radius: 4px;
  }

  .access-line {
    display: none;
  }

  .header-actions {
    flex-wrap: nowrap;
    gap: 6px;
  }

  .header-actions .icon-button {
    min-height: 32px;
    padding: 0 9px;
    font-size: 13px;
    border-radius: 4px;
  }

  .header-actions .icon-button:not(.secondary) {
    color: #dcecff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(220, 236, 255, 0.18);
    box-shadow: none;
  }

  .session-card {
    min-height: 34px;
    padding: 4px 6px 4px 8px;
    border-radius: 4px;
  }

  .session-card span {
    display: none;
  }

  .workspace-layout {
    width: 100%;
    max-width: none;
    grid-template-columns: 196px minmax(0, 1fr);
    gap: 0;
    margin: 0;
    padding: 0;
    background: #edf2f8;
  }

  .workspace-layout.sidebar-collapsed {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .workspace-main {
    min-height: calc(100vh - 56px);
    padding: 12px 16px 24px;
  }

  .sidebar-nav {
    position: sticky;
    top: 56px;
    gap: 0;
    min-height: calc(100vh - 56px);
    max-height: calc(100vh - 56px);
    padding: 10px 8px 12px;
    overflow-y: auto;
    background: #062654;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .sidebar-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    padding: 0 10px;
    color: #eff7ff;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .sidebar-title strong {
    font-size: 15px;
  }

  .sidebar-title span {
    display: none;
  }

  .sidebar-collapse-button {
    width: 28px;
    height: 28px;
    color: #bdd5ee;
    border-color: rgba(196, 220, 245, 0.28);
    border-radius: 4px;
  }

  .view-tabs {
    gap: 2px;
    padding: 6px 0 10px;
  }

  .view-tab {
    min-height: 40px;
    padding: 0 11px;
    color: #d4e2f2;
    border: 0;
    border-radius: 4px;
    box-shadow: none;
  }

  .view-tab:hover {
    color: #ffffff;
    background: #0b376f;
  }

  .view-tab.is-active {
    color: #ffffff;
    background: #1769d8;
    box-shadow: none;
  }

  .sidebar-notification-module {
    margin-top: auto;
    border-radius: 4px;
    box-shadow: none;
  }

  .work-notice-ticker {
    min-height: 36px;
    margin: 0 0 10px;
    border-radius: 4px;
    box-shadow: none;
  }

  .view-page.is-active {
    gap: 12px;
  }

  .toolbar,
  .notification-toolbar,
  .view-subnav,
  .section-tabs,
  .page-tabs,
  .module-tabs {
    padding: 10px 12px;
    border-radius: 4px;
    box-shadow: none;
  }

  .panel,
  .table-panel,
  .summary-panel,
  .workspace-card,
  .filter-panel,
  .production-overview,
  .collections-overview,
  .notification-page,
  .operation-log-page {
    border-radius: 4px;
    box-shadow: none;
  }

  .panel,
  .table-panel,
  .summary-panel,
  .workspace-card {
    border-color: #d9e3ef;
  }

  .icon-button,
  .text-button,
  .ghost-button,
  input,
  select,
  textarea {
    border-radius: 4px;
  }

  .icon-button:hover,
  .text-button:hover,
  .ghost-button:hover {
    transform: none;
  }

  .table-wrap,
  .data-table-wrap,
  .collection-table-wrap {
    border-radius: 4px;
  }

  table thead th,
  .data-table thead th {
    color: #395775;
    background: #f4f7fb;
    border-bottom-color: #cedae8;
  }

  table tbody tr,
  .data-table tbody tr {
    border-bottom-color: #e1e8f0;
  }

  .view-page.personal-workbench-page.is-active {
    gap: 10px;
    min-height: calc(100vh - 80px);
  }

  .personal-workbench-command {
    min-height: 58px;
    padding: 0 10px 0 4px;
    border: 0;
    border-bottom: 1px solid #d6e2ee;
    border-left: 3px solid #176be4;
    border-radius: 4px;
    box-shadow: none;
  }

  .personal-workbench-title-line {
    display: flex;
    align-items: baseline;
    gap: 16px;
    min-width: 0;
  }

  .personal-workbench-command h2 {
    font-size: 22px;
    font-weight: 850;
  }

  .personal-workbench-command .personal-workbench-date {
    font-size: 13px;
    font-weight: 700;
  }

  .personal-workbench-command-actions {
    gap: 2px;
  }

  .personal-workbench-quick-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 32px;
    padding: 0 10px;
    color: #1c62bd;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    background: transparent;
    border: 0;
    border-left: 1px solid #e0e7f0;
    white-space: nowrap;
  }

  .personal-workbench-quick-action:first-child {
    border-left: 0;
  }

  .personal-workbench-quick-action:hover {
    color: #0d4d9f;
    background: #f3f8ff;
  }

  .personal-workbench-quick-action i,
  .personal-workbench-quick-action svg {
    width: 15px;
    height: 15px;
  }

  .personal-workbench-stats {
    min-height: 58px;
    border-left-color: #176be4;
    border-radius: 4px;
    box-shadow: none;
  }

  .personal-workbench-priority-label {
    padding: 0 14px;
    background: #f7faff;
  }

  .personal-workbench-priority-label b {
    width: 22px;
    height: 22px;
    color: #ec3d32;
    background: transparent;
    font-size: 21px;
  }

  .personal-workbench-priority-items {
    gap: 8px;
    padding: 8px;
  }

  .personal-workbench-priority-item {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid #d8e4f0;
    border-right: 1px solid #d8e4f0;
    border-radius: 4px;
    background: #ffffff;
  }
}

.personal-workbench-stats {
  display: grid;
  grid-template-columns: 184px minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 0;
  min-height: 74px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #d9e5f1;
  border-left: 4px solid #e49b1e;
  border-radius: 7px;
  box-shadow: 0 5px 16px rgba(23, 59, 97, 0.05);
}

.personal-workbench-priority-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  color: #193451;
  background: #fff9ed;
  border-right: 1px solid #f0dfbd;
}

.personal-workbench-priority-label > i {
  color: #d58c14;
}

.personal-workbench-priority-label strong {
  flex: 0 0 auto;
  font-size: 15px;
  white-space: nowrap;
}

.personal-workbench-priority-label b {
  flex: 0 0 auto;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #ffffff;
  font-size: 12px;
  background: #e39a1f;
  border-radius: 50%;
}

.personal-workbench-priority-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
}

.personal-workbench-priority-item {
  display: grid;
  align-content: center;
  min-width: 0;
  gap: 2px;
  padding: 10px 15px;
  border-right: 1px solid #e6edf5;
}

.personal-workbench-priority-item:last-child {
  border-right: 0;
}

.personal-workbench-priority-item > span {
  color: #6d819b;
  font-size: 11px;
  font-weight: 800;
}

.personal-workbench-priority-item strong,
.personal-workbench-priority-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.personal-workbench-priority-item strong {
  color: #153251;
  font-size: 13px;
}

.personal-workbench-priority-item small {
  color: #7c8da5;
  font-size: 12px;
}

.personal-workbench-priority-item.is-danger {
  box-shadow: inset 3px 0 0 #df5148;
}

.personal-workbench-priority-item.is-warn {
  box-shadow: inset 3px 0 0 #e3a126;
}

.personal-workbench-priority-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  color: #657b97;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  background: #f8fbfe;
  border-left: 1px solid #e5edf5;
}

.personal-workbench-priority-meta span + span {
  color: #168569;
}

.personal-workbench-priority-empty {
  display: grid;
  place-items: center start;
  padding: 0 18px;
  color: #7487a0;
  font-size: 13px;
  font-weight: 700;
}

.personal-workbench-main-grid {
  grid-template-columns: minmax(560px, 1.7fr) minmax(250px, 0.73fr) minmax(250px, 0.73fr);
  gap: 12px;
  align-items: stretch;
}

.personal-workbench-task-panel {
  grid-row: span 2;
}

.personal-workbench-side {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
}

.personal-workbench-collaboration-panel {
  grid-column: 3;
  grid-row: 1 / span 2;
}

.personal-workbench-heading,
.compact-panel-heading {
  min-height: 56px;
  padding: 12px 16px;
}

.personal-workbench-heading h2,
.compact-panel-heading h2 {
  font-size: 17px;
}

.personal-workbench-heading span,
.compact-panel-heading span {
  margin-top: 2px;
  font-size: 12px;
}

.personal-workbench-tabs {
  padding: 3px;
  border-radius: 6px;
}

.personal-workbench-tabs .sort-tab {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.personal-workbench-task-columns {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) minmax(165px, 1fr) 76px 82px;
  gap: 12px;
  padding: 8px 16px 8px 70px;
  color: #8091a8;
  font-size: 11px;
  font-weight: 800;
  background: #f7fafd;
  border-top: 1px solid #e1eaf3;
}

.personal-workbench-task {
  grid-template-columns: 32px minmax(160px, 1.2fr) minmax(165px, 1fr) 76px 82px;
  gap: 12px;
  min-height: 78px;
  padding: 11px 16px;
  border-left-width: 3px;
}

.personal-workbench-task-icon {
  width: 30px;
  height: 30px;
  border-radius: 5px;
}

.personal-workbench-task-main h3 {
  margin: 1px 0 0;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.personal-workbench-task-main > span,
.personal-workbench-task-main small {
  font-size: 11px;
}

.personal-workbench-task-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.personal-workbench-task-context {
  min-width: 0;
  color: #526e8f;
  font-size: 12px;
  line-height: 1.45;
}

.personal-workbench-task-context > span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.personal-workbench-task-deadline {
  display: grid;
  min-width: 0;
  gap: 3px;
  align-content: center;
}

.personal-workbench-task-deadline small {
  color: #7c8fa8;
  font-size: 11px;
  font-weight: 700;
}

.personal-workbench-task-deadline strong {
  color: #223b58;
  font-size: 12px;
  white-space: nowrap;
}

.personal-workbench-task-action {
  min-width: 0;
  gap: 5px;
}

.personal-workbench-task-action em {
  padding: 2px 6px;
  font-size: 10px;
}

.personal-workbench-task-action .compact-button {
  min-height: 28px;
  padding: 0 7px;
  font-size: 11px;
}

.personal-workbench-list-footer {
  padding: 9px 16px;
  font-size: 12px;
}

.personal-workbench-agenda,
.personal-workbench-replies,
.personal-workbench-collaboration {
  display: grid;
}

.personal-workbench-agenda-item {
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 9px;
  padding: 9px 12px;
}

.personal-workbench-agenda-item > span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #286edf;
  font-size: 11px;
  background: #eaf3ff;
  border-radius: 50%;
}

.personal-workbench-agenda-item strong,
.personal-workbench-reply-item strong,
.personal-workbench-collaboration-item strong {
  font-size: 12px;
}

.personal-workbench-agenda-item small,
.personal-workbench-reply-item span,
.personal-workbench-collaboration-item span {
  font-size: 11px;
}

.personal-workbench-reply-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  padding: 10px 12px;
  border-top: 1px solid #e5edf5;
}

.personal-workbench-reply-item > i {
  width: 24px;
  height: 24px;
  padding: 5px;
  color: #d28612;
  background: #fff5df;
  border-radius: 5px;
}

.personal-workbench-reply-item > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.personal-workbench-reply-item strong,
.personal-workbench-reply-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.personal-workbench-reply-item span {
  color: #71839d;
}

.personal-workbench-collaboration-item {
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 8px;
  padding: 12px;
}

.personal-workbench-collaboration-item > i {
  width: 25px;
  height: 25px;
  padding: 5px;
  color: #286edf;
  background: #eaf3ff;
  border-radius: 5px;
}

.personal-workbench-project-panel {
  overflow: hidden;
}

.personal-workbench-project-columns {
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) repeat(4, minmax(105px, 0.65fr)) 70px;
  gap: 14px;
  padding: 8px 16px;
  color: #8091a8;
  font-size: 11px;
  font-weight: 800;
  background: #f7fafd;
  border-top: 1px solid #e1eaf3;
}

.personal-workbench-project {
  grid-template-columns: minmax(220px, 1.25fr) repeat(4, minmax(105px, 0.65fr)) 70px;
  gap: 14px;
  min-height: 64px;
  padding: 9px 16px;
}

.personal-workbench-project small {
  font-size: 11px;
}

.personal-workbench-project strong,
.personal-workbench-project-title span {
  font-size: 12px;
}

.personal-workbench-project-progress > span {
  height: 5px;
}

.personal-workbench-project .compact-button {
  min-height: 28px;
  padding: 0 8px;
  font-size: 11px;
}

.personal-workbench-recent-panel {
  overflow: hidden;
}

.personal-workbench-recent-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 16px;
  color: #173451;
  cursor: pointer;
  list-style: none;
}

.personal-workbench-recent-panel > summary::-webkit-details-marker {
  display: none;
}

.personal-workbench-recent-panel > summary span {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.personal-workbench-recent-panel > summary strong {
  font-size: 14px;
}

.personal-workbench-recent-panel > summary small {
  color: #7487a0;
  font-size: 12px;
}

.personal-workbench-recent-panel[open] > summary i {
  transform: rotate(180deg);
}

@media (max-width: 1220px) {
  .personal-workbench-main-grid {
    grid-template-columns: minmax(520px, 1.6fr) minmax(260px, 0.8fr);
  }

  .personal-workbench-collaboration-panel {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .personal-workbench-collaboration {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .personal-workbench-collaboration-item {
    border-right: 1px solid #e5edf5;
  }
}

/* Shared operating feedback: permission, scope, and LAN state stay visible without adding a new dashboard panel. */
.workbench-status-bar {
  display: grid;
  grid-template-columns: minmax(172px, 0.7fr) minmax(300px, 1.5fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  margin: 0 0 12px;
  padding: 8px 14px;
  border: 1px solid #d8e5f3;
  border-left: 3px solid #1e78e9;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 5px 18px rgba(18, 50, 87, 0.05);
}

.workbench-status-primary,
.workbench-status-sync {
  display: flex;
  align-items: center;
  min-width: 0;
}

.workbench-status-primary {
  gap: 9px;
}

.workbench-status-icon {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 5px;
  color: #1d73df;
  background: #eaf3ff;
}

.workbench-status-primary > div {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.workbench-status-eyebrow {
  color: #7b8da6;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
}

.workbench-status-primary strong {
  overflow: hidden;
  color: #163454;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workbench-status-permission {
  min-width: 0;
  overflow: hidden;
  color: #58718f;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workbench-status-sync {
  justify-self: end;
  gap: 6px;
  color: #178066;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.workbench-status-sync svg {
  width: 16px;
  height: 16px;
}

.workbench-status-sync .text-action-button {
  min-height: 28px;
  margin-left: 2px;
  padding: 3px 8px;
  border: 1px solid currentColor;
  border-radius: 4px;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.workbench-status-sync .text-action-button:hover {
  background: rgba(23, 128, 102, 0.08);
}

.workbench-status-bar[data-sync-state="loading"],
.workbench-status-bar[data-sync-state="saving"],
.workbench-status-bar[data-sync-state="refreshing"] {
  border-left-color: #2879e6;
}

.workbench-status-bar[data-sync-state="loading"] .workbench-status-sync,
.workbench-status-bar[data-sync-state="saving"] .workbench-status-sync,
.workbench-status-bar[data-sync-state="refreshing"] .workbench-status-sync {
  color: #276fd3;
}

.workbench-status-bar[data-sync-state="error"] {
  border-left-color: #df4b44;
  background: #fffdfd;
}

.workbench-status-sync.is-error {
  color: #c93d38;
}

.workbench-status-sync.is-error .text-action-button:hover {
  background: rgba(201, 61, 56, 0.08);
}

@media (max-width: 980px) {
  .workbench-status-bar {
    grid-template-columns: minmax(172px, 0.8fr) auto;
    gap: 7px 12px;
  }

  .workbench-status-permission {
    grid-column: 1 / -1;
    overflow: visible;
    white-space: normal;
  }
}

@media (max-width: 640px) {
  .workbench-status-bar {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 7px;
    margin-bottom: 9px;
    padding: 9px 11px;
  }

  .workbench-status-permission {
    grid-column: auto;
  }

  .workbench-status-sync {
    justify-self: start;
    flex-wrap: wrap;
    white-space: normal;
  }
}

/* Keep desktop header flex-basis values from expanding the phone header. */
@media (max-width: 860px) {
  .app-header > div:first-child,
  .app-header .header-actions {
    flex: 0 1 auto;
    min-width: 0;
    width: 100%;
  }

  .app-header .header-actions {
    justify-content: flex-start;
  }
}

/* Final cascade guard: the personal workbench is a two-column task workspace. */
.view-page.personal-workbench-page.is-active .personal-workbench-main-grid {
  display: grid;
  grid-template-columns: minmax(720px, 2.1fr) minmax(310px, 0.86fr);
  gap: 12px;
  align-items: stretch;
}

.view-page.personal-workbench-page.is-active .personal-workbench-task-panel {
  grid-column: 1;
  grid-row: auto;
  overflow: hidden;
}

.view-page.personal-workbench-page.is-active .personal-workbench-side {
  display: block;
  min-width: 0;
}

.view-page.personal-workbench-page.is-active .personal-workbench-collaboration-panel {
  display: flex;
  grid-column: auto;
  grid-row: auto;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.view-page.personal-workbench-page.is-active .personal-workbench-task-columns,
.view-page.personal-workbench-page.is-active .personal-workbench-task {
  grid-template-columns: 64px minmax(210px, 1.1fr) minmax(240px, 1.25fr) 96px 74px;
  gap: 12px;
}

.view-page.personal-workbench-page.is-active .personal-workbench-task-columns {
  padding: 8px 14px;
}

.view-page.personal-workbench-page.is-active .personal-workbench-task {
  min-height: 82px;
  padding: 10px 14px;
}

.view-page.personal-workbench-page.is-active .personal-workbench-priority-items {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.view-page.personal-workbench-page.is-active .personal-workbench-project-columns,
.view-page.personal-workbench-page.is-active .personal-workbench-project {
  grid-template-columns: minmax(210px, 1.25fr) 110px minmax(135px, 0.75fr) 110px 120px minmax(180px, 1fr) 70px;
  gap: 12px;
}

@media (max-width: 1400px) {
  .view-page.personal-workbench-page.is-active .personal-workbench-main-grid {
    grid-template-columns: minmax(650px, 1fr) 300px;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-task-columns,
  .view-page.personal-workbench-page.is-active .personal-workbench-task {
    grid-template-columns: 58px minmax(190px, 1.05fr) minmax(180px, 1fr) 92px 70px;
    gap: 10px;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-project-columns,
  .view-page.personal-workbench-page.is-active .personal-workbench-project {
    grid-template-columns: minmax(190px, 1.15fr) 100px minmax(120px, 0.7fr) 102px 108px minmax(150px, 0.9fr) 64px;
    gap: 10px;
  }
}

/* Keep desktop navigation compact beneath the global brand header. */
@media (min-width: 861px) {
  .sidebar-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }

  .sidebar-nav > .sidebar-title {
    display: none !important;
  }

  .sidebar-nav > .view-tabs {
    flex: 0 0 auto;
    padding: 4px 0 10px;
  }
}

/* Sync continues in the background; the redundant workspace status strip is not shown. */
.workbench-status-bar {
  display: none !important;
}

/* Personal workbench: dense desktop operations layout */
@media (min-width: 1180px) {
  .view-page.personal-workbench-page.is-active {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
    min-width: 1180px;
    padding: 0;
    background: transparent;
  }

  .view-page.personal-workbench-page.is-active .panel,
  .view-page.personal-workbench-page.is-active .personal-workbench-command,
  .view-page.personal-workbench-page.is-active .personal-workbench-stats {
    border: 1px solid #dbe5f1;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(27, 55, 92, 0.04);
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-command {
    min-height: 58px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-title-line {
    display: flex;
    align-items: center;
    gap: 20px;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-title-line h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1;
    color: #10213a;
    letter-spacing: 0;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-date {
    color: #66758e;
    font-size: 13px;
    font-weight: 600;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-command-actions {
    display: flex;
    align-items: center;
    gap: 0;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-quick-action {
    min-height: 32px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    border-left: 1px solid #dbe5f1;
    border-radius: 0;
    background: transparent;
    color: #315685;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-quick-action:first-child {
    border-left: 0;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-quick-action:hover {
    color: #1267d6;
    background: #f4f8fd;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-quick-action svg {
    width: 15px;
    height: 15px;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-stats {
    min-height: 92px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 0;
    overflow: hidden;
    border: 1px solid #dce5f0;
    border-radius: 6px;
    background: #fff;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-priority-group {
    min-width: 0;
    padding: 14px 18px 12px;
    display: grid;
    grid-template-rows: 30px 22px;
    gap: 9px;
    border: 0;
    border-right: 1px solid #e2e8f0;
    border-radius: 0;
    background: #fff;
    color: #182a45;
    text-align: left;
    cursor: pointer;
    transition: background-color 160ms ease;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-priority-group:last-child {
    border-right: 0;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-priority-group:hover {
    background: #f8fbff;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-priority-group:focus-visible {
    position: relative;
    z-index: 1;
    outline: 2px solid #176ee5;
    outline-offset: -2px;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-priority-group-heading {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-priority-group-icon {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    color: #fff;
    background: #d94b42;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-priority-group-icon svg {
    width: 16px;
    height: 16px;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-priority-group-heading strong {
    font-size: 15px;
    line-height: 1;
    color: #d94b42;
    white-space: nowrap;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-priority-group-heading b {
    font-size: 24px;
    line-height: 1;
    color: #d94b42;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-priority-group-arrow {
    width: 17px;
    height: 17px;
    margin-left: auto;
    flex: 0 0 auto;
    color: #7d8999;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-priority-group-task {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #34445c;
    font-size: 12px;
    line-height: 22px;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-priority-group-task > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-priority-group-task.is-empty {
    color: #97a3b3;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-priority-group-dot {
    width: 6px;
    height: 6px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #d94b42;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-priority-group.is-orange .personal-workbench-priority-group-icon,
  .view-page.personal-workbench-page.is-active .personal-workbench-priority-group.is-orange .personal-workbench-priority-group-dot {
    background: #ed9a29;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-priority-group.is-orange .personal-workbench-priority-group-heading strong,
  .view-page.personal-workbench-page.is-active .personal-workbench-priority-group.is-orange .personal-workbench-priority-group-heading b {
    color: #dd8420;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-priority-group.is-blue .personal-workbench-priority-group-icon,
  .view-page.personal-workbench-page.is-active .personal-workbench-priority-group.is-blue .personal-workbench-priority-group-dot {
    background: #3f6fd4;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-priority-group.is-blue .personal-workbench-priority-group-heading strong,
  .view-page.personal-workbench-page.is-active .personal-workbench-priority-group.is-blue .personal-workbench-priority-group-heading b {
    color: #315fc5;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-priority-group.is-teal .personal-workbench-priority-group-icon,
  .view-page.personal-workbench-page.is-active .personal-workbench-priority-group.is-teal .personal-workbench-priority-group-dot {
    background: #4a9fa6;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-priority-group.is-teal .personal-workbench-priority-group-heading strong,
  .view-page.personal-workbench-page.is-active .personal-workbench-priority-group.is-teal .personal-workbench-priority-group-heading b {
    color: #388d94;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-priority-label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: #263a57;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-priority-label svg {
    width: 20px;
    height: 20px;
    color: #e5483f;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-priority-label strong {
    font-size: 15px;
    white-space: nowrap;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-priority-label b {
    color: #e23a32;
    font-size: 24px;
    line-height: 1;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-priority-items {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    overflow: hidden;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-priority-item {
    min-width: 190px;
    max-width: 250px;
    height: 38px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #f1c2bd;
    border-radius: 4px;
    background: #fff;
    color: #d8453d;
    overflow: hidden;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-priority-item.is-amber {
    border-color: #efc987;
    color: #c97b10;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-priority-item.is-green,
  .view-page.personal-workbench-page.is-active .personal-workbench-priority-item.is-blue {
    border-color: #9ed1cf;
    color: #0f8683;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-priority-item svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-priority-item strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-priority-item b {
    margin-left: auto;
    font-size: 13px;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-priority-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    color: #52647d;
    font-size: 12px;
    white-space: nowrap;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-priority-meta strong {
    color: #12856a;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-main-grid {
    display: grid !important;
    grid-template-columns: minmax(650px, 1.75fr) minmax(240px, 0.6fr) minmax(285px, 0.72fr) !important;
    gap: 12px !important;
    align-items: stretch;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-task-panel,
  .view-page.personal-workbench-page.is-active .personal-workbench-agenda-panel,
  .view-page.personal-workbench-page.is-active .personal-workbench-collaboration-panel {
    min-width: 0;
    height: 455px;
    overflow: hidden;
  }

  .view-page.personal-workbench-page.is-active .panel-heading {
    min-height: 52px;
    padding: 10px 14px;
    border-bottom: 1px solid #e1e8f1;
    background: #fff;
  }

  .view-page.personal-workbench-page.is-active .panel-heading h2 {
    margin: 0;
    font-size: 15px;
    line-height: 1.3;
    color: #132540;
  }

  .view-page.personal-workbench-page.is-active .panel-heading span {
    margin-top: 2px;
    color: #75859d;
    font-size: 11px;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-heading-tools {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-tabs {
    display: inline-flex;
    padding: 2px;
    border: 1px solid #d9e3ef;
    border-radius: 4px;
    background: #f5f8fc;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-tabs .sort-tab {
    min-height: 28px;
    padding: 0 10px;
    border-radius: 3px;
    font-size: 12px;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-task-columns,
  .view-page.personal-workbench-page.is-active .personal-workbench-task {
    display: grid !important;
    grid-template-columns: 52px minmax(120px, 1.05fr) 78px minmax(120px, 1fr) 84px 80px 70px 58px !important;
    align-items: center;
    column-gap: 10px;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-task-columns {
    min-height: 34px;
    padding: 0 12px;
    border-bottom: 1px solid #e0e8f2;
    background: #f4f7fb;
    color: #66758c;
    font-size: 11px;
    font-weight: 700;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-list {
    height: calc(100% - 86px);
    overflow: auto;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-task {
    min-height: 58px;
    padding: 8px 12px;
    border: 0;
    border-bottom: 1px solid #e6ecf4;
    border-left: 2px solid transparent;
    border-radius: 0;
    background: #fff;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-task.is-red {
    border-left-color: #e6534b;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-task:hover {
    background: #f8fbff;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-task-priority {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #3c526e;
    font-size: 12px;
    font-weight: 700;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-task-priority b {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #0b9a91;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-task-main h3,
  .view-page.personal-workbench-page.is-active .personal-workbench-task-context strong {
    margin: 0;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #1a2d47;
    font-size: 12px;
    line-height: 1.4;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-task-main h3 {
    font-size: 13px;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-task-source,
  .view-page.personal-workbench-page.is-active .personal-workbench-task-owner,
  .view-page.personal-workbench-page.is-active .personal-workbench-task-deadline strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #49617f;
    font-size: 12px;
    font-weight: 600;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-task-deadline strong {
    color: #d74b40;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-task-status span {
    display: inline-flex;
    min-height: 24px;
    padding: 0 7px;
    align-items: center;
    border: 1px solid #80b2ed;
    border-radius: 3px;
    color: #1f6fc6;
    background: #f6faff;
    font-size: 11px;
    white-space: nowrap;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-task-control {
    justify-self: end;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-task-control button {
    min-width: 48px;
    height: 28px;
    padding: 0 8px;
    border-radius: 3px;
    font-size: 11px;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-list-footer {
    min-height: 40px;
    padding: 6px 12px;
    font-size: 11px;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-agenda {
    padding: 4px 12px 8px;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-agenda-item {
    min-height: 54px;
    display: grid;
    grid-template-columns: 48px 24px minmax(0, 1fr);
    align-items: start;
    gap: 7px;
    padding: 9px 0;
    border-bottom: 1px solid #e8edf4;
    position: relative;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-agenda-item time {
    padding-top: 2px;
    color: #245da4;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-agenda-item > b {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #edf5ff;
    color: #2a73ce;
    font-size: 10px;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-agenda-item strong,
  .view-page.personal-workbench-page.is-active .personal-workbench-agenda-item span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-agenda-item strong {
    color: #1a2c45;
    font-size: 12px;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-agenda-item span {
    margin-top: 3px;
    color: #728198;
    font-size: 10px;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-message-section {
    margin: 0;
    padding: 0 12px;
    border: 0;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-message-heading {
    min-height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e3eaf3;
    font-size: 12px;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-replies {
    max-height: 125px;
    overflow: hidden;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-reply-item,
  .view-page.personal-workbench-page.is-active .personal-workbench-collaboration-item {
    min-height: 42px;
    padding: 7px 0;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 7px;
    border: 0;
    border-bottom: 1px solid #e8edf4;
    border-radius: 0;
    background: #fff;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-reply-item svg,
  .view-page.personal-workbench-page.is-active .personal-workbench-collaboration-item svg {
    width: 15px;
    height: 15px;
    margin-top: 2px;
    color: #4f6f98;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-reply-item strong,
  .view-page.personal-workbench-page.is-active .personal-workbench-reply-item span,
  .view-page.personal-workbench-page.is-active .personal-workbench-collaboration-item strong,
  .view-page.personal-workbench-page.is-active .personal-workbench-collaboration-item span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-reply-item strong,
  .view-page.personal-workbench-page.is-active .personal-workbench-collaboration-item strong {
    color: #21344f;
    font-size: 11px;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-reply-item span,
  .view-page.personal-workbench-page.is-active .personal-workbench-collaboration-item span {
    margin-top: 2px;
    color: #718198;
    font-size: 10px;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-reply-item small,
  .view-page.personal-workbench-page.is-active .personal-workbench-collaboration-item small {
    display: none;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-collaboration-tabs {
    height: 38px;
    padding: 0 14px;
    display: flex;
    align-items: flex-end;
    gap: 18px;
    border-bottom: 1px solid #e3eaf3;
    color: #738197;
    font-size: 12px;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-collaboration-tabs strong {
    height: 38px;
    display: inline-flex;
    align-items: center;
    border-bottom: 2px solid #2c75d5;
    color: #1d64bc;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-collaboration {
    height: calc(100% - 90px);
    padding: 2px 14px;
    overflow: auto;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-collaboration-item {
    min-height: 65px;
    padding: 10px 0;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-project-panel {
    min-width: 0;
    overflow: hidden;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-project-columns,
  .view-page.personal-workbench-page.is-active .personal-workbench-project {
    display: grid !important;
    grid-template-columns: minmax(180px, 1.15fr) 110px minmax(130px, 0.75fr) 130px minmax(180px, 1.2fr) minmax(160px, 1fr) 92px !important;
    align-items: center;
    column-gap: 12px;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-project-columns {
    min-height: 36px;
    padding: 0 14px;
    border-bottom: 1px solid #dfe7f1;
    background: #f4f7fb;
    color: #62738a;
    font-size: 11px;
    font-weight: 700;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-project {
    min-height: 48px;
    padding: 7px 14px;
    border: 0;
    border-bottom: 1px solid #e5ebf3;
    border-radius: 0;
    background: #fff;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-project-title strong,
  .view-page.personal-workbench-page.is-active .personal-workbench-project-title span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-project-title strong {
    color: #155fb7;
    font-size: 12px;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-project-title span {
    margin-top: 2px;
    color: #20344f;
    font-size: 11px;
    font-weight: 600;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-project > div > strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #263a55;
    font-size: 11px;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-project-progress {
    display: grid;
    grid-template-columns: 30px minmax(70px, 1fr);
    align-items: center;
    gap: 6px;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-project-progress span {
    height: 6px;
    border-radius: 4px;
    background: #e1e7ed;
    overflow: hidden;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-project-progress span b {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #12958e;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-project-money strong {
    text-align: right;
    font-variant-numeric: tabular-nums;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-project-followup strong,
  .view-page.personal-workbench-page.is-active .personal-workbench-project-next strong {
    color: #566b86;
    font-weight: 500;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-project-actions {
    display: flex;
    justify-content: flex-end;
  }

  .view-page.personal-workbench-page.is-active .personal-workbench-recent-panel {
    display: none;
  }
}

/* Customer overview: approved desktop CRM dashboard. */
#customerManagementView,
#customerManagementOverviewPanel,
#customerManagementOverviewPanel > *,
#customerManagementOverviewPanel .customer-overview-main-grid,
#customerManagementOverviewPanel .customer-overview-lower-grid,
#customerManagementOverviewPanel .customer-management-panel,
#customerManagementOverviewPanel .customer-management-table-wrap {
  min-width: 0;
  max-width: 100%;
}

#customerManagementView {
  gap: 8px;
  overflow-x: hidden;
}

#customerManagementView .customer-management-heading {
  min-height: 56px;
  padding: 10px 16px;
}

#customerManagementView .customer-management-heading-actions {
  gap: 4px;
}

#customerManagementView .customer-management-nav {
  min-height: 40px;
  padding: 4px;
  gap: 2px;
}

#customerManagementOverviewPanel {
  display: grid;
  gap: 8px;
  width: 100%;
}

#customerManagementOverviewPanel .customer-management-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dce5f0;
  background: #fff;
}

#customerManagementOverviewPanel .customer-management-kpi {
  min-width: 0;
  min-height: 82px;
  padding: 12px 14px;
  border: 0;
  border-right: 1px solid #dce5f0;
  border-left: 0;
  border-radius: 0;
  box-shadow: none;
}

#customerManagementOverviewPanel .customer-management-kpi:last-child {
  border-right: 0;
}

#customerManagementOverviewPanel .customer-management-kpi strong {
  font-size: 24px;
}

#customerManagementOverviewPanel .customer-management-kpi .customer-kpi-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
}

.customer-map-label {
  max-width: 150px;
  padding: 2px 5px !important;
  overflow: hidden;
  border: 1px solid #bcd2ee !important;
  border-radius: 3px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 2px 7px rgba(24, 62, 105, 0.16);
  color: #1e5ca7 !important;
  font-size: var(--customer-map-label-size, 10px) !important;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-map-label.is-old {
  border-color: #b5dfd4 !important;
  color: #087d6b !important;
}

.customer-map-label.is-pending {
  border-color: #f0c36d !important;
  color: #946200 !important;
}

.customer-map-label.is-provisional {
  border-color: #f0c36d !important;
  color: #946200 !important;
}

#customerManagementOverviewPanel .customer-funnel-step {
  width: 100%;
  box-sizing: border-box;
  border: 0;
  border-bottom: 1px solid #e8edf3;
  appearance: none;
  color: inherit;
  font: inherit;
  text-align: left;
}

#customerManagementOverviewPanel .customer-overview-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 8px;
}

#customerManagementOverviewPanel .customer-overview-main-grid > .customer-overview-card {
  min-width: 0;
  height: 278px;
  min-height: 0;
  overflow: hidden;
}

#customerManagementOverviewPanel .customer-overview-map {
  height: 232px;
}

#customerManagementOverviewPanel .customer-overview-today {
  min-height: 232px;
  max-height: 232px;
  overflow-y: auto;
}

#customerManagementOverviewPanel .customer-today-copy {
  min-width: 0;
  overflow: hidden;
}

#customerManagementOverviewPanel .customer-today-copy strong,
#customerManagementOverviewPanel .customer-today-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#customerManagementOverviewPanel .customer-overview-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(320px, 24vw, 390px);
  gap: 8px;
  align-items: stretch;
  width: 100%;
}

#customerManagementOverviewPanel .customer-overview-side-stack {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

#customerManagementOverviewPanel .customer-overview-side-card {
  height: 196px;
  min-height: 0;
  overflow: hidden;
}

#customerManagementOverviewPanel .customer-overview-analysis-list {
  max-height: 148px;
  overflow-y: auto;
}

#customerManagementOverviewPanel .customer-management-toolbar {
  display: none;
}

#customerManagementOverviewPanel .customer-management-toolbar.is-open {
  display: grid;
}

#customerManagementOverviewPanel .customer-management-panel,
#customerManagementOverviewPanel .customer-management-table-wrap {
  width: 100%;
}

#customerManagementOverviewPanel .customer-management-table-wrap {
  overflow-x: auto;
  overflow-y: auto;
}

#customerManagementOverviewPanel .customer-management-table {
  width: 100%;
  min-width: 980px;
  table-layout: fixed;
}

#customerManagementOverviewPanel .customer-management-table th,
#customerManagementOverviewPanel .customer-management-table td {
  padding: 9px 10px;
}

#customerManagementOverviewPanel .customer-management-table th:nth-child(1),
#customerManagementOverviewPanel .customer-management-table td:nth-child(1) {
  width: 25%;
}

#customerManagementOverviewPanel .customer-management-table th:nth-child(2),
#customerManagementOverviewPanel .customer-management-table td:nth-child(2) {
  width: 13%;
}

#customerManagementOverviewPanel .customer-management-table th:nth-child(3),
#customerManagementOverviewPanel .customer-management-table td:nth-child(3) {
  width: 12%;
}

#customerManagementOverviewPanel .customer-management-table th:nth-child(4),
#customerManagementOverviewPanel .customer-management-table td:nth-child(4) {
  width: 13%;
}

#customerManagementOverviewPanel .customer-management-table th:nth-child(5),
#customerManagementOverviewPanel .customer-management-table td:nth-child(5) {
  width: 17%;
}

#customerManagementOverviewPanel .customer-management-table th:nth-child(6),
#customerManagementOverviewPanel .customer-management-table td:nth-child(6) {
  width: 15%;
}

#customerManagementOverviewPanel .customer-management-table th:nth-child(7),
#customerManagementOverviewPanel .customer-management-table td:nth-child(7) {
  width: 90px;
}

@media (max-width: 1280px) {
  #customerManagementOverviewPanel .customer-overview-main-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #customerManagementOverviewPanel .customer-overview-lower-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

/* Reference-aligned 30 day production execution board. */
.production-gantt-panel .production-gantt-heading {
  min-height: 76px;
  padding: 14px 16px 12px;
}

.production-gantt-panel .production-gantt-heading h2 {
  color: #102c4d;
  font-size: 1.38rem;
  line-height: 1;
}

.production-gantt-panel .production-gantt-heading .save-status {
  margin-top: 7px;
  color: #70849a;
  font-size: 0.68rem;
}

.production-gantt-panel .production-gantt-controls {
  gap: 10px;
}

.production-gantt-board.is-priority-board .production-gantt-row,
.production-gantt-board.is-priority-board .production-gantt-row .production-gantt-lane,
.production-gantt-board.is-priority-board .production-gantt-row.has-daily-arrangement,
.production-gantt-board.is-priority-board .production-gantt-row.has-daily-arrangement .production-gantt-lane {
  min-height: 94px;
}

.production-gantt-board.is-priority-board .production-gantt-task {
  padding: 9px 12px;
}

.production-gantt-board.is-priority-board .production-gantt-task-copy {
  grid-template-rows: auto 5px auto auto !important;
  gap: 5px !important;
}

.production-gantt-board.is-priority-board .production-gantt-task-actions {
  display: none;
}

.production-gantt-project-progress-rail {
  position: relative;
  height: 4px;
  overflow: hidden;
  background: #dfeafb;
  border-radius: 999px;
}

.production-gantt-project-progress-rail b {
  display: block;
  height: 100%;
  background: #13998b;
  border-radius: inherit;
}

.production-gantt-board.is-priority-board .production-gantt-task-meta {
  gap: 5px;
}

.production-gantt-board.is-priority-board .production-gantt-task .production-gantt-task-meta span {
  padding: 0;
  color: #68809a;
  background: transparent;
  font-size: 0.62rem;
}

.production-gantt-board.is-priority-board .production-gantt-task .production-gantt-task-meta .production-gantt-stage {
  color: #4b6785;
  background: transparent;
}

.production-gantt-board.is-priority-board .production-gantt-progress b { color: #143b5b; }

.production-gantt-board.is-priority-board .production-gantt-today-work-cell {
  padding: 7px 9px;
  background: #ffffff;
}

.production-gantt-board.is-priority-board .production-gantt-today-work {
  gap: 5px;
  min-height: 48px;
  padding-left: 0;
  border-left: 0;
}

.production-gantt-board.is-priority-board .production-gantt-today-work > strong {
  display: none;
}

.production-gantt-board.is-priority-board .production-gantt-today-work.is-empty {
  align-content: center;
  padding-left: 7px;
  border-left: 2px solid #d8e3ef;
}

.production-gantt-board.is-priority-board .production-gantt-today-work-chip {
  width: 100%;
  max-width: 100%;
  min-height: 24px;
  padding: 5px 6px;
  color: #3d5873;
  background: #ffffff;
  border-color: #d6e3ef;
  font-size: 0.64rem;
}

.production-gantt-board.is-priority-board .production-gantt-today-work-chip b { font-size: 0.64rem; }
.production-gantt-board.is-priority-board .production-gantt-today-work-chip small { margin-left: auto; font-size: 0.58rem; }

.production-gantt-board.is-priority-board .production-gantt-today-axis {
  color: #3c5874;
  background: #f7faff;
}

.production-gantt-board.is-priority-board .production-gantt-today-axis strong { color: #244561; }

.production-gantt-board.is-priority-board .production-gantt-priority-band > div {
  min-height: 34px;
  padding: 0 13px;
  background: #ffffff;
  border-left-width: 0;
}

.production-gantt-board.is-priority-board .production-gantt-priority-band strong {
  display: inline-flex;
  align-items: center;
  color: #244561;
  font-size: 0.78rem;
}

.production-gantt-board.is-priority-board .production-gantt-priority-band strong::before {
  width: 7px;
  height: 7px;
  margin-right: 8px;
  background: #1976dd;
  border-radius: 50%;
  content: "";
}

.production-gantt-board.is-priority-board .production-gantt-priority-band span {
  color: #7b8fa4;
  font-size: 0.63rem;
}

.production-gantt-board.is-priority-board .production-gantt-priority-band.is-today > div { background: #fffdfd; }
.production-gantt-board.is-priority-board .production-gantt-priority-band.is-today strong { color: #244561; }
.production-gantt-board.is-priority-board .production-gantt-priority-band.is-today strong::before { background: #1976dd; }
.production-gantt-board.is-priority-board .production-gantt-priority-band.is-week > div { background: #fbfdff; }
.production-gantt-board.is-priority-board .production-gantt-priority-band.is-week strong::before { background: #1a9a8c; }
.production-gantt-board.is-priority-board .production-gantt-priority-band.is-week strong { color: #244561; }
.production-gantt-board.is-priority-board .production-gantt-priority-band.is-later > div { background: #fbfdff; }
.production-gantt-board.is-priority-board .production-gantt-priority-band.is-later strong::before { background: #718aa6; }
.production-gantt-board.is-priority-board .production-gantt-priority-band.is-later strong { color: #244561; }

.production-gantt-board.is-priority-board .production-gantt-bar {
  top: 47px;
  height: 18px;
  background: #dce9fc;
  border: 0;
  border-radius: 0 2px 2px 0;
}

.production-gantt-actual-progress {
  position: absolute;
  z-index: 4;
  top: 47px;
  height: 18px;
  overflow: hidden;
  color: #ffffff;
  background: #078f89;
  border-radius: 0 2px 2px 0;
  box-shadow: inset -1px 0 rgba(0, 78, 77, 0.22);
}

.production-gantt-actual-progress.warn,
.production-gantt-actual-progress.danger,
.production-gantt-actual-progress.green { background: #078f89; }

.production-gantt-actual-progress span {
  display: block;
  overflow: hidden;
  padding: 0 6px;
  color: inherit;
  font-size: 0.62rem;
  font-weight: 850;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-gantt-board.is-priority-board .production-gantt-milestone {
  z-index: 6;
  top: 41px;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  background: #176fc5;
  border: 1px solid #ffffff;
  box-shadow: none;
  transform: rotate(45deg);
}

.production-gantt-board.is-priority-board .production-gantt-milestone::after { display: none; }

.production-gantt-board.is-priority-board .production-gantt-deadline { display: none; }

.production-gantt-execution-deadline {
  position: absolute;
  z-index: 7;
  top: 42px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: max-content;
  padding-left: 7px;
  color: #b6433d;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1;
  transform: translateX(2px);
}

.production-gantt-execution-deadline i {
  display: block;
  width: 9px;
  height: 12px;
  background: #d54e47;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 50% 52%, 0 72%);
}

.production-gantt-board.is-priority-board .production-gantt-current-callout,
.production-gantt-board.is-priority-board .production-gantt-node-date,
.production-gantt-board.is-priority-board .production-gantt-daily-marker {
  display: none;
}

.production-gantt-board.is-priority-board .production-gantt-today {
  width: 2px;
  background: #0d9b91;
  box-shadow: 0 0 0 1px rgba(13, 155, 145, 0.12);
}

.production-gantt-panel .production-gantt-execution-overview {
  grid-template-columns: minmax(0, 1fr) 0.6fr;
  min-height: 82px;
  margin: 0 0 10px;
  border-color: #dce7f3;
  border-radius: 4px;
}

.production-gantt-panel .production-gantt-execution-metrics > div {
  min-height: 80px;
  padding: 11px 18px;
}

.production-gantt-panel .production-gantt-execution-metrics span {
  color: #294765;
  font-size: 0.72rem;
}

.production-gantt-panel .production-gantt-execution-metrics strong {
  color: #0b64d8;
  font-size: 1.42rem;
}

.production-gantt-panel .production-gantt-execution-metrics .is-risk strong { color: #d34842; }

.production-gantt-panel .production-gantt-risk-brief {
  grid-template-columns: 70px minmax(0, 1fr);
  background: #fffafa;
  border-left: 1px solid #fee0dd;
}

.production-gantt-panel .production-gantt-risk-brief > strong { color: #bf3d37; }

@media (max-width: 1280px) {
  .production-gantt-panel .production-gantt-execution-overview { grid-template-columns: 1fr; }
  .production-gantt-panel .production-gantt-risk-brief { display: none; }
}

/* High-fidelity production Gantt shell, scoped to the live Gantt view only. */
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) {
  background: #f7f9fc;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .app-header {
  min-height: 56px;
  background: #ffffff;
  border-bottom: 1px solid #dfe8f2;
  box-shadow: none;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .app-brand {
  width: 180px;
  height: 56px;
  padding: 0 16px;
  background: var(--header-surface);
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .app-brand h1 {
  color: var(--header-ink);
  font-size: 1.02rem;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .app-brand .access-line { display: none; }

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .header-actions {
  gap: 8px;
  padding-right: 16px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .header-actions .icon-button,
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .header-actions .session-card,
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .header-actions .session-logout {
  color: #29445f;
  background: #ffffff;
  border-color: #dce6f1;
  box-shadow: none;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .workspace-layout {
  width: 100%;
  min-height: calc(100dvh - 56px);
  margin: 0;
  padding: 0;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 0;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .sidebar-nav {
  position: sticky;
  top: 56px;
  width: 180px;
  min-height: calc(100dvh - 56px);
  padding: 11px 8px 16px;
  background: #061c36;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .sidebar-title { display: none; }

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .view-tab {
  min-height: 38px;
  padding: 0 12px;
  color: #deebfa;
  border-radius: 3px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .view-tab.is-active {
  color: #ffffff;
  background: #176ff2;
  box-shadow: none;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .workspace-main {
  padding: 0 22px 24px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) #roleNotice {
  display: none !important;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-panel {
  height: calc(100dvh - 56px);
  min-height: 640px;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-panel .production-gantt-heading {
  min-height: 84px;
  padding: 20px 4px 12px;
  background: transparent;
  border: 0;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-panel .production-gantt-heading h2 {
  font-size: 1.5rem;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-actions {
  gap: 0;
  padding: 0 8px;
  border-right: 1px solid #e1e8f1;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-range-actions {
  padding-right: 8px;
  border-right: 1px solid #e1e8f1;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-actions .sort-tab {
  min-height: 32px;
  border-radius: 3px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-legend {
  min-height: 30px;
  padding: 5px 0 7px;
  background: transparent;
  border: 0;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-execution-overview {
  min-height: 92px;
  margin: 0 0 10px;
  background: #ffffff;
  border-color: #dbe5f0;
  border-radius: 4px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-execution-metrics > div {
  min-height: 90px;
  padding: 13px 28px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-execution-metrics span {
  color: #1d3e5f;
  font-size: 0.74rem;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-execution-metrics strong {
  font-size: 1.55rem;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-risk-brief {
  grid-template-columns: 76px minmax(0, 1fr);
  padding: 12px 16px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-scroll {
  border: 1px solid #d9e4ef;
  border-radius: 3px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-board.is-priority-board .production-gantt-axis,
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-board.is-priority-board .production-gantt-row,
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-board.is-priority-board .production-gantt-priority-band {
  grid-template-columns: 320px 142px var(--gantt-width);
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-board.is-priority-board {
  width: calc(462px + var(--gantt-width));
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-today-axis,
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-today-work-cell {
  left: 320px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-board.is-priority-board .production-gantt-today-work-cell {
  padding: 6px 7px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-board.is-priority-board .production-gantt-today-work-chip {
  min-height: 23px;
  padding: 4px 5px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-axis {
  min-height: 66px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-scale {
  grid-template-rows: 26px 20px 20px;
}

/* Reference production execution layout: a fixed navigation rail and a dense
   operating board where the first decision is risk, then the next job. */
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .app-header {
  position: relative;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .app-header::after {
  content: "30天生产执行";
  position: absolute;
  top: 0;
  left: 204px;
  z-index: 300;
  display: flex;
  align-items: center;
  height: 56px;
  color: #102d56;
  font-size: 24px;
  font-weight: 800;
  pointer-events: none;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  height: calc(100dvh - 56px);
  min-height: 700px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-panel .production-gantt-heading {
  order: 1;
  position: relative;
  min-height: 0;
  height: 0;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-panel .production-gantt-heading > div:first-child {
  position: fixed;
  top: 0;
  left: 204px;
  z-index: 200;
  display: flex;
  align-items: center;
  height: 56px;
  pointer-events: none;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-panel .production-gantt-heading h2,
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-panel .production-gantt-heading .save-status,
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-summary {
  display: none;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-execution-overview-host {
  order: 2;
  flex: 0 0 auto;
  margin-top: 11px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-execution-overview-host:empty {
  display: none;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-execution-overview {
  grid-template-columns: minmax(0, 1.55fr) minmax(410px, 1fr);
  min-height: 90px;
  margin: 0;
  overflow: hidden;
  border: 1px solid #dbe5f0;
  border-radius: 5px;
  background: #ffffff;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-execution-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-execution-metrics > div {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  grid-template-rows: 24px 34px;
  align-items: center;
  min-height: 89px;
  padding: 13px 20px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-execution-metrics > div > svg {
  grid-row: 1 / -1;
  width: 21px;
  height: 21px;
  color: #176ff2;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-execution-metrics > div.is-risk > svg { color: #d6433d; }

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-execution-metrics span {
  color: #253f5d;
  font-size: 0.76rem;
  font-weight: 800;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-execution-metrics strong {
  color: #1267e3;
  font-size: 1.46rem;
  font-weight: 900;
  line-height: 1;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-execution-metrics .is-risk strong { color: #d6433d; }

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-risk-brief {
  grid-template-columns: 78px minmax(0, 1fr);
  padding: 9px 15px;
  border-left: 1px solid #ffe1de;
  background: #fffafa;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-risk-brief > strong {
  align-self: start;
  padding-top: 2px;
  color: #bf3f3a;
  font-size: 0.74rem;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-risk-brief > div {
  gap: 4px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-risk-brief button {
  display: grid;
  grid-template-columns: 14px auto minmax(0, 1fr) auto 14px;
  align-items: center;
  gap: 5px;
  width: 100%;
  min-height: 28px;
  padding: 0;
  color: #314a67;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-risk-brief button > svg {
  width: 13px;
  height: 13px;
  color: #d6433d;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-risk-brief button b { color: #183a60; font-size: 0.7rem; }
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-risk-brief button span { overflow: hidden; color: #485f7c; font-size: 0.66rem; text-overflow: ellipsis; white-space: nowrap; }
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-risk-brief button em { padding: 2px 5px; color: #d6433d; background: #fff0ef; border-radius: 3px; font-size: 0.61rem; font-style: normal; }

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-toolbar {
  order: 3;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 14px;
  min-height: 54px;
  margin-top: 12px;
  padding: 9px 12px;
  border: 1px solid #dce6f2;
  border-radius: 5px 5px 0 0;
  background: #ffffff;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-view-controls,
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-view-controls > span {
  color: #60738b;
  font-size: 0.74rem;
  font-weight: 800;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-view-controls .sort-tab {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 3px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-filter-control {
  display: grid;
  grid-template-columns: auto 108px;
  align-items: center;
  gap: 8px;
  min-width: 190px;
  color: #526d89;
  font-size: 0.69rem;
  font-weight: 750;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-filter-control select {
  width: 108px;
  min-height: 31px;
  padding: 0 25px 0 10px;
  color: #24425f;
  font-size: 0.72rem;
  font-weight: 750;
  border: 1px solid #dce5ef;
  border-radius: 4px;
  background: #ffffff;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-toolbar-actions {
  margin-left: auto;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-tool-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 31px;
  padding: 0 10px;
  color: #38536e;
  font-size: 0.7rem;
  font-weight: 750;
  background: #ffffff;
  border: 1px solid #dce5ef;
  border-radius: 4px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-tool-button svg,
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-search svg {
  width: 15px;
  height: 15px;
  color: #4173a6;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-search {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 185px;
  min-height: 31px;
  padding: 0 8px;
  border: 1px solid #dce5ef;
  border-radius: 4px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-search input {
  width: 150px;
  min-width: 0;
  color: #24425f;
  font-size: 0.7rem;
  border: 0;
  outline: 0;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-toolbar .production-gantt-zoom { display: none; }

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt {
  order: 4;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-legend {
  order: 5;
  flex: 0 0 auto;
  min-height: 30px;
  margin: 0;
  padding: 8px 2px 2px;
  border: 0;
  background: transparent;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-scroll {
  height: 100%;
  border: 1px solid #d9e4ef;
  border-radius: 0 0 4px 4px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-board.is-priority-board,
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-board.is-priority-board .production-gantt-axis,
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-board.is-priority-board .production-gantt-row,
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-board.is-priority-board .production-gantt-priority-band {
  grid-template-columns: 202px 128px var(--gantt-width);
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-board.is-priority-board {
  width: calc(330px + var(--gantt-width));
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-today-axis,
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-today-work-cell {
  left: 202px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-axis { min-height: 67px; }
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-axis-title { padding: 0 10px; }
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-axis-title-main { gap: 4px; }
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-axis-title strong { font-size: 0.67rem; }
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-axis-title span { font-size: 0.57rem; }
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-today-axis { padding: 0 8px; }
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-today-axis strong { font-size: 0.7rem; }
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-today-axis span { font-size: 0.58rem; }

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-board.is-priority-board .production-gantt-row,
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-board.is-priority-board .production-gantt-row .production-gantt-lane,
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-board.is-priority-board .production-gantt-row.has-daily-arrangement,
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-board.is-priority-board .production-gantt-row.has-daily-arrangement .production-gantt-lane {
  min-height: 88px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-board.is-priority-board .production-gantt-task {
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 6px;
  padding: 7px 9px;
}

body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-board.is-priority-board .production-gantt-rank { width: 22px; height: 22px; font-size: 0.64rem; }
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-board.is-priority-board .production-gantt-task-copy { gap: 4px !important; }
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-board.is-priority-board .production-gantt-task strong { font-size: 0.82rem; }
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-board.is-priority-board .production-gantt-task-head span { font-size: 0.61rem; }
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-board.is-priority-board .production-gantt-progress b { font-size: 0.69rem; }
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-board.is-priority-board .production-gantt-task .production-gantt-task-meta span { font-size: 0.55rem; }
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-board.is-priority-board .production-gantt-today-work-cell { padding: 6px 8px; }
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-board.is-priority-board .production-gantt-today-work-chip { min-height: 21px; padding: 3px 4px; font-size: 0.55rem; }
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-board.is-priority-board .production-gantt-priority-band > div { min-height: 31px; padding: 0 12px; }
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-board.is-priority-board .production-gantt-priority-band strong { font-size: 0.71rem; }
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-board.is-priority-board .production-gantt-bar { top: 42px; height: 16px; }
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-board.is-priority-board .production-gantt-actual-progress { top: 42px; height: 16px; }
body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-execution-deadline { top: 39px; }

@media (max-width: 1350px) {
  body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-filter-control { min-width: 150px; grid-template-columns: auto 84px; }
  body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-filter-control select { width: 84px; }
  body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-search { min-width: 145px; }
  body:has(#productionView.is-active [data-production-section="gantt"]:not([hidden])) .production-gantt-search input { width: 110px; }
}

/* Shared header palette; module-specific shell geometry stays unchanged. */
.app-header {
  background: var(--header-surface);
  color: var(--header-ink);
  border-bottom-color: var(--header-line);
  box-shadow: 0 1px 4px rgba(24, 44, 69, 0.06);
}

.app-header .app-brand {
  --header-surface: var(--sidebar-surface);
  --header-ink: #ffffff;
  --header-muted: #c6d8ef;
  --header-line: #496487;
  --header-hover: #173f6d;
  background: var(--header-surface);
}
.app-header .app-brand h1 { color: var(--header-ink); }
.app-header .eyebrow,
.app-header .access-line,
.app-header .session-card span { color: var(--header-muted); }

.app-header .header-actions .icon-button,
.app-header .session-card,
.app-header .session-logout,
.app-header .header-sidebar-toggle {
  color: var(--header-ink);
  background: var(--header-surface);
  border-color: var(--header-line);
  box-shadow: none;
}

.app-header .session-card strong { color: var(--header-ink); }
.app-header .header-actions .icon-button:hover,
.app-header .session-logout:hover,
.app-header .header-sidebar-toggle:hover {
  color: var(--header-ink);
  background: var(--header-hover);
  border-color: #b8c9dd;
}

.app-header :is(button, label[for]):focus-visible {
  outline: 2px solid #1769dd;
  outline-offset: 2px;
}

.app-header .app-brand button:focus-visible { outline-color: #a8ceff; }

/* Navigation colors belong to the shared shell, not individual modules. */
#appShell #sidebarNav {
  background: var(--sidebar-surface);
  color: var(--sidebar-ink);
}
#appShell #sidebarNav .view-tab {
  color: var(--sidebar-ink);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
#appShell #sidebarNav .view-tab:hover:not(.is-active) {
  color: #fff;
  background: var(--sidebar-hover);
}
#appShell #sidebarNav .view-tab.is-active {
  color: #fff;
  background: var(--sidebar-active);
  border-color: transparent;
  box-shadow: none;
}
#appShell #sidebarNav .view-tab:focus-visible {
  outline: 2px solid #a8ceff;
  outline-offset: -2px;
}

@media (min-width: 861px) {
  .app-header > div.app-brand {
    box-sizing: border-box;
    flex: 0 0 196px;
    min-width: 196px;
    max-width: 196px;
    min-height: 55px;
    margin-left: -20px;
    padding: 0 12px;
    gap: 8px;
  }
  body:has(.workspace-layout.sidebar-collapsed) .app-header > div.app-brand {
    flex-basis: 68px;
    min-width: 68px;
    max-width: 68px;
    padding-inline: 18px;
  }
  body:has(.workspace-layout.sidebar-collapsed) .app-header > div.app-brand > div { display: none; }
}
