/* PASM module pages — Indicator / KPI / Simulation */

.module-split {
  display: grid;
  grid-template-columns: minmax(200px, 220px) minmax(0, 1fr) minmax(260px, 300px);
  min-height: 0;
  gap: 0;
}

.module-split-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 0;
  gap: 0;
}

.module-split-2.module-split-2--stack {
  grid-template-columns: 1fr;
  grid-template-rows: minmax(220px, 0.9fr) minmax(280px, 1.1fr);
}

.module-split-2.module-split-2--stack > .panel {
  border-right: none;
  border-bottom: 1px solid var(--line);
}

.module-split-2.module-split-2--stack > .panel:last-child {
  border-bottom: none;
}

.module-split-3 {
  display: grid;
  grid-template-columns: minmax(200px, 240px) minmax(0, 1.5fr) minmax(280px, 360px);
  min-height: 0;
}

.panel {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
}

.panel:last-child { border-right: none; }

.panel-stack > .panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.panel > .version-list,
.panel > .data-table-wrap {
  flex: 1;
  min-height: 0;
}

.panel-head {
  flex-shrink: 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.panel-head h2 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.panel-body {
  flex: 1;
  min-height: 0;
  overflow-x: auto;
  overflow-y: auto;
  padding: 10px 12px;
}

.panel-body.flush {
  padding: 0;
  display: flex;
  flex-direction: column;
}

.panel-chart-footer {
  flex: 1.4;
  min-height: 180px;
  margin: 0 12px 12px;
}

.panel > .toolbar + .panel-body,
.panel > .toolbar + .data-table-wrap {
  flex: 1;
  min-height: 0;
}

a.btn {
  text-decoration: none;
  color: inherit;
}

.status-warning { background: #fef3c7; color: #b45309; }

/* Config page */
.config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
  gap: 12px;
  padding: 14px;
  min-height: 0;
  align-items: stretch;
}

.config-panel {
  background: var(--surface-dim);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.config-panel h3 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.config-panel p.hint {
  font-size: 10px;
  color: var(--muted);
  margin-top: -6px;
}

.config-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.config-field label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.config-field select,
.config-field input[type="text"] {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 11px;
  background: #fff;
}

.toggle-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 11px;
  color: var(--text-2);
}

.toggle-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
  cursor: pointer;
  flex-shrink: 0;
}

.config-actions {
  display: flex;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
  margin-top: auto;
}

.preview-card {
  background: linear-gradient(145deg, #009688 0%, #004d47 100%);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 16px;
}

.preview-card h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.preview-card ul {
  list-style: none;
  font-size: 10px;
  opacity: 0.9;
  line-height: 1.7;
}

.preview-card ul li::before {
  content: '✓ ';
  opacity: 0.7;
}

/* Mapping table */
.mapping-status {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}

.mapping-connected { background: var(--teal-soft); color: var(--teal); }
.mapping-partial { background: #fef3c7; color: #b45309; }
.mapping-pending { background: #f3f4f6; color: var(--muted); }

/* Dependency graph */
.dep-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
  min-height: 0;
}

.dep-chart {
  min-height: 0;
  height: 100%;
  width: 100%;
}

.dep-detail {
  border-left: 1px solid var(--line);
  padding: 12px;
  overflow-y: auto;
  min-height: 0;
}

/* Version timeline */
.version-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  overflow-y: auto;
}

.version-card {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.version-card:hover { border-color: var(--teal-mid); }
.version-card.active {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.version-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.version-card h4 {
  font-size: 12px;
  font-weight: 600;
}

.version-meta {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.5;
}

.version-meta strong { color: var(--text-2); }

/* Compare page */
.compare-layout {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}

.compare-selectors {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.compare-selectors label {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.compare-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 0;
  overflow: hidden;
}

.compare-table-wrap,
.compare-chart-wrap {
  padding: 12px 14px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.compare-table-wrap .data-table-wrap,
.compare-table-wrap > table {
  flex: 1;
  min-height: 0;
}

.compare-chart-wrap {
  border-left: 1px solid var(--line);
}

.variance-pos { color: var(--up); font-weight: 600; }
.variance-neg { color: var(--down); font-weight: 600; }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--text);
  color: #fff;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(17,24,39,.2);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s, transform 0.25s;
  z-index: 9999;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: none;
}

.toast-success i { color: #6ee7b7; }

/* Category list */
.cat-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 11px;
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.15s;
}

.cat-item:hover { background: var(--surface-dim); }
.cat-item.active { background: var(--teal-soft); color: var(--teal); font-weight: 600; }

.cat-item i { font-size: 15px; flex-shrink: 0; }
.cat-item .cat-count {
  margin-left: auto;
  font-size: 10px;
  color: var(--muted);
  background: var(--surface-dim);
  padding: 2px 7px;
  border-radius: 999px;
}

.cat-item.active .cat-count {
  background: rgba(0, 128, 117, 0.15);
  color: var(--teal);
}

/* Toolbar */
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.toolbar .search-inline {
  flex: 1;
  max-width: 280px;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  background: var(--surface-dim);
  border-radius: 999px;
  color: var(--muted);
}

.toolbar .search-inline input {
  flex: 1;
  border: none;
  background: none;
  font: inherit;
  font-size: 11px;
  outline: none;
}

.btn {
  height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-2);
}

.btn:hover { border-color: var(--teal); color: var(--teal); }
.btn-primary {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
.btn-primary:hover { background: var(--teal-deep); border-color: var(--teal-deep); color: #fff; }

.btn-ghost {
  border: none;
  background: transparent;
  color: var(--muted);
}
.btn-ghost:hover { color: var(--teal); }

/* Data table */
.data-table-wrap {
  flex: 1;
  min-height: 0;
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  min-width: 640px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
  font-size: 12px;
}

.data-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.data-table th {
  padding: 10px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-2);
  background: var(--surface-dim);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  vertical-align: middle;
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
  vertical-align: middle;
  white-space: nowrap;
  line-height: 1.4;
}

.data-table td .cell-desc,
.data-table td.cell-wrap {
  white-space: normal;
  word-break: break-word;
  line-height: 1.45;
}

.data-table td.num {
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  color: var(--text);
}

.data-table tbody tr {
  cursor: pointer;
  transition: background 0.12s;
}

.data-table tbody tr:hover td { background: var(--surface-dim); }
.data-table tbody tr.selected td {
  background: var(--teal-soft);
  color: var(--teal);
}

.data-table .mono {
  font-family: ui-monospace, 'SF Mono', monospace;
  font-size: 11px;
  color: var(--text);
}

/* Status badges */
.status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}

.status-active { background: var(--teal-soft); color: var(--teal); }
.status-draft { background: #f3f4f6; color: var(--muted); }
.status-published { background: var(--teal-soft); color: var(--teal); }

.type-pill {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--surface-dim);
  color: var(--text-2);
}

/* Detail panel */
.detail-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.detail-hero {
  padding: 14px;
  background: linear-gradient(145deg, #009688 0%, #004d47 100%);
  border-radius: var(--radius-sm);
  color: #fff;
}

.detail-hero .code {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  opacity: 0.85;
  margin-bottom: 4px;
}

.detail-hero h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.detail-field label {
  display: block;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 4px;
}

.detail-field p,
.detail-field .formula-box {
  font-size: 11px;
  color: var(--text);
  line-height: 1.5;
}

.formula-box {
  padding: 10px 12px;
  background: var(--surface-dim);
  border-radius: 10px;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  color: var(--teal-deep);
  border: 1px solid var(--line);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tag-chip {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--teal-soft);
  color: var(--teal);
  font-weight: 500;
}

.detail-actions {
  display: flex;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

/* KPI type filter */
.filter-chips {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.chip {
  font-size: 10px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-2);
  cursor: pointer;
}

.chip.active {
  background: var(--teal-soft);
  border-color: var(--teal-soft);
  color: var(--teal);
  font-weight: 600;
}

/* Model cards */
.model-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  overflow-y: auto;
}

.model-card {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.model-card:hover { border-color: var(--teal-mid); }
.model-card.active {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.model-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 4px;
}

.model-card h4 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.model-card p {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.4;
}

.model-phase {
  font-size: 9px;
  color: var(--teal);
  font-weight: 600;
  margin-top: 6px;
}

/* Workflow steps */
.workflow {
  display: flex;
  gap: 4px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.workflow-step {
  flex: 1;
  text-align: center;
  padding: 6px 4px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface-dim);
}

.workflow-step.done {
  background: var(--teal-soft);
  color: var(--teal);
  font-weight: 600;
}

.workflow-step.current {
  background: var(--teal);
  color: #fff;
  font-weight: 600;
}

/* Simulation sliders */
#simPanel {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sim-grid {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 0;
  min-height: 0;
  flex: 1;
  height: 100%;
  align-content: stretch;
}

.sim-inputs,
.sim-outputs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  padding: 12px;
  overflow-y: auto;
}

.sim-inputs {
  border-right: 1px solid var(--line);
  background: #fff;
}

.sim-outputs {
  background: var(--surface-dim);
}

.sim-outputs .chart-slot {
  flex: none;
  height: 200px;
  min-height: 200px;
  max-height: 200px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.sim-slider {
  padding: 10px 12px;
  background: var(--surface-dim);
  border-radius: 12px;
}

.sim-slider label {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-2);
  margin-bottom: 6px;
}

.sim-slider label strong {
  font-size: 12px;
  color: var(--text);
  font-weight: 700;
}

.sim-slider input[type="range"] {
  width: 100%;
  accent-color: var(--teal);
}

.output-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.output-card {
  padding: 12px;
  background: var(--surface-dim);
  border-radius: 12px;
}

.output-card.highlight {
  background: linear-gradient(145deg, #009688 0%, #004d47 100%);
  color: #fff;
}

.output-card .out-label {
  font-size: 9px;
  opacity: 0.8;
  margin-bottom: 4px;
}

.output-card .out-value {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.output-card.highlight .out-label { opacity: 0.85; }

/* Simulation models — scope / architecture / UI sketch */
.model-arch-bar {
  margin: 0 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  overflow: hidden;
}

.model-arch-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface-dim);
}

.model-scope-tab {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.model-scope-tab.active {
  color: var(--teal-deep);
  background: #fff;
  border-bottom-color: var(--teal);
}

.model-scope-pane { display: none; padding: 10px 12px; max-height: 200px; overflow: auto; }
.model-scope-pane.active { display: block; }

.model-scope-section { margin-bottom: 10px; }
.model-scope-section:last-child { margin-bottom: 0; }
.model-scope-section h3 {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-2);
  margin: 0 0 6px;
}

.model-param-table-wrap { overflow-x: auto; }
.model-param-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9px;
}
.model-param-table th,
.model-param-table td {
  padding: 4px 6px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.model-param-table th { background: var(--surface-dim); font-weight: 600; }

.model-formula-list { font-size: 9px; line-height: 1.55; }
.model-output-list {
  margin: 0;
  padding-left: 14px;
  font-size: 9px;
  color: var(--text-2);
}
.model-output-list li { margin-bottom: 3px; }
.model-output-list strong { color: var(--text); }
.model-sim-desc { font-size: 9px; color: var(--text-2); margin: 0; }

.model-arch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.model-arch-col h3 {
  font-size: 10px;
  font-weight: 600;
  margin: 0 0 8px;
}

.data-flow-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 9px;
}
.flow-box {
  padding: 4px 8px;
  background: var(--teal-soft);
  border: 1px solid var(--teal-mid);
  border-radius: 6px;
  color: var(--teal-deep);
  font-weight: 600;
}
.flow-box.flow-end { background: #e8f5f3; }
.flow-arrow {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--muted);
  font-size: 8px;
}
.flow-arrow em { font-style: normal; }

.tech-layer { margin-bottom: 8px; }
.tech-layer label {
  display: block;
  font-size: 9px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}

.model-card-meta {
  display: flex;
  gap: 6px;
  margin: 4px 0;
}
.model-priority {
  font-size: 8px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: #fef3c7;
  color: #b45309;
}
.model-sim-mode {
  font-size: 8px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.model-list-panel .model-list { max-height: none; height: 100%; }

.model-user-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}
.model-user-layout.module-split-2 {
  grid-template-columns: 220px minmax(0, 1fr);
}
.model-user-layout .model-list-panel {
  min-width: 0;
  max-width: none;
  border-right: 1px solid var(--line);
}
.model-user-layout .model-sim-panel { min-width: 0; min-height: 0; }

.model-sim-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  background: var(--surface-dim);
  flex-wrap: wrap;
}
.model-sim-topbar-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}
.model-sim-topbar h2 {
  font-size: 13px;
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
}
.model-sim-steps {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.model-step-pill {
  font-size: 9px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.model-step-pill.done {
  background: var(--teal-soft);
  border-color: var(--teal-soft);
  color: var(--teal);
}
.model-step-pill.current {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
  font-weight: 600;
}
.model-step-sep {
  font-size: 10px;
  color: var(--muted);
  flex-shrink: 0;
}
.model-sim-versions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.model-active-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.model-active-head h2 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 2px;
}
.model-active-head p {
  font-size: 10px;
  color: var(--text-2);
  margin: 0;
  line-height: 1.4;
}

.model-sim-body { flex: 1; min-height: 0; overflow: auto; }

.model-hint-fold {
  border-top: 1px solid var(--line);
  padding: 0 12px;
  flex-shrink: 0;
}
.model-hint-fold summary {
  padding: 8px 0;
  font-size: 10px;
  font-weight: 600;
  color: var(--teal-deep);
  cursor: pointer;
  list-style: none;
}
.model-hint-fold summary::-webkit-details-marker { display: none; }
.model-hint-fold[open] summary { border-bottom: 1px dashed var(--line); margin-bottom: 6px; }
.model-hint-line {
  font-size: 10px;
  color: var(--text-2);
  line-height: 1.5;
  margin: 0 0 6px;
}

.sim-col-title {
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}
.btn-run { width: 100%; margin-top: 4px; }

.model-workspace-split { min-height: 380px; }

.sim-mode-badge {
  font-size: 8px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.output-grid-3 { grid-template-columns: repeat(3, 1fr); }
.output-grid-4 { grid-template-columns: repeat(2, 1fr); }

.ui-sketch {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 8px;
  background: var(--surface-dim);
}
.ui-sketch-row { display: flex; gap: 6px; margin-bottom: 6px; }
.ui-sketch-row:last-child { margin-bottom: 0; }
.ui-sketch-block {
  flex: 1;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 8px;
  text-align: center;
  color: var(--muted);
}
.ui-sketch-block.wide { flex: 2; }
.ui-sketch-main { gap: 8px; }
.ui-sketch-col {
  flex: 1;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.ui-sketch-label { font-size: 8px; font-weight: 600; margin-bottom: 4px; color: var(--text-2); }
.ui-sketch-slider {
  height: 6px;
  background: var(--line);
  border-radius: 999px;
  margin-bottom: 6px;
}
.ui-sketch-btn {
  font-size: 8px;
  padding: 4px;
  background: var(--teal);
  color: #fff;
  border-radius: 4px;
  text-align: center;
}
.ui-sketch-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 6px;
}
.ui-sketch-kpis span {
  height: 20px;
  background: var(--teal-soft);
  border-radius: 4px;
}
.ui-sketch-chart {
  height: 48px;
  background: linear-gradient(180deg, rgba(0,128,117,0.12), transparent);
  border-radius: 4px;
  border: 1px solid var(--line);
}
.ui-sketch-note {
  font-size: 8px;
  color: var(--muted);
  margin: 8px 0 0;
  line-height: 1.4;
}

/* Version compare bar */
.version-bar {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  overflow: hidden;
}

.version-pill {
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-2);
  cursor: pointer;
  white-space: nowrap;
}

.version-pill.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.ref-banner {
  flex-shrink: 0;
  padding: 7px 12px;
  background: var(--teal-soft);
  border-radius: var(--radius-sm);
  font-size: 10px;
  line-height: 1.45;
  color: var(--teal-deep);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.panel-split-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.panel-split-body > .panel-body {
  flex: 1;
  min-height: 0;
}

.ref-banner i { font-size: 14px; flex-shrink: 0; }

/* Financial Analysis dashboards */
.fa-dashboard {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  min-height: 0;
}

.fa-kpi-strip {
  display: grid;
  gap: 8px;
  flex-shrink: 0;
}

.fa-kpi {
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.fa-kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.fa-kpi-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.fa-kpi-top i { font-size: 14px; color: var(--teal); }

.fa-kpi-value {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.fa-kpi-delta {
  font-size: 10px;
  font-weight: 600;
  margin-top: 2px;
  display: inline-block;
}

.fa-kpi-delta.pos { color: var(--teal); }
.fa-kpi-delta.neg { color: #b45309; }

.fa-dash-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  flex: 1;
  min-height: 0;
  align-content: start;
}

.fa-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  min-height: 180px;
  overflow: hidden;
}

.fa-panel-wide { grid-column: 1 / -1; }

.fa-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.fa-panel-head h3 {
  font-size: 11px;
  font-weight: 600;
}

.fa-panel-body { flex: 1; min-height: 0; overflow: auto; }
.fa-panel-body.flush { padding: 0; }

.fa-panel .chart-slot {
  flex: 1;
  min-height: 160px;
  margin: 8px 10px 10px;
}

.fa-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  padding: 14px;
}

.fa-hub-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.fa-hub-card:hover {
  border-color: var(--teal);
  box-shadow: 0 4px 20px rgba(0, 128, 117, 0.1);
  transform: translateY(-2px);
}

.fa-hub-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--teal-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  font-size: 18px;
}

.fa-hub-card h3 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.fa-hub-card p {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.5;
  flex: 1;
}

.fa-hub-arrow {
  position: absolute;
  top: 14px;
  right: 14px;
  color: var(--muted);
  font-size: 14px;
}

.fa-upload-zone {
  margin: 12px;
  padding: 24px;
  border: 2px dashed var(--line);
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.fa-upload-zone:hover,
.fa-upload-zone.drag-over {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.fa-upload-zone i { font-size: 28px; color: var(--teal); margin-bottom: 8px; display: block; }
.fa-upload-zone p { font-size: 11px; font-weight: 500; margin-bottom: 4px; }
.fa-upload-zone .hint { font-size: 9px; color: var(--muted); }

.fa-compose {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}

.fa-compose input {
  flex: 1;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 11px;
}

.fa-msg {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.fa-msg:last-child { border-bottom: none; }

.fa-msg-av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fa-msg-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.fa-msg-top strong { font-size: 11px; }
.fa-msg-time { font-size: 9px; color: var(--muted); margin-left: auto; }
.fa-msg-body p { font-size: 11px; color: var(--text-2); line-height: 1.5; }

.priority-pill {
  font-size: 9px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
}

.priority-high { background: #fee2e2; color: #b91c1c; }
.priority-med { background: #fef3c7; color: #b45309; }
.priority-low { background: #f3f4f6; color: var(--muted); }

.variance-pos { color: var(--teal); font-weight: 600; }
.variance-neg { color: #ef4444; font-weight: 600; }

.empty-state {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
}

/* Financial Analysis — unified board layout */

.fin-board {
  gap: 0;
  padding: 0 var(--pad) var(--pad);
}

.fin-module-tabs {
  display: flex;
  gap: 4px;
  padding: 0 0 0;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.fin-module-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  border-radius: 8px 8px 0 0;
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  flex-shrink: 0;
}

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

.fin-module-tab.active {
  color: var(--teal);
  font-weight: 600;
  border-bottom-color: var(--teal);
  background: var(--surface);
}

.fin-module-tab i { font-size: 13px; }

.fin-board .module-canvas.fin-report-layout {
  display: flex;
  flex-direction: column;
  padding: 0;
  gap: 0;
  min-height: 0;
  flex: 1 1 auto;
}

.fin-board .module-canvas.fin-report-layout > .fin-dim-tabs,
.fin-board .module-canvas.fin-report-layout > .fin-toolbar,
.fin-board .module-canvas.fin-report-layout > .fin-kpi-strip,
.fin-board .module-canvas.fin-report-layout > .fin-extra-panel,
.fin-board .module-canvas.fin-report-layout > .fin-charts-area,
.fin-board .module-canvas.fin-report-layout > .ref-banner,
.fin-board .module-canvas.fin-report-layout > .domain-banner,
.fin-board .module-canvas.fin-report-layout > .plv-nav-bar,
.fin-board .module-canvas.fin-report-layout > .plv-chrome,
.fin-board .module-canvas.fin-report-layout > .plv-kpi-strip {
  flex: 0 0 auto !important;
  min-height: auto !important;
  height: auto !important;
}

.fin-board .module-canvas.fin-report-layout > .fin-report-panel,
.fin-board .module-canvas.fin-report-layout > #domainMain,
.fin-board .module-canvas.fin-report-layout > #statementMain,
.fin-board .module-canvas.fin-report-layout > #plvMain,
.fin-board .module-canvas.fin-report-layout > #vsftMain {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  overflow: auto;
}

.fin-toolbar {
  flex-shrink: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.fin-toolbar .fin-filter-bar {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: none;
  flex-wrap: wrap;
  background: transparent;
}

.fin-report-layout > .fin-dim-tabs {
  border-bottom: 1px solid var(--line);
  padding: 6px 14px 0;
  background: var(--surface-dim);
  flex-shrink: 0;
}

.fin-report-head--compact {
  padding: 6px 14px 4px;
}

.fin-report-head--compact .fin-report-head-main {
  margin-bottom: 2px;
}

.fin-report-head--compact h2 {
  font-size: 11px;
}

.fin-kpi-strip--compact {
  padding: 4px 0 !important;
  border-bottom: 1px solid var(--line);
}

.fin-kpi-strip--compact .fin-kpi-cell {
  min-height: 34px;
  padding: 2px 10px;
}

.fin-kpi-strip--compact .fin-kpi-value {
  font-size: 13px;
}

.fin-charts-area.is-empty {
  display: none;
}

.fin-charts-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 6px 14px;
  border: none;
  border-top: 1px solid var(--line);
  background: var(--surface-dim);
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.fin-charts-toggle:hover {
  color: var(--teal);
  background: var(--teal-soft);
}

.fin-charts-count {
  font-size: 9px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(0, 128, 117, 0.12);
  color: var(--teal);
}

.fin-charts-area.is-collapsed .fin-charts-body {
  display: none;
}

.fin-charts-area:not(.is-collapsed) .fin-charts-body {
  padding: 8px 14px 10px;
  background: var(--surface-dim);
}

.fin-charts-area:not(.is-collapsed) .fin-charts-row {
  min-height: 140px;
}

.fin-charts-area:not(.is-collapsed) .chart-slot-sm {
  min-height: 130px;
  height: 130px;
}

.fin-report-head {
  flex-shrink: 0;
  padding: 10px 14px 8px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.fin-report-head-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.fin-report-head h2 {
  font-size: 12px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

.fin-report-dim {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.fin-report-head .fin-report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 9px;
  color: var(--muted);
}

/* fin-* aliases & additional financial analysis styles */

.page-toolbar {
  flex: 0 0 auto !important;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 0;
  overflow: hidden;
}

.module-board > .page-toolbar:not(.page-toolbar--fin) {
  background: var(--surface);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: var(--shadow);
}

.module-board > .page-toolbar + .module-canvas {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.module-canvas.has-page-toolbar > :not(.page-toolbar) {
  flex: 1 1 auto;
  min-height: 0;
}

.module-canvas.has-page-toolbar > .page-toolbar {
  border-radius: 0;
}

.page-toolbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 14px;
  background: var(--surface-dim);
  border-bottom: 1px solid var(--line);
}

.page-toolbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.page-toolbar-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto;
}

.page-toolbar-search {
  width: 260px;
  max-width: 320px;
  min-width: 200px;
  margin: 0 !important;
  height: 32px;
  flex: none;
}

.page-toolbar-search input {
  font-size: 11px;
}

/* Financial analysis — dedicated toolbar layout */
.page-toolbar--fin .page-toolbar-inner {
  border-bottom: 1px solid var(--line);
}

.page-toolbar--fin .page-toolbar-body {
  padding: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.page-toolbar--fin .page-toolbar-body .fin-filter-bar {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: none;
  flex-wrap: nowrap;
  background: transparent;
}

.page-toolbar--fin .fin-filter-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  flex: 1;
  min-width: 0;
  margin-left: auto;
}

.page-toolbar--fin .fin-filter-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  align-items: center;
  padding-bottom: 1px;
}

.page-toolbar-extra:empty {
  display: none;
}

.page-toolbar-extra .fin-dim-tabs {
  border-top: 1px solid var(--line);
  border-bottom: none;
  padding: 8px 14px 0;
}

.page-toolbar-panel-tools {
  padding: 0;
  border: none;
  background: transparent;
}

.page-toolbar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 5px 12px;
  border: none;
  border-top: 1px solid var(--line);
  background: var(--surface-dim);
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
}

.page-toolbar-toggle[hidden] {
  display: none !important;
}

.page-toolbar-toggle:hover {
  color: var(--teal);
  background: var(--teal-soft);
}

.fin-page-controls {
  flex-shrink: 0;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.fin-filter-bar {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.fin-filter-fields {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
  margin-left: auto;
}

.fin-filter-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* ── Financial import modal ── */
body.fin-modal-open { overflow: hidden; }

.fin-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.fin-modal[hidden] { display: none !important; }

.fin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
}

.fin-modal-card {
  position: relative;
  width: min(520px, 100%);
  max-height: 88vh;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 128, 117, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: finModalIn 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes finModalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.fin-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff 0%, var(--surface-dim) 100%);
}

.fin-modal-head-text { min-width: 0; }

.fin-modal-head h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
  color: var(--text);
}

.fin-modal-sub {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.fin-modal-body {
  padding: 16px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fin-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface-dim);
}

.fin-import-template-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--teal-soft);
}

.fin-import-template-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(0, 128, 117, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--teal);
  font-size: 20px;
}

.fin-import-template-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fin-import-template-text strong {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
}

.fin-import-template-text span {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.35;
}

.fin-import-dl-btn {
  flex-shrink: 0;
  border: 1px solid var(--teal);
  color: var(--teal-deep);
  background: #fff;
}

.fin-import-dl-btn:hover {
  background: var(--teal-soft);
}

.fin-upload-zone {
  border: 2px dashed var(--line);
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: #fff;
}

.fin-upload-zone:hover,
.fin-upload-zone.drag-over {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.fin-upload-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.fin-upload-picked {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 4px 0;
}

.fin-upload-icon,
.fin-upload-file-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--teal-soft);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 4px;
}

.fin-upload-picked .fin-upload-file-icon { margin-bottom: 0; flex-shrink: 0; }

.fin-upload-title {
  font-size: 12px;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}

.fin-upload-hint {
  font-size: 10px;
  color: var(--muted);
  margin: 0 0 8px;
  line-height: 1.4;
}

.fin-upload-browse {
  border: 1px solid var(--line);
  background: #fff;
}

.fin-upload-file-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fin-upload-filename {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  word-break: break-all;
}

.fin-upload-filesize {
  font-size: 10px;
  color: var(--muted);
}

#finUploadSubmit.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

/* ── Financial export modal (large) ── */
.fin-export-modal {
  padding: 16px;
  align-items: stretch;
}

.fin-export-shell {
  position: relative;
  width: min(1280px, 100%);
  max-height: calc(100vh - 32px);
  margin: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: finModalIn 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.fin-export-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff 0%, var(--surface-dim) 100%);
  flex-shrink: 0;
}

.fin-export-header h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}

