:root {
  color-scheme: light;
  --page: #f3f6f5;
  --surface: #ffffff;
  --surface-muted: #f7f9f8;
  --text: #1e2a27;
  --muted: #687470;
  --border: #dce4e1;
  --border-strong: #c7d2ce;
  --blue: #117a70;
  --blue-soft: #e7f3f0;
  --teal: #0b8f82;
  --teal-soft: #e4f5f2;
  --gold: #d79600;
  --gold-soft: #fff5d6;
  --orange: #dd6b20;
  --orange-soft: #fff0e6;
  --red: #b42318;
  --red-soft: #fdeceb;
  --green: #1f6f46;
  --green-soft: #e8f5ed;
  --violet: #7656b8;
  --violet-soft: #f0ebfa;
  --branch-a: #2563b8;
  --branch-b: #0f766e;
  --branch-c: #6d4bb3;
  --branch-d: #946200;
  --sidebar: #f8faf9;
  --shadow: 0 1px 2px rgba(20, 46, 40, 0.035);
  --focus-ring: rgba(17, 122, 112, 0.24);
  --radius-sm: 6px;
  --radius-md: 8px;
  --space-section: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--page);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

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

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--sidebar);
  padding: 14px 12px;
  overflow-y: auto;
  z-index: 20;
}

.brand-row {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px 13px;
  border-bottom: 1px solid var(--border);
}

.brand-mark,
.login-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #117a70;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
}

.brand-row > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.brand-row strong {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.brand-row span:not(.brand-mark) {
  color: var(--muted);
  font-size: 12px;
}

.side-nav {
  display: grid;
  gap: 3px;
  margin-top: 14px;
}

.side-nav[hidden] {
  display: none;
}

.side-nav p {
  margin: 16px 10px 5px;
  color: #9299a2;
  font-size: 11px;
}

.side-link {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 6px;
  padding: 0 10px;
  background: transparent;
  color: #515963;
  cursor: pointer;
  text-align: left;
}

.side-link svg {
  width: 17px;
  height: 17px;
  color: #7c848e;
}

.side-link:hover,
.side-link.is-active {
  background: #e7f1ee;
  color: var(--text);
}

.side-link.is-active svg {
  color: var(--blue);
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  border-top: 1px solid var(--border);
  padding: 14px 8px 2px;
}

.sidebar-footer > div {
  display: grid;
  gap: 2px;
}

.sidebar-footer strong {
  font-size: 12px;
  font-weight: 500;
}

.sidebar-footer span:not(.status-dot) {
  color: var(--muted);
  font-size: 11px;
}

.page-shell {
  min-width: 0;
}

.topbar {
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 18px;
  border-bottom: 0;
  background: #123f38;
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 15;
}

.title-block {
  flex: 1 1 auto;
  min-width: 0;
}

.eyebrow {
  margin-bottom: 2px;
  color: rgba(235, 245, 242, 0.7);
  font-size: 11px;
}

.title-block h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.store-switcher {
  min-width: 0;
  flex: 0 0 230px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(235, 245, 242, 0.72);
  font-size: 12px;
}

.store-switcher > span {
  flex: 0 0 auto;
  white-space: nowrap;
}

.store-switcher[hidden] {
  display: none;
}

.store-switcher select {
  width: auto;
  min-width: 0;
  height: 36px;
  flex: 1 1 auto;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 6px;
  padding: 0 28px 0 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font: inherit;
  cursor: pointer;
}

.store-switcher select:hover {
  border-color: rgba(255, 255, 255, 0.46);
}

.store-switcher select:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.34);
  outline-offset: 1px;
  border-color: var(--blue);
}

.update-state {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  padding-right: 13px;
  color: rgba(235, 245, 242, 0.76);
  font-size: 12px;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #9ba2ab;
}

.status-dot.is-ok {
  background: var(--green);
}

.status-dot.is-warning {
  background: var(--gold);
}

.status-dot.is-error {
  background: var(--red);
}

.icon-button {
  position: relative;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--border-strong);
  background: var(--surface-muted);
}

.topbar .icon-button {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.topbar .icon-button:hover {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.14);
}

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

.icon-button::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  top: calc(100% + 7px);
  z-index: 30;
  width: max-content;
  max-width: 150px;
  padding: 6px 8px;
  border-radius: 5px;
  background: #20242b;
  color: #ffffff;
  font-size: 11px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.icon-button:hover::after,
.icon-button:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.icon-button.is-spinning svg {
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.menu-button,
.sidebar-close {
  display: none;
}

.logout-form {
  margin: 0;
}

.module-tabs {
  position: sticky;
  top: 60px;
  z-index: 14;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  padding: 4px 16px;
  background: rgba(255, 255, 255, 0.98);
  scrollbar-width: none;
}

.module-tabs[hidden] {
  display: none;
}

.module-tabs::-webkit-scrollbar {
  display: none;
}

.module-tab {
  min-width: 82px;
  min-height: 34px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 6px;
  padding: 0 13px;
  background: transparent;
  color: #5f6771;
  cursor: pointer;
  font-weight: 500;
}

.module-tab[hidden] {
  display: none;
}

.module-tab svg {
  width: 17px;
  height: 17px;
}

.module-tab:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.module-tab.is-active {
  background: var(--blue-soft);
  color: var(--blue);
}

.dashboard-main {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 12px clamp(14px, 1.5vw, 28px) 28px;
}

.dashboard-main section[id],
.dashboard-main article[id] {
  scroll-margin-top: 116px;
}

.module-view[hidden] {
  display: none !important;
}

.operation-toolbar {
  min-height: 66px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--border);
  padding: 2px 2px 13px;
}

.operation-kicker {
  color: var(--blue);
  font-size: 11px;
  font-weight: 600;
}

.operation-toolbar h2 {
  margin: 3px 0 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
}

.operation-toolbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.operation-period-tabs {
  display: inline-grid;
  grid-template-columns: repeat(5, minmax(54px, 1fr));
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 2px;
  background: var(--surface-muted);
}

.operation-period-tabs[hidden] {
  display: none;
}

.operation-period-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 5px;
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}

.operation-period-tabs button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(24, 34, 48, 0.1);
  font-weight: 600;
}

.operation-toolbar-controls,
.operation-range-controls {
  min-width: 0;
  display: grid;
  justify-items: end;
  gap: 7px;
}

.operation-range-controls[hidden],
.operation-custom-range[hidden],
.livestock-view-tabs[hidden],
.operation-scope-notice[hidden],
.livestock-period-content[hidden],
#operationSnapshotContent[hidden] {
  display: none;
}

.operation-custom-range {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 326px) auto;
  align-items: center;
  justify-content: end;
  gap: 7px;
}

.operation-custom-range .person-date-range {
  min-height: 38px;
}

.operation-range-apply {
  min-height: 38px;
  border: 1px solid var(--blue);
  border-radius: 7px;
  padding: 0 15px;
  background: var(--blue);
  color: #ffffff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.operation-range-apply:hover {
  filter: brightness(0.96);
}

.operation-range-error {
  grid-column: 1 / -1;
  justify-self: stretch;
  margin: 0;
  color: var(--red);
  font-size: 11px;
  line-height: 1.45;
  text-align: left;
}

.operation-range-error[hidden] {
  display: none;
}

.operation-range-applied {
  min-height: 16px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  text-align: right;
}

.operation-range-controls[aria-busy="true"] {
  opacity: 0.7;
}

.operation-range-controls :disabled {
  cursor: wait;
}

.livestock-view-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(92px, 1fr));
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 2px;
  background: var(--surface-muted);
}

.livestock-view-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 5px;
  padding: 0 13px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}

.livestock-view-tabs button[aria-selected="true"] {
  background: var(--surface);
  color: var(--blue);
  box-shadow: 0 1px 2px rgba(24, 34, 48, 0.1);
  font-weight: 600;
}

.livestock-view-tabs button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.operation-scope-notice {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  margin-top: 12px;
  border: 1px solid #cfe0dc;
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--blue-soft);
  color: #245b53;
}

.operation-scope-notice > svg {
  width: 17px;
  height: 17px;
  margin-top: 1px;
}

.operation-scope-notice div {
  display: grid;
  gap: 2px;
}

.operation-scope-notice strong {
  font-size: 12px;
}

.operation-scope-notice span {
  color: #54716b;
  font-size: 11px;
  line-height: 1.5;
}

.livestock-period-content .operation-metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.livestock-period-limitations {
  white-space: normal;
}

.livestock-period-table {
  min-width: 660px;
}

.operation-metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.operation-metric-card {
  min-height: 122px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 15px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.operation-metric-card span {
  color: #4b535d;
  font-size: 13px;
}

.operation-metric-card strong {
  overflow-wrap: anywhere;
  font-size: 29px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.operation-metric-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.operation-metric-card.is-alert strong {
  color: var(--red);
}

.operation-metric-card.is-good strong {
  color: var(--green);
}

.operation-warning {
  margin-top: 12px;
  border: 1px solid #ecdca8;
  border-radius: 7px;
  padding: 10px 12px;
  background: var(--gold-soft);
  color: #775b13;
  font-size: 12px;
  line-height: 1.6;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.national-view,
.clinic-view,
.planned-view {
  min-width: 0;
}

.national-toolbar {
  min-height: 66px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--border);
  padding: 2px 2px 13px;
}

.national-toolbar h2 {
  margin: 3px 0 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
}

.national-toolbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.national-period-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(64px, 1fr));
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 2px;
  background: var(--surface-muted);
}

.national-period-tabs button {
  min-height: 30px;
  border: 0;
  border-radius: 5px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}

.national-period-tabs button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(24, 34, 48, 0.1);
  font-weight: 600;
}

.national-quality-notice {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid #b9d8ca;
  border-radius: 7px;
  padding: 10px 12px;
  background: var(--green-soft);
  color: #226c47;
}

.national-quality-notice.is-warning {
  border-color: #ecdca8;
  background: var(--gold-soft);
  color: #775b13;
}

.national-quality-notice.is-error {
  border-color: #efc3bf;
  background: var(--red-soft);
  color: #9c3329;
}

.national-quality-notice > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.national-quality-notice > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.national-quality-notice strong,
.national-quality-notice span {
  overflow-wrap: anywhere;
}

.national-quality-notice span {
  font-size: 11px;
  line-height: 1.45;
}

.national-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.national-metric-card {
  min-width: 0;
  min-height: 126px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 15px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.national-metric-card.is-primary {
  border-top: 3px solid var(--blue);
  padding-top: 13px;
}

.national-metric-card > span {
  color: #4b535d;
  font-size: 12px;
}

.national-metric-card strong {
  overflow-wrap: anywhere;
  font-size: 24px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.national-metric-card small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.national-ranking-panel {
  margin-top: 12px;
  overflow: hidden;
}

.national-ranking-heading {
  align-items: center;
}

.national-ranking-toolbar {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 13px;
}

.national-ranking-filter {
  min-width: 210px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.national-ranking-filter select,
.national-ranking-search input {
  height: 36px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  letter-spacing: 0;
}

.national-ranking-filter select {
  width: 100%;
  padding: 0 28px 0 9px;
  cursor: pointer;
}

.national-ranking-search {
  position: relative;
  width: min(240px, 100%);
  min-width: 0;
  display: block;
}

.national-ranking-search > svg {
  position: absolute;
  left: 10px;
  top: 50%;
  width: 15px;
  height: 15px;
  color: var(--muted);
  pointer-events: none;
  transform: translateY(-50%);
}

.national-ranking-search input {
  width: 100%;
  padding: 0 10px 0 32px;
}

.national-ranking-filter select:focus-visible,
.national-ranking-search input:focus-visible {
  outline: 3px solid rgba(40, 100, 220, 0.25);
  outline-offset: 2px;
}

.national-ranking-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 13px -16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface-muted);
}

.national-ranking-summary > span {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  border-right: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
}

.national-ranking-summary > span:last-child {
  border-right: 0;
}

.national-ranking-summary strong {
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  text-align: right;
}

.national-ranking-notice {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 10px 0 0;
  border: 1px solid #ecdca8;
  border-radius: 6px;
  padding: 8px 10px;
  background: var(--gold-soft);
  color: #775b13;
  font-size: 11px;
  line-height: 1.5;
}

.national-ranking-notice[hidden] {
  display: none;
}

.national-ranking-notice > svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  margin-top: 1px;
}

.national-ranking-notice span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.national-ranking-table-scroll {
  width: auto;
  max-width: none;
  margin: 12px -16px -16px;
  overflow-x: auto;
  border-top: 1px solid var(--border);
  scrollbar-gutter: stable;
}

.national-ranking-table {
  width: 100%;
  min-width: 920px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.national-ranking-table th,
.national-ranking-table td {
  height: 48px;
  border-right: 1px solid #edf0f3;
  border-bottom: 1px solid #edf0f3;
  padding: 8px 11px;
  background: var(--surface);
  text-align: right;
  white-space: nowrap;
}

.national-ranking-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f7f8fa;
  color: #5f6771;
  font-weight: 600;
}

.national-ranking-table th:first-child,
.national-ranking-table td:first-child {
  text-align: center;
}

.national-ranking-table th:nth-child(2),
.national-ranking-table td:nth-child(2),
.national-ranking-table th:nth-child(3),
.national-ranking-table td:nth-child(3) {
  text-align: left;
}

.national-ranking-table th:last-child,
.national-ranking-table td:last-child {
  border-right: 0;
}

.national-ranking-table tbody tr:last-child td {
  border-bottom: 0;
}

