/* 725 报表需求拆分页公共样式
   来源：/Users/yudongbo/Downloads/奕境(报表)_20260526.html
   适配：奕境项目-原型输出规范 v3.2（PC 端） */

:root {
  --report-filter-height: 40px;
  --report-row-hover: var(--sidebar-active-bg);
  --report-grid-line: var(--border-light);
  --report-muted-bg: var(--bg-table-header);
  --report-prd-width: 420px;
}

body.report-page {
  background: var(--bg-shell);
}

body.report-page .content {
  padding: 16px 24px 20px;
  background: var(--bg-shell);
  overflow: hidden;
}

body.report-page .topbar-left {
  min-width: 0;
}

body.report-page .topbar-left strong {
  white-space: nowrap;
}

.page-content {
  display: none;
}

.page-content.active {
  display: block;
  min-width: 0;
  overflow: hidden;
}

/* ===== 725 PRD 右侧阅读区 ===== */
.report-prd-panel {
  position: relative;
  width: var(--report-prd-width);
  height: 100vh;
  min-width: 0;
  flex: 0 0 var(--report-prd-width);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  background: var(--bg-card);
  border-left: 1px solid var(--border-light);
  color: var(--text-primary);
  box-sizing: border-box;
}

.report-prd-resizer {
  position: absolute;
  left: -4px;
  top: 0;
  bottom: 0;
  z-index: 12;
  width: 8px;
  cursor: col-resize;
  touch-action: none;
}

.report-prd-resizer::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border-light);
  transition: background 0.15s, width 0.15s;
}

.report-prd-resizer:hover::after,
body.report-prd-resizing .report-prd-resizer::after {
  left: 2px;
  width: 3px;
  background: var(--brand-primary);
}

body.report-prd-resizing {
  cursor: col-resize;
  user-select: none;
}

.report-prd-head {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-lg) var(--space-md);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
}

.report-prd-eyebrow {
  margin-bottom: 3px;
  color: var(--brand-primary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
}

.report-prd-title {
  margin: 0;
  color: var(--text-primary);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  line-height: 1.35;
}

.report-prd-status {
  flex-shrink: 0;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border: 1px solid var(--tag-info-border);
  border-radius: var(--radius-sm);
  background: var(--tag-info-bg);
  color: var(--tag-info-text);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
}

.report-prd-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: var(--bg-card);
  padding: 0 var(--space-lg) var(--space-lg);
}

.report-prd-meta {
  display: grid;
  gap: var(--space-xs);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: var(--font-size-xs);
  line-height: 1.6;
}

.report-prd-meta strong {
  color: var(--text-primary);
  font-weight: var(--font-weight-medium);
}

.report-prd-section {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-light);
}

.report-prd-section:last-child {
  border-bottom: 0;
}

.report-prd-section h3 {
  margin: 0 0 var(--space-sm);
  color: var(--text-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  line-height: 1.4;
}

.report-prd-section p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.75;
}

.report-prd-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.report-prd-list li {
  display: flex;
  gap: var(--space-xs);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.6;
}

.report-prd-list li::before {
  content: "";
  width: 5px;
  height: 5px;
  margin-top: 8px;
  flex-shrink: 0;
  border-radius: var(--radius-full);
  background: var(--brand-primary);
}

.report-prd-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.report-prd-tag {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-table-header);
  color: var(--text-secondary);
  font-size: var(--font-size-xs);
  line-height: 1;
}

.report-prd-empty {
  padding: var(--space-lg) 0;
  color: var(--text-tertiary);
  font-size: var(--font-size-sm);
  line-height: 1.7;
}

body.report-page .page-desc-trigger {
  right: calc(var(--report-prd-width) + 42px);
}

body.report-prd-collapsed .report-prd-panel {
  display: none;
}

body.report-prd-collapsed .page-desc-trigger {
  right: 18px;
}

.report-prd-toggle {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0 var(--space-sm);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}

.report-prd-toggle .dms-icon {
  width: 16px;
  height: 16px;
}

.report-prd-toggle:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: var(--sidebar-active-bg);
}

.report-prd-toggle.is-active {
  border-color: var(--brand-primary);
  background: var(--sidebar-active-bg);
  color: var(--brand-primary);
}