.fin-export-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.fin-export-mode {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--teal-deep);
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--teal-soft);
}

.fin-export-change-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-dim);
  color: var(--muted);
  border: 1px solid var(--line);
}

.fin-export-change-badge.has-changes {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.25);
}

.fin-export-body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.fin-export-sidebar {
  width: 248px;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  background: var(--surface-dim);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.fin-export-sidebar-head {
  padding: 12px 14px 8px;
  border-bottom: 1px solid var(--line);
}

.fin-export-sidebar-head h3 {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.fin-export-version-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fin-export-history-empty {
  font-size: 11px;
  color: var(--muted);
  padding: 12px 8px;
  margin: 0;
  line-height: 1.45;
}

.fin-export-version-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.12s, box-shadow 0.12s;
}

.fin-export-version-item:hover {
  border-color: var(--teal);
  box-shadow: 0 2px 8px rgba(0, 128, 117, 0.08);
}

.fin-export-version-item.active {
  border-color: var(--teal);
  background: var(--teal-soft);
  box-shadow: inset 0 0 0 1px rgba(0, 128, 117, 0.12);
}

.fin-export-version-user {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 4px;
}

.fin-export-version-time {
  font-size: 10px;
  color: var(--muted);
}

.fin-export-version-meta {
  font-size: 10px;
  color: var(--text-2);
  line-height: 1.35;
}

.fin-export-version-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.fin-export-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.fin-export-controls {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  flex-shrink: 0;
}

.fin-export-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
}

.fin-export-field-grow {
  flex: 1;
  min-width: 200px;
}

.fin-export-field > span {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.fin-export-table-wrap {
  flex: 1;
  overflow: auto;
  padding: 0;
  min-height: 280px;
  background: #fff;
}

.fin-export-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.fin-export-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.fin-export-table th {
  padding: 8px 10px;
  text-align: left;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--surface-dim);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.fin-export-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fin-export-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.fin-export-table td[contenteditable] {
  cursor: text;
  background: #fff;
  outline: none;
}

.fin-export-table td[contenteditable]:focus {
  box-shadow: inset 0 0 0 2px var(--teal);
  background: #fff;
}

.fin-export-table tr.fin-export-section td {
  font-weight: 700;
  font-size: 10px;
  color: var(--teal-deep);
  background: var(--surface-dim);
  padding: 8px 10px;
}

.fin-export-table tr.fin-export-sum td {
  font-weight: 600;
  background: #fafbfc;
}

.fin-export-cell-changed {
  background: rgba(254, 226, 226, 0.85) !important;
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.45);
  position: relative;
}

.fin-export-cell-changed:hover {
  background: rgba(254, 202, 202, 0.95) !important;
  cursor: help;
}

.fin-export-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface-dim);
  flex-shrink: 0;
}

#finExportConfirm:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.fin-filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}

.fin-filter-field.required .fin-filter-input:invalid,
.fin-filter-bar.fin-filter-invalid .fin-filter-field.required .fin-filter-input {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.12);
}

.fin-filter-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.fin-filter-required {
  color: #ef4444;
  margin-left: 2px;
}

.fin-filter-input,
.fin-filter-select {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 11px;
  background: #fff;
  min-width: 130px;
}

.fin-dim-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 14px 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.fin-dim-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  border-radius: 8px 8px 0 0;
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  flex-shrink: 0;
}

.fin-dim-tab:hover { color: var(--text-2); background: var(--surface-dim); }
.fin-dim-tab.active {
  color: var(--teal);
  font-weight: 600;
  border-bottom-color: var(--teal);
  background: #fff;
}

.fin-dim-tab i { font-size: 13px; }

.fin-dashboard {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  min-height: 0;
  overflow-y: auto;
}

.fin-kpi-strip {
  display: grid;
  gap: 0;
  flex: 0 0 auto;
  min-height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}
.fin-kpi-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  padding: 4px 10px;
  min-height: 40px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.fin-kpi-cell:last-child { border-right: none; }