.national-ranking-table tr.is-rank-1 td { background: #fffbef; }
.national-ranking-table tr.is-rank-2 td { background: #f7f8fa; }
.national-ranking-table tr.is-rank-3 td { background: #fff8f2; }

.national-ranking-rank {
  width: 74px;
}

.national-rank-badge {
  width: 27px;
  height: 27px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-muted);
  color: var(--muted);
  font-weight: 700;
}

.national-rank-badge.is-rank-1 { border-color: #e2bd55; background: var(--gold-soft); color: #866000; }
.national-rank-badge.is-rank-2 { border-color: #bcc3cb; background: #edf0f3; color: #555e69; }
.national-rank-badge.is-rank-3 { border-color: #e0a176; background: var(--orange-soft); color: #9a4d19; }

.national-ranking-person {
  min-width: 142px;
}

.national-ranking-person strong,
.national-ranking-table .sales-cell {
  color: var(--text);
  font-weight: 600;
}

.national-ranking-table .is-missing {
  color: #8a6400;
}

.national-ranking-store {
  max-width: 230px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  padding: 4px 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-size: 11px;
  text-align: left;
  white-space: normal;
}

.national-ranking-store:hover {
  text-decoration: underline;
}

.national-ranking-store svg {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
}

.national-decision-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.15fr) minmax(360px, 0.85fr);
  gap: 12px;
  margin-top: 12px;
}

.national-actions-panel,
.national-efficiency-panel {
  min-height: 332px;
}

.national-action-list {
  max-height: 258px;
  display: grid;
  gap: 1px;
  margin: 12px -4px 0;
  overflow-y: auto;
}

.national-action {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  grid-template-areas:
    "heading store icon"
    "detail store icon";
  gap: 4px 10px;
  border: 0;
  border-bottom: 1px solid var(--border);
  padding: 10px 6px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.national-action:hover {
  background: var(--surface-muted);
}

.national-action-heading {
  grid-area: heading;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.national-action-heading strong,
.national-action p {
  min-width: 0;
  overflow-wrap: anywhere;
}

.national-action p {
  grid-area: detail;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.national-action-store {
  grid-area: store;
  align-self: center;
  max-width: 150px;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
  text-align: right;
}

.national-action > svg {
  grid-area: icon;
  align-self: center;
  color: var(--muted);
}

.national-action-level {
  flex: 0 0 auto;
  border-radius: 4px;
  padding: 2px 5px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.national-action-level.is-high {
  background: var(--red-soft);
  color: var(--red);
}

.national-action-level.is-medium {
  background: var(--gold-soft);
  color: #8a6400;
}

.national-action-level.is-low {
  background: var(--blue-soft);
  color: var(--blue);
}

.national-efficiency-chart {
  position: relative;
  min-width: 0;
  height: 260px;
  padding: 12px 12px 24px 34px;
}

.national-efficiency-plot {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  background:
    linear-gradient(to right, transparent calc(50% - 0.5px), var(--border-strong) 50%, transparent calc(50% + 0.5px)),
    linear-gradient(to bottom, transparent calc(50% - 0.5px), var(--border-strong) 50%, transparent calc(50% + 0.5px)),
    #fafbfd;
}

.national-quadrant {
  position: absolute;
  color: #a0a7b0;
  font-size: 9px;
  pointer-events: none;
}

.national-quadrant.is-top-left { left: 7px; top: 6px; }
.national-quadrant.is-top-right { right: 7px; top: 6px; }
.national-quadrant.is-bottom-left { left: 7px; bottom: 6px; }
.national-quadrant.is-bottom-right { right: 7px; bottom: 6px; }

.national-efficiency-point {
  position: absolute;
  z-index: 2;
  max-width: 104px;
  display: grid;
  gap: 1px;
  border: 1px solid rgba(40, 100, 220, 0.28);
  border-radius: 6px;
  padding: 4px 6px;
  background: var(--blue-soft);
  color: var(--blue);
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.national-efficiency-point span {
  overflow: hidden;
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.national-efficiency-point small {
  font-size: 9px;
}

.national-axis-label {
  position: absolute;
  color: var(--muted);
  font-size: 9px;
}

.national-axis-label.is-x { right: 12px; bottom: 6px; }
.national-axis-label.is-y { left: 3px; top: 12px; writing-mode: vertical-rl; }

.national-stores-panel,
.national-diagnostics-panel {
  margin-top: 12px;
}

.national-stores-panel {
  padding-bottom: 0;
}

.national-table-scroll {
  width: calc(100% + 32px);
  max-width: calc(100% + 32px);
  margin: 14px -16px 0;
  overflow-x: auto;
  border-top: 1px solid var(--border);
  scrollbar-gutter: stable;
}

.national-store-table {
  width: 100%;
  min-width: 1410px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.national-store-table th,
.national-store-table td {
  height: 46px;
  border-right: 1px solid #edf0f3;
  border-bottom: 1px solid #edf0f3;
  padding: 8px 10px;
  background: var(--surface);
  text-align: right;
  white-space: nowrap;
}

.national-store-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f7f8fa;
  color: #5f6771;
  font-weight: 600;
}

.national-store-table th:first-child,
.national-store-table td:first-child,
.national-store-table th:nth-child(2),
.national-store-table td:nth-child(2) {
  text-align: left;
}

.national-store-table tr.is-unavailable td,
.national-store-table tr.is-planned td {
  background: #fafbfc;
  color: var(--muted);
}

.national-store-table .sales-cell,
.national-store-name strong {
  color: var(--text);
  font-weight: 600;
}

.national-store-name {
  min-width: 196px;
}

.national-store-name strong,
.national-store-name small {
  display: block;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.national-store-name small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.national-store-table .is-missing {
  color: #8a6400;
}

.national-store-table .is-positive {
  color: var(--green);
  font-weight: 600;
}

.national-store-table .is-negative {
  color: var(--red);
  font-weight: 600;
}

.national-status {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  border-radius: 5px;
  padding: 2px 7px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.national-status.is-ok { background: var(--green-soft); color: var(--green); }
.national-status.is-warning { background: var(--gold-soft); color: #8a6400; }
.national-status.is-error { background: var(--red-soft); color: var(--red); }
.national-status.is-planned { background: #edf0f3; color: #626b76; }

.national-drilldown {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 5px 7px;
  background: var(--surface);
  color: var(--blue);
  cursor: pointer;
  font-size: 10px;
  white-space: nowrap;
}

.national-drilldown:hover {
  border-color: rgba(40, 100, 220, 0.35);
  background: var(--blue-soft);
}

.national-drilldown svg {
  width: 13px;
  height: 13px;
}

.national-diagnostic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
  border-top: 1px solid var(--border);
}

.national-diagnostic-item {
  min-width: 0;
  padding: 14px;
  border-right: 1px solid var(--border);
}

.national-diagnostic-item:last-child {
  border-right: 0;
}

.national-diagnostic-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.national-diagnostic-heading > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.national-diagnostic-heading span,
.national-diagnostic-heading strong {
  overflow-wrap: anywhere;
}

.national-diagnostic-heading span {
  color: var(--muted);
  font-size: 10px;
}

.national-loss-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 12px;
  background: var(--border);
}

.national-loss-summary span {
  padding: 8px 5px;
  background: var(--surface-muted);
  color: #4f5863;
  font-size: 10px;
  text-align: center;
}

.national-branch-list {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.national-branch-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  padding-top: 7px;
  border-top: 1px dashed var(--border);
  font-size: 10px;
}

.national-branch-row span {
  min-width: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.national-empty {
  min-height: 100px;
  display: grid;
  place-items: center;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.talent-panel,
.national-talent-panel {
  margin-top: 12px;
}

.national-talent-panel {
  padding-bottom: 0;
}

.talent-heading {
  align-items: center;
}

.talent-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border-radius: 5px;
  padding: 3px 8px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.talent-status.is-ready {
  background: var(--green-soft);
  color: var(--green);
}

.talent-status.is-warning {
  background: var(--gold-soft);
  color: #8a6400;
}

.talent-status.is-unavailable {
  background: #edf0f3;
  color: #626b76;
}

.talent-status.is-pending {
  background: var(--blue-soft);
  color: var(--blue);
}

.talent-metric-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--border);
}

.talent-metric {
  min-width: 0;
  min-height: 98px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  padding: 12px;
  background: var(--surface);
}

.talent-metric > span,
.talent-metric small {
  color: var(--muted);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.talent-metric > span {
  font-size: 11px;
  font-weight: 500;
}

.talent-metric strong {
  color: var(--text);
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.talent-metric small {
  min-height: 28px;
  font-size: 9px;
}

.talent-quality-note {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 10px;
  border-left: 3px solid #d4a72c;
  padding: 7px 9px;
  background: #fffaf0;
  color: #735d1d;
  font-size: 10px;
  line-height: 1.5;
}

.talent-quality-note[hidden] {
  display: none;
}

.talent-quality-note svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  margin-top: 1px;
}

.talent-quality-note span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.talent-newcomer-section {
  min-width: 0;
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 15px;
}

.talent-newcomer-heading {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.talent-newcomer-heading > div {
  min-width: 0;
}

.talent-newcomer-heading h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.talent-newcomer-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.talent-newcomer-count {
  flex: 0 0 auto;
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 8px;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.talent-newcomer-list {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  column-gap: 18px;
  margin-top: 10px;
  border-top: 1px solid var(--border);
}

.talent-newcomer-item {
  min-width: 0;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 10px;
  border-bottom: 1px solid var(--border);
  padding: 9px 2px;
}

.talent-newcomer-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.talent-newcomer-copy strong,
.talent-newcomer-copy span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.talent-newcomer-copy strong {
  font-size: 11px;
  font-weight: 600;
}

.talent-newcomer-copy span {
  color: var(--muted);
  font-size: 9px;
}

.talent-newcomer-stage {
  max-width: 112px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 5px;
  padding: 3px 7px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 9px;
  font-weight: 600;
  overflow-wrap: anywhere;
  text-align: center;
}

.talent-newcomer-progress {
  grid-column: 1 / -1;
  min-width: 0;
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: #edf0f3;
}

.talent-newcomer-progress > span {
  display: block;
  width: var(--talent-newcomer-progress, 0%);
  max-width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.talent-newcomer-empty {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
  padding: 14px 2px;
  color: var(--muted);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.talent-quadrant-section {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 15px;
}

.talent-subheading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.talent-subheading > div {
  min-width: 0;
}

.talent-subheading h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.talent-subheading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.talent-coverage-summary {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.talent-coverage-summary span {
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 8px;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.talent-quadrant-plot {
  position: relative;
  min-height: 330px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(145px, 1fr));
  margin: 12px 0 27px;
  border: 1px solid var(--border-strong);
  background: var(--border);
  --talent-quadrant-x-threshold: 50%;
  --talent-quadrant-y-threshold: 50%;
}

.talent-quadrant {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: 13px 15px;
  background: var(--surface);
}

.talent-quadrant:nth-child(odd) {
  border-right: 1px solid var(--border-strong);
}

.talent-quadrant:nth-child(-n + 2) {
  border-bottom: 1px solid var(--border-strong);
}

.talent-quadrant.is-core { background: #f1faf7; }
.talent-quadrant.is-backbone { background: #f3f7ff; }
.talent-quadrant.is-develop { background: #fff9ed; }
.talent-quadrant.is-observe { background: #fff5f3; }

.talent-quadrant header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 9px;
}

.talent-quadrant header strong {
  font-size: 12px;
  font-weight: 600;
}

.talent-quadrant header span {
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.talent-quadrant.is-core header strong { color: var(--teal); }
.talent-quadrant.is-backbone header strong { color: var(--blue); }
.talent-quadrant.is-develop header strong { color: #8a6400; }
.talent-quadrant.is-observe header strong { color: var(--red); }

.talent-quadrant-people {
  min-width: 0;
  align-content: start;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.talent-quadrant-person {
  max-width: 100%;
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(84, 94, 106, 0.18);
  border-radius: 4px;
  padding: 3px 6px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  font-size: 10px;
}

.talent-quadrant-person b,
.talent-quadrant-person span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.talent-quadrant-person b {
  max-width: 150px;
  font-weight: 600;
}

.talent-quadrant-person span {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.talent-quadrant-empty {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.talent-quadrant-axis {
  position: absolute;
  z-index: 2;
  border-radius: 3px;
  padding: 2px 4px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
  font-size: 9px;
  pointer-events: none;
}

.talent-quadrant-axis.is-y {
  left: 2px;
  top: 50%;
  writing-mode: vertical-rl;
  transform: translateY(-50%);
}

.talent-quadrant-axis.is-x {
  left: 50%;
  bottom: 2px;
  transform: translateX(-50%);
}

.talent-quadrant-threshold,
.talent-quadrant-threshold-label,
.talent-quadrant-scale,
.talent-quadrant-markers {
  position: absolute;
  pointer-events: none;
}

.talent-quadrant-threshold {
  z-index: 3;
  border-color: rgba(40, 100, 220, 0.52);
  border-style: dashed;
}

.talent-quadrant-threshold.is-x {
  top: 0;
  bottom: 0;
  left: var(--talent-quadrant-x-threshold, 50%);
  border-left-width: 1px;
  border-left-style: dashed;
}

.talent-quadrant-threshold.is-y {
  right: 0;
  left: 0;
  top: var(--talent-quadrant-y-threshold, 50%);
  border-top-width: 1px;
  border-top-style: dashed;
}

.talent-quadrant-threshold-label {
  z-index: 6;
  border: 1px solid rgba(40, 100, 220, 0.2);
  border-radius: 3px;
  padding: 2px 5px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--blue);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.talent-quadrant-threshold-label.is-x {
  left: var(--talent-quadrant-x-threshold, 50%);
  top: 5px;
  transform: translateX(-50%);
}

.talent-quadrant-threshold-label.is-y {
  right: 5px;
  top: var(--talent-quadrant-y-threshold, 50%);
  transform: translateY(-50%);
}

.talent-quadrant-scale {
  z-index: 5;
  color: var(--muted);
  font-size: 8px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.talent-quadrant-scale.is-y {
  top: 8px;
  bottom: 8px;
  left: -31px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
}

.talent-quadrant-scale.is-x {
  right: 8px;
  bottom: -20px;
  left: 8px;
  display: flex;
  justify-content: space-between;
}

.talent-quadrant-scale.is-x span:nth-child(2) {
  position: absolute;
  left: var(--talent-quadrant-x-threshold, 50%);
  transform: translateX(-50%);
}

.talent-quadrant-markers {
  z-index: 4;
  inset: 0;
}

.talent-quadrant-marker {
  position: absolute;
  left: var(--talent-marker-x, 0%);
  top: var(--talent-marker-y, 0%);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 124px;
  min-height: 21px;
  border: 1px solid rgba(24, 34, 48, 0.2);
  border-radius: 999px;
  padding: 2px 6px 2px 4px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 3px rgba(24, 34, 48, 0.16);
  color: var(--text);
  font-size: 9px;
  line-height: 1.2;
  transform: translate(
    calc(-50% + var(--talent-marker-offset-x, 0px)),
    calc(-50% + var(--talent-marker-offset-y, 0px))
  );
}

.talent-quadrant-marker.is-left-edge {
  transform: translate(
    var(--talent-marker-offset-x, 0px),
    calc(-50% + var(--talent-marker-offset-y, 0px))
  );
}

.talent-quadrant-marker.is-right-edge {
  transform: translate(
    calc(-100% + var(--talent-marker-offset-x, 0px)),
    calc(-50% + var(--talent-marker-offset-y, 0px))
  );
}

.talent-quadrant-marker.is-capped {
  border-style: dashed;
}

.talent-quadrant-marker-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}

.talent-quadrant-marker.is-core .talent-quadrant-marker-dot { background: var(--teal); }
.talent-quadrant-marker.is-backbone .talent-quadrant-marker-dot { background: var(--blue); }
.talent-quadrant-marker.is-develop .talent-quadrant-marker-dot { background: #b18417; }
.talent-quadrant-marker.is-observe .talent-quadrant-marker-dot { background: var(--red); }

.talent-quadrant-marker-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.talent-quadrant-unclassified {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px 9px;
  margin: -14px 0 15px;
  border: 1px solid #eadfb9;
  border-radius: 5px;
  padding: 8px 10px;
  background: #fffaf0;
  color: #765b16;
  font-size: 10px;
}

.talent-quadrant-unclassified[hidden] {
  display: none;
}

.talent-quadrant-unclassified strong {
  color: #8a6400;
  font-size: 10px;
}

.talent-quadrant-unclassified > span {
  color: #927b42;
}

.talent-quadrant-unclassified > div {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.talent-quadrant-unclassified-person {
  max-width: 100%;
  border: 1px solid #eadfb9;
  border-radius: 3px;
  padding: 3px 5px;
  background: rgba(255, 255, 255, 0.72);
  color: #765b16;
  overflow-wrap: anywhere;
}

.talent-profile-table-scroll {
  width: calc(100% + 32px);
  max-width: calc(100% + 32px);
  margin: 15px -16px -16px;
  overflow: auto;
  border-top: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  scrollbar-gutter: stable;
}

.talent-profile-table-scroll:focus-visible {
  outline: 3px solid rgba(40, 100, 220, 0.22);
  outline-offset: -3px;
}

.talent-profile-table {
  width: 100%;
  min-width: 1280px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.talent-profile-table th,
.talent-profile-table td {
  height: 45px;
  border-right: 1px solid #edf0f3;
  border-bottom: 1px solid #edf0f3;
  padding: 8px 10px;
  background: var(--surface);
  text-align: right;
  white-space: nowrap;
}

.talent-profile-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f7f8fa;
  color: #5f6771;
  font-weight: 600;
}

.talent-profile-table th:first-child,
.talent-profile-table td:first-child,
.talent-profile-table th:nth-child(2),
.talent-profile-table td:nth-child(2),
.talent-profile-table th:nth-child(3),
.talent-profile-table td:nth-child(3),
.talent-profile-table th:nth-child(4),
.talent-profile-table td:nth-child(4),
.talent-profile-table th:nth-child(5),
.talent-profile-table td:nth-child(5),
.talent-profile-table th:nth-child(6),
.talent-profile-table td:nth-child(6),
.talent-profile-table th:nth-child(7),
.talent-profile-table td:nth-child(7),
.talent-profile-table th:nth-child(8),
.talent-profile-table td:nth-child(8),
.talent-profile-table th:nth-child(9),
.talent-profile-table td:nth-child(9) {
  text-align: left;
}

.talent-profile-table th:last-child,
.talent-profile-table td:last-child {
  border-right: 0;
}

.talent-profile-table tbody tr:last-child td {
  border-bottom: 0;
}

.talent-profile-table tbody tr:hover td {
  background: #fafbfd;
}

.talent-profile-table .is-missing {
  color: #8a6400;
}

.talent-profile-name {
  max-width: 170px;
  overflow: hidden;
  color: var(--text);
  font-weight: 600;
  text-overflow: ellipsis;
}

.talent-profile-table .talent-potential-cell {
  min-width: 280px;
  text-align: left;
  white-space: normal;
}

.talent-potential-summary {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.talent-potential-summary strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
}

.talent-potential-summary > span {
  color: var(--muted);
  font-size: 9px;
}

.talent-potential-basis {
  border-radius: 3px;
  padding: 2px 4px;
  background: var(--gold-soft);
  color: #8a6400;
  font-size: 8px;
  font-weight: 600;
  white-space: nowrap;
}

.talent-potential-basis.is-source-quality {
  background: var(--red-soft);
  color: var(--red);
}

.talent-potential-components {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.talent-potential-components span {
  min-height: 19px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 1px solid #e4e8ed;
  border-radius: 3px;
  padding: 1px 4px;
  background: #fafbfd;
  color: var(--muted);
  font-size: 8px;
  white-space: nowrap;
}

.talent-potential-components b {
  color: #59626d;
  font-weight: 600;
}

.talent-potential-components em {
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.talent-potential-components .is-unavailable {
  border-color: #eee3c3;
  background: #fffaf0;
  color: #8a6400;
}

.talent-quadrant-label {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  border-radius: 4px;
  padding: 3px 7px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.talent-quadrant-label.is-core { background: var(--green-soft); color: var(--teal); }
.talent-quadrant-label.is-backbone { background: var(--blue-soft); color: var(--blue); }
.talent-quadrant-label.is-develop { background: var(--gold-soft); color: #8a6400; }
.talent-quadrant-label.is-observe { background: var(--red-soft); color: var(--red); }

.talent-profile-edit {
  width: 29px;
  height: 29px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}

.talent-profile-edit:hover {
  border-color: rgba(40, 100, 220, 0.34);
  background: var(--blue-soft);
  color: var(--blue);
}

.talent-profile-edit:focus-visible,
.talent-profile-dialog button:focus-visible,
.talent-profile-dialog input:focus-visible {
  outline: 2px solid rgba(40, 100, 220, 0.38);
  outline-offset: 1px;
}

.talent-profile-edit:disabled {
  opacity: 0.55;
  cursor: wait;
}

.talent-profile-edit svg {
  width: 14px;
  height: 14px;
}

.national-talent-quadrants {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 12px;
  border: 1px solid var(--border);
  background: var(--border);
}

.national-talent-quadrants > div {
  min-width: 0;
  min-height: 82px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px 12px;
  background: var(--surface);
}

.national-talent-quadrants span,
.national-talent-quadrants small {
  color: var(--muted);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.national-talent-quadrants strong {
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.national-talent-quadrants > p {
  grid-column: 1 / -1;
  margin: 0;
  padding: 7px 10px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 10px;
}

.talent-profile-dialog {
  width: min(480px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 0;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 22px 60px rgba(24, 34, 48, 0.24);
}

.talent-profile-dialog::backdrop {
  background: rgba(24, 30, 39, 0.42);
}

.talent-profile-dialog form {
  display: grid;
}

.talent-profile-dialog form > header,
.talent-profile-dialog form > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
}

.talent-profile-dialog form > header {
  border-bottom: 1px solid var(--border);
}

.talent-profile-dialog form > header > div {
  min-width: 0;
}

.talent-profile-dialog h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.talent-profile-dialog header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.talent-dialog-close {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}

.talent-dialog-close svg {
  width: 15px;
  height: 15px;
}

.talent-profile-fields {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.talent-profile-fields label {
  display: grid;
  gap: 6px;
  color: #4f5863;
  font-size: 11px;
  font-weight: 500;
}

.talent-profile-fields input {
  width: 100%;
  min-height: 39px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 0 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.talent-profile-form-error {
  margin: 0 16px 12px;
  border-left: 3px solid var(--red);
  padding: 7px 9px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 11px;
}

.talent-profile-form-error[hidden] {
  display: none;
}

.talent-profile-dialog form > footer {
  justify-content: flex-end;
  border-top: 1px solid var(--border);
}

.talent-profile-dialog .primary-button,
.talent-profile-dialog .secondary-button {
  min-height: 35px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 5px;
  padding: 0 13px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
}

.talent-profile-dialog .primary-button {
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #ffffff;
}

.talent-profile-dialog .secondary-button {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
}

.talent-profile-dialog .primary-button svg {
  width: 14px;
  height: 14px;
}

.talent-profile-dialog :disabled {
  opacity: 0.58;
  cursor: wait;
}

.national-talent-table-scroll {
  width: calc(100% + 32px);
  max-width: calc(100% + 32px);
  margin: 12px -16px 0;
  overflow-x: auto;
  border-top: 1px solid var(--border);
  scrollbar-gutter: stable;
}

.national-talent-table-scroll:focus-visible {
  outline: 3px solid rgba(40, 100, 220, 0.22);
  outline-offset: -3px;
}

.national-talent-table {
  width: 100%;
  min-width: 1660px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.national-talent-table th,
.national-talent-table td {
  height: 45px;
  border-right: 1px solid #edf0f3;
  border-bottom: 1px solid #edf0f3;
  padding: 8px 10px;
  background: var(--surface);
  text-align: right;
  white-space: nowrap;
}

.national-talent-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f7f8fa;
  color: #5f6771;
  font-weight: 600;
}

.national-talent-table th:first-child,
.national-talent-table td:first-child,
.national-talent-table th:last-child,
.national-talent-table td:last-child {
  text-align: left;
}

.national-talent-table th:last-child,
.national-talent-table td:last-child {
  border-right: 0;
}

.national-talent-table tr.is-unavailable td,
.national-talent-table tr.is-planned td {
  background: #fafbfc;
  color: var(--muted);
}

.national-talent-store-name {
  min-width: 190px;
}

.national-talent-store-name strong,
.national-talent-store-name small {
  display: block;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.national-talent-store-name strong {
  color: var(--text);
  font-weight: 600;
}

.national-talent-store-name small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.planned-view {
  min-height: calc(100vh - 142px);
  display: grid;
  place-items: center;
}

.planned-state {
  width: min(520px, 100%);
  display: grid;
  justify-items: center;
  gap: 9px;
  padding: 44px 20px;
  text-align: center;
}

.planned-state-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--blue);
}

.planned-state-icon svg {
  width: 25px;
  height: 25px;
}

.planned-state h2 {
  margin: 3px 0 0;
  font-size: 20px;
  font-weight: 600;
}

.planned-state p {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
}

.planned-business-scope {
  color: #4f5863;
  font-size: 13px;
  font-weight: 600;
}

.planned-business-scope[hidden] {
  display: none;
}

.clinic-boundary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-top: 12px;
  border: 1px solid #cddff8;
  border-radius: 8px;
  padding: 13px 15px;
  background: #f4f8ff;
  color: #314056;
}

.clinic-boundary-copy,
.clinic-boundary-notes {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.clinic-boundary-copy {
  flex-wrap: wrap;
}

.clinic-boundary-copy strong {
  font-size: 13px;
}

.clinic-boundary-copy > span:not(.clinic-readonly-badge) {
  color: var(--muted);
  font-size: 11px;
}

.clinic-readonly-badge,
.clinic-boundary-notes span,
.clinic-section-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.clinic-readonly-badge {
  background: #dce9fd;
  color: #245db3;
}

.clinic-readonly-badge svg {
  width: 13px;
  height: 13px;
}

.clinic-boundary-notes {
  justify-content: flex-end;
}

.clinic-boundary-notes span {
  background: var(--surface);
  color: #556273;
}

.clinic-data-state {
  display: grid;
  gap: 3px;
  margin-top: 12px;
  border: 1px solid #e4d399;
  border-radius: 8px;
  padding: 11px 13px;
  background: var(--gold-soft);
  color: #6f5715;
}

.clinic-data-state[hidden],
.clinic-review-section[hidden] {
  display: none;
}

.clinic-data-state strong {
  font-size: 13px;
}

.clinic-data-state span {
  font-size: 11px;
  line-height: 1.55;
}

.clinic-data-state.is-unavailable,
.clinic-data-state.is-unconfigured {
  border-color: #efc7c4;
  background: var(--red-soft);
  color: #8f281f;
}

.clinic-review-section {
  margin-top: 12px;
  border-color: #e4d399;
  background: #fffdf7;
}

.clinic-review-table {
  min-width: 760px;
}

.clinic-section {
  margin-top: 12px;
}

.clinic-section-heading {
  align-items: flex-start;
}

.clinic-section-heading .operation-kicker {
  display: block;
  margin-bottom: 3px;
}

.clinic-section-count {
  flex: 0 0 auto;
  background: var(--blue-soft);
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}

.clinic-table {
  min-width: 980px;
}

.clinic-finance-truth {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 13px;
  border: 1px solid #e4d399;
  border-radius: 7px;
  padding: 11px 12px;
  background: var(--gold-soft);
  color: #6f5715;
}

.clinic-finance-truth > svg {
  width: 18px;
  height: 18px;
}

.clinic-finance-truth div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.clinic-finance-truth strong {
  font-size: 12px;
}

.clinic-finance-truth span {
  color: #806b31;
  font-size: 11px;
}

.clinic-finance-truth b {
  color: #684d00;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.clinic-footer {
  margin-top: 14px;
}

.operation-analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.operation-analysis-panel {
  min-height: 280px;
}

.operation-analysis-panel.is-breed {
  grid-column: span 2;
}

.operation-analysis-panel .panel-heading {
  margin-bottom: 14px;
}

.distribution-list {
  display: grid;
  gap: 12px;
}

.operation-analysis-panel.is-breed .distribution-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.distribution-row {
  display: grid;
  gap: 6px;
}

.distribution-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.distribution-copy span {
  min-width: 0;
  overflow: hidden;
  color: #4e5660;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.distribution-copy strong {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.distribution-track {
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: #edf0f3;
}

.distribution-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.distribution-row:nth-child(3n + 2) .distribution-track span {
  background: var(--teal);
}

.distribution-row:nth-child(3n) .distribution-track span {
  background: var(--gold);
}

.replenishment-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.replenishment-row {
  display: grid;
  gap: 5px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong);
  border-radius: 6px;
  padding: 9px 10px;
  background: var(--surface-muted);
}

.replenishment-row.is-replenish {
  border-left-color: var(--teal);
  background: var(--teal-soft);
}

.replenishment-row.is-observe {
  border-left-color: var(--gold);
  background: var(--gold-soft);
}

.replenishment-row.is-pause {
  border-left-color: var(--red);
  background: var(--red-soft);
}

.replenishment-row-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.replenishment-row-heading strong {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.replenishment-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 8px;
  background: #eef1f0;
  color: #53605c;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.is-replenish .replenishment-badge {
  background: #cdebe5;
  color: #12675e;
}

.is-observe .replenishment-badge {
  background: #f7e7ad;
  color: #755600;
}

.is-pause .replenishment-badge {
  background: #f7d4d1;
  color: var(--red);
}

.replenishment-metrics,
.replenishment-reason {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.replenishment-reason {
  overflow-wrap: anywhere;
}

.operation-analysis-panel.is-assortment,
.operation-analysis-panel.is-changsha-assortment {
  grid-column: 1 / -1;
  min-width: 0;
}

.assortment-notes {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.assortment-notes p { margin: 0; }

.assortment-notice {
  padding: 8px 10px;
  border-left: 3px solid var(--gold);
  background: var(--gold-soft);
  color: #755600;
}

.assortment-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.assortment-table-scroll:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.assortment-table {
  width: 100%;
  min-width: 850px;
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.assortment-table caption {
  caption-side: bottom;
  padding: 10px 12px;
  text-align: left;
  color: var(--muted);
  line-height: 1.5;
}

.assortment-table th,
.assortment-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  text-align: right;
  vertical-align: middle;
}

.assortment-table th:first-child {
  min-width: 185px;
  max-width: 235px;
  text-align: left;
  white-space: normal;
  line-height: 1.5;
}

.assortment-table thead,
.assortment-table tfoot {
  background: var(--surface-muted);
  font-weight: 700;
}

.assortment-table .assortment-status {
  min-width: 145px;
  color: var(--muted);
  font-size: 11px;
  text-align: left;
}

.assortment-table .assortment-quantity {
  color: var(--teal);
  font-weight: 700;
}

.assortment-table .is-overstock {
  background: var(--gold-soft);
}

.changsha-assortment-notes {
  margin-bottom: 14px;
}

.changsha-cabinet-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.changsha-cabinet-card {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
}

.changsha-cabinet-card > span,
.changsha-cabinet-card > small {
  color: var(--muted);
  font-size: 11px;
}

.changsha-cabinet-card > strong {
  color: var(--text);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.changsha-cabinet-card.is-over {
  border-color: var(--red);
  background: var(--red-soft);
}

.changsha-assortment-groups {
  display: grid;
  gap: 18px;
}

.changsha-assortment-group {
  min-width: 0;
}

.changsha-assortment-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.changsha-assortment-heading h3,
.changsha-assortment-heading p {
  margin: 0;
}

.changsha-assortment-heading h3 {
  font-size: 14px;
}

.changsha-assortment-heading p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.changsha-capacity-badge {
  flex: none;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.changsha-capacity-badge.is-alert {
  background: var(--red-soft);
  color: var(--red);
}

.changsha-capacity-warning {
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid rgba(180, 35, 24, 0.3);
  border-radius: 6px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
}

.changsha-assortment-table {
  min-width: 760px;
}

.changsha-assortment-table .is-shortage {
  background: rgba(220, 38, 38, 0.035);
}

.changsha-unmapped-panel {
  padding: 12px;
  border: 1px dashed var(--gold);
  border-radius: 8px;
  background: var(--gold-soft);
}

.changsha-unmapped-panel h3 {
  margin: 0 0 8px;
  color: #755600;
  font-size: 13px;
}

.changsha-unmapped-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
}

.changsha-unmapped-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}

.changsha-unmapped-row strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
  .changsha-cabinet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .changsha-unmapped-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .changsha-assortment-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .changsha-cabinet-grid {
    grid-template-columns: 1fr;
  }
}

.operation-records-panel {
  margin-top: 12px;
}

.operation-table-scroll {
  margin: 14px -16px -16px;
  overflow-x: auto;
  border-top: 1px solid var(--border);
  scrollbar-gutter: stable;
}

.operation-table-scroll:focus-visible {
  outline: 3px solid rgba(40, 100, 220, 0.25);
  outline-offset: -3px;
}

.operation-table {
  width: 100%;
  min-width: 840px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

.operation-table th,
.operation-table td {
  height: 43px;
  border-right: 1px solid #edf0f3;
  border-bottom: 1px solid #edf0f3;
  padding: 8px 11px;
  text-align: left;
  vertical-align: middle;
}

.operation-table th:last-child,
.operation-table td:last-child {
  border-right: 0;
}

.operation-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7f8fa;
  color: #5f6771;
  font-weight: 600;
  white-space: nowrap;
}

.operation-table tbody tr:hover td {
  background: #fafbfd;
}

.operation-table .empty-state {
  height: 108px;
  color: var(--muted);
  text-align: center;
}

.operation-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 5px;
  padding: 2px 7px;
  background: var(--surface-muted);
  color: #59616c;
  white-space: nowrap;
}

.operation-status.is-good {
  background: var(--green-soft);
  color: var(--green);
}

.operation-status.is-alert {
  background: var(--red-soft);
  color: var(--red);
}

.operation-status.is-warning {
  background: var(--gold-soft);
  color: #8a6400;
}

.scope-strip {
  display: grid;
  grid-template-columns: minmax(240px, 1.35fr) repeat(3, minmax(155px, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--border);
  box-shadow: none;
}

.scope-strip > div {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  background: var(--surface);
}

.scope-strip svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.scope-strip span {
  color: var(--muted);
  font-size: 10px;
}

.scope-strip strong {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
  text-align: right;
}

.sales-project-nav {
  position: relative;
  z-index: 12;
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0 10px;
  background: var(--surface);
}

.sales-project-tabs {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  gap: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}

.sales-project-tabs::-webkit-scrollbar {
  display: none;
}

.sales-project-tab {
  position: relative;
  min-width: 0;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  border: 0;
  border-radius: 0;
  padding: 0 18px;
  background: transparent;
  color: #59616c;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.sales-project-tab > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-project-tab > svg {
  display: none;
}

.sales-project-tab:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.sales-project-tab.is-active,
.sales-project-tab[aria-pressed="true"] {
  background: transparent;
  color: var(--blue);
  font-weight: 600;
}

.sales-project-tab::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: -1px;
  left: 18px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: transparent;
}

.sales-project-tab.is-active::after,
.sales-project-tab[aria-pressed="true"]::after {
  background: var(--blue);
}

.sales-project-more {
  position: relative;
  width: 96px;
  flex: 0 0 96px;
  border-left: 1px solid var(--border);
  padding-left: 5px;
}

.sales-project-more-trigger {
  width: 100%;
}

.sales-project-more-trigger .sales-project-chevron {
  width: 14px;
  height: 14px;
  flex-basis: 14px;
  transition: transform 0.16s ease;
}

.sales-project-more-trigger[aria-expanded="true"] .sales-project-chevron {
  transform: rotate(180deg);
}

.sales-project-menu {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  width: 176px;
  display: grid;
  gap: 3px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  padding: 5px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(24, 34, 48, 0.14);
}

.sales-project-menu[hidden] {
  display: none;
}

.sales-project-menu button {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 5px;
  padding: 0 10px;
  background: transparent;
  color: #515963;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
}

.sales-project-menu button:hover,
.sales-project-menu button.is-active {
  background: var(--surface-muted);
  color: var(--text);
}

.sales-project-menu button.is-active {
  color: var(--blue);
  font-weight: 600;
}

.sales-project-menu svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.is-sales-view-hidden {
  display: none !important;
}

.sales-personnel-nav {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 10px;
  border-bottom: 1px solid var(--border);
}

.sales-personnel-nav button {
  position: relative;
  min-width: 0;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
}

.sales-personnel-nav button::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: -1px;
  left: 12px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: transparent;
}

.sales-personnel-nav button:hover,
.sales-personnel-nav button:focus-visible,
.sales-personnel-nav button.is-active,
.sales-personnel-nav button[aria-current] {
  color: var(--blue);
}

.sales-personnel-nav button.is-active::after,
.sales-personnel-nav button[aria-current]::after {
  background: var(--blue);
}

.sales-personnel-nav button > svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}

.sales-personnel-nav button > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-operating-summary {
  min-width: 0;
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 13px 14px 14px;
  background: var(--surface);
}

.sales-view-heading {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.sales-view-heading > div {
  min-width: 0;
}

.sales-view-heading h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.sales-view-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.sales-view-heading > span {
  flex: 0 0 auto;
  border-left: 3px solid var(--teal);
  padding-left: 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.sales-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.sales-summary-card {
  min-width: 0;
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 7px;
  border: 1px solid var(--border);
  border-top: 2px solid var(--blue);
  border-radius: 6px;
  padding: 10px 11px 11px;
  background: var(--surface);
  box-shadow: none;
}

.sales-summary-card-header {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.sales-summary-card-header > span:first-child {
  min-width: 0;
  color: #4f5863;
  font-size: 11px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.metric-trust {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 4px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.metric-trust.is-verified {
  border-color: #b9dfd2;
  background: var(--green-soft);
  color: var(--green);
}

.metric-trust.is-conditional {
  border-color: #ead69c;
  background: var(--gold-soft);
  color: #795b0d;
}

.metric-trust.is-local {
  border-color: #bfd3f5;
  background: var(--blue-soft);
  color: var(--blue);
}

.metric-trust.is-unavailable {
  border-color: #efc7c4;
  background: var(--red-soft);
  color: var(--red);
}

.sales-summary-card.is-target,
.sales-summary-card.is-forecast {
  border-top-color: var(--gold);
}

.sales-summary-card.is-efficiency {
  border-top-color: var(--blue);
}

.sales-summary-card.is-average {
  border-top-color: var(--violet);
}

.sales-summary-card.is-productivity {
  border-top-color: var(--teal);
}

.sales-summary-card > span,
.sales-summary-card small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.sales-summary-card > span {
  color: #4f5863;
  font-size: 12px;
  font-weight: 500;
}

.sales-summary-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 21px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.sales-summary-card small {
  min-height: 24px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sales-summary-card small.is-positive {
  color: var(--green);
}

.sales-summary-card small.is-negative {
  color: var(--red);
}

.sales-business-metrics {
  min-width: 0;
  margin: 0 10px 10px;
  padding: 13px 0 0;
  border-top: 1px solid var(--border);
}

.sales-business-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.sales-business-card {
  min-width: 0;
  min-height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 9px;
  border: 1px solid var(--border);
  border-top: 2px solid var(--blue);
  border-radius: 6px;
  padding: 10px 11px;
  background: var(--surface);
  box-shadow: none;
}

.sales-business-card.is-violet {
  border-top-color: var(--violet);
}

.sales-business-card.is-orange {
  border-top-color: var(--orange);
}

.sales-business-card.is-teal {
  border-top-color: var(--teal);
}

.sales-business-card-header,
.sales-business-card-label {
  min-width: 0;
  display: flex;
  align-items: flex-start;
}

.sales-business-card-header {
  justify-content: space-between;
  gap: 8px;
}

.sales-business-card-label {
  align-items: center;
  gap: 7px;
  color: #4f5863;
  font-size: 11px;
  font-weight: 500;
}

.sales-business-card-label > svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  color: var(--muted);
}

.business-metric-status {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 6px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.business-metric-status.is-ready {
  border-color: #b9dfd2;
  background: var(--green-soft);
  color: var(--green);
}

.business-metric-status.is-pending {
  border-color: #ead69c;
  background: var(--gold-soft);
  color: #795b0d;
}

.business-metric-status.is-unavailable,
.business-metric-status.is-error {
  border-color: #efc7c4;
  background: var(--red-soft);
  color: var(--red);
}

.sales-business-card-value {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.sales-business-card.is-pending .sales-business-card-value,
.sales-business-card.is-unavailable .sales-business-card-value,
.sales-business-card.is-error .sales-business-card-value {
  color: var(--muted);
  font-size: 18px;
}

.sales-business-card-note {
  min-height: 24px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.sales-view-link {
  flex: 0 0 auto;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  padding: 0 9px;
  background: var(--surface);
  color: var(--blue);
  cursor: pointer;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.sales-view-link:hover,
.sales-view-link:focus-visible {
  border-color: #a9c2ed;
  background: var(--blue-soft);
}

.sales-view-link svg {
  width: 14px;
  height: 14px;
}

.sales-funnel-snapshot {
  min-width: 0;
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 13px 14px 14px;
  background: var(--surface);
}

.sales-funnel-snapshot-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.sales-funnel-card {
  --funnel-accent: var(--branch-a);
  min-width: 0;
  min-height: 158px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  border: 1px solid var(--border);
  border-top: 2px solid var(--funnel-accent);
  border-radius: 6px;
  padding: 10px 11px 11px;
  background: var(--surface);
  box-shadow: none;
}

.sales-funnel-card.is-b { --funnel-accent: var(--branch-b); }
.sales-funnel-card.is-c { --funnel-accent: var(--branch-c); }
.sales-funnel-card.is-d { --funnel-accent: var(--branch-d); }

.sales-funnel-card-header,
.lifan-funnel-diagnostic-header,
.batch-conversion-heading {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sales-funnel-card-header > div,
.lifan-funnel-diagnostic-header > div,
.batch-conversion-heading > div {
  min-width: 0;
}

.sales-funnel-card h3,
.lifan-funnel-diagnostic h3,
.batch-conversion-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.sales-funnel-card-header p,
.lifan-funnel-diagnostic-header p,
.batch-conversion-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.sales-funnel-source,
.batch-conversion-status {
  flex: 0 0 auto;
  border: 1px solid #b9dfd2;
  border-radius: 999px;
  padding: 2px 5px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.sales-funnel-source.is-pending,
.sales-funnel-source.is-warning,
.batch-conversion-status.is-pending {
  border-color: #ead69c;
  background: var(--gold-soft);
  color: #795b0d;
}

.sales-funnel-mini-chain {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  overflow: hidden;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.sales-funnel-mini-chain > i {
  flex: 0 0 auto;
  color: #9aa3ad;
  font-size: 10px;
  font-style: normal;
}

.sales-funnel-mini-stage {
  min-width: 0;
  flex: 1 1 0;
  display: grid;
  gap: 3px;
  text-align: center;
}

.sales-funnel-mini-stage small {
  color: var(--muted);
  font-size: 10px;
}

.sales-funnel-mini-stage strong {
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.sales-funnel-card-metrics,
.lifan-funnel-summary {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: auto;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--border);
}

.sales-funnel-card-metrics > span,
.lifan-funnel-summary > span {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 7px;
  background: var(--surface-muted);
}

.sales-funnel-card-metrics small,
.lifan-funnel-summary small {
  color: var(--muted);
  font-size: 10px;
}

.sales-funnel-card-metrics strong,
.lifan-funnel-summary strong {
  min-width: 0;
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.sales-funnel-card-metrics .is-rate strong,
.lifan-funnel-summary .is-rate strong { color: var(--funnel-accent, var(--blue)); }
.sales-funnel-card-metrics .is-sales strong,
.lifan-funnel-summary .is-sales strong { color: var(--teal); }
.sales-funnel-card-metrics .is-unavailable strong,
.lifan-funnel-summary .is-unavailable strong { color: var(--muted); }

.sales-funnel-pending {
  min-height: 92px;
  display: grid;
  place-content: center;
  gap: 7px;
  border: 1px dashed #dbc57f;
  border-radius: 7px;
  padding: 12px;
  background: #fffbef;
  text-align: center;
}

.sales-funnel-pending strong {
  font-size: 12px;
  font-weight: 600;
}

.sales-funnel-pending p {
  margin: 0;
  color: #796727;
  font-size: 10px;
  line-height: 1.5;
}

.overview-layout.is-sales-view-single {
  display: block;
}

.manager-workspace.is-sales-view-compact {
  grid-template-columns: minmax(390px, 1.35fr) minmax(280px, 0.85fr);
}

.manager-workspace.is-sales-view-single {
  grid-template-columns: minmax(0, 1fr);
}

.manager-workspace.is-sales-view-single .panel {
  min-height: 0;
}

.manager-workspace.is-sales-view-single .quality-alert-list {
  overflow-y: visible;
}

.manager-workspace.is-sales-view-single .quality-alert-copy small {
  display: block;
  overflow: visible;
  font-size: 10px;
  -webkit-line-clamp: initial;
}

.sales-definitions-panel {
  margin-top: 12px;
}

.sales-definition-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 14px -16px -16px;
  border-top: 1px solid var(--border);
  background: var(--border);
}

.sales-definition-item {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(112px, 0.36fr) minmax(0, 1fr);
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
}

.sales-definition-item strong,
.sales-definition-item span {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.5;
}

.sales-definition-item strong {
  font-size: 11px;
  font-weight: 600;
}

.sales-definition-item span {
  color: var(--muted);
  font-size: 10px;
}

.manager-workspace {
  display: grid;
  grid-template-columns: minmax(390px, 1.35fr) repeat(3, minmax(215px, 0.72fr));
  gap: 12px;
  margin-top: 12px;
  align-items: stretch;
}

.manager-workspace .panel {
  min-height: 244px;
}

.workspace-heading,
.decision-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.workspace-kicker {
  color: var(--blue);
  font-size: 11px;
  font-weight: 600;
}

.workspace-heading h2 {
  margin: 3px 0 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.workspace-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.workspace-count {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 8px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.action-list {
  max-height: 184px;
  display: grid;
  gap: 7px;
  margin-top: 13px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.manager-action,
.quality-alert-item {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  cursor: pointer;
  text-align: left;
}

.manager-action {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto 16px;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
}

.manager-action-open {
  min-width: 0;
  min-height: 56px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.manager-action-open:hover .manager-action-copy strong {
  color: var(--blue);
}

.manager-action.is-done {
  opacity: 0.66;
  background: var(--surface-muted);
}

.manager-action.is-done .manager-action-copy strong {
  text-decoration: line-through;
}

.manager-action.is-snoozed {
  border-style: dashed;
}

.manager-action-controls {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.manager-action-state {
  position: relative;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.manager-action-state:hover,
.manager-action-state:focus-visible {
  background: var(--blue-soft);
  color: var(--blue);
}

.manager-action-state::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  bottom: calc(100% + 5px);
  z-index: 20;
  width: max-content;
  padding: 4px 6px;
  border-radius: 4px;
  background: #20242b;
  color: #fff;
  font-size: 10px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.manager-action-state:hover::after,
.manager-action-state:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.manager-action-state svg {
  width: 15px;
  height: 15px;
}

.manager-action:hover,
.quality-alert-item:hover,
.decision-link:hover {
  border-color: var(--border-strong);
  background: var(--surface-muted);
}

.manager-action-icon,
.decision-icon {
  display: grid;
  place-items: center;
  border-radius: 7px;
}

.manager-action-icon {
  width: 32px;
  height: 32px;
  background: var(--surface-muted);
  color: var(--muted);
}

.manager-action.is-critical .manager-action-icon,
.manager-action.is-high .manager-action-icon {
  background: var(--red-soft);
  color: var(--red);
}

.manager-action.is-medium .manager-action-icon,
.manager-action.is-warning .manager-action-icon {
  background: var(--orange-soft);
  color: var(--orange);
}

.manager-action-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.manager-action-category {
  width: max-content;
  max-width: 100%;
  border-radius: 4px;
  padding: 2px 5px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.2;
}

.manager-action-category.is-data {
  background: var(--gold-soft);
  color: #795b0d;
}

.manager-action-toggle,
.manager-actions-toggle {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  justify-self: start;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 10px;
  background: var(--surface);
  color: var(--blue);
  cursor: pointer;
  font-size: 10px;
  font-weight: 600;
}

.manager-action-toggle:hover,
.manager-action-toggle:focus-visible,
.manager-actions-toggle:hover,
.manager-actions-toggle:focus-visible {
  border-color: var(--border-strong);
  background: var(--blue-soft);
}

.manager-action-toggle svg,
.manager-actions-toggle svg {
  width: 14px;
  height: 14px;
}

.manager-action-copy strong {
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 600;
}

.manager-action-copy small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.manager-action-badge {
  color: var(--text);
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.manager-action > svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.manager-action-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.manager-action-empty.is-good {
  color: var(--green);
}

.decision-panel {
  display: flex;
  flex-direction: column;
}

.decision-heading {
  justify-content: flex-start;
}

.decision-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
}

.decision-heading > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.decision-heading span:not(.decision-icon) {
  color: var(--muted);
  font-size: 11px;
}

.decision-heading strong {
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.decision-panel.is-alert .decision-heading strong {
  color: var(--red);
}

.decision-panel.is-good .decision-heading strong {
  color: var(--green);
}

.decision-body {
  min-height: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.decision-message,
.decision-footnote {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.decision-highlight {
  overflow-wrap: anywhere;
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.forecast-metrics,
.loss-metrics {
  display: grid;
  gap: 8px;
}

.forecast-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.decision-metric {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.decision-metric span {
  color: var(--muted);
  font-size: 10px;
}

.decision-metric strong {
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.forecast-progress {
  display: grid;
  gap: 6px;
}

.forecast-progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
}

.decision-link,
.operation-filter-clear {
  min-height: 31px;
  align-self: flex-start;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 9px;
  background: var(--surface);
  color: var(--blue);
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
}

.panel-heading-actions,
.operation-filter-clear {
  display: inline-flex;
  align-items: center;
}

.panel-heading-actions {
  flex: 0 0 auto;
  gap: 9px;
}

.panel-heading-actions > svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.operation-filter-clear {
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.operation-filter-clear:hover,
.operation-filter-clear:focus-visible {
  border-color: var(--border-strong);
  background: var(--surface-muted);
}

.operation-filter-clear[hidden] {
  display: none;
}

.operation-filter-clear svg {
  width: 15px;
  height: 15px;
}

.quality-alert-list {
  justify-content: flex-start;
  gap: 7px;
  overflow-y: auto;
}

.quality-alert-item {
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
}

.quality-alert-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.quality-alert-copy strong {
  font-size: 11px;
  font-weight: 600;
}

.quality-alert-copy small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.quality-alert-item > b {
  color: var(--red);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

[data-lifan-only][hidden],
[data-lead-funnel-only][hidden],
[data-jinhua-only][hidden] {
  display: none !important;
}

.lead-funnel-month {
  margin-top: 12px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 15px 0;
}

.lead-funnel-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}

.lead-funnel-section-heading h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.lead-funnel-section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.lead-funnel-section-heading > svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.lead-funnel-metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 13px;
}

.lead-funnel-metric {
  min-width: 0;
  min-height: 106px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.lead-funnel-metric span {
  color: #535b65;
  font-size: 12px;
}

.lead-funnel-metric strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 26px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.lead-funnel-metric.is-rate strong {
  color: var(--blue);
}

.icon-blue { background: var(--blue-soft); color: var(--blue); }
.icon-red { background: var(--red-soft); color: var(--red); }
.icon-violet { background: var(--violet-soft); color: var(--violet); }
.icon-teal { background: var(--teal-soft); color: var(--teal); }
.icon-gold { background: var(--gold-soft); color: var(--gold); }
.icon-orange { background: var(--orange-soft); color: var(--orange); }

.overview-layout {
  display: grid;
  grid-template-columns: minmax(500px, 1.65fr) minmax(310px, 0.95fr) minmax(250px, 0.72fr);
  gap: 12px;
  align-items: start;
  margin-top: 12px;
}

.overview-layout.is-lead-funnel,
.overview-layout.is-jinhua-daily {
  grid-template-columns: minmax(310px, 1fr) minmax(280px, 0.86fr);
}

.overview-layout.is-lead-funnel .ranking-panel,
.overview-layout.is-jinhua-daily .ranking-panel {
  grid-column: auto;
}

.primary-column,
.progress-column,
.performance-column {
  min-width: 0;
  display: grid;
  gap: 12px;
}

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

.metric-card,
.panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric-card {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 18px;
}

.metric-card > span {
  color: #4b535d;
  font-size: 14px;
}

.metric-card strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 34px;
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.metric-card small {
  color: var(--muted);
  font-size: 11px;
}

.metric-card small.is-positive { color: var(--green); }
.metric-card small.is-negative { color: var(--red); }

.panel {
  min-width: 0;
  padding: 16px;
}

.panel-heading,
.conversion-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading > :first-child {
  min-width: 0;
}

.panel-heading h2,
.conversion-heading h2,
.compact-panel h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.panel-heading p,
.conversion-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.panel-heading h2 {
  overflow-wrap: anywhere;
}

.panel-heading > svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.trend-panel {
  min-height: 402px;
}

.chart-legend {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: var(--muted);
  font-size: 10px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-line {
  width: 13px;
  height: 2px;
}

.blue { background: var(--blue); }
.teal { background: var(--teal); }
.gold { background: var(--gold); }
.red { background: var(--red); }

.chart-wrap {
  position: relative;
  min-height: 330px;
  margin-top: 10px;
}

#productivityChart {
  display: block;
  width: 100%;
  height: 330px;
  overflow: visible;
}

.chart-tooltip {
  position: absolute;
  z-index: 8;
  min-width: 170px;
  border: 1px solid #363c44;
  border-radius: 6px;
  background: rgba(32, 36, 43, 0.96);
  color: #ffffff;
  padding: 9px 10px;
  pointer-events: none;
  font-size: 11px;
  box-shadow: 0 7px 18px rgba(20, 25, 34, 0.18);
}

.chart-tooltip strong {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
}

.chart-tooltip span {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 3px;
}

.compact-panel {
  min-height: 176px;
  text-align: center;
}

.compact-panel h2 {
  text-align: left;
}

.progress-ring {
  --progress: 0deg;
  width: 94px;
  height: 94px;
  display: grid;
  place-items: center;
  margin: 15px auto 6px;
  border-radius: 50%;
  background: conic-gradient(var(--blue) var(--progress), #e9ebee 0);
  position: relative;
}

.progress-ring::after {
  content: "";
  position: absolute;
  inset: 11px;
  border-radius: 50%;
  background: var(--surface);
}

.progress-ring strong {
  position: relative;
  z-index: 1;
  font-size: 20px;
  font-weight: 600;
}

.compact-panel > p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.achievement-number {
  display: block;
  margin: 25px 0 14px;
  font-size: 30px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.achievement-number.is-money {
  font-size: 25px;
  overflow-wrap: anywhere;
}

.progress-track[hidden] {
  display: none;
}

.progress-track {
  width: 100%;
  height: 9px;
  overflow: hidden;
  border-radius: 4px;
  background: #e9ebee;
}

.progress-track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 0.35s ease;
}

.actual-target {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
  text-align: left;
}

.actual-target span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.actual-target i {
  font-style: normal;
}

.actual-target b {
  color: var(--text);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.store-panel {
  min-height: 278px;
}

.store-metric-list {
  display: grid;
  margin-top: 15px;
}

.store-metric-row {
  min-height: 64px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--border);
}

.store-metric-row:first-child {
  border-top: 0;
}

.store-metric-row > i {
  width: 10px;
  height: 34px;
  border-radius: 3px;
  justify-self: center;
}

.store-metric-row div {
  display: grid;
  gap: 3px;
}

.store-metric-row span {
  color: var(--muted);
  font-size: 11px;
}

.store-metric-row strong {
  font-size: 19px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.team-progress-panel {
  min-height: 312px;
}

.team-progress-list {
  display: grid;
  gap: 20px;
  margin-top: 18px;
}

.team-progress-item {
  display: grid;
  gap: 8px;
}

.team-progress-item header,
.team-progress-item footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.team-progress-item header strong {
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.team-progress-item header b {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.team-progress-item footer {
  color: var(--muted);
  font-size: 10px;
}

.team-progress-item footer span:last-child {
  text-align: right;
}

.ranking-panel {
  min-height: 679px;
}

.ranking-scroll {
  max-height: 470px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.podium {
  min-height: 150px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 5px;
  margin-top: 12px;
  border-bottom: 1px solid var(--border);
  padding: 0 0 15px;
}

.podium-item {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 0;
}

.podium-item.first {
  align-self: start;
}

.podium-avatar,
.rank-avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e9edf3;
  color: #4f5965;
  font-weight: 600;
}

.podium-avatar {
  width: 48px;
  height: 48px;
  border: 3px solid #bfc6cf;
  font-size: 15px;
}

.podium-item.first .podium-avatar { border-color: #e3aa1c; background: var(--gold-soft); color: #765400; }
.podium-item.third .podium-avatar { border-color: #c47745; background: var(--orange-soft); color: #7e3d18; }

.podium-item span:not(.podium-avatar) {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.podium-item strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.podium-item small {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ranking-list li {
  min-height: 45px;
  display: grid;
  grid-template-columns: 24px 30px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
}

.ranking-list li:last-child {
  border-bottom: 0;
}

.ranking-list .rank-number {
  color: var(--muted);
  text-align: center;
}

.rank-avatar {
  width: 26px;
  height: 26px;
  font-size: 10px;
}

.ranking-list .rank-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-list strong {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ranking-deal-quantity {
  color: var(--muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.people-operating-workspace {
  margin-top: 18px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.people-operating-heading,
.people-operating-summary,
.people-operating-filters {
  display: flex;
  align-items: center;
  gap: 10px;
}

.people-operating-heading {
  justify-content: space-between;
}

.people-operating-heading h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
}

.people-operating-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.people-operating-filters {
  flex-wrap: wrap;
  margin-top: 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  background: #fafbfd;
}

.people-operating-period {
  min-width: 170px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 8px;
  margin-right: auto;
}

.people-operating-period .filter-label,
.people-operating-select > span {
  color: var(--muted);
  font-size: 10px;
}

.people-operating-period strong {
  color: var(--text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.people-operating-period small {
  grid-column: 2;
  color: var(--muted);
  font-size: 9px;
}

.people-operating-select {
  min-width: 132px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.people-operating-select select {
  min-width: 0;
  height: 31px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 7px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 11px;
}

.people-operating-select select:focus-visible {
  outline: 2px solid rgba(40, 100, 220, 0.3);
  outline-offset: 1px;
}

.people-operating-summary {
  flex-wrap: wrap;
  margin-top: 11px;
  color: var(--muted);
  font-size: 10px;
}

.people-operating-summary span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}

.people-operating-summary span + span::before {
  content: "·";
  color: #b4bbc4;
}

.people-operating-summary strong {
  color: var(--text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.people-operating-note {
  margin-top: 8px;
  color: #806000;
  font-size: 10px;
}

.people-operating-table-scroll {
  margin: 10px -16px -16px;
  overflow: auto;
  border-top: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  scrollbar-gutter: stable;
}

.people-operating-table-scroll:focus-visible {
  outline: 3px solid rgba(40, 100, 220, 0.22);
  outline-offset: -3px;
}

.people-operating-table {
  width: 100%;
  min-width: 1070px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.people-operating-table th,
.people-operating-table td {
  height: 43px;
  border-right: 1px solid #edf0f3;
  border-bottom: 1px solid #edf0f3;
  padding: 7px 10px;
  background: var(--surface);
  text-align: right;
  white-space: nowrap;
}

.people-operating-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f7f8fa;
  color: #5f6771;
  font-weight: 600;
}

.people-operating-table th:first-child,
.people-operating-table td:first-child,
.people-operating-table th:nth-child(2),
.people-operating-table td:nth-child(2),
.people-operating-table th:nth-child(3),
.people-operating-table td:nth-child(3),
.people-operating-table th:last-child,
.people-operating-table td:last-child {
  text-align: left;
}

.people-operating-table th:last-child,
.people-operating-table td:last-child {
  border-right: 0;
}

.people-operating-table tbody tr:hover td {
  background: #fafbfd;
}

.people-operating-table .rank-cell {
  color: var(--muted);
  font-weight: 600;
}

.people-operating-name {
  max-width: 150px;
  overflow: hidden;
  color: var(--text);
  font-weight: 600;
  text-overflow: ellipsis;
}

.people-operating-table .is-missing {
  color: #8a6400;
}

.people-operating-table .is-positive {
  color: var(--teal);
}

.people-operating-table .is-negative {
  color: var(--red);
}

.people-funnel-cell {
  min-width: 305px;
  text-align: left !important;
  white-space: normal !important;
}

.people-funnel-cell strong,
.people-funnel-cell small {
  display: block;
}

.people-funnel-cell strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
}

.people-funnel-cell small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.conversion-panel {
  margin-top: 12px;
}

.conversion-heading {
  align-items: center;
}

.conversion-toolbar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.funnel-branch-tabs {
  display: inline-grid;
  grid-template-columns: repeat(4, minmax(48px, 1fr));
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 3px;
  background: var(--surface-muted);
}

.funnel-branch-tabs button {
  min-height: 30px;
  border: 0;
  border-radius: 5px;
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
}

.funnel-branch-tabs button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--blue);
  box-shadow: 0 1px 3px rgba(24, 34, 48, 0.1);
}

.period-tabs {
  display: inline-flex;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 3px;
  background: var(--surface-muted);
}

.period-tabs button {
  min-height: 30px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  padding: 0 11px;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
}

.period-tabs button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--blue);
  box-shadow: 0 1px 3px rgba(24, 34, 48, 0.1);
}

.conversion-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(105px, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--border);
}

.conversion-grid.is-jinhua-daily {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
}

.conversion-grid.is-lifan-funnel {
  display: block;
  overflow: visible;
  border: 0;
  background: transparent;
}

.lifan-funnel-diagnostic {
  --funnel-accent: var(--branch-a);
  min-width: 0;
  display: grid;
  gap: 16px;
}

.lifan-funnel-diagnostic.is-b { --funnel-accent: var(--branch-b); }
.lifan-funnel-diagnostic.is-c { --funnel-accent: var(--branch-c); }
.lifan-funnel-diagnostic.is-d { --funnel-accent: var(--branch-d); }

.lifan-funnel-chain {
  min-width: 0;
  display: flex;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 1px 6px;
  scrollbar-width: thin;
}

.lifan-funnel-stage {
  min-width: 132px;
  min-height: 122px;
  flex: 1 0 132px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 9px;
  border: 1px solid var(--border);
  border-top: 2px solid var(--funnel-accent);
  border-radius: 7px;
  padding: 13px;
  background: var(--surface-muted);
}

.lifan-funnel-stage > span {
  color: #4f5863;
  font-size: 11px;
  font-weight: 500;
}

.lifan-funnel-stage > strong {
  font-size: 25px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.lifan-funnel-stage > small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.lifan-funnel-stage > small.is-conditional { color: #795b0d; }
.lifan-funnel-stage > small.is-unavailable { color: var(--red); }

.lifan-funnel-arrow {
  flex: 0 0 18px;
  display: grid;
  place-items: center;
  color: #8f98a2;
  font-size: 18px;
}

.lifan-funnel-summary {
  margin-top: 0;
}

.lifan-funnel-summary > span {
  min-height: 66px;
  padding: 11px 13px;
  background: var(--surface);
}

.lifan-funnel-diagnostic-pending {
  min-height: 210px;
  display: grid;
  place-content: center;
  gap: 8px;
  border: 1px dashed #dbc57f;
  border-radius: 8px;
  padding: 24px;
  background: #fffbef;
  text-align: center;
}

.lifan-funnel-diagnostic-pending strong {
  font-size: 17px;
  font-weight: 600;
}

.lifan-funnel-diagnostic-pending p {
  max-width: 620px;
  margin: 0;
  color: #796727;
  font-size: 11px;
  line-height: 1.6;
}

.batch-conversion-panel {
  margin-top: 12px;
}

.batch-conversion-heading h2 {
  margin-top: 3px;
  font-size: 18px;
}

.batch-readiness-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.batch-readiness-card {
  min-width: 0;
  min-height: 100px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 7px;
  padding: 11px 12px;
  background: var(--surface-muted);
}

.batch-readiness-card.is-missing { border-left-color: var(--red); }
.batch-readiness-card.is-partial { border-left-color: var(--teal); }

.batch-readiness-card > span,
.batch-readiness-card > small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.batch-readiness-card > strong {
  font-size: 20px;
  font-weight: 600;
}

.batch-conversion-empty {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  border: 1px solid #ead69c;
  border-radius: 8px;
  padding: 14px;
  background: #fffbef;
}

.batch-conversion-empty-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--gold-soft);
  color: #795b0d;
}

.batch-conversion-empty-icon svg {
  width: 20px;
  height: 20px;
}

.batch-conversion-empty strong {
  font-size: 13px;
  font-weight: 600;
}

.batch-conversion-empty p {
  margin: 4px 0 0;
  color: #796727;
  font-size: 10px;
  line-height: 1.55;
}

.batch-field-contract {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--border);
}

.batch-field-contract > div {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 13px 14px;
  background: var(--surface);
}

.batch-field-contract span,
.batch-field-contract small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.batch-field-contract strong {
  font-size: 11px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.conversion-item {
  min-height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface);
  padding: 14px;
}

.conversion-item span {
  color: #535b65;
  font-size: 11px;
  line-height: 1.4;
}

.conversion-item small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.conversion-item small.is-conditional {
  color: #795b0d;
}

.conversion-item small.is-unavailable {
  color: var(--red);
}

.conversion-item strong {
  font-size: 25px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.conversion-item.rate strong { color: var(--blue); }

.team-analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.team-analysis-panel {
  min-height: 315px;
}

.team-analysis-list {
  display: grid;
  gap: 20px;
  margin-top: 18px;
  max-height: 560px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.team-analysis-row {
  display: grid;
  gap: 8px;
}

.team-analysis-row header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.team-analysis-row header strong {
  font-size: 12px;
  font-weight: 600;
}

.team-analysis-row header b {
  color: var(--blue);
  font-size: 18px;
  font-weight: 600;
}

.analysis-values {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.analysis-values div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.analysis-values span {
  color: var(--muted);
  font-size: 10px;
}

.analysis-values strong {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.people-comparison {
  display: grid;
  gap: 21px;
  margin-top: 22px;
  max-height: 560px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.people-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(220px, 2fr);
  align-items: center;
  gap: 16px;
}

.people-row > div:first-child {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.people-row > div:first-child strong {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.people-row > div:first-child span {
  color: var(--muted);
  font-size: 10px;
}

.people-bars {
  display: grid;
  gap: 7px;
}

.people-bar {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
}

.people-bar i {
  height: 8px;
  border-radius: 3px;
  background: #e9ebee;
  overflow: hidden;
}

.people-bar i span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.people-bar b {
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  text-align: right;
}

.team-analysis-grid.is-lead-funnel,
.team-analysis-grid.is-jinhua-daily {
  grid-template-columns: minmax(0, 1fr);
}

.lead-funnel-team-panel {
  min-height: 0;
}

.lead-funnel-table-scroll {
  max-height: 560px;
  margin: 14px -16px -16px;
  overflow: auto;
  border-top: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  scrollbar-gutter: stable;
}

.lead-funnel-table-scroll:focus-visible {
  outline: 3px solid rgba(40, 100, 220, 0.22);
  outline-offset: -3px;
}

.lead-funnel-table {
  width: 100%;
  min-width: 1220px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.lead-funnel-table.jinhua-team-table {
  min-width: 720px;
}

.lead-funnel-table th,
.lead-funnel-table td {
  min-width: 74px;
  height: 44px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 8px 10px;
  background: var(--surface);
  text-align: right;
  white-space: nowrap;
}

.lead-funnel-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f5f7fa;
  color: #4f5863;
  font-weight: 600;
}

.lead-funnel-table th:first-child,
.lead-funnel-table td:first-child {
  min-width: 150px;
  padding-left: 16px;
  text-align: left;
}

.lead-funnel-table th:last-child,
.lead-funnel-table td:last-child {
  min-width: 108px;
  border-right: 0;
}

.lead-funnel-table tbody tr:hover td {
  background: #f8fafc;
}

.lead-funnel-table tfoot[hidden] {
  display: none;
}

.lead-funnel-table tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 2;
  border-top: 1px solid var(--border-strong);
  border-bottom: 0;
  background: #f5f7fa;
  box-shadow: 0 -2px 5px rgba(24, 34, 48, 0.05);
  font-weight: 600;
}

.lead-funnel-table .team-name-cell,
.lead-funnel-table .sales-cell {
  color: var(--text);
  font-weight: 600;
}

.lead-funnel-table .rate-cell {
  color: var(--blue);
  font-weight: 600;
}

.lead-funnel-table .empty-state {
  height: 110px;
  color: var(--muted);
  text-align: center;
}

.person-conversion-panel {
  margin-top: 12px;
  padding-bottom: 0;
}

.person-conversion-heading {
  align-items: center;
}

.person-conversion-copy {
  min-width: 180px;
  flex: 1 1 auto;
}

.person-filter-toolbar {
  min-width: 0;
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.person-range-apply {
  min-height: 36px;
  border: 0;
  border-radius: 7px;
  padding: 0 14px;
  background: var(--blue);
  color: #ffffff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.person-range-apply:hover {
  filter: brightness(0.96);
}

.person-range-apply:focus-visible {
  outline: 3px solid rgba(40, 100, 220, 0.25);
  outline-offset: 2px;
}

.person-range-error {
  flex: 1 0 100%;
  margin: 0;
  color: var(--red);
  font-size: 10px;
  text-align: right;
}

.person-period-scope-note {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  margin-top: 12px;
  border: 1px solid rgba(40, 100, 220, 0.16);
  border-radius: 7px;
  padding: 9px 11px;
  background: var(--blue-soft);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.person-period-scope-note svg {
  width: 16px;
  height: 16px;
  color: var(--blue);
}

.person-period-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.person-period-summary-grid .operation-metric-card {
  min-height: 98px;
}

.person-date-range {
  min-width: 0;
  min-height: 36px;
  flex: 0 1 326px;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0 8px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}

.person-date-range.is-active {
  border-color: rgba(40, 100, 220, 0.58);
  background: var(--blue-soft);
  color: var(--blue);
}

.person-date-range:focus-within {
  outline: 3px solid rgba(40, 100, 220, 0.25);
  outline-offset: 2px;
}

.person-date-range > svg {
  width: 16px;
  height: 16px;
}

.person-date-field {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.person-date-field span,
.person-date-separator {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.person-date-field input {
  width: 106px;
  min-width: 0;
  min-height: 32px;
  flex: 1 1 auto;
  border: 0;
  outline: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 11px;
}

.person-date-field input:focus-visible {
  outline: 0;
}

.person-period-tabs {
  display: inline-grid;
  grid-template-columns: repeat(4, minmax(44px, 1fr));
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 2px;
  background: var(--surface-muted);
}

.person-period-tabs button {
  min-height: 30px;
  border: 0;
  border-radius: 5px;
  padding: 0 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  white-space: nowrap;
}

.person-period-tabs button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--blue);
  box-shadow: 0 1px 3px rgba(24, 34, 48, 0.1);
  font-weight: 600;
}

.person-filter-toolbar[aria-busy="true"] {
  opacity: 0.72;
}

.person-filter-toolbar :disabled {
  cursor: wait;
}

.person-table-scroll {
  max-height: 680px;
  margin: 15px -16px 0;
  overflow: auto;
  border-top: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  scrollbar-gutter: stable;
}

.person-table-scroll:focus-visible {
  outline: 3px solid rgba(40, 100, 220, 0.22);
  outline-offset: -3px;
}

.person-conversion-table {
  width: 100%;
  min-width: 2250px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.person-conversion-table.is-lead-funnel {
  min-width: 1490px;
}

.person-conversion-table.is-jinhua-daily {
  min-width: 1190px;
}

.person-conversion-table th,
.person-conversion-table td {
  min-width: 68px;
  height: 43px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 8px 10px;
  background: var(--surface);
  text-align: right;
  white-space: nowrap;
}

.person-conversion-table th {
  position: sticky;
  z-index: 3;
  background: #f5f7fa;
  color: #4f5863;
  font-weight: 600;
}

.person-conversion-table thead tr:first-child th {
  top: 0;
  height: 38px;
  text-align: center;
}

.person-conversion-table thead tr:nth-child(2) th {
  top: 38px;
  height: 38px;
}

.person-conversion-table thead th[rowspan] {
  vertical-align: middle;
  text-align: left;
}

.person-conversion-table tbody tr:hover td {
  background: #f8fafc;
}

.person-conversion-table thead tr:first-child th:first-child,
.person-conversion-table tbody td:first-child,
.person-conversion-table tfoot td:first-child {
  min-width: 108px;
  padding-left: 16px;
  text-align: left;
}

.person-conversion-table thead tr:first-child th:nth-child(2),
.person-conversion-table tbody td:nth-child(2),
.person-conversion-table tfoot td:nth-child(2) {
  min-width: 190px;
  text-align: left;
}

.person-conversion-table thead tr:first-child th:nth-child(3),
.person-conversion-table tbody td:nth-child(3),
.person-conversion-table tfoot td:nth-child(3) {
  min-width: 154px;
}

.person-conversion-table thead tr:first-child th:nth-child(4),
.person-conversion-table tbody td:nth-child(4),
.person-conversion-table tfoot td:nth-child(4) {
  min-width: 112px;
}

.person-conversion-table thead tr:first-child th:nth-child(5),
.person-conversion-table tbody td:nth-child(5),
.person-conversion-table tfoot td:nth-child(5) {
  min-width: 116px;
}

.person-conversion-table th:last-child,
.person-conversion-table td:last-child {
  border-right: 0;
}

.person-rate-note {
  margin: 10px 16px;
  color: var(--muted, #64748b);
  font-size: 12px;
  line-height: 1.6;
}

.person-conversion-table .rate-cell { white-space: nowrap; }
.person-conversion-table .refund-cell { color: #8c5b24; }
#personPeriodRefundCard[hidden] { display: none; }
#personSpeciesSummary[hidden] { display: none; }
#personSpeciesSummary { margin: 12px 16px; }
.person-conversion-table .species-sales-cell { white-space: nowrap; }

.person-conversion-table tbody tr:last-child td {
  border-bottom: 0;
}

.person-conversion-table tfoot[hidden] {
  display: none;
}

.person-conversion-table tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 2;
  border-top: 1px solid var(--border-strong);
  border-bottom: 0;
  background: #f5f7fa;
  box-shadow: 0 -2px 5px rgba(24, 34, 48, 0.05);
  font-weight: 600;
}

.person-conversion-table .person-total-row .department-cell {
  color: var(--text);
}

.person-conversion-table .person-name-cell,
.person-conversion-table .sales-cell {
  color: var(--text);
  font-weight: 600;
}

.person-conversion-table .person-target-cell {
  padding: 5px 8px;
}

.person-conversion-table .person-progress-cell {
  padding: 7px 10px;
}

.person-progress {
  min-width: 88px;
  display: grid;
  gap: 5px;
}

.person-progress-value,
.person-progress-empty {
  display: block;
  color: var(--blue);
  font-weight: 600;
  line-height: 1;
  text-align: right;
}

.person-progress-empty {
  color: var(--muted);
  font-weight: 500;
}

.person-progress-note {
  display: block;
  color: #8a6400;
  font-size: 9px;
  font-weight: 500;
  line-height: 1.1;
  text-align: right;
}

.person-progress-track {
  width: 100%;
  height: 4px;
  display: block;
  overflow: hidden;
  border-radius: 2px;
  background: #e8edf5;
}

.person-progress-track > span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--blue);
}

.person-progress.is-complete .person-progress-value {
  color: var(--teal);
}

.person-progress.is-complete .person-progress-track > span {
  background: var(--teal);
}

.person-target-value,
.person-target-status {
  display: block;
  color: var(--text);
  font-weight: 600;
  text-align: right;
}

.person-target-status {
  color: var(--muted);
  font-weight: 500;
}

.person-target-status.is-error {
  color: var(--red);
}

.person-target-edit-trigger {
  width: 100%;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 0 5px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.person-target-edit-trigger:hover {
  border-color: rgba(40, 100, 220, 0.3);
  background: var(--blue-soft);
  color: var(--blue);
}

.person-target-edit-trigger:focus-visible,
.person-target-action:focus-visible,
.person-target-editor input:focus-visible {
  outline: 2px solid rgba(40, 100, 220, 0.38);
  outline-offset: 1px;
}

.person-target-edit-trigger:disabled {
  opacity: 0.55;
  cursor: wait;
}

.person-target-edit-trigger svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.person-target-editor {
  width: 100%;
  min-width: 138px;
  display: grid;
  grid-template-columns: minmax(72px, 1fr) 27px 27px;
  align-items: center;
  gap: 3px;
}

.person-target-editor input {
  width: 100%;
  min-width: 0;
  height: 29px;
  border: 1px solid rgba(40, 100, 220, 0.42);
  border-radius: 5px;
  padding: 0 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.person-target-action {
  width: 27px;
  height: 27px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}

.person-target-action:hover {
  border-color: rgba(40, 100, 220, 0.34);
  color: var(--blue);
}

.person-target-action:disabled,
.person-target-editor input:disabled {
  opacity: 0.58;
  cursor: wait;
}

.person-target-action svg {
  width: 14px;
  height: 14px;
}

.person-target-save {
  border-color: rgba(20, 140, 116, 0.3);
  color: var(--teal);
}

.person-target-editor.is-saving {
  opacity: 0.75;
}

.person-conversion-table .department-cell {
  max-width: 260px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
}

.person-conversion-table .rate-cell {
  color: var(--blue);
  font-weight: 600;
}

.person-conversion-table .empty-state {
  height: 110px;
  color: var(--muted);
  text-align: center;
}

.dashboard-footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 18px 8px 0;
  color: #949ba4;
  font-size: 10px;
}

.author-credit {
  color: #747d88;
  font-weight: 500;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 50;
  max-width: min(420px, calc(100vw - 28px));
  padding: 9px 12px;
  border-radius: 6px;
  background: #20242b;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(20, 25, 34, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  font-size: 12px;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.menu-backdrop {
  display: none;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
  background: #eef1f4;
}

.login-shell {
  width: min(390px, 100%);
}

.login-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 28px;
  box-shadow: 0 12px 32px rgba(24, 34, 48, 0.08);
}

.login-panel h1 {
  margin: 18px 0 5px;
  font-size: 21px;
  font-weight: 600;
}

.login-panel > p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 12px;
}

.login-panel form {
  display: grid;
  gap: 9px;
}

.login-panel label {
  font-size: 12px;
  font-weight: 500;
}

.login-panel input {
  min-height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 0 11px;
  background: #ffffff;
}

.login-panel button,
.login-panel .login-action {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: var(--blue);
  color: #ffffff;
  cursor: pointer;
  font-weight: 600;
}

.login-panel .login-action {
  display: grid;
  place-items: center;
  text-decoration: none;
}

.login-panel button:hover,
.login-panel .login-action:hover {
  background: #2057c3;
}

.login-error {
  margin: -10px 0 12px !important;
  color: var(--red) !important;
}

.app-shell[aria-busy="true"] .metric-card strong,
.app-shell[aria-busy="true"] .achievement-number {
  color: #aab0b7;
}

/* Keep the first viewport decision-focused while preserving secondary detail on demand. */
.sales-summary-grid,
.national-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.sales-supplemental,
.national-summary-more,
.national-talent-details {
  min-width: 0;
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
}

.sales-supplemental > summary,
.national-summary-more > summary,
.national-talent-details > summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}

.sales-supplemental > summary::-webkit-details-marker,
.national-summary-more > summary::-webkit-details-marker,
.national-talent-details > summary::-webkit-details-marker {
  display: none;
}

.sales-supplemental > summary > span,
.national-summary-more > summary > span,
.national-talent-details > summary > span {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sales-supplemental > summary svg,
.national-summary-more > summary svg,
.national-talent-details > summary svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: var(--blue);
}

.sales-supplemental > summary strong,
.national-summary-more > summary strong,
.national-talent-details > summary strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.sales-supplemental > summary small,
.national-summary-more > summary small,
.national-talent-details > summary small {
  min-width: 0;
  font-size: 11px;
  overflow-wrap: anywhere;
  text-align: right;
}

.sales-supplemental[open] > summary,
.national-summary-more[open] > summary,
.national-talent-details[open] > summary {
  border-bottom: 1px solid var(--border);
  background: var(--surface-muted);
}

.sales-summary-grid-secondary,
.national-summary-secondary-grid {
  margin-top: 0;
  padding: 10px;
}

.sales-summary-grid-secondary .sales-summary-card,
.national-summary-secondary-grid .national-metric-card {
  min-height: 112px;
  box-shadow: none;
}

.national-talent-panel {
  padding-bottom: 16px;
}

.national-talent-details .national-talent-table-scroll {
  margin-bottom: -16px;
}

.talent-metric-grid.is-national {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.talent-metric-grid.is-national .talent-metric {
  grid-column: auto;
}

.data-state-banner {
  min-width: 0;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  border: 1px solid #c9d7ef;
  border-radius: 7px;
  padding: 10px 12px;
  background: #f3f7fd;
  color: #365b8d;
}

.data-state-banner[hidden] {
  display: none;
}

.data-state-banner.is-warning {
  border-color: #ead69c;
  background: var(--gold-soft);
  color: #775b13;
}

.data-state-banner.is-error {
  border-color: #efc3bf;
  background: var(--red-soft);
  color: #9c3329;
}

.data-state-banner > svg {
  width: 17px;
  height: 17px;
}

.data-state-banner > svg.is-spinning {
  animation: spin 0.8s linear infinite;
}

.data-state-banner > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.data-state-banner strong,
.data-state-banner span {
  overflow-wrap: anywhere;
}

.data-state-banner strong {
  font-size: 12px;
}

.data-state-banner span {
  font-size: 11px;
  line-height: 1.45;
}

.data-state-retry {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid currentColor;
  border-radius: 6px;
  padding: 0 10px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
}

.data-state-retry:hover {
  background: rgba(255, 255, 255, 0.52);
}

.data-state-retry svg {
  width: 14px;
  height: 14px;
}

.sales-view-heading p,
.workspace-heading p,
.sales-summary-card small,
.national-metric-card small,
.manager-action-copy small,
.quality-alert-copy small,
.talent-metric small,
.national-talent-quadrants span,
.national-talent-quadrants small,
.national-talent-quadrants > p {
  font-size: 11px;
}

@media (max-width: 1570px) {
  .sales-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .national-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .sales-funnel-snapshot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .talent-metric-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .talent-metric {
    grid-column: span 3;
  }

  .talent-metric:nth-last-child(-n + 3) {
    grid-column: span 4;
  }

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

  .action-center-panel,
  .quality-alert-panel {
    grid-column: 1 / -1;
  }

  .operation-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .overview-layout {
    grid-template-columns: minmax(520px, 1.6fr) minmax(310px, 0.95fr);
  }

  .lead-funnel-metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .overview-layout.is-lead-funnel,
  .overview-layout.is-jinhua-daily {
    grid-template-columns: minmax(280px, 0.78fr) minmax(360px, 1.22fr);
  }

  .ranking-panel {
    grid-column: 1 / -1;
    min-height: auto;
  }

  .overview-layout.is-lead-funnel .ranking-panel,
  .overview-layout.is-jinhua-daily .ranking-panel {
    grid-column: auto;
  }

  .ranking-panel .podium {
    width: min(470px, 100%);
    margin-left: auto;
    margin-right: auto;
  }

  .ranking-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 22px;
  }

  .conversion-grid {
    grid-template-columns: repeat(5, minmax(105px, 1fr));
  }
}

@media (max-width: 1325px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(280px, calc(100vw - 42px));
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: 12px 0 28px rgba(24, 34, 48, 0.18);
  }

  .app-shell.menu-open .sidebar {
    transform: translateX(0);
  }

  .menu-button,
  .sidebar-close {
    display: grid;
  }

  .sidebar-close {
    margin-left: auto;
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 19;
    background: rgba(27, 32, 40, 0.32);
  }

  .app-shell.menu-open .menu-backdrop {
    display: block;
  }

  .scope-strip {
    grid-template-columns: minmax(240px, 1.35fr) repeat(3, minmax(155px, 1fr));
  }

  .national-decision-grid {
    grid-template-columns: minmax(360px, 1fr) minmax(320px, 0.9fr);
  }

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

  .lead-funnel-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .overview-layout {
    grid-template-columns: minmax(0, 1.55fr) minmax(225px, 0.62fr);
  }

  .ranking-panel {
    grid-column: 1 / -1;
  }

  .overview-layout.is-lead-funnel,
  .overview-layout.is-jinhua-daily {
    grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  }

  .overview-layout.is-lead-funnel .performance-column,
  .overview-layout.is-jinhua-daily .performance-column {
    grid-column: auto;
  }

  .overview-layout.is-lead-funnel .ranking-panel,
  .overview-layout.is-jinhua-daily .ranking-panel {
    grid-column: auto;
  }

  .performance-column {
    grid-template-columns: 1fr;
  }

  .conversion-grid {
    grid-template-columns: repeat(4, minmax(105px, 1fr));
  }
}

@media (max-width: 820px) {
  .clinic-boundary {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .clinic-boundary-notes {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .sales-summary-grid,
  .sales-definition-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .scope-strip,
  .sales-funnel-snapshot-grid,
  .batch-readiness-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manager-workspace.is-sales-view-compact {
    grid-template-columns: 1fr;
  }

  .icon-button::after {
    display: none;
  }

  .topbar {
    padding: 9px 11px;
  }

  .module-tabs {
    padding: 5px 10px;
  }

  .module-tab {
    min-width: 82px;
    min-height: 36px;
    padding: 0 10px;
  }

  .title-block h1 {
    font-size: 17px;
  }

  .store-switcher {
    flex-basis: 190px;
  }

  .update-state {
    display: none;
  }

  .dashboard-main {
    padding: 10px;
  }

  .national-decision-grid,
  .national-diagnostic-grid {
    grid-template-columns: 1fr;
  }

  .national-diagnostic-item {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .national-diagnostic-item:last-child {
    border-bottom: 0;
  }

  .manager-workspace .panel {
    min-height: 220px;
  }

  .forecast-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .operation-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
  }

  .operation-analysis-grid {
    grid-template-columns: 1fr;
  }

  .operation-analysis-panel.is-breed {
    grid-column: auto;
  }

  .operation-analysis-panel.is-breed .distribution-list {
    grid-template-columns: 1fr;
  }

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

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

  .overview-layout.is-lead-funnel,
  .overview-layout.is-jinhua-daily {
    grid-template-columns: 1fr;
  }

  .overview-layout.is-lead-funnel .performance-column,
  .overview-layout.is-lead-funnel .ranking-panel,
  .overview-layout.is-jinhua-daily .performance-column,
  .overview-layout.is-jinhua-daily .ranking-panel {
    grid-column: auto;
  }

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

  .performance-column {
    grid-template-columns: 1fr;
  }

  .conversion-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .conversion-toolbar {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .funnel-branch-tabs {
    width: 100%;
  }

  .period-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .period-tabs button {
    padding: 0 5px;
  }

  .manager-action-toggle,
  .manager-actions-toggle {
    width: 100%;
  }

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

  .team-analysis-grid {
    grid-template-columns: 1fr;
  }

  .person-conversion-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .person-filter-toolbar {
    width: 100%;
    justify-content: space-between;
  }

  .person-period-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .person-period-tabs {
    min-width: 0;
    flex: 1 1 auto;
  }
}

@media (max-width: 620px) {
  .clinic-boundary-copy,
  .clinic-boundary-notes {
    align-items: flex-start;
    flex-direction: column;
  }

  .clinic-finance-truth {
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: start;
  }

  .clinic-finance-truth b {
    grid-column: 2;
  }

  .clinic-section-heading {
    flex-direction: column;
    gap: 10px;
  }

  .sales-summary-grid,
  .sales-definition-list,
  .sales-business-grid {
    grid-template-columns: 1fr;
  }

  .sales-summary-grid.sales-summary-grid-secondary,
  .national-summary-secondary-grid {
    grid-template-columns: 1fr;
  }

  .sales-funnel-snapshot-grid,
  .batch-readiness-grid,
  .sales-funnel-card-metrics,
  .lifan-funnel-summary {
    grid-template-columns: 1fr;
  }

  .talent-metric-grid.is-national {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .data-state-banner {
    grid-template-columns: 18px minmax(0, 1fr);
  }

  .data-state-retry {
    grid-column: 2;
    justify-self: start;
  }

  .sales-supplemental > summary,
  .national-summary-more > summary,
  .national-talent-details > summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .sales-supplemental > summary small,
  .national-summary-more > summary small,
  .national-talent-details > summary small {
    padding-left: 24px;
    text-align: left;
  }

  .sales-summary-card {
    min-height: 126px;
  }

  .sales-definition-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .topbar {
    gap: 8px;
  }

  .title-block {
    display: none;
  }

  .store-switcher {
    flex: 1 1 auto;
  }

  .store-switcher > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .store-switcher select {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    padding-left: 8px;
  }

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

  .national-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 11px;
  }

  .national-period-tabs {
    width: 100%;
  }

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

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

  .talent-metric,
  .talent-metric:nth-last-child(-n + 3) {
    grid-column: auto;
  }

  .talent-metric:last-child {
    grid-column: 1 / -1;
  }

  .talent-quadrant-plot {
    min-height: 300px;
    grid-template-rows: repeat(2, minmax(132px, 1fr));
  }

  .talent-quadrant {
    padding: 11px 10px;
  }

  .talent-quadrant-person b {
    max-width: 105px;
  }

  .national-talent-quadrants {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .national-ranking-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .national-ranking-filter,
  .national-ranking-search {
    width: 100%;
    min-width: 0;
  }

  .national-ranking-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .national-ranking-summary > span {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .national-ranking-summary > span:last-child {
    border-bottom: 0;
  }

  .national-decision-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .national-action {
    grid-template-columns: minmax(0, 1fr) 18px;
    grid-template-areas:
      "heading icon"
      "detail icon"
      "store icon";
  }

  .national-action-store {
    justify-self: start;
    max-width: 100%;
    text-align: left;
  }

  .national-table-scroll {
    width: calc(100% + 32px);
    max-width: calc(100% + 32px);
  }

  .operation-period-tabs {
    width: 100%;
  }

  .scope-strip {
    grid-template-columns: 1fr;
  }

  .scope-strip > div {
    min-height: 46px;
  }

  .people-operating-filters {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .people-operating-period {
    margin-right: 0;
  }

  .people-operating-select {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .people-operating-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .people-operating-summary span + span::before {
    content: "";
  }

  .sales-project-nav {
    min-height: 48px;
    gap: 4px;
    padding: 4px;
  }

  .sales-project-tabs {
    grid-template-columns: repeat(7, 104px);
    gap: 3px;
    scroll-snap-type: inline proximity;
  }

  .sales-project-tab {
    min-height: 38px;
    gap: 5px;
    padding: 0 7px;
    font-size: 12px;
    scroll-snap-align: start;
  }

  .sales-project-tab > svg {
    width: 15px;
    height: 15px;
    flex-basis: 15px;
  }

  .sales-project-more {
    width: 82px;
    flex-basis: 82px;
    padding-left: 4px;
  }

  .sales-project-menu {
    width: 164px;
  }

  .manager-workspace {
    grid-template-columns: 1fr;
  }

  .action-center-panel,
  .quality-alert-panel {
    grid-column: auto;
  }

  .manager-workspace .panel {
    min-height: 0;
  }

  .action-list {
    max-height: 260px;
  }

  .manager-action {
    grid-template-columns: minmax(0, 1fr) auto 15px;
    grid-template-areas:
      "open controls arrow"
      "badge controls arrow";
    row-gap: 4px;
    padding-block: 5px;
  }

  .manager-action-open {
    grid-area: open;
    width: 100%;
  }

  .manager-action-badge {
    grid-area: badge;
    justify-self: start;
    margin-left: 41px;
    white-space: normal;
  }

  .manager-action-controls {
    grid-area: controls;
  }

  .manager-action > svg {
    grid-area: arrow;
  }

  .forecast-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .panel-heading-actions {
    gap: 6px;
  }

  .operation-filter-clear {
    padding: 0 7px;
  }

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

  .lead-funnel-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-card {
    min-height: 118px;
    padding: 14px;
  }

  .metric-card strong {
    font-size: 27px;
  }

  .progress-column {
    grid-template-columns: 1fr;
  }

  .compact-panel {
    min-height: 160px;
  }

  .chart-legend {
    justify-content: flex-start;
  }

  .trend-panel .panel-heading {
    flex-direction: column;
  }

  .conversion-grid,
  .conversion-grid.is-jinhua-daily {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .batch-conversion-empty {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .batch-conversion-empty .sales-view-link {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .batch-field-contract {
    grid-template-columns: 1fr;
  }

  .ranking-list {
    grid-template-columns: 1fr;
  }

  .people-row {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .person-filter-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .person-date-range,
  .person-period-tabs {
    width: 100%;
  }

  .person-date-range {
    min-height: 40px;
  }

  .person-period-tabs button {
    min-height: 36px;
    padding: 0 5px;
  }

  .person-range-apply {
    width: 100%;
    min-height: 44px;
  }

  .person-range-error {
    text-align: left;
  }
}

@media (max-width: 420px) {
  .national-summary-grid {
    grid-template-columns: 1fr;
  }

  .talent-heading {
    align-items: flex-start;
  }

  .talent-metric-grid {
    grid-template-columns: 1fr;
  }

  .talent-metric-grid.is-national {
    grid-template-columns: 1fr;
  }

  .talent-metric:last-child {
    grid-column: auto;
  }

  .talent-subheading {
    align-items: stretch;
    flex-direction: column;
  }

  .talent-newcomer-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .talent-newcomer-count {
    align-self: flex-start;
  }

  .talent-newcomer-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .talent-coverage-summary {
    align-self: flex-start;
    justify-content: flex-start;
  }

  .talent-quadrant-plot {
    width: calc(100% - 14px);
    min-height: 284px;
    margin-left: 14px;
    grid-template-rows: repeat(2, minmax(124px, 1fr));
  }

  .talent-quadrant-axis.is-y {
    left: -16px;
    padding-inline: 1px;
    background: transparent;
  }

  .talent-quadrant {
    gap: 7px;
    padding: 9px 8px;
  }

  .talent-quadrant header {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .talent-quadrant-person span {
    display: none;
  }

  .talent-quadrant-person b {
    max-width: 115px;
  }

  .talent-profile-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }

  .national-metric-card {
    min-height: 112px;
  }

  .national-efficiency-chart {
    height: 240px;
    padding-left: 28px;
  }

  .national-efficiency-point {
    max-width: 82px;
    padding: 3px 5px;
  }

  .national-loss-summary {
    grid-template-columns: 1fr;
  }

  .forecast-metrics {
    grid-template-columns: 1fr;
  }

  .operation-records-panel .panel-heading {
    flex-direction: column;
  }

  .operation-records-panel .panel-heading-actions {
    align-self: flex-end;
  }

  .person-date-range {
    grid-template-columns: 16px minmax(0, 1fr);
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .person-date-range > svg {
    grid-row: 1 / span 2;
  }

  .person-date-separator {
    display: none;
  }

  .person-date-field input {
    width: 100%;
  }

  .person-period-summary-grid {
    grid-template-columns: 1fr;
  }

  .title-block .eyebrow {
    display: none;
  }

  .topbar-actions {
    gap: 5px;
  }

  .module-tab {
    min-width: 70px;
    gap: 5px;
    padding: 0 8px;
    font-size: 12px;
  }

  .module-tab svg {
    width: 15px;
    height: 15px;
  }

  .operation-metric-card {
    min-height: 108px;
    padding: 12px;
  }

  .operation-metric-card strong {
    font-size: 24px;
  }

  .shortcut-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .shortcut {
    min-height: 68px;
    padding: 9px;
    font-size: 12px;
  }

  .shortcut-icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .lead-funnel-metric-grid {
    grid-template-columns: 1fr;
  }

  .conversion-grid,
  .conversion-grid.is-jinhua-daily {
    grid-template-columns: 1fr;
  }

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

/* Chairman review: compact sales working surface with one clear visual hierarchy. */
.store-switcher select option {
  background: #ffffff;
  color: var(--text);
}

.sales-summary-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.sales-summary-grid.sales-summary-grid-secondary {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.sales-summary-card .metric-trust {
  border: 0;
  padding: 0;
  background: transparent;
}

.sales-summary-card small {
  font-size: 10px;
}

.sales-funnel-snapshot-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sales-supplemental > summary {
  min-height: 38px;
  padding: 7px 10px;
}

.sales-supplemental > summary small {
  font-size: 10px;
}

.sales-summary-grid-secondary {
  padding: 8px 10px 10px;
}

.sales-summary-grid-secondary .sales-summary-card {
  min-height: 92px;
}

.module-view[data-module-view="sales"] .panel {
  box-shadow: none;
}

@media (max-width: 1120px) {
  .sales-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sales-funnel-snapshot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .sales-summary-grid,
  .sales-business-grid,
  .scope-strip,
  .sales-funnel-snapshot-grid,
  .batch-readiness-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sales-project-nav {
    min-height: 44px;
    padding: 0 6px;
  }

  .sales-project-tabs {
    display: flex;
    gap: 0;
  }

  .sales-project-tab {
    min-height: 42px;
    padding: 0 12px;
  }

  .sales-project-tab::after {
    right: 12px;
    left: 12px;
  }

  .sales-project-tab > svg {
    display: none;
  }
}

@media (max-width: 620px) {
  .sales-summary-grid,
  .sales-summary-grid.sales-summary-grid-secondary,
  .sales-business-grid,
  .scope-strip,
  .sales-funnel-snapshot-grid,
  .batch-readiness-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  .operation-toolbar-controls,
  .operation-range-controls {
    width: 100%;
    justify-items: stretch;
  }

  .operation-period-tabs,
  .livestock-view-tabs {
    width: 100%;
  }

  .operation-custom-range {
    grid-template-columns: minmax(0, 1fr) auto;
    justify-content: stretch;
  }

  .operation-range-applied {
    text-align: left;
  }
}

@media (max-width: 620px) {
  .operation-period-tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .operation-period-tabs button {
    min-width: 68px;
    min-height: 44px;
    flex: 1 0 auto;
  }

  .livestock-view-tabs button,
  .operation-range-apply {
    min-height: 44px;
  }

  .operation-custom-range .person-date-range {
    min-height: 44px;
  }

  .livestock-period-content .operation-metric-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 420px) {
  .operation-custom-range {
    grid-template-columns: minmax(0, 1fr);
  }

  .operation-range-apply {
    width: 100%;
  }
}

/* Manager cockpit refinement: visible time controls, stronger hierarchy and calmer color use. */
.side-nav p {
  margin: 18px 10px 6px;
  color: #53645f;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.35;
}

.side-nav p:not(:first-of-type) {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.side-link {
  color: #40504b;
}

.side-link:hover,
.side-link:focus-visible,
.side-link.is-active {
  background: #e4f0ed;
  color: #123f38;
}

.side-link:focus-visible,
.sales-project-tab:focus-visible,
.sales-personnel-nav button:focus-visible,
.person-range-apply:focus-visible,
.person-table-scroll:focus-visible,
.sales-global-period-bar button:focus-visible,
.sales-global-period-bar input:focus-visible {
  outline-color: var(--focus-ring);
}

.sales-global-period-bar {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(210px, 0.7fr) minmax(520px, 1.3fr);
  align-items: center;
  gap: 16px;
  margin-top: var(--space-section);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  background: var(--surface);
}

.sales-global-period-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.sales-global-period-copy strong {
  color: #173f38;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.sales-global-period-copy span,
.sales-global-period-copy small,
.sales-global-period-applied,
.sales-global-period-error,
#salesRangeError {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.sales-global-period-copy span,
.sales-global-period-copy small,
.sales-global-period-applied {
  color: var(--muted);
}

.sales-global-period-copy .workspace-kicker {
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.sales-global-period-toolbar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.sales-global-period-tabs {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
  background: var(--surface-muted);
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.sales-global-period-tabs button {
  min-width: 58px;
  min-height: 34px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 5px;
  padding: 0 10px;
  background: transparent;
  color: #52615d;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}

.sales-global-period-tabs button:hover {
  background: #eef4f2;
  color: #123f38;
}

.sales-global-period-tabs button[aria-pressed="true"],
.sales-global-period-tabs button.is-active {
  background: #ffffff;
  color: var(--blue);
  box-shadow: 0 1px 3px rgba(20, 46, 40, 0.12);
  font-weight: 700;
}

.sales-global-date-range {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.sales-global-date-range[hidden] {
  display: none;
}

.sales-global-date-range label {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.sales-global-date-range input {
  width: 128px;
  min-height: 36px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0 8px;
  background: #ffffff;
  color: var(--text);
  font-size: 12px;
}

#salesRangeApply,
.sales-global-period-apply {
  min-height: 36px;
  border: 1px solid var(--blue);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  background: var(--blue);
  color: #ffffff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

#salesRangeApply:hover,
.sales-global-period-apply:hover {
  background: #0d695f;
}

.sales-global-period-applied {
  text-align: left;
}

.sales-global-period-error,
#salesRangeError {
  flex: 1 0 100%;
  color: var(--red);
  text-align: right;
}

.sales-global-period-error[hidden],
#salesRangeError[hidden],
.sales-global-period-applied[hidden] {
  display: none;
}

/* The first viewport is a decision surface: four primary metrics, not six equal tiles. */
.module-view[data-module-view="sales"] .sales-summary-grid:not(.sales-summary-grid-secondary) {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.module-view[data-module-view="sales"] .sales-summary-card {
  min-height: 118px;
  border-radius: var(--radius-md);
  padding: 12px 13px;
}

.module-view[data-module-view="sales"] small,
.module-view[data-module-view="sales"] .scope-strip span,
.module-view[data-module-view="sales"] .workspace-kicker,
.module-view[data-module-view="sales"] .workspace-count,
.module-view[data-module-view="sales"] .sales-view-link,
.module-view[data-module-view="sales"] .sales-definition-item strong,
.module-view[data-module-view="sales"] .person-progress-note,
.module-view[data-module-view="sales"] .dashboard-footer {
  font-size: 12px;
}

.module-view[data-module-view="sales"] .sales-summary-card.is-target,
.module-view[data-module-view="sales"] .sales-summary-card.is-forecast,
.module-view[data-module-view="sales"] .sales-summary-card.is-average,
.module-view[data-module-view="sales"] .sales-business-card.is-orange,
.module-view[data-module-view="sales"] .sales-business-card.is-violet {
  border-top-color: var(--blue);
}

.module-view[data-module-view="sales"] .metric-trust.is-local,
.module-view[data-module-view="sales"] .sales-view-link:hover,
.module-view[data-module-view="sales"] .sales-view-link:focus-visible {
  border-color: #9bc8c0;
}

.module-view[data-module-view="sales"] .person-date-range.is-active {
  border-color: rgba(17, 122, 112, 0.55);
}

.module-view[data-module-view="sales"] .person-date-range:focus-within,
.module-view[data-module-view="sales"] .person-table-scroll:focus-visible {
  outline-color: var(--focus-ring);
}

.module-view[data-module-view="sales"] .person-period-scope-note {
  border-color: rgba(17, 122, 112, 0.2);
}

.module-view[data-module-view="sales"] :is(
  .sales-view-heading p,
  .sales-view-heading > span,
  .sales-summary-card-header > span:first-child,
  .sales-summary-card small,
  .metric-trust,
  .sales-supplemental > summary small,
  .sales-business-card-label,
  .business-metric-status,
  .sales-business-card-note,
  .sales-funnel-card-header p,
  .sales-funnel-source,
  .sales-funnel-mini-stage small,
  .sales-funnel-card-metrics small,
  .sales-funnel-pending p,
  .workspace-heading p,
  .decision-heading span,
  .decision-body small,
  .quality-alert-copy small,
  .sales-definition-item span,
  .person-period-scope-note,
  .person-range-error,
  .person-date-field span,
  .person-date-separator,
  .person-date-field input,
  .person-period-tabs button
) {
  font-size: 12px;
}

.module-view[data-module-view="sales"] .sales-view-heading p,
.module-view[data-module-view="sales"] .sales-view-heading > span,
.module-view[data-module-view="sales"] .sales-summary-card small,
.module-view[data-module-view="sales"] .sales-business-card-note,
.module-view[data-module-view="sales"] .workspace-heading p {
  line-height: 1.5;
}

.module-view[data-module-view="sales"] :is(
  .sales-operating-summary,
  .sales-funnel-snapshot,
  .sales-supplemental,
  .panel,
  .sales-business-card,
  .sales-funnel-card
) {
  border-radius: var(--radius-md);
}

/* Keep wide navigation discoverable on ordinary notebooks. */
.sales-project-tabs {
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: #9db2ac transparent;
}

.sales-project-tabs::-webkit-scrollbar {
  display: block;
  height: 5px;
}

.sales-project-tabs::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #9db2ac;
}

.sales-project-tabs::-webkit-scrollbar-track {
  background: transparent;
}

.sales-project-tab {
  min-width: max-content;
  flex: 0 0 auto;
}

/* Sticky identity columns preserve context while scanning the wide people table. */
.person-conversion-table {
  min-width: 2100px;
  font-size: 12px;
}

.person-conversion-table th,
.person-conversion-table td {
  padding-inline: 8px;
}

.person-conversion-table thead tr:first-child th:first-child,
.person-conversion-table tbody td:first-child,
.person-conversion-table tfoot td:first-child {
  position: sticky;
  left: 0;
  z-index: 4;
  width: 108px;
  min-width: 108px;
  background: var(--surface);
}

.person-conversion-table thead tr:first-child th:nth-child(2),
.person-conversion-table tbody td:nth-child(2),
.person-conversion-table tfoot td:nth-child(2) {
  position: sticky;
  left: 108px;
  z-index: 4;
  width: 190px;
  min-width: 190px;
  background: var(--surface);
  box-shadow: 5px 0 8px -7px rgba(20, 46, 40, 0.45);
}

.person-conversion-table thead tr:first-child th:first-child,
.person-conversion-table thead tr:first-child th:nth-child(2) {
  z-index: 6;
  background: #eef3f1;
}

.person-conversion-table tfoot td:first-child,
.person-conversion-table tfoot td:nth-child(2) {
  z-index: 5;
  background: #eef3f1;
}

.person-conversion-table tbody tr:hover td:first-child,
.person-conversion-table tbody tr:hover td:nth-child(2) {
  background: #f2f7f5;
}

.person-table-scroll {
  scrollbar-color: #9db2ac #eef3f1;
}

.person-table-scroll::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.person-table-scroll::-webkit-scrollbar-thumb {
  border: 2px solid #eef3f1;
  border-radius: 999px;
  background: #9db2ac;
}

.person-table-scroll::-webkit-scrollbar-track {
  background: #eef3f1;
}

@media (max-width: 980px) {
  .sales-global-period-bar {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .sales-global-period-toolbar {
    justify-content: flex-start;
  }

  .sales-global-period-applied,
  .sales-global-period-error,
  #salesRangeError {
    text-align: left;
  }

  .module-view[data-module-view="sales"] .sales-summary-grid:not(.sales-summary-grid-secondary) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .sales-global-period-bar {
    gap: 9px;
    padding: 10px;
  }

  .sales-global-period-copy strong {
    font-size: 13px;
  }

  .sales-global-period-toolbar,
  .sales-global-date-range {
    align-items: stretch;
    flex-direction: column;
  }

  .sales-global-period-tabs {
    width: 100%;
  }

  .sales-global-period-tabs button {
    min-width: 64px;
    min-height: 42px;
  }

  .sales-global-date-range label,
  .sales-global-date-range input,
  #salesRangeApply,
  .sales-global-period-apply {
    width: 100%;
  }

  .sales-global-date-range > span[aria-hidden="true"] {
    display: none;
  }

  .sales-global-date-range input,
  #salesRangeApply,
  .sales-global-period-apply {
    min-height: 42px;
  }

  .module-view[data-module-view="sales"] .sales-summary-grid:not(.sales-summary-grid-secondary) {
    grid-template-columns: minmax(0, 1fr);
  }

  .module-view[data-module-view="sales"] :is(.sales-operating-summary, .sales-funnel-snapshot) {
    padding: 11px;
  }

  .module-view[data-module-view="sales"] .sales-view-heading {
    align-items: flex-start;
    gap: 9px;
  }

  .module-view[data-module-view="sales"] .sales-view-heading h2 {
    font-size: 15px;
  }

  .module-view[data-module-view="sales"] .sales-view-heading > span {
    max-width: 42%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
.saas-source-notice {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-left: 3px solid #278c80;
  border-radius: 4px;
  background: #edf6f4;
  color: #31534e;
  line-height: 1.65;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.saas-transition { display: block; margin: 4px 0; color: #556560; }
.saas-extra-metrics > span { display: flex; justify-content: space-between; gap: 12px; margin: 6px 0; }
.saas-extra-metrics small { color: #556560; }
.b-traffic-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.b-traffic-path { border: 1px solid #d5e7e2; border-radius: 8px; padding: 10px; background: #f5faf8; min-width: 0; }
.b-traffic-path h4 { margin: 0 0 8px; font-size: 13px; color: #245b52; }
.b-traffic-path > span { display: flex; justify-content: space-between; gap: 8px; margin: 5px 0; }
.b-traffic-note { font-size: 12px; line-height: 1.6; color: #596b65; }
#legacyConversionPeriodTabs[hidden] { display: none; }
.person-conversion-table .b-traffic-cell { background: #f2f8f5; }
@media (max-width: 600px) { .b-traffic-split { grid-template-columns: 1fr; } }