@media (max-width: 1180px) {
  :root {
    --report-prd-width: 300px;
  }

  body.report-page .content {
    padding: 12px 16px 16px;
  }

  .report-prd-head {
    padding: var(--space-md);
  }

  .report-prd-body {
    padding: 0 var(--space-md) var(--space-md);
  }
}

/* ===== 维修营业日报 ===== */
.rpt {
  height: calc(100vh - 92px);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  overflow-y: auto;
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
}

.hdr {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 10px var(--space-md);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  position: sticky;
  top: 0;
  z-index: 5;
}

.hdr-center {
  position: static;
  transform: none;
  text-align: left;
}

.hdr-title {
  color: var(--text-primary);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  line-height: 1.4;
}

.hdr-meta {
  margin-top: 2px;
  color: var(--text-tertiary);
  font-size: var(--font-size-xs);
}

.hdr-right,
.date-nav {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.date-nav button,
.lt-btn,
.lt-btn-filter,
.lt-pager button {
  min-width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0 var(--space-md);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.date-nav button {
  width: 32px;
  padding: 0;
}

.date-nav button:hover,
.lt-btn:hover,
.lt-btn-filter.default:hover,
.lt-pager button:hover:not(:disabled):not(.active) {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: var(--bg-card);
}

.date-input,
.lt-input-wrap input,
.lt-input-wrap select,
.lt-date-range .lt-date-range-text,
.lt-date-range-drop input[type="date"],
.lt-pager .pager-goto input,
.lt-pager .pager-size {
  width: 100%;
  height: var(--report-filter-height);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  outline: none;
}

.date-input {
  height: 32px;
  width: 132px;
  padding: 0 var(--space-sm);
}

.date-input:focus,
.lt-input-wrap input:focus,
.lt-input-wrap select:focus,
.lt-date-range .lt-date-range-text:focus,
.lt-date-range-drop input[type="date"]:focus,
.lt-pager .pager-goto input:focus,
.lt-pager .pager-size:focus {
  border-color: var(--brand-primary);
}

body.report-page .badge {
  min-height: 22px !important;
  padding: 1px 8px !important;
  background: var(--tag-success-bg) !important;
  border-color: var(--tag-success-border) !important;
  color: var(--tag-success-text) !important;
  border-radius: var(--radius-sm) !important;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-md);
}

.kpi {
  min-height: 96px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: none;
}

.kpi-label {
  margin-bottom: var(--space-xs);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

.kpi-val {
  color: var(--text-primary);
  font-size: var(--font-size-display);
  font-weight: var(--font-weight-semibold);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.kpi-sub {
  margin-top: var(--space-xs);
  color: var(--text-tertiary);
  font-size: var(--font-size-xs);
}

.up,
.lt-green {
  color: var(--success) !important;
}

.dn,
.lt-red {
  color: var(--error) !important;
}

.neu {
  color: var(--text-tertiary);
}

.row2,
.row3 {
  display: grid;
  gap: var(--space-md);
  align-items: stretch;
}

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

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

.card {
  min-width: 0;
  padding: var(--space-lg);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: none;
  overflow: hidden;
}

.card-title {
  margin-bottom: var(--space-md);
  color: var(--text-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
}

.ch-wrap {
  width: 100%;
  position: relative;
  overflow: hidden;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
  font-size: var(--font-size-xs);
}

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

.tech-scroll,
.order-scroll {
  max-height: 220px;
  overflow-y: auto;
}

.tech-row,
.s-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}

.tech-row:last-child,
.s-row:last-child {
  border-bottom: 0;
}

.av {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: var(--radius-full);
  background: var(--sidebar-active-bg) !important;
  color: var(--brand-primary) !important;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
}

.bar-bg {
  flex: 1;
  height: 6px;
  margin: 0 var(--space-sm);
  border-radius: var(--radius-full);
  overflow: hidden;
  background: var(--border-light);
}

.bar-f {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--brand-primary) !important;
}

.s-row {
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-sm);
  background: var(--bg-card);
}

.s-tag {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border: 1px solid var(--tag-neutral-border);
  border-radius: var(--radius-sm);
  background: var(--tag-neutral-bg);
  color: var(--tag-neutral-text);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
}

.sw {
  background: var(--tag-warning-bg);
  color: var(--tag-warning-text);
  border-color: var(--tag-warning-border);
}

.sr {
  background: var(--tag-info-bg);
  color: var(--tag-info-text);
  border-color: var(--tag-info-border);
}

.sq,
.sd {
  background: var(--tag-success-bg);
  color: var(--tag-success-text);
  border-color: var(--tag-success-border);
}

/* ===== 多条件筛选 + 宽表 ===== */
.lt-wrap {
  height: calc(100vh - 92px);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.lt-filter {
  flex-shrink: 0;
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-md);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: none;
}

.lt-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px var(--space-lg);
  align-items: end;
}