.fin-kpi-label {
  font-size: 9px;
  line-height: 1.2;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fin-kpi-metrics {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.fin-kpi-value {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}
.fin-kpi-delta {
  font-size: 9px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
}
.fin-kpi-delta.up { background: var(--teal-soft); color: var(--up); }
.fin-kpi-delta.down { background: #fef2f2; color: var(--down); }

/* Override module-canvas child flex — KPI / report / charts stack correctly */
.fin-report-layout > .fin-kpi-strip {
  flex: 0 0 auto;
  min-height: auto;
}
.fin-report-layout > .fin-report-panel {
  flex: 1 1 auto;
  min-height: 0;
}
.fin-report-layout > .fin-charts-row {
  flex: 0 0 auto;
  min-height: 220px;
}

.fin-report-layout {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  min-height: 0;
  overflow: hidden;
}

.fin-kpi-strip {
  border-bottom: 1px solid var(--line);
  padding: 8px 14px;
  background: #fff;
}

.fin-report-panel {
  flex: 1 1 auto;
  border: none;
  border-radius: 0;
  background: #fff;
  min-height: 0;
  max-height: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.formula-editor {
  width: 100%;
  min-height: 72px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 11px;
  line-height: 1.5;
  resize: vertical;
  background: var(--surface-dim);
}
.formula-editor:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 2px var(--teal-soft);
}

.fin-tabulator-wrap {
  flex: 1 1 auto;
  min-height: 280px;
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  flex-direction: column;
}

.fin-tabulator-wrap .tabulator {
  flex: 1;
  border: none;
  background: #fff;
  min-width: max(100%, 2200px);
}

.fin-report-layout > .fin-extra-panel {
  flex: 0 0 auto;
  min-height: auto;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.fin-report-layout > .fin-charts-area {
  flex: 0 0 auto;
  min-height: auto;
  padding: 0;
  border-top: none;
  background: transparent;
}

.fin-extra-panel:empty { display: none; }

.fin-extra-compact .panel-body { padding: 8px 10px; }
.fin-extra-compact .panel-head { padding: 6px 10px; }
.fin-extra-compact .panel-head h2 { font-size: 11px; }

.lifecycle-arrow {
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  flex-shrink: 0;
}

.fin-alert-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fin-alert {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 500;
}
.fin-alert-warn { background: #fef3c7; color: #b45309; }
.fin-alert-info { background: var(--teal-soft); color: var(--teal-deep); }

.fin-mini-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.fin-mini-card {
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.fin-mini-label { font-size: 9px; color: var(--muted); margin-bottom: 2px; }
.fin-mini-value { font-size: 16px; font-weight: 700; color: var(--teal); }
.fin-mini-sub { font-size: 9px; color: var(--muted); margin-top: 2px; }

.fin-info-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--surface-dim);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 10px;
  color: var(--text-2);
}
.fin-info-strip i { color: var(--teal); font-size: 14px; }

.fin-campaign-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.fin-campaign-card {
  position: relative;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.fin-campaign-card.highlight { border-color: var(--teal); background: var(--teal-soft); }
.fin-campaign-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 8px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--teal);
  color: #fff;
}
.fin-campaign-name { font-size: 10px; font-weight: 600; margin-bottom: 4px; }
.fin-campaign-stats { display: flex; gap: 10px; font-size: 9px; color: var(--text-2); }

.fin-variance-pills {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.fin-variance-pill {
  padding: 6px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  text-align: center;
}
.fin-variance-pill.down { border-color: #fecaca; background: #fef2f2; }
.fin-pill-label { display: block; font-size: 9px; color: var(--muted); }
.fin-pill-value { display: block; font-size: 12px; font-weight: 700; margin-top: 2px; }

.fin-charts-area .fin-charts-row {
  display: grid;
  gap: 10px;
  flex: 0 0 auto;
  min-height: 220px;
}
.fin-charts-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.fin-charts-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.fin-chart-wide { grid-column: span 1; }

.fin-charts-row .chart-cell { min-height: 200px; display: flex; flex-direction: column; }
.fin-charts-row .chart-slot { flex: 1; min-height: 160px; }
.fin-charts-area .chart-slot-sm {
  min-height: 180px;
  height: 180px;
}

/* Statistical report table */
.fin-report-panel .panel-head {
  flex-wrap: wrap;
  gap: 4px 12px;
}
.fin-report-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  width: 100%;
  font-size: 9px;
  color: var(--muted);
  padding-top: 2px;
}
.fin-rpt-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
}
.fin-rpt-meta-item::before {
  content: '·';
  margin-right: 6px;
  color: var(--line);
}
.fin-rpt-meta-item:first-child::before { content: none; margin: 0; }

.fin-tabulator-wrap .tabulator .tabulator-header .tabulator-col-group .tabulator-col-group-cols {
  border-top: 1px solid var(--line);
}
.fin-tabulator-wrap .tabulator .tabulator-header .tabulator-col-group .tabulator-col-group-title {
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  padding: 5px 8px;
  background: var(--surface-dim);
  color: var(--text-2);
}

.tabulator-row.fin-rpt-section-row {
  background: var(--surface-dim) !important;
  border-top: 2px solid var(--line);
}
.tabulator-row.fin-rpt-section-row .tabulator-cell {
  font-weight: 600;
  color: var(--teal-deep);
}
.fin-rpt-section-text {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.tabulator-row.fin-rpt-subtotal-row {
  background: #f8fafb !important;
  border-top: 1px solid var(--line);
}
.tabulator-row.fin-rpt-total-row {
  background: var(--teal-soft) !important;
  border-top: 2px solid var(--teal);
  font-weight: 700;
}
.fin-rpt-sum-label {
  font-weight: 600;
  font-size: 10px;
}

.fin-charts-grid { display: grid; gap: 12px; min-height: 0; }
.fin-charts-2 { grid-template-columns: 1fr 1fr; }
.fin-charts-3 { grid-template-columns: repeat(3, 1fr); }

.fin-charts-grid .panel,
.fin-table-panel,
.fin-lifecycle-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  min-height: 0;
}

.fin-variance-layout { grid-template-columns: 200px minmax(0, 1.4fr) minmax(260px, 1fr); }

.fin-hub-section { padding: 14px; }
.fin-hub-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--text-2);
}
.fin-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.fin-hub-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.fin-hub-card:hover {
  border-color: var(--teal);
  box-shadow: 0 4px 20px rgba(0, 128, 117, 0.1);
  transform: translateY(-2px);
}
.fin-hub-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--teal-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  font-size: 18px;
}
.fin-hub-card h3 { font-size: 12px; font-weight: 600; letter-spacing: -0.02em; }
.fin-hub-card p { font-size: 10px; color: var(--muted); line-height: 1.5; flex: 1; }
.fin-hub-arrow { position: absolute; top: 14px; right: 14px; color: var(--muted); font-size: 14px; }

.formula-cell {
  font-size: 9px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ind-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 14px 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  flex-shrink: 0;
}

.ind-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  border-radius: 8px 8px 0 0;
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.ind-tab:hover { color: var(--text-2); background: var(--surface-dim); }
.ind-tab.active {
  color: var(--teal);
  font-weight: 600;
  border-bottom-color: var(--teal);
  background: #fff;
}

.ind-tab-panel { display: none; flex: 1; min-height: 0; }
.ind-tab-panel.active { display: flex; flex-direction: column; min-height: 0; }

.ind-tab-panel .module-split { flex: 1; min-height: 0; }

.ind-dep-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) minmax(240px, 320px);
  gap: 12px;
  padding: 14px;
  flex: 1;
  min-height: 0;
}

.ind-dep-chart {
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.ind-edit-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.ind-edit-row input,
.ind-edit-row select {
  flex: 1;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 11px;
}

.ind-note {
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.4;
}

.tabulator {
  font-family: var(--font);
  font-size: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.tabulator .tabulator-header { background: var(--surface-dim); border-bottom: 1px solid var(--line); }
.tabulator .tabulator-header .tabulator-col { background: var(--surface-dim); border-right: none; }
.tabulator .tabulator-header .tabulator-col .tabulator-col-title {
  font-size: 9px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--muted); padding: 8px 10px;
}

.tabulator .tabulator-tableholder .tabulator-table .tabulator-row {
  border-bottom: 1px solid var(--line); min-height: 32px;
}

.tabulator .tabulator-tableholder .tabulator-table .tabulator-row .tabulator-cell {
  padding: 8px 10px; border-right: none; color: var(--text-2);
}

.tabulator .tabulator-tableholder .tabulator-table .tabulator-row:hover {
  background: var(--surface-dim);
}

.lifecycle-flow { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.lifecycle-step {
  flex: 1; min-width: 120px; padding: 12px; background: var(--surface-dim);
  border-radius: 12px; display: flex; flex-direction: column; gap: 6px;
}
.lifecycle-phase { font-size: 14px; font-weight: 700; color: var(--teal); }
.lifecycle-label { font-size: 9px; color: var(--muted); line-height: 1.3; }
.lifecycle-bar { height: 4px; background: var(--line); border-radius: 999px; overflow: hidden; }
.lifecycle-fill { height: 100%; width: var(--w); background: var(--teal); border-radius: 999px; }
.lifecycle-meta { display: flex; justify-content: space-between; font-size: 9px; color: var(--text-2); }

.upload-zone {
  border: 2px dashed var(--line); border-radius: 12px; padding: 32px 20px;
  text-align: center; margin-bottom: 16px;
}
.upload-zone:hover { border-color: var(--teal-mid); }
.upload-zone i { font-size: 32px; color: var(--teal); margin-bottom: 8px; display: block; }
.upload-zone h4 { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.upload-zone p { font-size: 10px; color: var(--muted); margin-bottom: 12px; }
.upload-form { display: flex; flex-direction: column; gap: 10px; }

.collab-feed { display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 0; overflow-y: auto; }
.collab-message { display: flex; gap: 10px; padding: 10px; background: var(--surface-dim); border-radius: 12px; }
.collab-message-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.collab-message-head strong { font-size: 11px; }
.collab-message-body p { font-size: 11px; color: var(--text-2); line-height: 1.45; }
.collab-time { font-size: 9px; color: var(--muted); margin-left: auto; }
.collab-compose { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); flex-shrink: 0; }
.collab-compose input {
  flex: 1; height: 32px; padding: 0 12px; border: 1px solid var(--line);
  border-radius: 999px; font: inherit; font-size: 11px;
}

.task-list { display: flex; flex-direction: column; gap: 8px; }
.task-card { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.task-card.status-done { opacity: 0.7; }
.task-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.task-priority { font-size: 9px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.task-status { font-size: 9px; color: var(--muted); }
.task-card h4 { font-size: 12px; font-weight: 600; margin-bottom: 8px; line-height: 1.35; }
.task-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 10px; color: var(--muted); }
.task-meta span, .task-link { display: inline-flex; align-items: center; gap: 4px; }
.task-link { color: var(--teal); text-decoration: none; font-weight: 500; }
.task-link:hover { text-decoration: underline; }

.cockpit-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 12px;
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  min-height: 42px;
}

.cockpit-dim-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 0 0;
  overflow-x: auto;
  scrollbar-width: thin;
  flex: 1;
  min-width: 0;
}

.cockpit-dim-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  border-radius: 8px 8px 0 0;
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  flex-shrink: 0;
}

.cockpit-dim-tab:hover {
  color: var(--text-2);
  background: var(--surface-dim);
}

.cockpit-dim-tab.active {
  color: var(--teal);
  font-weight: 600;
  border-bottom-color: var(--teal);
  background: #fff;
}

.cockpit-dim-tab i { font-size: 13px; }

.cockpit-menu-shortcuts {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0 8px;
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.cockpit-shortcut {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 52px;
  min-width: 52px;
  padding: 6px 4px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-2);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s, box-shadow 0.15s;
}

.cockpit-shortcut:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-soft);
  box-shadow: 0 2px 8px rgba(0, 128, 117, 0.08);
}

.cockpit-shortcut i {
  font-size: 18px;
  line-height: 1;
}

.cockpit-shortcut-label {
  font-size: 8px;
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .cockpit-shortcut-label { display: none; }
  .cockpit-shortcut { width: 36px; min-width: 36px; padding: 6px; }
}

/* RBAC — organization, roles, permissions, menus */
.rbac-summary {
  display: flex;
  gap: 12px;
  padding: 0 16px 12px;
  flex-wrap: wrap;
}
.rbac-stat {
  flex: 1;
  min-width: 100px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.rbac-stat-val {
  display: block;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--teal);
}
.rbac-stat-label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.rbac-user-switch { flex-shrink: 0; }
.rbac-select { max-width: 220px; font-size: 11px; }
.rbac-tree-node,
.rbac-menu-node {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  padding-left: calc(10px + var(--depth, 0) * 14px);
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.12s;
}
.rbac-tree-node:hover,
.rbac-menu-node:hover { background: var(--surface-dim); }
.rbac-tree-node.active,
.rbac-menu-node.active {
  background: rgba(0, 128, 117, 0.1);
  color: var(--teal);
  font-weight: 600;
}
.rbac-tree-node small,
.rbac-menu-node code {
  margin-left: auto;
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
}
.rbac-menu-node.module { font-weight: 600; }
.rbac-menu-children { margin-bottom: 4px; }
.rbac-menu-module { margin-bottom: 8px; }
.rbac-role-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.rbac-role-card:hover { border-color: var(--teal); }
.rbac-role-card.active {
  border-color: var(--teal);
  box-shadow: 0 0 0 1px var(--teal);
}
.rbac-role-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.rbac-role-card code { font-size: 10px; color: var(--muted); }
.rbac-role-card p {
  font-size: 11px;
  color: var(--text-2);
  margin: 6px 0 4px;
  line-height: 1.4;
}
.rbac-perm-group { margin-bottom: 16px; }
.rbac-perm-group h4 {
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-2);
}
.rbac-perm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rbac-perm-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 10px;
  cursor: pointer;
  background: #fff;
  max-width: 200px;
}
.rbac-perm-chip.on {
  border-color: var(--teal);
  background: rgba(0, 128, 117, 0.06);
}
.rbac-perm-chip input { display: none; }
.rbac-perm-chip code { color: var(--muted); font-size: 9px; }
.rbac-cat-block { margin-bottom: 14px; }
.rbac-cat-block h4 { font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.rbac-cat-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 11px;
  line-height: 1.6;
}
.rbac-cat-list code {
  font-size: 10px;
  color: var(--teal);
  margin-right: 4px;
}
.detail-list {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 8px 12px;
  font-size: 12px;
  margin-bottom: 12px;
}
.detail-list dt { color: var(--muted); font-weight: 500; }
.detail-list dd { margin: 0; }
.rbac-user-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar.lg { width: 40px; height: 40px; font-size: 16px; }
.rbac-user-cell { display: inline-flex; align-items: center; gap: 8px; }
.rbac-perm-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 10px 0 14px;
  font-size: 9px;
}
.rbac-perm-preview code {
  padding: 2px 6px;
  background: var(--surface-dim);
  border-radius: 4px;
}
.rbac-roles-layout {
  display: flex;
  align-items: stretch;
  min-height: 0;
  flex: 1 1 auto;
  height: 100%;
  overflow: hidden;
}
.rbac-roles-main {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  min-height: 0;
  align-self: stretch;
}
.rbac-roles-list-panel {
  border-right: 1px solid var(--line);
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.rbac-roles-list-panel .panel-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.rbac-roles-menu-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.rbac-roles-menu-panel .panel-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.btn-sm { padding: 4px 10px; font-size: 11px; }
.btn-xs { padding: 2px 6px; font-size: 10px; }
.btn-danger {
  color: #b42318;
  border-color: rgba(180, 35, 24, 0.35);
  background: rgba(180, 35, 24, 0.06);
}
.btn-danger:hover { background: rgba(180, 35, 24, 0.12); }
.panel-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.ref-banner > span { flex: 1; min-width: 200px; }
.admin-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.admin-field { display: flex; flex-direction: column; gap: 4px; font-size: 11px; }
.admin-field > span { color: var(--muted); font-weight: 500; }
.admin-field .input,
.admin-field .select,
.admin-field textarea { width: 100%; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; }
.admin-subhead { font-size: 11px; font-weight: 600; margin: 12px 0 6px; }
.rbac-menu-editor-inline {
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--surface-dim, #f8fafc);
}
.admin-modal-card--wide .rbac-menu-editor-inline {
  max-height: min(360px, 40vh);
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.admin-modal[hidden] { display: none !important; }
.admin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.admin-modal-card {
  position: relative;
  width: min(480px, 100%);
  max-height: 85vh;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
}
.admin-modal-card--wide {
  width: min(640px, 100%);
}
.admin-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.admin-modal-head h3 { font-size: 14px; font-weight: 600; margin: 0; }
.admin-modal-body { padding: 16px; overflow-y: auto; }
.admin-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}
.rbac-perm-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.rbac-perm-group-head h4 { margin: 0; }
.rbac-cat-item { cursor: pointer; border-radius: 4px; padding: 2px 4px; }
.rbac-cat-item:hover { background: var(--surface-dim); }
.rbac-cat-item.active { background: rgba(0, 128, 117, 0.1); }
.rbac-menu-role-module {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.rbac-menu-role-mod-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.rbac-menu-role-mod {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.rbac-menu-role-pages {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 8px;
}
.rbac-menu-role-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 11px;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.rbac-menu-role-item:hover { background: var(--surface-dim); }
.rbac-menu-role-item.on {
  border-color: rgba(0, 128, 117, 0.35);
  background: rgba(0, 128, 117, 0.06);
}
.rbac-menu-role-item input { flex-shrink: 0; }
.rbac-menu-role-item code {
  margin-left: auto;
  font-size: 9px;
  color: var(--muted);
}
.data-table tbody tr { cursor: pointer; }
.data-table tbody tr.selected { background: rgba(0, 128, 117, 0.08); }

/* —— Domain / Statement / Platform (功能清单重构) —— */
.domain-banner {
  align-items: flex-start;
  gap: 12px;
  flex: 0 0 auto !important;
  min-height: auto !important;
  margin: 10px 12px 0;
}

#domainMain,
#statementMain {
  display: flex;
  flex-direction: column;
  padding: 10px 12px 12px;
  min-height: 0;
}

#domainMain > .domain-panel,
#domainMain > .domain-dash-grid,
#statementMain > .domain-panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.domain-banner-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.domain-banner-text strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.domain-banner-text span {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.45;
}
.domain-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
}
.domain-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-dim);
}
.domain-meta-row .chip {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-deep);
}
.domain-points {
  margin: 0;
  padding: 12px 18px 16px 32px;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.55;
}
.domain-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.domain-kpi-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: linear-gradient(180deg, #fff, var(--surface-dim));
}
.domain-kpi-card-label {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}
.domain-kpi-card-value {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.03em;
  color: var(--text);
}
.domain-kpi-card-value span {
  margin-left: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.domain-kpi-card-change {
  margin-top: 6px;
  font-size: 12px;
  color: var(--teal);
}
.domain-formula-box {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.domain-formula-box h3 {
  font-size: 12px;
  margin: 0 0 8px;
}
.domain-formula-box p {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.5;
}
.domain-formula-box .muted { color: var(--muted); }
.domain-dash-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
}
.domain-dash-wide { grid-column: 1 / -1; }
.domain-chart {
  height: 260px;
  width: 100%;
}
.domain-chart--sm { height: 220px; }
.fin-kpi-value small {
  margin-left: 4px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}
.statement-table .th-sub {
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
}
.statement-table .stmt-fc {
  display: block;
  font-weight: 600;
}
.statement-table .stmt-ac {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.statement-table tr.is-bold td {
  font-weight: 650;
}

/* —— PL-Vehicle (Excel PL-Vehicle layout) —— */
.plv-layout {
  --plv-teal: var(--teal, #008075);
  --plv-teal-soft: rgba(0, 128, 117, 0.08);
  --plv-ac: #0f172a;
  --plv-fc: #94a3b8;
  --plv-surface: #fff;
  --plv-chrome-bg: linear-gradient(180deg, #f8fafb 0%, #fff 100%);
}

.plv-chrome {
  flex-shrink: 0;
  background: var(--plv-chrome-bg);
  border-bottom: 1px solid var(--line);
}

.plv-scope-switch {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 16px 8px;
  border-bottom: 1px solid var(--line);
}

/* Dimension tabs — same chrome as Dashboard Vehicle PC */
.plv-chrome > .workspace-tabs.plv-dim-tabs {
  padding: 0 16px;
  min-height: 40px;
  background: var(--plv-surface, #fff);
  border-bottom: 1px solid var(--line);
}

.plv-chrome > .workspace-tabs.plv-dim-tabs .workspace-tab {
  cursor: pointer;
}

.plv-chrome > .workspace-tabs.plv-dim-tabs .workspace-tab-text strong {
  max-width: 180px;
}

.plv-empty {
  text-align: center;
  color: var(--muted);
  padding: 24px 12px !important;
}

.plv-scope-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 30px;
}

.plv-scope-row--single {
  width: 100%;
}

.plv-scope-label {
  flex: 0 0 64px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.plv-scope-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.plv-scope-tab {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 6px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  color: var(--text-2);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.plv-scope-tab:hover:not(.is-active) {
  background: rgba(15, 23, 42, 0.04);
  color: var(--text);
}

.plv-scope-tab.is-active {
  border-color: var(--plv-teal);
  color: var(--plv-teal);
  background: var(--plv-teal-soft);
  font-weight: 600;
}

.plv-toolbar {
  padding: 8px 16px 10px;
}

.plv-filters {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.plv-filter-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: flex-end;
}

.plv-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.plv-field > span {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.plv-field .select,
.plv-field input.select {
  min-width: 118px;
  height: 32px;
  padding: 0 28px 0 10px;
  font-size: 12px;
  border-radius: 8px;
  background-color: var(--plv-surface);
}

.plv-field input.select {
  padding-right: 10px;
}

.plv-filter-legend {
  display: flex;
  align-items: center;
  min-height: 32px;
  margin-left: auto;
}

.plv-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.03);
  font-size: 11px;
  color: var(--text-2);
}

.plv-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.plv-swatch {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

.plv-swatch--ac { background: var(--plv-ac); }
.plv-swatch--fc { background: var(--plv-fc); }

/* KPI strip */
.plv-kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  background: var(--plv-surface);
  border-bottom: 1px solid var(--line);
}

.plv-kpi {
  padding: 12px 16px;
  border-right: 1px solid var(--line);
  min-width: 0;
}

.plv-kpi:last-child { border-right: none; }

.plv-kpi-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plv-kpi-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--plv-ac);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plv-kpi-value small {
  margin-left: 5px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}

/* Main panel */
.plv-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.plv-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  background: var(--plv-surface);
}

.plv-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--plv-surface);
  flex-shrink: 0;
}

.plv-panel-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.plv-panel-title h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.plv-panel-scope {
  display: inline-flex;
  align-items: center;
  max-width: 280px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--plv-teal-soft);
  color: var(--plv-teal);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plv-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.plv-panel-actions .btn[disabled] {
  opacity: 0.45;
  pointer-events: none;
}

.plv-panel-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0;
}

