/**
 * 还车应结款-新
 */
@import url('../../ledger-shared/styles/ledger-page.css');
@import url('../../lease-contract-management/styles/lease-contract.css');

.vm-page.vrs2-page.lc-page--list-dense {
  --lc-list-chrome-offset: 420px;
}

.vrs2-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.vrs2-page-header__left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vrs2-badge-new {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #16a34a;
  background: rgba(50, 160, 110, 0.12);
  border: 1px solid rgba(50, 160, 110, 0.25);
}

.vrs2-role-switch {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vrs2-role-switch__label {
  font-size: 0.8125rem;
  color: var(--ln-muted);
  white-space: nowrap;
}

.vrs2-muted {
  color: var(--ln-muted);
  font-size: 0.875rem;
}

.vrs2-pending-hint {
  font-size: 0.8125rem;
  color: #b45309;
  font-weight: 500;
}

.vrs2-settle--refund { color: #16a34a; font-size: 0.8125rem; font-weight: 500; }
.vrs2-settle--pay { color: #dc2626; font-size: 0.8125rem; font-weight: 500; }

.vrs2-action-cell {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.vrs2-primary-action {
  font-weight: 600;
}

/* 四部门进度条 */
.vrs2-dept-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.vrs2-dept-progress__seg {
  height: 28px;
  border-radius: 6px;
  background: var(--ln-canvas-soft, #f4f4f5);
  border: 1px solid var(--ln-hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  color: var(--ln-muted);
  cursor: default;
}

.vrs2-dept-progress__seg--done {
  background: rgba(50, 160, 110, 0.14);
  border-color: rgba(50, 160, 110, 0.35);
  color: #15803d;
  font-weight: 600;
}

.vrs2-dept-progress__seg--active {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.35);
  color: #1d4ed8;
}

/* —— 详情页 —— */
.vrs2-detail-page {
  padding-bottom: 80px;
}

.vrs2-detail-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.vrs2-detail-topbar__left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.vrs2-detail-title-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.vrs2-detail-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ln-ink);
}

.vrs2-pipeline {
  display: flex;
  align-items: flex-start;
  gap: 0;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  overflow-x: auto;
}

.vrs2-pipeline__step {
  flex: 1;
  min-width: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  padding: 0 4px 4px;
}

.vrs2-pipeline__step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 9px;
  left: calc(50% + 10px);
  width: calc(100% - 20px);
  height: 2px;
  background: var(--ln-hairline);
  z-index: 0;
}

.vrs2-pipeline__step--done:not(:last-child)::after {
  background: #32a06e;
}

.vrs2-pipeline__dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--ln-hairline);
  background: var(--ln-surface-card);
  position: relative;
  z-index: 1;
}

.vrs2-pipeline__step--done .vrs2-pipeline__dot {
  border-color: #32a06e;
  background: #32a06e;
}

.vrs2-pipeline__step--current .vrs2-pipeline__dot {
  border-color: #32a06e;
  box-shadow: 0 0 0 4px rgba(50, 160, 110, 0.18);
}

.vrs2-pipeline__label {
  font-size: 0.75rem;
  color: var(--ln-muted);
  text-align: center;
  line-height: 1.3;
}

.vrs2-pipeline__step--done .vrs2-pipeline__label,
.vrs2-pipeline__step--current .vrs2-pipeline__label {
  color: var(--ln-ink);
  font-weight: 500;
}

.vrs2-overview-banner {
  margin-bottom: 16px;
  padding: 14px 16px;
}

.vrs2-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 20px;
  font-size: 0.875rem;
  margin-bottom: 12px;
}

.vrs2-overview-label {
  display: block;
  font-size: 0.75rem;
  color: var(--ln-muted);
  margin-bottom: 2px;
}

.vrs2-link-btn {
  font-size: 0.8125rem;
}

.vrs2-section {
  margin-bottom: 16px;
}

.vrs2-section__title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ln-ink);
}

.vrs2-dept-overview-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.vrs2-dept-overview-card {
  background: var(--ln-surface-card);
  border: 1px solid var(--ln-hairline);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vrs2-dept-overview-card__title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ln-ink);
}

.vrs2-dept-overview-card__meta {
  font-size: 0.75rem;
  color: var(--ln-muted);
}

.vrs2-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.vrs2-kpi-card {
  background: var(--ln-surface-card);
  border: 1px solid var(--ln-hairline);
  border-radius: 10px;
  padding: 14px;
}

.vrs2-kpi-card__label {
  font-size: 0.8125rem;
  color: var(--ln-muted);
  margin-bottom: 8px;
}

.vrs2-kpi-card__value {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--ln-ink);
}

.vrs2-kpi-card__unit {
  font-size: 0.875rem;
  font-weight: 500;
  margin-left: 4px;
}

.vrs2-kpi-card--warn .vrs2-kpi-card__value { color: #d97706; }
.vrs2-kpi-card--good .vrs2-kpi-card__value { color: #16a34a; }
.vrs2-kpi-card--danger .vrs2-kpi-card__value { color: #dc2626; }

.vrs2-dept-panel {
  padding: 16px;
  margin-bottom: 12px;
}

.vrs2-dept-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.vrs2-dept-panel__head h3 {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
}

.vrs2-dept-panel__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
  color: var(--ln-muted);
}

.vrs2-dept-panel__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--ln-hairline);
}

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

.vrs2-field__label {
  display: block;
  font-size: 0.8125rem;
  color: var(--ln-muted);
  margin-bottom: 4px;
}

.vrs2-field__value {
  font-size: 0.875rem;
  color: var(--ln-ink);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.vrs2-source-tag {
  display: inline-flex;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.6875rem;
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.1);
}

.vrs2-subtitle {
  margin: 16px 0 8px;
  font-size: 0.875rem;
  font-weight: 600;
}

.vrs2-closure-panel {
  padding: 16px;
  margin-bottom: 16px;
}

.vrs2-closure-panel h3 {
  margin: 0 0 12px;
  font-size: 0.9375rem;
}

.vrs2-detail-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 24px;
  background: var(--ln-surface-card);
  border-top: 1px solid var(--ln-hairline);
}

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

@media (max-width: 640px) {
  .vrs2-dept-overview-row,
  .vrs2-kpi-row,
  .vrs2-overview-grid,
  .vrs2-field-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vrs2-pipeline__step--current .vrs2-pipeline__dot {
    box-shadow: none;
  }
}