.lt-filter-item {
  min-width: 0;
  height: var(--report-filter-height);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  position: relative;
  padding: 0 10px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}

.lt-filter-item:focus-within {
  border-color: var(--brand-primary);
}

.lt-filter-item label {
  flex: 0 0 auto;
  max-width: 112px;
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  line-height: 20px;
  pointer-events: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lt-input-wrap,
.lt-date-range {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  width: auto;
}

.lt-input-wrap input,
.lt-input-wrap select {
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 28px 0 0;
  appearance: none;
  -webkit-appearance: none;
}

.lt-input-wrap.plain input {
  padding-right: 10px;
  cursor: text;
}

.lt-input-wrap::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--text-tertiary);
}

.lt-input-wrap.plain::after,
.lt-input-wrap.search::after,
.lt-input-wrap.combobox::after {
  display: none;
}

.lt-input-wrap.search input {
  padding-right: 32px;
}

.lt-input-wrap.search .search-icon {
  position: absolute;
  right: 9px;
  top: 50%;
  width: 14px;
  height: 14px;
  color: var(--text-tertiary);
  transform: translateY(-50%);
  pointer-events: none;
}

.lt-input-wrap.search .search-icon * {
  stroke: currentColor;
}

.lt-input-wrap.combobox input {
  padding-right: 28px;
  cursor: text;
}

.lt-input-wrap.combobox .cb-arrow {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--border-light);
  color: var(--text-tertiary);
  font-size: 10px;
  cursor: pointer;
}

.lt-input-wrap.combobox .cb-arrow:hover {
  color: var(--brand-primary);
  background: var(--sidebar-active-bg);
}

.lt-date-range .lt-date-range-text {
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 10px 0 0;
  text-align: left;
  cursor: pointer;
}

.lt-date-range-drop {
  display: none;
  position: absolute;
  top: calc(var(--report-filter-height) + 4px);
  left: 0;
  z-index: 30;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}

.lt-date-range-drop.open {
  display: flex;
}

.lt-date-range-drop input[type="date"] {
  height: 32px;
  width: 140px;
  padding: 0 var(--space-sm);
}

.lt-date-range-drop span {
  color: var(--text-tertiary);
  font-size: var(--font-size-sm);
}

.lt-filter-footer {
  grid-column: 4;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-sm);
}

.lt-btn-primary,
.lt-btn-filter.primary {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: var(--sidebar-brand-logo-color);
}

.lt-btn-primary:hover,
.lt-btn-filter.primary:hover {
  background: var(--brand-primary-dark);
  border-color: var(--brand-primary-dark);
  color: var(--sidebar-brand-logo-color);
}

.lt-btn-default,
.lt-btn-filter.default {
  background: var(--bg-card);
  color: var(--text-primary);
}

.lt-btn-filter.warn {
  background: var(--tag-warning-bg);
  border-color: var(--tag-warning-border);
  color: var(--tag-warning-text);
}

.lt-btn-filter.warn:hover {
  border-color: var(--warning);
  color: var(--warning);
}

.lt-btn-filter.link,
.lt-filter-toggle,
.lt-filter-more-toggle {
  min-width: 0;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand-primary);
  font-size: var(--font-size-sm);
  text-decoration: none;
}

.lt-btn-filter.link:hover,
.lt-filter-toggle:hover,
.lt-filter-more-toggle:hover {
  color: var(--brand-primary-dark);
  text-decoration: underline;
}

