/**
 * 还车应结款 — 对齐租赁合同管理（vm-page + lc-page + ledger-page）
 */
@import url('../../ledger-shared/styles/ledger-page.css');
@import url('../../lease-contract-management/styles/lease-contract.css');

.vm-page.vrs-page.lc-page--list-dense {
  --lc-list-chrome-offset: 380px;
}

.vm-page.vrs-page .vm-list-table .ant-table-tbody > tr:not(.ant-table-measure-row) > td.vm-stacked-cell-td {
  white-space: normal !important;
  overflow: visible !important;
  vertical-align: middle !important;
}

.vm-page.vrs-page .vrs-action-links {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.vm-page.vrs-page .vrs-action-links .ant-btn-link {
  padding-inline: 0;
  height: auto;
  line-height: 1.4;
}

.vm-page.vrs-page .vrs-dept-tag-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.vm-page.vrs-page .vrs-dept-tag-row .vm-status {
  max-width: 100%;
  justify-content: flex-start;
  font-size: 11px;
  padding: 0 8px;
  line-height: 18px;
  cursor: default;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 提交情况标签色与表头图例圆点一致 */
.vm-page.vrs-page .vrs-dept-tag-row .vm-status-blue {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
}

.vm-page.vrs-page .vrs-submit-legend-dot--amber { background: #d97706; }
.vm-page.vrs-page .vrs-submit-legend-dot--blue { background: #2563eb; }
.vm-page.vrs-page .vrs-submit-legend-dot--green { background: #27a644; }
.vm-page.vrs-page .vrs-submit-legend-dot--red { background: #e5484d; }

.vm-page.vrs-page .vrs-submit-th {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  white-space: normal;
  line-height: 1.3;
}

.vm-page.vrs-page .vrs-submit-th__title {
  font-weight: 500;
  color: var(--ln-ink, #18181b);
}

.vm-page.vrs-page .vrs-submit-th__legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.vm-page.vrs-page .vrs-submit-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.vm-page.vrs-page .vrs-submit-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}


.vm-page.vrs-page .vrs-submit-legend-label {
  font-size: 10px;
  color: var(--ln-muted, #71717a);
  line-height: 1.2;
}

.vm-page.vrs-page .vrs-settlement-status-col {
  white-space: nowrap;
}

.vm-page.vrs-page .vrs-handover-btn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.vm-page.vrs-page .vrs-handover-btn:hover .vm-stack .primary {
  color: var(--ln-link, #32a06e);
  text-decoration: underline;
}

.vm-page.vrs-page .vrs-handover-btn:focus-visible {
  outline: 2px solid var(--ln-link, #32a06e);
  outline-offset: 2px;
  border-radius: 4px;
}

.vm-page.vrs-page .vrs-handover-btn .vm-stack .primary {
  color: var(--ln-link, #32a06e);
  font-weight: 500;
}

/* —— 去处理详情页 —— */
.vm-page.vrs-handle-page {
  padding-bottom: 88px;
}

.vrs-handle-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.vrs-handle-topbar__left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

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

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

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

.vrs-handle-section,
.vrs-handle-fee-section {
  margin-bottom: 16px;
}

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

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

.vrs-handle-kpi-card {
  background: var(--ln-surface-card);
  border: 1px solid var(--ln-hairline);
  border-radius: 12px;
  padding: 16px;
}

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

.vrs-handle-kpi-card__hint {
  margin-left: 6px;
  font-size: 0.75rem;
  color: var(--ln-link);
}

.vrs-handle-kpi-card__value {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ln-ink);
  line-height: 1.2;
}

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

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

.vrs-handle-dept-card {
  margin-bottom: 12px;
  padding: 16px;
}

.vrs-handle-dept-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.vrs-handle-dept-head__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ln-ink);
}

.vrs-handle-dept-head__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8125rem;
  color: var(--ln-muted);
}

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

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

.vrs-handle-field--full {
  grid-column: 1 / -1;
}

.vrs-handle-field__label {
  font-size: 0.8125rem;
  color: var(--ln-muted);
}

.vrs-handle-field__value {
  font-size: 0.875rem;
  color: var(--ln-ink);
}

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

.vrs-handle-subtitle {
  margin: 16px 0 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ln-ink);
}

.vrs-handle-empty {
  padding: 24px;
  text-align: center;
  color: var(--ln-muted);
  background: var(--ln-canvas-soft);
  border-radius: 8px;
  font-size: 0.875rem;
}

.vrs-handle-vehicle-banner {
  margin-bottom: 16px;
  padding: 14px 16px;
}

.vrs-handle-vehicle-compact {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  font-size: 0.875rem;
  color: var(--ln-body);
}

.vrs-handle-vehicle-compact__plate {
  font-weight: 600;
  color: var(--ln-ink);
}

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

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

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