.plv-section {
  margin: 0;
}

.plv-section + .plv-section {
  border-top: 1px solid var(--line);
}

.plv-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  background: #f8fafb;
  border-bottom: 1px solid var(--line);
}

.plv-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.plv-section-meta {
  font-size: 11px;
  color: var(--muted);
}

/* Table */
.plv-table-wrap {
  height: 100%;
  max-height: none;
  overflow: auto;
  background: var(--plv-surface);
}

.plv-table {
  table-layout: fixed;
  width: 100%;
  min-width: 1180px;
  background: var(--plv-surface);
  border-collapse: separate;
  border-spacing: 0;
}

.plv-table .plv-col-label { width: 300px; }
.plv-table .plv-col-month { width: 72px; }
.plv-table .plv-col-total { width: 88px; }

.plv-table th,
.plv-table td {
  background: var(--plv-surface);
  box-sizing: border-box;
  border-bottom: 1px solid #f1f5f9;
  padding: 7px 8px;
}

.plv-table td:not(.row-label) {
  width: 72px;
  white-space: nowrap;
  overflow: hidden;
  text-align: right;
  vertical-align: top;
  font-variant-numeric: tabular-nums;
}

.plv-table td.plv-total-col {
  width: 88px;
}

.plv-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafb;
  box-shadow: 0 1px 0 var(--line);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
  padding: 8px;
  border-bottom: 1px solid var(--line);
}

.plv-table thead th:not(:first-child) {
  text-align: right;
}

.plv-table th:first-child,
.plv-table td.row-label {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 300px;
  min-width: 300px;
  max-width: 300px;
  background: var(--plv-surface);
  overflow: hidden;
}

.plv-table thead th:first-child {
  z-index: 3;
  text-align: left;
  background: #f8fafb;
}

.plv-val {
  display: block;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.plv-val--excel {
  color: var(--plv-ac, #0f172a);
  font-weight: 600;
  font-size: 12px;
}

.plv-label-inner {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.plv-toggle {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--plv-teal);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.plv-toggle:hover {
  background: var(--plv-teal-soft);
  color: var(--plv-teal);
}

.plv-toggle-spacer {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}

.plv-label-text {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.plv-row-label .plv-en {
  display: block;
  font-size: 12px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plv-row-label .plv-zh {
  display: block;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.2;
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plv-table tr.plv-parent {
  cursor: pointer;
}

.plv-table tr.plv-parent:hover td {
  filter: brightness(0.985);
}

/* Green bar only on expandable parents */
.plv-table tr.plv-parent > td.row-label {
  box-shadow: inset 3px 0 0 var(--plv-teal);
}

.plv-table tr.plv-gap td {
  height: 10px;
  padding: 0;
  border: none;
  background: transparent;
}

.plv-table tr.plv-col-b td.row-label .plv-en {
  font-weight: 500;
}

.plv-row-label .plv-zh--solo {
  color: var(--text);
  font-size: 12px;
}

.plv-table--excel .plv-label-inner {
  padding-right: 8px;
}

/* Excel gray fill rows (theme tint ~-0.25) — full rule after .plv-total-col */

.plv-table tr.plv-section-row:not(.plv-shaded) > td {
  background: #f3faf8;
}

.plv-table tr.is-bold td {
  font-weight: 650;
}

.plv-table tr.plv-total:not(.plv-shaded) > td {
  border-top: 1px solid var(--line);
}

.plv-table tr.plv-level-2 > td {
  color: #475569;
}

.plv-total-col {
  font-weight: 600;
  background: #fafbfc !important;
  color: var(--text);
  box-shadow: inset 1px 0 0 var(--line);
}

.plv-table tr.plv-shaded > td,
.plv-table tr.plv-shaded > td.row-label,
.plv-table tr.plv-shaded > td.plv-total-col {
  background: rgba(0, 128, 117, 0.08) !important;
}

.plv-table thead th.plv-total-col,
.plv-table thead th:last-child {
  background: #f1f5f9;
}

.fin-board .module-canvas.plv-layout > .plv-chrome,
.fin-board .module-canvas.plv-layout > .plv-kpi-strip {
  flex-shrink: 0;
}

.fin-board .module-canvas.plv-layout > .fin-report-panel,
.fin-board .module-canvas.plv-layout > .plv-main {
  min-height: 0;
}

@media (max-width: 1100px) {
  .plv-kpi-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .plv-kpi:nth-child(3) { border-right: none; }
  .plv-kpi:nth-child(n + 4) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 720px) {
  .plv-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .plv-kpi:nth-child(2n) { border-right: none; }
  .plv-kpi:nth-child(3) { border-right: 1px solid var(--line); }
  .plv-scope-label {
    flex-basis: 100%;
  }
  .plv-filter-legend {
    margin-left: 0;
    width: 100%;
  }
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--text-2);
}
.plat-check-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.plat-check {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-dim);
}
.plat-side-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.plat-side-item {
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
}
.plat-side-item:hover { background: var(--surface-dim); }
.plat-side-item.active {
  background: var(--teal-soft);
  color: var(--teal-deep);
  border-color: rgba(0, 128, 117, 0.18);
  font-weight: 600;
}
.panel-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.data-table td.row-label {
  font-weight: 550;
  color: var(--text);
}
@media (max-width: 1100px) {
  .domain-dash-grid { grid-template-columns: 1fr; }
}

/* Platform pages: banner stays compact above canvas */
.module-board > .ref-banner {
  flex: 0 0 auto;
  min-height: auto;
}


/* Domain data entry */
.domain-edit-cell {
  outline: none;
  background: rgba(0, 128, 117, 0.04);
  cursor: text;
}
.domain-edit-cell:focus {
  background: rgba(0, 128, 117, 0.1);
  box-shadow: inset 0 0 0 1px rgba(0, 128, 117, 0.35);
}
.domain-data-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 4px;
}
.domain-data-foot .muted {
  font-size: 10px;
  color: var(--muted);
}
.chip-active {
  color: var(--teal);
  background: var(--teal-soft);
  border-color: rgba(0, 128, 117, 0.25);
}
.domain-panel .panel-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* P&L · Data upload records */
body.pld-mode #domainKpis { display: none !important; }
body.pld-mode .fin-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
body.pld-mode #pldFilterTitle,
body.pld-mode #pldFilterUploader { min-width: 180px; }

.pld-date-range {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pld-date-range span {
  color: var(--muted);
  font-size: 11px;
  flex-shrink: 0;
}

.pld-date-range .select {
  min-width: 132px;
}

body.pld-mode .fin-filter-bar {
  align-items: flex-end;
}

body.pld-mode .fin-filter-bar > .btn {
  margin-bottom: 1px;
}

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

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

.pld-head-title h2 { margin: 0; }

.pld-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--teal-deep);
  background: var(--teal-soft);
  border-radius: 999px;
  padding: 2px 8px;
}

.pld-table-wrap { min-height: 240px; }

.pld-table td.muted { color: var(--muted); font-variant-numeric: tabular-nums; }

.pld-title-cell {
  font-weight: 600;
  color: var(--text);
}

.pld-version {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--surface-dim);
  border: 1px solid var(--line);
  color: var(--text-2);
}

.pld-type-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--teal-deep);
  background: var(--teal-soft);
  border-radius: 999px;
  padding: 3px 9px 3px 7px;
  white-space: nowrap;
}

.pld-type-chip i { font-size: 13px; }

.pld-table tbody tr.is-disabled td {
  opacity: 0.55;
}

.pld-switch {
  position: relative;
  display: inline-flex;
  width: 36px;
  height: 20px;
  cursor: pointer;
  vertical-align: middle;
}

.pld-switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.pld-switch input:disabled { cursor: default; }

.pld-switch-ui {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #d1d5db;
  position: relative;
  transition: background 0.16s ease;
  pointer-events: none;
}

.pld-switch-ui::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
  transition: transform 0.16s ease;
}

.pld-switch input:checked + .pld-switch-ui { background: var(--teal); }
.pld-switch input:checked + .pld-switch-ui::after { transform: translateX(16px); }
.pld-switch input:focus-visible + .pld-switch-ui { box-shadow: 0 0 0 3px rgba(0, 128, 117, 0.22); }
.pld-switch input:disabled + .pld-switch-ui { opacity: 0.6; }

.pld-del-btn { color: #b42318; }
.pld-del-btn:hover { background: rgba(180, 35, 24, 0.08); }

.pld-form-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
}

.pld-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, var(--surface-dim));
}

.pld-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  min-width: 0;
}

.pld-field > span {
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.pld-field .select,
.pld-field input.select {
  width: 100%;
}

.pld-field input:disabled,
.pld-field select:disabled {
  background: var(--surface-dim);
  color: var(--text-2);
  cursor: default;
}

.pld-data-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.pld-data-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-dim);
}

.pld-data-head-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pld-data-head-text h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.pld-data-head-text span {
  font-size: 11px;
  color: var(--muted);
}

.pld-data-wrap {
  max-height: min(52vh, 520px);
  overflow: auto;
}

.pld-data-table .pld-cell-input {
  width: 100%;
  min-width: 72px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: rgba(0, 128, 117, 0.04);
  font: inherit;
  font-size: 11px;
  color: var(--text);
  padding: 0 8px;
}

.pld-data-table td.num .pld-cell-input {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.pld-data-table .pld-cell-input:hover {
  border-color: rgba(0, 128, 117, 0.25);
}

.pld-data-table .pld-cell-input:focus {
  outline: none;
  background: #fff;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 128, 117, 0.12);
}

.pld-type-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 220px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--surface-dim);
  color: var(--muted);
  text-align: center;
  padding: 28px 16px;
}

.pld-type-placeholder i {
  font-size: 28px;
  color: var(--teal);
  margin-bottom: 4px;
}

.pld-type-placeholder strong {
  font-size: 13px;
  color: var(--text);
}

.pld-type-placeholder span {
  font-size: 11px;
  max-width: 360px;
  line-height: 1.45;
}

.pld-confirm-card { width: min(420px, 100%) !important; }
.pld-confirm-msg { margin: 0; font-size: 13px; color: var(--text-2); line-height: 1.5; }

@media (max-width: 900px) {
  .pld-meta-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .pld-meta-grid { grid-template-columns: 1fr; }
}

/* Admin / master list meta columns */
.cell-desc {
  display: inline-block;
  max-width: min(280px, 36vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-2);
  font-size: 12px;
  vertical-align: bottom;
}
.rbac-role-table-wrap {
  max-height: none;
}
.rbac-role-table-wrap .data-table tbody tr {
  cursor: pointer;
}
.rbac-role-table-wrap .data-table tbody tr.selected {
  background: var(--teal-soft);
}
.data-table tbody tr.selected td {
  background: transparent;
}

/* Forecast management */
.status-info { background: #e0f2fe; color: #0369a1; }
.status-danger { background: #fee2e2; color: #b91c1c; }
.form-grid-3 { grid-template-columns: repeat(3, 1fr); }
.fc-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 120px;
}
.fc-progress-ring {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  background: conic-gradient(var(--teal) calc(var(--p) * 1%), var(--surface-dim) 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
}
.fc-progress-meta { flex: 1; min-width: 0; }
.fc-progress-meta strong { font-size: 12px; font-weight: 600; }
.fc-progress-meta .progress { margin: 4px 0 0; }
.fc-actions { white-space: nowrap; }
.fc-actions .btn { padding: 4px 6px; }
body.fc-modal-open { overflow: hidden; }
.fc-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.fc-modal[hidden] { display: none !important; }
.fc-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.fc-modal-card {
  position: relative;
  width: min(760px, 100%);
  max-height: 90vh;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
}
.fc-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.fc-modal-head h3 { font-size: 14px; font-weight: 600; margin: 0; }
.fc-modal-body { padding: 16px; overflow-y: auto; }
.fc-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}
.fc-modal-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 10px;
}
.fc-modal-section-head h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}
.fc-line-table-wrap { max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.fc-line-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  cursor: pointer;
}
.fc-line-table tr.fc-line-off { opacity: 0.45; }
.fc-line-table .select-sm {
  width: 100%;
  min-width: 0;
  font-size: 12px;
  padding: 4px 8px;
  height: 30px;
}
.fc-confirm-msg { font-size: 13px; line-height: 1.5; margin: 0; }