.lt-list-area {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: var(--space-sm) var(--space-lg) 0;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.lt-toolbar {
  min-height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 0 0 var(--space-sm);
}

.lt-toolbar-left,
.lt-toolbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.lt-table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: var(--bg-card);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  box-shadow: none;
}

.lt-table {
  min-width: max-content;
  width: auto;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  white-space: nowrap;
}

.lt-table th,
.lt-table td {
  height: 34px;
  padding: 6px 10px;
  border: 0;
  border-bottom: 1px solid var(--border-light);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.lt-table th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--bg-table-header);
  color: var(--text-secondary);
  font-weight: var(--font-weight-medium);
}

.lt-table thead tr:nth-child(2) th {
  top: 34px;
}

.lt-table tbody tr:hover td {
  background: var(--report-row-hover);
}

.lt-table tbody tr:nth-child(even) td {
  background: var(--bg-table-header);
}

.lt-table tbody tr:nth-child(even):hover td {
  background: var(--report-row-hover);
}

.lt-table .sticky {
  position: sticky;
  z-index: 3;
  background: var(--bg-card);
}

.lt-table th.sticky {
  z-index: 6;
  background: var(--bg-table-header);
}

.lt-table tbody tr:nth-child(even) .sticky {
  background: var(--bg-table-header);
}

.lt-table tbody tr:hover .sticky {
  background: var(--report-row-hover);
}

.th-group {
  background: var(--bg-table-header) !important;
  color: var(--brand-primary) !important;
  font-weight: var(--font-weight-semibold) !important;
}

.lt-bold {
  font-weight: var(--font-weight-semibold);
}

.lt-pager {
  min-height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-lg);
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

.lt-pager-left,
.lt-pager-right,
.pg-pages,
.lt-pager .pager-goto {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.lt-pager .pager-total {
  color: var(--text-tertiary);
}

.lt-pager button {
  min-width: 32px;
  padding: 0 var(--space-sm);
}

.lt-pager button.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: var(--sidebar-brand-logo-color);
}

.lt-pager button:disabled {
  color: var(--text-placeholder);
  cursor: not-allowed;
}

.lt-pager .pager-goto input {
  height: 32px;
  width: 48px;
  text-align: center;
}

.lt-pager .pager-size {
  height: 32px;
  width: auto;
  padding: 0 var(--space-sm);
}

.lt-pager .pager-ellipsis {
  min-width: 24px;
  display: inline-flex;
  justify-content: center;
  color: var(--text-tertiary);
}

.lt-datalist {
  display: none;
  position: absolute;
  top: calc(var(--report-filter-height) + 2px);
  left: 0;
  right: 0;
  z-index: 40;
  max-height: 220px;
  overflow-y: auto;
  margin: 0;
  padding: var(--space-xs) 0;
  list-style: none;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}

.lt-datalist.show,
.lt-datalist[style*="block"] {
  display: block;
}

.lt-datalist li {
  padding: 7px var(--space-md);
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  cursor: pointer;
}

.lt-datalist li:hover,
.lt-datalist li.selected {
  background: var(--sidebar-active-bg);
  color: var(--brand-primary);
}

.lt-datalist li.hidden {
  display: none;
}

/* ===== 表格列宽和冻结列 ===== */
.lt-table th[class*="col-"],
.lt-table td[class*="col-"] {
  min-width: 92px;
}

#page-lead-tracking .col-seq,
#page-parts-inventory-ledger .col-seq,
#page-repair-requisition-detail .col-seq,
#page-parts-sales-detail .col-seq,
#page-purchase-return-detail .col-seq,
#page-internal-usage-detail .col-seq {
  left: 0;
  width: 60px;
  min-width: 60px;
  max-width: 60px;
}

#page-lead-tracking .col-store-code {
  left: 60px;
  width: 96px;
  min-width: 96px;
  max-width: 96px;
}

#page-lead-tracking .col-store-name {
  left: 156px;
  width: 180px;
  min-width: 180px;
  max-width: 180px;
  text-align: left;
}

#page-parts-inventory-ledger .col-code {
  left: 60px;
  width: 104px;
  min-width: 104px;
  max-width: 104px;
}

#page-parts-inventory-ledger .col-name {
  left: 164px;
  width: 160px;
  min-width: 160px;
  max-width: 160px;
  text-align: left;
}