.fc-chase-msg {
  width: 100%;
  min-height: 96px;
  height: auto;
  resize: vertical;
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
  padding: 10px 12px;
  box-sizing: border-box;
}
.fc-chase-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.fc-chase-field label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
}
.fc-chase-people {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-dim, #f8fafc);
}
.fc-chase-person {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  margin: 0;
}
.fc-chase-person input { flex-shrink: 0; }
.fc-chase-person-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fc-chase-person-main strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.fc-chase-person-main em {
  font-style: normal;
  font-size: 11px;
  color: var(--text-2);
}

/* Notification bell */
.notif-bell-wrap {
  position: relative;
}
.notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, calc(100vw - 24px));
  max-height: min(420px, 70vh);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.notif-panel[hidden] { display: none !important; }
.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.notif-panel-head strong {
  font-size: 13px;
  font-weight: 600;
}
.notif-panel-list {
  overflow-y: auto;
  padding: 6px;
}
.notif-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.notif-item:hover { background: var(--surface-dim, #f8fafc); }
.notif-item.is-unread {
  background: color-mix(in srgb, var(--teal) 8%, #fff);
}
.notif-item-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.notif-item-top strong {
  font-size: 12px;
  font-weight: 600;
}
.notif-item-top time {
  font-size: 10px;
  color: var(--text-2);
  white-space: nowrap;
}
.notif-item-body {
  margin: 6px 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 10px;
  color: var(--text-2);
}
.notif-empty {
  padding: 28px 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-2);
}
.notif-bell-wrap .badge[hidden] { display: none !important; }

.fc-official-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 4px;
  background: #ecfdf5;
  color: #047857;
  vertical-align: middle;
}
.fc-fill-scope {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-2);
  font-weight: 400;
}

.fc-fill-modal-card {
  width: min(1080px, 96vw);
  max-height: 92vh;
}
.fc-fill-sheet-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.fc-fill-sheet-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  font-size: 12px;
  color: var(--text-2);
}
.fc-fill-sheet-meta i { margin-right: 4px; vertical-align: -2px; }
.fc-fill-sheet-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.fc-fill-sheet-wrap {
  overflow: auto;
  max-height: min(52vh, 480px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.fc-fill-sheet {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  min-width: 720px;
}
.fc-fill-sheet thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #0f766e;
  color: #fff;
  font-weight: 600;
  text-align: left;
  padding: 10px 12px;
  white-space: nowrap;
  border-bottom: 0;
}
.fc-fill-sheet thead th.fc-fill-num { text-align: right; }
.fc-fill-sheet tbody td {
  padding: 6px 10px;
  border-bottom: 1px solid #eef2f6;
  vertical-align: middle;
}
.fc-fill-sheet tbody tr:nth-child(even) { background: #f8fafc; }
.fc-fill-sheet tbody tr:hover { background: #ecfdf5; }
.fc-fill-item-col,
.fc-fill-item {
  min-width: 140px;
  font-weight: 500;
  color: var(--text);
}
.fc-fill-num { text-align: right; font-variant-numeric: tabular-nums; }
.fc-fill-total {
  font-weight: 600;
  color: #0f766e;
  background: color-mix(in srgb, #0f766e 6%, #fff);
}
.fc-fill-cell {
  width: 78px;
  height: 30px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: right;
  font: inherit;
  font-size: 12px;
  background: #fff;
}
.fc-fill-cell:focus {
  outline: none;
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}
.fc-fill-remark {
  width: 100%;
  min-width: 100px;
  height: 30px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-size: 12px;
}
.fc-fill-remark-ro {
  color: var(--text-2);
  font-size: 12px;
}

@media (max-width: 720px) {
  .form-grid-3 { grid-template-columns: 1fr 1fr; }
  .fc-modal-card { width: 100%; max-height: 95vh; }
}

/* Forecast management toolbar + pager */
.fc-toolbar {
  align-items: center;
  gap: 8px;
}
.fc-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-2);
}
.fc-filter .select { min-width: 140px; }
.fc-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: var(--surface-dim);
}
.fc-pager-total {
  font-size: 12px;
  color: var(--text-2);
  min-width: 72px;
}
.fc-pager-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.fc-pager-page {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  min-width: 52px;
  text-align: center;
}
.fc-pager-size {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-2);
  margin-left: auto;
}
.fc-pager-size .select { width: auto; min-width: 64px; }
.fc-pager .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Keep financial module tabs usable where still referenced */
.fin-module-tabs.module-inner-tabs,
.module-board > .fin-module-tabs {
  margin-bottom: 8px;
}

/* FC filter panel */
.fc-filter-panel {
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  padding: 12px 16px 14px;
}
.fc-filter-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.fc-filter-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
.fc-filter-fields {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  min-width: 0;
  max-height: 34px;
  overflow: hidden;
}
.fc-filter-panel.is-expanded .fc-filter-fields {
  max-height: none;
  overflow: visible;
}
.fc-filter-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}
.fc-filter-more:hover {
  background: var(--teal-soft);
  border-color: rgba(0, 128, 117, 0.25);
  color: var(--teal);
}
.fc-filter-more[hidden] { display: none !important; }
.fc-filter-more i { font-size: 14px; }
.fc-search-btn {
  flex-shrink: 0;
  min-width: 76px;
  height: 32px;
  margin-left: auto;
}
.fc-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}
.fc-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-2);
}
.fc-filter > span {
  flex-shrink: 0;
  min-width: 2em;
  font-weight: 500;
}
.fc-filter-input {
  min-width: 240px;
  width: min(320px, 48vw);
  height: 32px;
}
/* Month range — Air Datepicker */
.fc-month-range-input {
  width: 100%;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23008075' viewBox='0 0 256 256'%3E%3Cpath d='M208,32H180V24a8,8,0,0,0-16,0v8H92V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM92,48v8a8,8,0,0,0,16,0V48h72v8a8,8,0,0,0,16,0V48h28V80H48V48ZM208,208H48V96H208V208Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.fc-month-range-input.is-readonly,
.fc-month-range-input:disabled {
  cursor: not-allowed;
  background-color: var(--surface-dim);
  color: var(--muted);
  pointer-events: none;
}
.air-datepicker-global-container {
  z-index: 1200 !important;
}
.air-datepicker {
  --adp-accent-color: var(--teal);
  --adp-cell-background-color-selected: var(--teal);
  --adp-cell-background-color-selected-hover: var(--teal-mid);
  --adp-cell-background-color-in-range: var(--teal-soft);
  --adp-cell-background-color-in-range-hover: rgba(0, 128, 117, 0.18);
  --adp-cell-background-color-selected-in-range: var(--teal);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(17, 24, 39, 0.16);
}
.air-datepicker-cell.-selected-,
.air-datepicker-cell.-selected-.-focus- {
  background: var(--teal) !important;
}
.air-datepicker-cell.-in-range- {
  background: var(--teal-soft) !important;
  color: var(--teal-deep);
}
.air-datepicker-button {
  color: var(--teal);
}

/* Month range control (legacy fallback) */
.form-grid-2 {
  grid-template-columns: 1fr 1fr;
}
.form-grid .fc-span-2 { grid-column: 1 / -1; }
.fc-month-range {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px rgba(0, 128, 117, 0.06);
}
.fc-month-range .select {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}
.fc-month-range .select:focus {
  outline: none;
}
.fc-range-sep {
  color: var(--teal);
  font-weight: 600;
  flex-shrink: 0;
}
.fc-month-range.is-readonly,
.fc-field-readonly .select,
.fc-field-readonly input {
  background: var(--surface-dim);
  color: var(--muted);
  cursor: not-allowed;
  opacity: 1;
}
.fc-field-readonly .select,
.fc-field-readonly input {
  pointer-events: none;
}
.fc-month-range.is-readonly .select {
  pointer-events: none;
  color: var(--muted);
}

/* ── Dashboard demo (charts + KPIs) ── */
.dash-board {
  min-height: 0;
  flex: 1;
}

.dash-board .dash-canvas {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 16px 20px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  background:
    radial-gradient(1200px 400px at 10% -10%, rgba(0, 128, 117, 0.06), transparent 60%),
    radial-gradient(900px 360px at 100% 0%, rgba(0, 168, 150, 0.05), transparent 55%),
    var(--surface, #f5f7f9);
}

/* Keep sections content-sized — no forced stretch/overlap */
.dash-board .dash-canvas > * {
  flex: 0 0 auto;
  min-height: auto;
  width: 100%;
}

.dash-board .dash-canvas > .pas-page,
.dash-board .dash-canvas > .pas2-page {
  flex: 1 1 auto;
  min-height: 0;
}

.dash-board .dash-canvas:has(.pas2-page) {
  overflow: hidden;
  padding: 8px 12px 8px;
  gap: 8px;
}

.dash-board .dash-canvas:has(.pas2-page--scroll) {
  overflow: auto;
}

.pas2-page--scroll {
  overflow: visible;
  height: auto;
  min-height: 100%;
}

.pas2-stage--fill {
  min-height: 360px;
}

.pas2-note {
  margin: 0 2px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
}

.pas2-row--wip {
  color: #9ca3af;
  font-size: 12px;
  font-weight: 600;
}

.pas2-wip {
  flex: 1 1 auto;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fff;
  border: 1px dashed #d5ddda;
  border-radius: 12px;
  color: #9ca3af;
  text-align: center;
}

.pas2-wip i {
  font-size: 36px;
  color: #c5d4d1;
}

.pas2-wip h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #6b7280;
  letter-spacing: -0.02em;
}

.pas2-wip p {
  margin: 0;
  font-size: 13px;
}

.pas2-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pas2-stock-board {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 10px;
  align-items: start;
}

.pas2-stock-board .pas2-stage {
  flex: 1 1 auto;
  overflow: visible;
}

.pas2-stock-board .pas2-table-wrap {
  border: none;
  border-radius: 0;
}

.pas2-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px 8px;
  min-height: 240px;
  display: flex;
  flex-direction: column;
}

.pas2-card header h3 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pas2-card header p {
  margin-top: 2px;
  font-size: 10px;
  color: var(--muted);
}

.pas2-card-chart { flex: 1 1 auto; min-height: 180px; }

.pas2-table-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
}

.pas2-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.pas2-table th,
.pas2-table td {
  padding: 8px 10px;
  text-align: right;
  border-bottom: 1px solid #f1f3f5;
  white-space: nowrap;
}

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

.pas2-table th {
  font-size: 10px;
  font-weight: 700;
  color: #6b7280;
  background: #f8faf9;
}

.pas2-table td.up { color: var(--up); font-weight: 700; }
.pas2-table td.down { color: var(--down); font-weight: 700; }

.pas2-table .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}