#page-repair-requisition-detail .col-order-no,
#page-parts-sales-detail .col-sale-no {
  left: 60px;
  width: 170px;
  min-width: 170px;
  max-width: 170px;
}

#page-purchase-return-detail .col-return-no {
  left: 60px;
  width: 150px;
  min-width: 150px;
  max-width: 150px;
}

#page-internal-usage-detail .col-usage-no {
  left: 60px;
  width: 160px;
  min-width: 160px;
  max-width: 160px;
}

.col-store-name,
.col-vin,
.col-io-time,
.col-settle-time,
.col-remark {
  min-width: 150px !important;
}

.col-part-name,
.col-name,
.col-model,
.col-reason,
.col-ref-no,
.col-purchase-no,
.col-out-no {
  min-width: 130px !important;
}

/* ===== 报表说明弹框 / 页面说明抽屉 ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
  background: color-mix(in srgb, var(--text-primary) 42%, transparent);
}

.modal-overlay.show {
  display: flex;
}

.modal-box {
  width: 780px;
  max-width: 92vw;
  max-height: 82vh;
  overflow-y: auto;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.modal-header {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 0 var(--space-lg);
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-card);
}

.modal-header h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
}

.modal-close,
.page-desc-drawer-close {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-tertiary);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover,
.page-desc-drawer-close:hover {
  background: var(--bg-page);
  color: var(--text-primary);
}

.modal-body {
  padding: var(--space-lg);
}

.desc-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.desc-tbl th,
.desc-tbl td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
  line-height: 1.7;
}

.desc-tbl th {
  width: 92px;
  background: var(--bg-table-header);
  color: var(--text-secondary);
  font-weight: var(--font-weight-medium);
  vertical-align: top;
}

.desc-tbl td {
  color: var(--text-primary);
}

.desc-sub-label {
  min-width: 72px;
  display: inline-block;
  color: var(--text-primary);
  font-weight: var(--font-weight-semibold);
}

.desc-formula {
  color: var(--brand-primary);
  font-family: var(--font-family);
  font-weight: var(--font-weight-semibold);
}

.page-desc-trigger {
  position: fixed;
  right: 18px;
  bottom: 48px;
  z-index: 50;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0 var(--space-md);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--brand-primary);
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  cursor: pointer;
}

.page-desc-trigger:hover,
.page-desc-trigger.open {
  border-color: var(--brand-primary);
  background: var(--sidebar-active-bg);
}

.page-desc-trigger svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.page-desc-icon-collapsed {
  display: block;
}

.page-desc-icon-expanded,
.page-desc-trigger.open .page-desc-icon-collapsed {
  display: none;
}

.page-desc-trigger.open .page-desc-icon-expanded {
  display: block;
}

.page-desc-eye {
  transform-box: fill-box;
  transform-origin: center;
  animation: pageDescBlink 3s ease-in-out infinite;
}

@keyframes pageDescBlink {
  0%,
  45%,
  55%,
  100% {
    transform: scaleX(1);
  }
  48%,
  52% {
    transform: scaleX(0.08);
  }
}

.page-desc-drawer {
  position: fixed;
  top: 56px;
  right: -320px;
  bottom: 0;
  z-index: 60;
  width: 320px;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-left: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  transition: right 0.25s ease;
}

.page-desc-drawer.open {
  right: 0;
}

.page-desc-drawer-head {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-md);
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
}

.page-desc-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-lg);
}

.page-desc-empty {
  padding-top: 40px;
  text-align: center;
}

.page-desc-empty .page-desc-working {
  width: 52px;
  height: 52px;
  margin-bottom: var(--space-md);
  color: var(--text-tertiary);
}

.page-desc-gear {
  animation: pageDescGearSpin 2s linear infinite;
  transform-origin: 12px 13px;
}

.page-desc-gear * {
  stroke: var(--brand-primary);
  fill: var(--brand-primary);
}

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

.page-desc-empty-title {
  margin: 0 0 var(--space-xs);
  color: var(--text-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
}

.page-desc-empty-desc {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.7;
}

@media (max-width: 1280px) {
  .kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .row2,
  .row3 {
    grid-template-columns: 1fr;
  }

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

  .lt-filter-footer {
    grid-column: 2;
  }
}