.pas2-mix-table th {
  background: #1B7A72;
  color: #fff;
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.pas2-mix-table th:first-child,
.pas2-mix-table td:first-child {
  text-align: left;
}

.pas2-mix-table th:nth-child(2),
.pas2-mix-table td:nth-child(2) {
  text-align: right;
}

.pas2-mix-table td {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.pas2-mix-table tbody tr:hover td {
  background: #f4faf9;
}

.pas2-mix-table tr.is-sub td {
  background: #e8f0ef;
  color: #145c56;
  font-weight: 700;
}

.pas2-mix-table tr.is-sub:hover td {
  background: #dceae8;
}

.pas2-mix-table tr.is-total td {
  background: #1B7A72;
  color: #fff;
  font-weight: 700;
  border-bottom: none;
}

.pas2-mix-table tr.is-total:hover td {
  background: #176960;
}

.pas2-dealer-table th,
.pas2-dealer-table td {
  text-align: right;
}

.pas2-dealer-table th:nth-child(-n+4),
.pas2-dealer-table td:nth-child(-n+4) {
  text-align: left;
}

.pas2-dealer-table td.is-ytg {
  color: #9ca3af;
}

.pas2-forecast-table tr.is-ytg td.is-ytg,
.pas2-forecast-table tr.is-ytg td {
  color: #9ca3af;
}

.pas2-dealer-viz {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.pas2-ticker {
  position: relative;
  overflow: hidden;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.pas2-ticker::before,
.pas2-ticker::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 36px;
  z-index: 1;
  pointer-events: none;
}

.pas2-ticker::before { left: 0; background: linear-gradient(90deg, #fff, transparent); }
.pas2-ticker::after { right: 0; background: linear-gradient(270deg, #fff, transparent); }

.pas2-ticker-track {
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  height: 100%;
  padding: 0 12px;
  animation: pas2Ticker 32s linear infinite;
}

.pas2-ticker:hover .pas2-ticker-track {
  animation-play-state: paused;
}

@keyframes pas2Ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.pas2-tick {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  flex: 0 0 auto;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  background: #f4f7f6;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  white-space: nowrap;
}

.pas2-tick em {
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #9ca3af;
}

.pas2-tick b {
  font-weight: 700;
  color: #1f2937;
}

.pas2-tick.r0 em { color: #C4A35A; }
.pas2-tick.r1 em { color: #8b95a1; }
.pas2-tick.r2 em { color: #D97B4C; }

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

.pas2-rank {
  cursor: pointer;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px 8px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.pas2-rank:hover {
  border-color: #c5d4d1;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.06);
}

.pas2-rank.on {
  border-color: #1B7A72;
  box-shadow: 0 0 0 1px rgba(27, 122, 114, 0.22);
}

.pas2-rank header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.pas2-rank header strong {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pas2-rank header span {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}

.pas2-rank ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pas2-rank li {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 2px 0 6px;
  overflow: hidden;
}

.pas2-rank li b {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: #9ca3af;
}

.pas2-rank li.gold b { background: #C4A35A; }
.pas2-rank li.silver b { background: #8b95a1; }
.pas2-rank li.bronze b { background: #D97B4C; }

.pas2-rank li span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 650;
}

.pas2-rank li em {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.pas2-rank li i {
  position: absolute;
  left: 28px;
  right: 0;
  bottom: 0;
  height: 3px;
  max-width: calc(100% - 28px);
  border-radius: 2px;
  background: #1B7A72;
  opacity: 0.22;
}

.pas2-rank li.gold i { background: #C4A35A; opacity: 0.45; }
.pas2-rank li.silver i { background: #8b95a1; opacity: 0.4; }
.pas2-rank li.bronze i { background: #D97B4C; opacity: 0.4; }

.pas2-rank li.empty {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.pas2-legend-hints .is-dash i {
  background: repeating-linear-gradient(90deg, #00a896 0 5px, transparent 5px 8px);
}

.pas2-legend-hints .is-dot i {
  background: radial-gradient(circle, #004d47 0 2px, transparent 2.2px);
  background-size: 6px 8px;
}

@media (max-width: 1100px) {
  .pas2-ranks { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .pas2-ticker-track { animation: none; }
}

@media (max-width: 1100px) {
  .pas2-grid { grid-template-columns: 1fr; }
  .pas2-stock-board { grid-template-columns: 1fr; }
}

.dash-board .dash-canvas > .dash-body,
.pas2-page .dash-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pas2-page .dash-kpi-strip {
  flex: 0 0 auto;
}

.pas2-prod-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.pas2-page .dash-body > .dash-grid--1 .dash-chart--lg {
  height: 280px;
}

.pas2-page .dash-body > .dash-grid--1 .dash-chart--xl {
  height: 360px;
}

.pas2-page .dash-chart--md {
  height: 240px;
}

.pas2-page .dash-chart--sm {
  height: 200px;
}

.pas2-prod-hero {
  background: linear-gradient(135deg, #fafbfb 0%, #ffffff 100%);
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0,128,117,0.06);
}

.pas2-prod-insights {
  background: linear-gradient(135deg, #f8faf9 0%, #ffffff 100%);
}

.pas2-prod-insights .dash-insights-list li {
  font-size: 11.5px;
  line-height: 1.65;
  color: #1f2937;
}

.pas2-page .dash-grid--2 {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pas2-page .dash-grid--3 {
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.pas2-page .dash-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.pas2-page .dash-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 4px 12px rgba(0,128,117,0.08);
}

.pas2-page .dash-card-head {
  margin-bottom: 8px;
}

.pas2-page .dash-card-head h3 {
  font-size: 12px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 2px;
  letter-spacing: -0.01em;
}

.pas2-page .dash-card-sub {
  font-size: 10px;
  color: #6b7280;
  font-weight: 500;
  margin: 0;
}

@media (max-width: 1200px) {
  .pas2-page .dash-grid--3 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .pas2-page .dash-grid--2,
  .pas2-page .dash-grid--3 {
    grid-template-columns: 1fr;
  }
}

.pas2-prod-table-card {
  min-height: 0;
}

.pas2-prod-table {
  flex: 1 1 auto;
  max-height: 280px;
  border: none;
  border-radius: 0;
}

.pas2-prod-table .pas2-table tr.is-ytg td {
  color: #9ca3af;
  background: #fafbfb;
}

.pas2-prod-table .pas2-table tr.is-sub td {
  background: #e8f0ef;
  color: #145c56;
  font-weight: 700;
}

.pas2-prod-table .pas2-table tr.is-total td {
  background: #1B7A72;
  color: #fff;
  font-weight: 700;
  border-bottom: none;
}

.pas2-prod-table .pas2-table tr.is-total td.up,
.pas2-prod-table .pas2-table tr.is-total td.down {
  color: #fff;
}

.pas2-page .dash-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pas2-page .dash-card:hover {
  box-shadow: 0 4px 16px rgba(0,128,117,0.12);
  transform: translateY(-1px);
}

.pas2-prod-hero:hover {
  box-shadow: 0 6px 20px rgba(0,128,117,0.15);
}

.pas2-page .dash-kpi-strip {
  box-shadow: 0 1px 3px rgba(0,128,117,0.08);
}

.pas2-page .dash-kpi {
  transition: background 0.2s ease;
}

.pas2-page .dash-kpi:hover {
  background: linear-gradient(135deg, #fafbfb 0%, #f8faf9 100%);
}

.pas2-page .dash-card-head h3 {
  color: #111827;
  letter-spacing: -0.015em;
}

.pas2-page .dash-card-sub {
  color: #6b7280;
  font-weight: 500;
}

.pas2-prod-insights .dash-insights-list li b {
  color: #008075;
  font-weight: 700;
}

.pas2-prod-table .pas2-table {
  font-variant-numeric: tabular-nums;
}

.pas2-prod-table .pas2-table tbody tr {
  transition: background 0.15s ease;
}

.pas2-prod-table .pas2-table tbody tr:hover {
  background: #f8faf9 !important;
}

.pas2-page .dash-kpi-bar {
  background: linear-gradient(180deg, var(--kpi-color, #008075) 0%, rgba(0,128,117,0.75) 100%) !important;
  width: 3px;
}

.pas2-prod-head {
  border-bottom: 1px solid #f3f4f6;
  padding-bottom: 12px;
  margin-bottom: 8px;
}

.pas2-page .dash-chart {
  border-radius: 6px;
}

@keyframes pas2ModelPulse {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .pas2-page .dash-card {
    transition: none;
  }
  .pas2-page .dash-card:hover {
    transform: none;
  }
}

.dash-kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.dash-kpi {
  position: relative;
  background: #fff;
  border: none;
  border-right: 1px solid var(--line);
  border-radius: 0;
  padding: 6px 10px 6px 12px;
  overflow: hidden;
  box-shadow: none;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
}

.dash-kpi:last-child {
  border-right: none;
}

.dash-kpi-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
}

.dash-kpi-lab {
  font-size: 9px;
  line-height: 1.2;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-kpi-val {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.15;
  white-space: nowrap;
}

.dash-kpi-unit {
  margin-left: 3px;
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
}

.dash-kpi-delta {
  margin-top: 0;
  font-size: 9px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-kpi-delta.up { color: var(--up, #059669); }
.dash-kpi-delta.down { color: var(--down, #ef4444); }

.dash-grid {
  display: grid;
  gap: 12px;
  align-items: stretch;
}

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

.dash-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 12px 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dash-card-head {
  flex: 0 0 auto;
}

.dash-card-head h3 {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.dash-card-sub {
  margin: 0 0 8px;
  font-size: 10px;
  line-height: 1.35;
  color: var(--muted);
  font-weight: 400;
}

.dash-insights {
  justify-content: flex-start;
}

.dash-insights-list {
  margin: 0;
  padding: 0 0 0 18px;
  list-style: none;
  counter-reset: dash-insight;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-insights-list li {
  position: relative;
  padding-left: 4px;
  font-size: 11px;
  line-height: 1.55;
  color: #374151;
  counter-increment: dash-insight;
}

.dash-insights-list li::before {
  content: counter(dash-insight);
  position: absolute;
  left: -18px;
  top: 1px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(0, 128, 117, 0.12);
  color: var(--teal, #008075);
  font-size: 9px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
}

.dash-insights-list li strong {
  font-weight: 600;
  color: var(--text);
}

.dash-body > .dash-grid--2 .dash-insights {
  min-height: 340px;
}

.dash-chart {
  width: 100%;
  height: 260px;
  flex: 0 0 auto;
}

.dash-chart--md {
  height: 260px;
}

.dash-chart--lg {
  height: 320px;
}

/* Wide single charts: a bit taller, still capped */
.dash-body > .dash-grid--1 .dash-chart--lg {
  height: 340px;
}

/* Dashboard page tabs reuse global workspace-tabs chrome */
.workspace .workspace-tabs#dashboardTabBar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  z-index: 1;
}

.workspace .workspace-tabs#dashboardTabBar[hidden] {
  display: none !important;
}

.workspace .workspace-tabs#dashboardTabBar .workspace-tab {
  max-width: none;
}

.workspace .workspace-tabs#dashboardTabBar .workspace-tab-text strong {
  max-width: 260px;
}

@media (max-width: 1100px) {
  .dash-grid--3 { grid-template-columns: 1fr; }
  .dash-grid--2 { grid-template-columns: 1fr; }
  .dash-kpi-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .dash-kpi:nth-child(4n) {
    border-right: none;
  }
  .dash-kpi:nth-child(n + 5) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 720px) {
  .dash-board .dash-canvas { padding: 10px 12px 16px; }
  .dash-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dash-kpi:nth-child(2n) {
    border-right: none;
  }
  .dash-kpi:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
  .dash-kpi-val { font-size: 13px; }
  .dash-chart,
  .dash-chart--md {
    height: 240px;
  }
  .dash-chart--lg,
  .dash-body > .dash-grid--1 .dash-chart--lg {
    height: 280px;
  }
}

/* ── Production / AAK / Stock (PPT FC overview) ── */
.pas-page {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  height: 100%;
}

.pas-bar {
  flex: 0 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px 12px;
}

.pas-bar-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.pas-bar-title h2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pas-bar-title em {
  font-style: normal;
  font-size: 10px;
  font-weight: 600;
  color: var(--teal);
  background: var(--teal-soft);
  padding: 2px 8px;
  border-radius: 999px;
}

.pas-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pas-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
}

.pas-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.pas-field > label {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.pas-field .select {
  height: 30px;
  min-width: 96px;
}

.pas-field .select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}

.pas-field--carlines {
  flex: 1 1 360px;
}

.pas-pills {
  display: inline-flex;
  align-items: stretch;
}

.pas-pill {
  appearance: none;
  margin-left: -1px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-2);
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  padding: 6px 12px;
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, z-index 0s;
}

.pas-pills .pas-pill:first-child {
  margin-left: 0;
  border-radius: 8px 0 0 8px;
}

.pas-pills .pas-pill:last-child {
  border-radius: 0 8px 8px 0;
}

.pas-pills .pas-pill:only-child {
  border-radius: 8px;
}

.pas-pill:hover {
  color: var(--teal);
  background: var(--teal-soft);
  z-index: 1;
}

.pas-pill.on {
  z-index: 2;
  background: var(--teal-soft);
  border-color: var(--teal);
  color: var(--teal-deep);
  font-weight: 600;
}

.pas-pills--wrap {
  flex-wrap: wrap;
  gap: 6px;
}

.pas-pills--wrap .pas-pill,
.pas-pills--wrap .pas-pill:first-child,
.pas-pills--wrap .pas-pill:last-child,
.pas-pills--wrap .pas-pill:only-child {
  margin-left: 0;
  border-radius: 8px;
}

.pas-pill-empty {
  font-size: 11px;
  color: var(--muted);
  padding: 6px 2px;
}

.pas-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  flex: 0 0 auto;
  overflow: visible;
}

.pas-kpi {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px 11px 14px;
  cursor: default;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.pas-kpi::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 2px;
  background: var(--kpi, var(--teal));
}

.pas-kpi:hover {
  z-index: 6;
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--kpi) 40%, var(--line));
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
}

.pas-kpi-lab {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}

.pas-kpi-val {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.pas-kpi-val small {
  margin-left: 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}

.pas-kpi-sub {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}

.pas-kpi-sub.up { color: var(--up); }
.pas-kpi-sub.down { color: var(--down); }

.pas-kpi-pop {
  position: absolute;
  left: 8px;
  right: 8px;
  top: calc(100% + 6px);
  z-index: 8;
  padding: 10px 12px;
  background: rgba(17, 24, 39, 0.94);
  color: #f3f4f6;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.2);
}

.pas-kpi:hover .pas-kpi-pop {
  opacity: 1;
  transform: translateY(0);
}

.pas-pop-title {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 8px;
}

.pas-pop-row {
  display: grid;
  grid-template-columns: 8px 1fr auto auto;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  padding: 3px 0;
}

.pas-pop-row i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.pas-pop-row b {
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.pas-pop-row em {
  font-style: normal;
  color: #9ca3af;
  min-width: 28px;
  text-align: right;
}

.pas-legend-col {
  color: var(--muted) !important;
  font-weight: 500 !important;
}

.pas-legend-col::before {
  content: "·";
  margin-right: 8px;
  color: #d1d5db;
}

.pas-stage {
  flex: 1 1 auto;
  min-height: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px 12px;
  display: flex;
  flex-direction: column;
}

.pas-stage-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.pas-stage-head h3 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pas-stage-head p {
  margin-top: 2px;
  font-size: 10px;
  color: var(--muted);
}

.pas-board {
  display: flex;
  gap: 14px;
  flex: 1 1 auto;
  min-height: 0;
}

.pas-hero-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}

.pas-hero {
  height: 100%;
  min-height: 340px;
}

.pas-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 16px;
  flex-shrink: 0;
}

.pas-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
}

.pas-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.pas-side {
  flex: 0 0 228px;
  width: 228px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.pas-mix,
.pas-stock {
  background: #f6f8f8;
  border: 1px solid #eef1f1;
  border-radius: 12px;
  padding: 10px 12px 8px;
}

.pas-mix {
  flex: 1 1 0;
  min-height: 158px;
  display: flex;
  flex-direction: column;
}

.pas-mix header,
.pas-stock header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  font-weight: 600;
  color: #6b7280;
  letter-spacing: 0.02em;
}

.pas-mix header b,
.pas-stock header b {
  font-size: 12px;
  font-weight: 700;
  color: #111827;
  font-variant-numeric: tabular-nums;
}

.pas-mix-chart {
  flex: 1 1 auto;
  min-height: 96px;
}

.pas-mix ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 2px 0 2px;
}

.pas-mix li {
  display: grid;
  grid-template-columns: 8px 1fr auto auto;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #6b7280;
}

.pas-mix li i {
  width: 8px;
  height: 8px;
  border-radius: 99px;
}

.pas-mix li b {
  font-variant-numeric: tabular-nums;
  color: #111827;
  font-size: 11px;
}

.pas-mix li em {
  font-style: normal;
  min-width: 28px;
  text-align: right;
  font-weight: 600;
  color: #9ca3af;
}

.pas-stock {
  flex: 0 0 auto;
}

.pas-stock-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 6px;
  height: 108px;
  padding: 10px 2px 0;
}

.pas-stock-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  height: 100%;
}

.pas-stock-col .stem {
  width: 16px;
  border-radius: 5px 5px 2px 2px;
  background: #e2c4b4;
  min-height: 8px;
}

.pas-stock-col.on .stem {
  background: #D97B4C;
}

.pas-stock-col b {
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #111827;
  letter-spacing: -0.02em;
}

.pas-stock-col span {
  font-size: 9px;
  font-weight: 600;
  color: #9ca3af;
  text-align: center;
  line-height: 1.2;
}

.pas-stock-col.on span {
  color: #D97B4C;
}

.pas-side-empty {
  font-size: 11px;
  color: var(--muted);
  padding: 16px 8px;
}

@media (max-width: 1100px) {
  .pas-board { flex-direction: column; }
  .pas-side {
    flex: 0 0 auto;
    width: 100%;
    flex-direction: row;
    overflow: auto;
  }
  .pas-mix,
  .pas-stock { min-width: 200px; }
}

@media (max-width: 900px) {
  .pas-hero { min-height: 280px; }
  .pas-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pas-side { flex-direction: column; }
}

/* ── Production/AAK/Stock2 (revised) ── */
@keyframes pas2In {
  from { opacity: 0; }
  to { opacity: 1; }
}

.pas2-page {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  animation: pas2In 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.pas2-bar {
  flex: 0 0 auto;
  position: relative;
  z-index: 8;
  overflow: visible;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px 10px;
}

.pas2-bar-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.pas2-bar-title h2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.pas2-bar-title em {
  font-style: normal;
  font-size: 10px;
  font-weight: 600;
  color: var(--teal);
  background: var(--teal-soft);
  padding: 2px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

.pas2-summary {
  margin: 0 0 0 auto;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.pas2-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pas2-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 14px;
}

.pas2-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.pas2-field > label {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}

.pas2-field .select {
  height: 30px;
  min-width: 96px;
}

.pas2-field.is-off {
  opacity: 0.4;
  pointer-events: none;
}

.pas2-pills {
  display: inline-flex;
  align-items: stretch;
}

.pas2-pill {
  appearance: none;
  margin-left: -1px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-2);
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  padding: 6px 12px;
  cursor: pointer;
  position: relative;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.pas2-pills .pas2-pill:first-child {
  margin-left: 0;
  border-radius: 8px 0 0 8px;
}

.pas2-pills .pas2-pill:last-child {
  border-radius: 0 8px 8px 0;
}

.pas2-pills .pas2-pill:only-child { border-radius: 8px; }

.pas2-pill:hover {
  color: var(--teal);
  background: var(--teal-soft);
  z-index: 1;
}

.pas2-pill.on {
  z-index: 2;
  background: var(--teal-soft);
  border-color: var(--teal);
  color: var(--teal-deep);
  font-weight: 600;
}

.pas2-field > label em {
  font-style: normal;
  font-weight: 500;
  color: #9ca3af;
  margin-left: 4px;
}

.pas2-row--geo .pas2-dd-btn {
  min-width: 132px;
  max-width: 168px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pas2-dd-btn.is-ph {
  font-weight: 500;
  color: #9ca3af;
}

.pas2-dd-actions {
  display: flex;
  gap: 4px;
}

.pas2-dd-actions .pas2-dd-all {
  flex: 1;
}

.pas2-dd-btn {
  appearance: none;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  min-width: 148px;
  text-align: left;
  transition: border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.pas2-dd.open .pas2-dd-btn {
  border-color: var(--teal);
  color: var(--teal-deep);
}

.pas2-dd-panel {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 80;
  min-width: 220px;
  max-height: 320px;
  overflow: hidden;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.12);
}

.pas2-dd.open .pas2-dd-panel { display: flex; flex-direction: column; gap: 2px; }

.pas2-dd-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: auto;
  min-height: 0;
  max-height: 220px;
}

.pas2-dd-foot {
  display: flex;
  justify-content: flex-end;
  padding: 6px 2px 2px;
  margin-top: 4px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}

.pas2-dd-ok {
  appearance: none;
  border: 0;
  background: #008C82;
  color: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
}

.pas2-dd-ok:hover { background: #00756d; }

.pas2-dd-all,
.pas2-dd-item {
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 11px;
  padding: 7px 8px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-2);
  transition: background 0.15s ease, color 0.15s ease;
}

.pas2-dd-all { font-weight: 700; color: var(--teal-deep); }

.pas2-dd-item { display: flex; align-items: center; gap: 8px; }

.pas2-dd-item i {
  width: 12px;
  height: 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
}

.pas2-dd-item.on { background: var(--teal-soft); color: var(--teal-deep); font-weight: 600; }
.pas2-dd-item.on i { background: var(--teal); border-color: var(--teal); }
.pas2-dd-empty { font-size: 11px; color: var(--muted); padding: 8px; }

.pas2-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  flex: 0 0 auto;
  overflow: visible;
}

.pas2-kpi {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px 9px 14px;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, border-color 0.22s ease;
}

.pas2-kpi::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 2px;
  background: var(--kpi, var(--teal));
}

.pas2-kpi:hover {
  z-index: 6;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
}

.pas2-kpi-lab { font-size: 10px; font-weight: 600; color: var(--muted); }
.pas2-kpi-val {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.pas2-kpi-val small { margin-left: 4px; font-size: 10px; font-weight: 600; color: var(--muted); }
.pas2-kpi-sub { margin-top: 2px; font-size: 10px; font-weight: 600; color: var(--muted); }
.pas2-kpi-sub.up { color: var(--up); }
.pas2-kpi-sub.down { color: var(--down); }

.pas2-kpi-pop {
  position: absolute;
  left: 8px;
  right: 8px;
  top: calc(100% + 6px);
  z-index: 8;
  padding: 10px 12px;
  background: rgba(17, 24, 39, 0.94);
  color: #f3f4f6;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.pas2-kpi:hover .pas2-kpi-pop { opacity: 1; transform: translateY(0); }
.pas2-pop-title {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 8px;
}
.pas2-pop-row {
  display: grid;
  grid-template-columns: 8px 1fr auto auto;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  padding: 3px 0;
}
.pas2-pop-row i { width: 8px; height: 8px; border-radius: 2px; }
.pas2-pop-row b { font-variant-numeric: tabular-nums; color: #fff; }
.pas2-pop-row em { font-style: normal; color: #9ca3af; min-width: 28px; text-align: right; }

.pas2-stage {
  flex: 1 1 auto;
  min-height: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pas2-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.pas2-stage-head h3 { font-size: 13px; font-weight: 700; letter-spacing: -0.02em; }
.pas2-stage-head p { margin-top: 2px; font-size: 10px; color: var(--muted); }

.pas2-chart-tools {
  width: 100%;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.pas2-legend-hints {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
}

.pas2-legend-hints i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: 1px;
}

.pas2-legend-hints i.hi { background: #1B7A72; }
.pas2-legend-hints i.lo { background: rgba(27, 122, 114, 0.28); }

.pas2-chart-tools > .pas2-pill {
  margin-left: 0;
  border-radius: 8px;
}

.pas2-page--scroll .pas2-hero { min-height: 360px; }
.pas2-page--scroll .pas2-hero.is-split { min-height: 560px; }

.pas2-grain .pas2-pills {
  background: transparent;
}

.pas2-grain .pas2-pill {
  margin-left: 0;
  border: none;
  background: transparent;
  border-radius: 0;
  padding: 6px 12px 8px;
  color: var(--muted);
  font-weight: 600;
}

.pas2-grain .pas2-pills .pas2-pill:first-child,
.pas2-grain .pas2-pills .pas2-pill:last-child,
.pas2-grain .pas2-pills .pas2-pill:only-child {
  border-radius: 0;
}

.pas2-grain .pas2-pill:hover {
  color: var(--teal);
  background: transparent;
}

.pas2-grain .pas2-pill.on {
  background: transparent;
  border-color: transparent;
  color: var(--teal-deep);
  box-shadow: inset 0 -2px 0 var(--teal);
}

.pas2-range {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.pas2-range .select {
  height: 30px;
  min-width: 108px;
}

.pas2-dates {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pas2-dates span {
  color: var(--muted);
  font-size: 11px;
}

.pas2-dates input[type="date"] {
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  font: inherit;
  font-size: 11px;
  color: var(--text);
  background: #fff;
}

.pas2-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.pas2-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #6b7280;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.pas2-tool:hover {
  border-color: #c5d0ce;
  color: #111827;
  background: #f6f8f8;
  transform: translateY(-1px);
}

.pas2-tool:active { transform: translateY(0) scale(0.96); }

.pas2-tool.on {
  background: var(--teal-soft);
  border-color: var(--teal);
  color: var(--teal-deep);
  box-shadow: 0 0 0 3px rgba(0, 128, 117, 0.08);
}

.pas2-tool i { font-size: 15px; }

body.pas2-lb-lock { overflow: hidden; }

.pas2-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.pas2-lightbox.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.pas2-lightbox-bg {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.46);
  backdrop-filter: blur(8px);
}

.pas2-lightbox-card {
  position: relative;
  z-index: 1;
  width: min(1280px, 96vw);
  height: min(820px, 90vh);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 32px 80px rgba(17, 24, 39, 0.24);
  display: flex;
  flex-direction: column;
  padding: 16px 18px 18px;
  transform: translateY(18px) scale(0.96);
  opacity: 0;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.32s ease;
}

.pas2-lightbox.open .pas2-lightbox-card {
  transform: none;
  opacity: 1;
}

.pas2-lightbox-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.pas2-lightbox-head h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pas2-lightbox-head p {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
}

.pas2-lightbox-hero {
  flex: 1 1 auto;
  min-height: 0;
}

.pas2-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 16px;
}

.pas2-legend--in {
  position: absolute;
  top: 6px;
  right: 10px;
  z-index: 3;
  pointer-events: auto;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.pas2-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  transition: opacity 0.18s ease, color 0.18s ease;
}

.pas2-legend span:hover { color: #111827; }

.pas2-legend.is-focus span { opacity: 0.28; }
.pas2-legend.is-focus span.is-on {
  opacity: 1;
  color: #111827;
}

.pas2-legend i { width: 10px; height: 10px; border-radius: 3px; }

.pas2-board {
  display: flex;
  gap: 14px;
  flex: 1 1 auto;
  min-height: 0;
}

.pas2-hero-wrap { position: relative; flex: 1 1 auto; min-width: 0; min-height: 0; }
.pas2-hero { height: 100%; min-height: 0; }

.pas2-side {
  flex: 0 0 200px;
  width: 200px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  overflow: hidden;
}

.pas2-mix,
.pas2-stock {
  background: #f6f8f8;
  border: 1px solid #eef1f1;
  border-radius: 12px;
  padding: 10px 12px 8px;
  animation: pas2In 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.pas2-mix {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pas2-mix header,
.pas2-stock header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  font-weight: 600;
  color: #6b7280;
  flex-shrink: 0;
}

.pas2-mix header b { font-size: 12px; font-weight: 700; color: #111827; }
.pas2-mix-chart { flex: 1 1 auto; min-height: 72px; }
.pas2-mix ul { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 2px 0; }
.pas2-mix li {
  display: grid;
  grid-template-columns: 8px 1fr auto auto;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #6b7280;
}
.pas2-mix li i { width: 8px; height: 8px; border-radius: 99px; }
.pas2-mix li b { font-variant-numeric: tabular-nums; color: #111827; }
.pas2-mix li em { font-style: normal; min-width: 28px; text-align: right; font-weight: 600; color: #9ca3af; }

.pas2-stock {
  flex: 0.9 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.pas2-stock-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
  gap: 6px;
  flex: 1 1 auto;
  min-height: 0;
  padding: 6px 2px 0;
}
.pas2-stock-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-height: 0;
  height: 100%;
}
.pas2-stock-track {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.pas2-stock-col .stem {
  width: 16px;
  border-radius: 5px 5px 2px 2px;
  background: #e2c4b4;
  min-height: 6px;
  height: 0;
  max-height: 100%;
  transition: height 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.pas2-stock-col.on .stem { background: #D97B4C; }
.pas2-stock-col b { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; color: #111827; flex-shrink: 0; line-height: 1.1; }
.pas2-stock-col span { font-size: 9px; font-weight: 600; color: #9ca3af; text-align: center; line-height: 1.2; flex-shrink: 0; white-space: nowrap; }
.pas2-stock-col.on span { color: #D97B4C; }
.pas2-side-empty { font-size: 11px; color: var(--muted); padding: 16px 8px; }

@media (max-width: 1100px) {
  .pas2-board { flex-direction: column; }
  .pas2-side { flex: 0 0 auto; width: 100%; flex-direction: row; overflow: auto; }
  .pas2-mix, .pas2-stock { min-width: 200px; }
}

@media (max-width: 900px) {
  .pas2-hero { min-height: 0; }
  .pas2-side { flex-direction: column; }
}

/* Vehicle Sales Flat Table — reuse Vehicle P&L chrome / panel / table */
.plv-table.vsft-table {
  table-layout: auto;
  width: max-content;
  min-width: 100%;
}

.plv-table.vsft-table th,
.plv-table.vsft-table td {
  white-space: nowrap;
}

.plv-table.vsft-table td:not(.row-label) {
  width: auto;
  text-align: left;
}

.plv-table.vsft-table thead th:not(:first-child) {
  text-align: left;
}

.plv-table.vsft-table thead th.is-num,
.plv-table.vsft-table td.is-num {
  text-align: right;
}

.plv-table.vsft-table th:first-child,
.plv-table.vsft-table td.row-label {
  width: 168px;
  min-width: 168px;
  max-width: 168px;
}

.vsft-pager-bar {
  border-top: 1px solid var(--line);
  border-bottom: none;
}

.vsft-pager .btn {
  min-width: 32px;
}

/* Production-FC — one screen, original Inter */
.dash-board .dash-canvas:has(.pas2-page--prod) {
  overflow: hidden;
}

.pas2-page.pas2-page--prod {
  height: 100% !important;
  min-height: 0 !important;
  overflow: auto !important;
  overscroll-behavior-y: contain;
  gap: 6px;
  --pfc-accent: #008C82;
  --pfc-soft: #E5F3F2;
}

.pas2-page--prod.pfc-theme-production { --pfc-accent: #008C82; --pfc-soft: #E5F3F2; }
.pas2-page--prod.pfc-theme-aak { --pfc-accent: #2EA198; --pfc-soft: #EAF5F4; }
.pas2-page--prod.pfc-theme-stock { --pfc-accent: #1A9A91; --pfc-soft: #EEF7F6; }
.pas2-page--prod.pfc-theme-sales { --pfc-accent: #1B7A72; --pfc-soft: #e6f4f2; }
.pas2-page--prod.pfc-theme-mix { --pfc-accent: #5C6BC0; --pfc-soft: #eef0f8; }

.pas2-page--prod .pas2-bar {
  padding: 6px 10px 8px;
}

.pas2-page--prod .pas2-bar-title {
  margin-bottom: 6px;
}

.pas2-page--prod .pas2-bar-title h2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #002733;
}

.pas2-page--prod .pas2-bar-title em {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--pfc-soft);
  color: var(--pfc-accent);
}

.pas2-page--prod .pas2-bar-title em i {
  font-size: 12px;
}

.pas2-page--prod .pas2-summary {
  display: none;
}

.pas2-page--prod .pas2-row {
  gap: 12px 22px;
}

.pas2-page--prod .pas2-field {
  flex: 0 1 auto;
}

.pas2-page--prod .pas2-pills {
  flex-wrap: nowrap;
}

.pas2-page--prod .pas2-row--aak-ch .pas2-pills {
  flex-wrap: wrap;
}

.pas2-page--prod .pfc-main {
  flex: 1.7 1 0;
  min-height: 300px;
}

.pfc-top {
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(320px, 0.95fr);
  gap: 8px;
  flex: 0 0 228px;
  min-height: 216px;
}

.pfc-kpis--compact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  min-height: 0;
}

.pas2-page--prod .pfc-kpis--compact .pfc-kpi {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 12px 14px 12px 16px;
  background: linear-gradient(180deg, #fff 0%, #f7fbfb 100%);
  box-shadow: 0 1px 0 rgba(0, 39, 51, 0.04);
}

.pas2-page--prod .pfc-kpis--compact .pfc-kpi-val {
  font-size: 20px;
  margin-top: 0;
}

.pas2-page--prod .pfc-kpis--compact .pfc-kpi-lab {
  font-size: 11px;
}

.pas2-page--prod .pfc-kpis--compact .pfc-kpi-sub {
  margin-top: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pfc-theme-aak .pfc-kpis--compact .pfc-kpi {
  background: linear-gradient(180deg, #fff 0%, #f6fbfa 100%);
}

.pfc-theme-stock .pfc-kpis--compact .pfc-kpi {
  background: linear-gradient(180deg, #fff 0%, #f8fcfb 100%);
}

.pfc-pies {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  min-height: 0;
}

.pfc-pies .pfc-card {
  min-height: 0;
}

.pfc-pie-body {
  display: grid;
  grid-template-columns: minmax(108px, 0.92fr) minmax(118px, 1.08fr);
  gap: 8px 10px;
  flex: 1 1 auto;
  min-height: 0;
  align-items: center;
}

.pfc-pies .pfc-pie {
  min-height: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  max-height: 168px;
  justify-self: center;
}

.pfc-mix {
  list-style: none;
  margin: 0;
  padding: 2px 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 0;
  max-height: 100%;
  overflow: auto;
}

.pfc-mix-row {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto auto;
  grid-template-rows: auto 3px;
  column-gap: 6px;
  row-gap: 3px;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  color: #4C5356;
  cursor: pointer;
}

.pfc-mix-row i {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  grid-row: 1;
}

.pfc-mix-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pfc-mix-row em {
  font-style: normal;
  color: #809399;
  font-variant-numeric: tabular-nums;
}

.pfc-mix-row b {
  color: #002733;
  font-variant-numeric: tabular-nums;
}

.pfc-mix-bar {
  grid-column: 2 / -1;
  grid-row: 2;
  height: 3px;
  background: #E8EEEE;
  border-radius: 99px;
  overflow: hidden;
}

.pfc-mix-bar s {
  display: block;
  height: 100%;
  border-radius: 99px;
}

.pfc-mix-row:hover span,
.pfc-mix-row:hover b {
  color: #002733;
}

.pfc-mix-empty {
  font-size: 11px;
  font-weight: 600;
  color: #809399;
}

.pas2-page--prod .pfc-hero {
  flex: 1 1 auto;
  height: auto !important;
  min-height: 280px !important;
}

.pfc-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  flex: 0 0 auto;
}

.pfc-kpis.pfc-kpis--compact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
  min-height: 0;
}

.pfc-kpi {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px 8px 12px;
  min-height: 0;
}

.pfc-kpi::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--kpi, var(--teal));
}

.pfc-kpi-lab {
  font-size: 10px;
  font-weight: 600;
  color: #809399;
}

.pfc-kpi-val {
  margin-top: 2px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #002733;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.pfc-kpi-val small {
  margin-left: 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}

.pfc-kpi-sub {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}

.pfc-kpi-sub.up { color: var(--up); }
.pfc-kpi-sub.down { color: var(--down); }

.pfc-head {
  align-items: center;
}

.pas2-page--prod .pfc-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}

.pas2-page--prod .pfc-head h3 {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.pfc-head-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.pas2-page--prod .pfc-caption {
  flex: 1 0 100%;
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  color: #4C5356;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pfc-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.pfc-leg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 4px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #4C5356;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  line-height: 1;
}

.pfc-leg i {
  width: 10px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
  opacity: 1 !important;
}

.pfc-leg.on {
  color: #002733;
}

.pfc-leg:not(.on) {
  color: #98a2a8;
}

.pfc-leg:hover {
  background: #f3f6f6;
}

.pfc-model-legend-slot {
  display: flex;
  align-items: center;
}

.pfc-model-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 4px;
}

.pfc-mleg {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #002733;
  line-height: 1;
}

.pfc-mleg i {
  width: 10px;
  height: 8px;
  border-radius: 2px;
}

.pfc-split-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #4C5356;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  line-height: 1;
}

.pfc-split-btn i {
  font-size: 13px;
}

.pfc-split-btn:hover {
  border-color: #c5d0ce;
  color: #002733;
  background: #f6f8f8;
}

.pfc-split-btn.on {
  background: var(--pfc-soft, #E5F3F2);
  border-color: var(--pfc-accent, #008C82);
  color: var(--pfc-accent, #008C82);
}

.pfc-grid {
  flex: 1 1 0;
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(180px, 0.9fr) 1.35fr 1.35fr;
  gap: 6px;
  min-height: 260px;
}

.pfc-grid--pies {
  flex: 0 0 210px;
  grid-template-columns: 1fr 1fr;
  min-height: 188px;
}

.pas2-page--prod .pfc-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px 6px;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.pas2-page--prod .pfc-card header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
  flex-shrink: 0;
}

.pas2-page--prod .pfc-card header span {
  font-size: 12px;
  font-weight: 700;
  color: #002733;
}

.pas2-page--prod .pas2-dd.open .pas2-dd-btn {
  border-color: var(--pfc-accent);
  color: var(--pfc-accent);
}

.pas2-page--prod .pas2-dd-item.on {
  background: var(--pfc-soft);
  color: var(--pfc-accent);
}

.pas2-page--prod .pas2-dd-item.on i {
  background: var(--pfc-accent);
  border-color: var(--pfc-accent);
}

.pas2-page--prod .pas2-dd-ok {
  background: var(--pfc-accent);
}

.pas2-page--prod .pfc-card header b {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}

.pfc-pie {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}

.pfc-chart {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}

.pas2-page--prod .pas2-pill.on {
  background: var(--pfc-soft);
  border-color: var(--pfc-accent);
  color: var(--pfc-accent);
}

.pas2-page--prod .pas2-pill:disabled {
  opacity: 1;
  cursor: default;
}

.pfc-mix-split {
  flex: 1.15 1 0;
  min-height: 240px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.9fr);
  gap: 6px;
}

.pfc-mix-split .pfc-main {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}

.pas2-page--prod.pfc-theme-mix .pfc-kpis {
  gap: 4px;
}

.pas2-page--prod.pfc-theme-mix .pfc-kpi {
  padding: 5px 8px 5px 10px;
}

.pas2-page--prod.pfc-theme-mix .pfc-kpi-val {
  font-size: 14px;
}

.pas2-page--prod.pfc-theme-mix .pfc-kpi-sub {
  display: none;
}

.pfc-mix-table-stage {
  flex: 1.6 1 0;
  min-height: 280px;
}

.pfc-mix-side {
  flex: 0 0 168px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.85fr;
  gap: 6px;
  min-height: 168px;
  max-height: 180px;
}

.pfc-mix-side .pfc-chart {
  min-height: 0;
}

.pas2-page--prod .pfc-card--table {
  min-height: 0;
  overflow: hidden;
}

.pfc-table-pane {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.pfc-mix-table th {
  background: var(--pfc-accent);
}

.pfc-mix-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 112px;
}

.pfc-mix-cell span {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  min-width: 46px;
  text-align: right;
}

.pfc-mix-cell span.up { color: var(--up, #1B7A72); }
.pfc-mix-cell span.down { color: var(--down, #D97B4C); }

.pfc-mix-track {
  width: 64px;
  height: 6px;
  background: #eef1f3;
  border-radius: 99px;
  overflow: hidden;
  flex: 0 0 64px;
}

.pfc-mix-track i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--pfc-accent);
}

.pfc-grid--2 {
  grid-template-columns: 1fr 1fr;
}

.pas2-page--prod .pfc-head-right .pas2-range {
  margin: 0;
}

.pas2-page--prod .pas2-row--geo {
  margin-top: 4px;
}

@media (max-width: 1100px) {
  .pfc-kpis { grid-template-columns: 1fr 1fr; }
  .pfc-top {
    grid-template-columns: 1fr;
    flex: 0 0 auto;
    min-height: 0;
  }
  .pfc-kpis--compact {
    min-height: 140px;
  }
  .pfc-pies {
    min-height: 180px;
  }
  .pfc-grid {
    flex: 0 0 auto;
    grid-template-columns: 1fr 1fr;
    height: auto;
  }
  .pfc-grid--pies {
    flex: 0 0 auto;
    min-height: 200px;
  }
  .pfc-mix-split {
    grid-template-columns: 1fr;
    flex: 0 0 auto;
    min-height: 0;
  }
  .pfc-mix-side {
    flex: 0 0 auto;
    max-height: none;
    grid-template-columns: 1fr;
    height: auto;
  }
  .pfc-mix-side .pfc-chart { height: 160px; min-height: 160px; }
}

@media (max-width: 720px) {
  .pfc-kpis { grid-template-columns: 1fr; }
  .pfc-grid { grid-template-columns: 1fr; }
  .pfc-head-right { flex-wrap: wrap; }
}

.dash-board .dash-canvas:has(.pas2-page--long) {
  overflow: hidden;
  padding: 8px 12px 8px;
}

.pas2-page.pas2-page--long {
  --pas2-view-h: 100%;
  --pas2-fc-bar-h: 88px;
  --pas2-sales-bar-h: 88px;
  --pas2-snap-pad: 88px;
  height: 100% !important;
  min-height: 0 !important;
  overflow: auto !important;
  gap: 0;
  animation: none;
  scroll-snap-type: y proximity;
  scroll-padding-top: var(--pas2-snap-pad);
  scroll-behavior: auto;
}

.pas2-page.pas2-page--long.is-wheel {
  scroll-snap-type: none !important;
}

.pas2-page--long .pas2-group {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 0;
}

.pas2-page--long .pas2-bar--sticky {
  position: sticky;
  top: 0;
  z-index: 24;
  box-shadow: 0 8px 18px rgba(0, 39, 51, 0.06);
  scroll-snap-align: none;
}

.pas2-page--long .pas2-bar--page-extra.pas2-bar--aak-ch,
.pas2-page--long .pas2-bar--page-extra.pas2-bar--sales-extra {
  position: sticky;
  z-index: 23;
  flex: 0 0 auto;
  padding: 6px 10px 8px;
  margin: 0 0 8px;
  background: #fff;
  box-shadow: 0 6px 14px rgba(0, 39, 51, 0.06);
}

.pas2-page--long .pas2-bar--page-extra.pas2-bar--aak-ch {
  top: var(--pas2-fc-bar-h);
}

.pas2-page--long .pas2-bar--page-extra.pas2-bar--sales-extra {
  top: var(--pas2-sales-bar-h);
}

.pas2-page--long .pas2-bar--aak-ch .pas2-row--aak-ch,
.pas2-page--long .pas2-bar--sales-extra .pas2-row--sales-extra {
  margin: 0;
}

.pas2-page--long #pas2-sec-aak,
.pas2-page--long #pas2-sec-sales-actual {
  overflow: visible !important;
}

.pas2-page--long .pas2-screen--fc .pfc-head {
  flex: 0 0 auto;
}

.pas2-page--long .pas2-screen--fc .pfc-caption {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pas2-page--long .pas2-screen--fc .pfc-main {
  overflow: hidden;
}

.pas2-page--long .pas2-row--extra {
  padding-top: 8px;
  margin-top: 2px;
  border-top: 1px dashed rgba(0, 39, 51, 0.1);
}

.pas2-page--long .pas2-field--range .pas2-range {
  margin-left: 0;
  flex-wrap: wrap;
}

.pas2-page--long .pas2-screen {
  scroll-snap-align: start;
  box-sizing: border-box;
  flex: 0 0 auto;
}

.pas2-page--long .pas2-group[data-group="fc"] .pas2-screen {
  display: flex;
  flex-direction: column;
  height: calc(var(--pas2-view-h) - var(--pas2-fc-bar-h));
  min-height: calc(var(--pas2-view-h) - var(--pas2-fc-bar-h));
  max-height: calc(var(--pas2-view-h) - var(--pas2-fc-bar-h));
  overflow: clip;
}

.pas2-page--long .pas2-screen--fc.pas2-page--prod {
  height: calc(var(--pas2-view-h) - var(--pas2-fc-bar-h)) !important;
  min-height: calc(var(--pas2-view-h) - var(--pas2-fc-bar-h)) !important;
  max-height: calc(var(--pas2-view-h) - var(--pas2-fc-bar-h)) !important;
  overflow: clip !important;
  overscroll-behavior: auto !important;
  overscroll-behavior-y: auto !important;
  background: transparent;
  border: none;
  animation: none;
}

.pas2-page--long .pas2-screen--fc .pfc-top {
  flex: 0 1 200px;
  min-height: 160px;
  max-height: 42%;
}

.pas2-page--long .pas2-screen--fc .pfc-main {
  flex: 1 1 0;
  min-height: 0;
  height: auto;
  overflow: hidden;
}

.pas2-page--long .pas2-screen--fc .pfc-hero {
  flex: 1 1 0;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
}

.pas2-page--long .pas2-screen-tag {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin: 4px 0 10px;
  padding: 4px 0 10px;
  border-bottom: 2px solid var(--pfc-accent, #008C82);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: #002733;
}

.pas2-page--long .pas2-screen-tag i {
  font-size: 22px;
  color: var(--pfc-accent, #008C82);
}

.pas2-page--long .pfc-head h3,
.pas2-page--long .pas2-stage-head h3 {
  font-size: 16px;
}

.pas2-page--long .pas2-screen--fc .pfc-main,
.pas2-page--long .pas2-screen--fc .pas2-stage,
.pas2-page--long .pfc-pie,
.pas2-page--long .pfc-hero,
.pas2-page--long .pfc-chart,
.pas2-page--long .pas2-hero {
  overscroll-behavior: auto !important;
  overscroll-behavior-y: auto !important;
}

.pas2-page--long .pfc-mix {
  overflow: visible;
}

.pas2-page--long .pas2-screen--sales {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: calc(var(--pas2-view-h) - var(--pas2-sales-bar-h));
  min-height: calc(var(--pas2-view-h) - var(--pas2-sales-bar-h));
  max-height: calc(var(--pas2-view-h) - var(--pas2-sales-bar-h));
  overflow: clip;
}

.pas2-page--long .pas2-screen--sales.pas2-page--prod {
  height: calc(var(--pas2-view-h) - var(--pas2-sales-bar-h)) !important;
  min-height: calc(var(--pas2-view-h) - var(--pas2-sales-bar-h)) !important;
  max-height: calc(var(--pas2-view-h) - var(--pas2-sales-bar-h)) !important;
  overflow: clip !important;
  overscroll-behavior: auto !important;
}

.pas2-page--long .pas2-screen--sales .pfc-main,
.pas2-page--long .pas2-screen--sales .pas2-stage {
  flex: 1 1 auto;
  min-height: 0;
}

.pas2-page--long #pas2-sec-sales-actual {
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
}

.pas2-page--long #pas2-sec-sales-actual .pas2-bar--page-extra,
.pas2-page--long #pas2-sec-sales-actual .pas2-screen-tag,
.pas2-page--long #pas2-sec-sales-actual .pfc-kpis {
  flex: 0 0 auto;
}

.pas2-page--long #pas2-sec-sales-actual .pas2-bar--page-extra {
  position: relative;
  top: auto;
  z-index: 2;
}

.pas2-page--long #pas2-sec-sales-actual .pfc-kpis {
  position: relative;
  z-index: 1;
  min-height: 72px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pas2-page--long #pas2-sec-sales-actual .pfc-kpi {
  padding: 8px 10px 8px 12px;
}

.pas2-page--long #pas2-sec-sales-actual .pfc-main {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}

.pas2-page--long #pas2-sec-sales-actual .pas2-hero-scroll {
  display: flex;
  flex: 1 1 0;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.pas2-page--long #pas2-sec-sales-actual .pas2-hero-scroll .pfc-hero {
  flex: 0 0 auto;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
}

.pas2-page--long #pas2-sec-sales-actual .pas2-grain .pas2-pill.on {
  color: var(--pfc-accent, #2EA198);
  box-shadow: inset 0 -2px 0 var(--pfc-accent, #2EA198);
}

.pas2-page--long #pas2-sec-sales-actual .pas2-grain .pas2-pill:hover {
  color: var(--pfc-accent, #2EA198);
}

.pas2-page--long #pas2-sec-sales-mix {
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
  --pfc-accent: #008C82;
  --pfc-soft: #E5F3F2;
}

.pas2-page--long #pas2-sec-sales-mix .pas2-screen-tag,
.pas2-page--long #pas2-sec-sales-mix .pfc-kpis {
  flex: 0 0 auto;
}

.pas2-page--long #pas2-sec-sales-mix .pfc-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 88px;
  gap: 8px;
}

.pas2-page--long #pas2-sec-sales-mix .pfc-kpi {
  padding: 12px 14px 12px 16px;
  background: linear-gradient(180deg, #fff 0%, #f7fbfb 100%);
  box-shadow: 0 1px 0 rgba(0, 39, 51, 0.04);
}

.pas2-page--long #pas2-sec-sales-mix .pfc-kpi-val {
  font-size: 20px;
  margin-top: 0;
}

.pas2-page--long #pas2-sec-sales-mix .pfc-kpi-lab {
  font-size: 11px;
}

.pas2-page--long #pas2-sec-sales-mix .pfc-kpi-sub {
  display: block;
  margin-top: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.smix-body {
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(340px, 0.82fr);
  gap: 10px;
}

.smix-table-card {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  padding: 8px 10px 8px;
  display: flex;
  flex-direction: column;
}

.smix-table-card .pfc-head {
  flex: 0 0 auto;
}

.smix-table-wrap {
  flex: 1 1 0;
  min-height: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.smix-pies {
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: minmax(176px, 0.34fr) minmax(0, 1fr);
  gap: 8px;
}

.smix-pies .pfc-card {
  min-height: 0;
}

.smix-pie--model {
  flex: 0 0 auto;
}

.smix-pie--carline {
  min-height: 0;
}

.smix-pies .pfc-pie-body {
  display: grid;
  grid-template-columns: minmax(112px, 0.9fr) minmax(132px, 1.1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 6px 10px;
  flex: 1 1 auto;
  min-height: 0;
  align-items: center;
}

.smix-pies .pfc-pie {
  width: 100%;
  height: 100%;
  max-height: 148px;
  aspect-ratio: 1;
  justify-self: center;
}

.smix-pie--model .pfc-pie {
  max-height: 118px;
}

.smix-pie--carline .pfc-pie {
  max-height: 156px;
}

.smix-pies .pfc-mix {
  min-height: 0;
  overflow: auto;
  gap: 6px;
}

.smix-pies .pfc-mix-row {
  font-size: 10px;
}

.smix-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: 11px;
}

.smix-table thead th {
  color: #008C82;
  font-weight: 700;
  background: #fff;
  padding: 8px 10px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid #c5ddd9;
}

.smix-table thead tr:first-child th {
  position: sticky;
  top: 0;
  z-index: 3;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.smix-table thead tr:last-child th {
  position: sticky;
  top: 30px;
  z-index: 2;
  font-size: 10px;
  font-weight: 600;
  border-bottom: 2px solid #008C82;
}

.smix-table thead th.is-dim {
  text-align: center;
}

.smix-table thead tr:last-child th {
  text-align: right;
}

.smix-table thead th.is-name {
  left: 0;
  z-index: 6;
  vertical-align: middle;
  border-bottom: 2px solid #008C82;
}

.smix-table thead th.is-mix,
.smix-table td.is-mix {
  background: #eaf6f4;
  color: #008C82;
  font-weight: 700;
}

.smix-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #c5ddd9;
  color: #002733;
  white-space: nowrap;
}

.smix-table td.is-name {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  text-align: left;
  font-weight: 700;
  box-shadow: 4px 0 8px rgba(0, 39, 51, 0.04);
}

.smix-table td.is-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.smix-table .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}

.smix-table tbody tr:hover td {
  background: #f4faf9;
}

.smix-table tbody tr:hover td.is-mix {
  background: #dceeea;
}

.smix-table tbody tr:hover td.is-name {
  background: #f4faf9;
}

.smix-table tr.is-sub td {
  font-weight: 700;
  background: #f7fbfb;
}

.smix-table tr.is-sub td.is-name {
  background: #f7fbfb;
}

.smix-table tr.is-sub td.is-mix {
  background: #e5f3f2;
}

.smix-table tr.is-total td {
  background: #e5f3f2;
  color: #008C82;
  font-weight: 700;
  border-bottom: none;
}

.smix-table tr.is-total td.is-name {
  background: #e5f3f2;
}

.smix-table tr.is-total td.is-mix {
  background: #cde8e4;
}

.smix-table td.is-mix.is-low {
  color: #c44536;
  background: #f8e8e4;
}

.smix-table tbody tr:hover td.is-mix.is-low {
  background: #f3d8d2;
}

.smix-table tr.is-sub td.is-mix.is-low,
.smix-table tr.is-total td.is-mix.is-low {
  color: #c44536;
  background: #f3d8d2;
}

@media (max-width: 1100px) {
  .smix-body {
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  }
}

.pas2-page--long .pas2-screen--soon {
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
}

.pas2-soon {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #809399;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.pas2-page--long #pas2-sec-dealer-mix {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
  --pfc-accent: #008C82;
  --pfc-soft: #E5F3F2;
}

.pas2-wip-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #002733;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.pas2-wip-body {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  filter: blur(7px);
  transform: scale(1.01);
}

.pas2-wip-body .pas2-screen-tag {
  margin: 0 0 8px;
  padding-bottom: 8px;
}

.sagent-table-card {
  flex: 1 1 0;
  min-height: 0;
  height: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sagent-table-wrap {
  flex: 1 1 0;
  min-height: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.sagent-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 11px;
}

.sagent-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 7px 8px;
  white-space: nowrap;
  font-weight: 700;
  border-bottom: 2px solid #008C82;
}

.sagent-table thead th.is-dim {
  color: #008C82;
  background: #fff;
  text-align: left;
}

.sagent-table thead th.is-m {
  background: #008C82;
  color: #fff;
  text-align: center;
}

.sagent-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #d7e4e1;
  color: #002733;
  white-space: nowrap;
}

.sagent-table td.is-num {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.sagent-table td.is-ytg {
  color: #9aa7ab;
}

.sagent-table td.is-sum {
  font-weight: 700;
}

.sagent-table tbody tr:hover td {
  background: #f4faf9;
}

.sagent-table tr.is-total td {
  background: #E5F3F2;
  color: #008C82;
  font-weight: 700;
  border-bottom: none;
}

.sagent-table tr.is-total td.is-ytg {
  color: #5f8d88;
}

.pas2-page--long .pas2-summary {
  display: none;
}
