/* ============================================
   车辆租赁管理系统 - 全局样式
   ============================================ */

:root {
  --primary: #4361ee;
  --primary-dark: #3a56d4;
  --primary-light: #eef1ff;
  --success: #2ec4b6;
  --warning: #ff9f1c;
  --danger: #e71d36;
  --gray-50: #f8f9fa;
  --gray-100: #f1f3f5;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
  --radius: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
  --transition: 0.2s ease;
}

/* 月租回执：选择后立即显示图片缩略图或 PDF 标识，并保留查看、下载、删除操作。 */
.finance-receipt-visual{width:44px;height:40px;flex:0 0 44px;padding:2px!important;border:0!important;border-right:1px solid rgba(23,92,211,.16)!important;background:transparent;display:inline-grid;place-items:center;overflow:hidden;cursor:pointer}.finance-receipt-visual img{width:100%;height:100%;object-fit:cover;border-radius:4px}.finance-pdf-badge{display:grid;place-items:center;width:34px;height:30px;border-radius:5px;background:#fff;color:#c9192d;font-size:10px;font-weight:800;box-shadow:inset 0 0 0 1px #f4b3bc}.finance-receipt-title{max-width:120px}.finance-local-view{color:#175cd3}
.trust-row-link{cursor:pointer}.trust-row-link:hover td{background:#f4f8ff}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
}

.write-freeze-banner {
  position: fixed;
  z-index: 12050;
  top: 14px;
  left: calc(50% + 110px);
  transform: translateX(-50%);
  width: min(680px, calc(100vw - 260px));
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid #f4c96b;
  border-radius: 14px;
  background: #fff8e7;
  color: #713b12;
  box-shadow: 0 12px 32px rgba(95, 54, 12, 0.18);
  pointer-events: none;
}

.write-freeze-banner-icon {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 999px;
  background: #a64b10;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.write-freeze-banner-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
  font-size: 13px;
  line-height: 1.45;
}

.write-freeze-banner-copy strong { color: #5f2f0b; font-size: 14px; }

@media (max-width: 768px) {
  .write-freeze-banner {
    z-index: 170;
    top: 66px;
    left: 10px;
    right: 10px;
    transform: none;
    width: auto;
    padding: 10px 12px;
  }

  .write-freeze-banner-copy { font-size: 12px; }
  .write-freeze-banner-copy strong { font-size: 13px; }
}

/* ====== 布局 ====== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* 侧边导航栏 */
.sidebar {
  width: 220px;
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  box-shadow: 2px 0 16px rgba(0,0,0,0.15);
}

.sidebar-logo {
  padding: 24px 20px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo .icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 0;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
  color: #fff;
  background: rgba(255,255,255,0.05);
}

.sidebar-nav a.active {
  color: #fff;
  background: rgba(67, 97, 238, 0.25);
  border-left-color: var(--primary);
}

.sidebar-nav a .nav-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  color: rgba(255,255,255,0.35);
}

/* 主内容区 */
.main-content {
  flex: 1;
  margin-left: 220px;
  padding: 24px;
  min-height: 100vh;
}

/* 页面顶部 */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--gray-900);
}

.page-header .date-display {
  font-size: 14px;
  color: var(--gray-600);
  background: #fff;
  padding: 6px 16px;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

/* ====== 统计卡片 ====== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  border: 1px solid var(--gray-200);
}

.stat-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-card .stat-icon.blue { background: #eef1ff; color: var(--primary); }
.stat-card .stat-icon.green { background: #e6f9f7; color: var(--success); }
.stat-card .stat-icon.orange { background: #fff3e6; color: var(--warning); }
.stat-card .stat-icon.red { background: #fde8ec; color: var(--danger); }

.stat-card .stat-info .stat-number {
  font-size: 28px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.2;
}

.stat-card .stat-info .stat-label {
  font-size: 13px;
  color: var(--gray-600);
  margin-top: 2px;
}

/* ====== 面板/卡片 ====== */
.panel {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  margin-bottom: 20px;
}

.panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-900);
}

.panel-body {
  padding: 20px;
}

/* ====== 表格 ====== */
.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table thead th {
  background: var(--gray-50);
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: var(--gray-700);
  border-bottom: 2px solid var(--gray-200);
  white-space: nowrap;
  font-size: 13px;
}

table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-800);
}

table tbody tr {
  transition: var(--transition);
}

table tbody tr:hover {
  background: var(--primary-light);
}

table tbody tr.row-danger {
  background: #fff5f5;
}

table tbody tr.row-danger:hover {
  background: #fff0f0;
}

table tbody tr.row-warning {
  background: #fffcf5;
}

table tbody tr.row-warning:hover {
  background: #fff8eb;
}

/* 车辆状态行颜色 */
table tbody tr.row-rented {
  background: #eefbf0;
}
table tbody tr.row-rented:hover {
  background: #e1f7e5;
}
table tbody tr.row-available {
  background: #fde8ec;
}
table tbody tr.row-available:hover {
  background: #fcd5db;
}

/* ====== 按钮 ====== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-success:hover {
  background: #25a89d;
}

.btn-warning {
  background: var(--warning);
  color: #fff;
}

.btn-warning:hover {
  background: #e68a00;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #c81a2e;
}

.btn-clear-draft {
  background: #fff1f0;
  color: #cf1322;
  border: 1px solid #ffa39e;
}

.btn-clear-draft:hover:not(:disabled) {
  background: #ffccc7;
  color: #a8071a;
  border-color: #ff7875;
}

.btn-outline {
  background: #fff;
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}

.btn-outline:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
}

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}

.btn-lg {
  padding: 10px 24px;
  font-size: 15px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ====== 表单 ====== */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-group label .required {
  color: var(--danger);
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  color: var(--gray-800);
  background: #fff;
  transition: var(--transition);
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.form-control:disabled {
  background: var(--gray-100);
  color: var(--gray-600);
}

select.form-control {
  appearance: auto;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.contract-term-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 22px;
  align-items: start;
  margin-bottom: 16px;
}

.contract-term-grid > .form-group {
  min-width: 0;
  margin-bottom: 0;
}

.contract-term-payment {
  grid-column: span 2;
}

.form-inline {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ====== 上传区域 ====== */
.upload-section {
  margin-bottom: 20px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px;
  background: #fafbfc;
}

.upload-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.upload-section h4 .badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 500;
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.upload-box {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: #fff;
  position: relative;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.upload-box:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.upload-box.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

.upload-box .upload-icon {
  font-size: 32px;
  color: var(--gray-400);
  margin-bottom: 8px;
}

.upload-box .upload-text {
  font-size: 12px;
  color: var(--gray-500);
}

.upload-box .upload-hint {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 4px;
}

.upload-box.has-file {
  border-style: solid;
  border-color: var(--success);
  background: #f0faf9;
}

.upload-box.has-file .upload-icon {
  color: var(--success);
}

.upload-box .file-preview {
  max-width: 100%;
  max-height: 100px;
  object-fit: contain;
  border-radius: 4px;
}

.upload-box .file-info {
  font-size: 11px;
  color: var(--gray-600);
  margin-top: 6px;
  word-break: break-all;
  max-width: 100%;
}

.upload-box .file-actions { display:flex; align-items:center; justify-content:center; gap:7px; margin-top:8px; flex-wrap:wrap; }
.upload-box .file-view,
.upload-box .file-download {
  padding: 4px 12px;
  border: 1px solid #91d5ff;
  border-radius: 6px;
  background: #e6f7ff;
  color: #096dd9;
  font-size: 11px;
  cursor: pointer;
  text-decoration:none;
}

.upload-box .file-view:hover,
.upload-box .file-view:focus-visible,
.upload-box .file-download:hover,
.upload-box .file-download:focus-visible {
  border-color: #1890ff;
  background: #bae7ff;
}

.upload-box .file-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  display: none;
}

.upload-box.has-file .file-remove,
.upload-box.has-file:hover .file-remove {
  display: flex;
}

.upload-box.has-file:focus-within .file-remove {
  display: flex;
}

/* ====== 搜索框 ====== */
.search-box {
  position: relative;
  max-width: 300px;
}

.search-box input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--gray-300);
  border-radius: 20px;
  font-size: 13px;
  transition: var(--transition);
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.search-box .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
  font-size: 14px;
}

/* ====== 标签/徽章 ====== */
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  text-align: center;
}

.status-badge.rented {
  background: #e6f9f7;
  color: #0d9488;
}

.status-badge.available {
  background: #eef1ff;
  color: var(--primary);
}

.status-badge.active {
  background: #e6f9f7;
  color: #0d9488;
}

.status-badge.ended {
  background: var(--gray-100);
  color: var(--gray-600);
}

.status-badge.expiring {
  background: #fde8ec;
  color: var(--danger);
}

.status-badge.warning {
  background: #fff3e6;
  color: var(--warning);
}

/* ====== 提示信息 ====== */
.alert {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-warning {
  background: #fff9e6;
  color: #996800;
  border: 1px solid #ffe69c;
}

.alert-info {
  background: #eef1ff;
  color: #364fc7;
  border: 1px solid #c7d2fe;
}

.alert-success {
  background: #e6f9f7;
  color: #0d6b5e;
  border: 1px solid #99f6e4;
}

.alert-danger {
  background: #fde8ec;
  color: #991b1b;
  border: 1px solid #fecdd3;
}

/* ====== 模态框 ====== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--gray-500);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ====== Toast 消息 ====== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  animation: slideIn 0.3s ease;
  box-shadow: var(--shadow-lg);
  max-width: 380px;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.info { background: var(--primary); }
.toast.success { background: var(--success); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ====== 加载动画 ====== */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.spinner.dark {
  border-color: rgba(0,0,0,0.1);
  border-top-color: var(--primary);
}

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

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  color: var(--gray-600);
  font-size: 13px;
}

/* ====== 空状态 ====== */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--gray-500);
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 14px;
}

/* ====== 开关样式 ====== */
.toggle-section {
  margin-bottom: 16px;
}

.toggle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 8px 12px;
  background: var(--gray-50);
  border-radius: 6px;
  user-select: none;
}

/* ====== 快捷按钮区 ====== */
.action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.action-bar .left-actions {
  display: flex;
  gap: 8px;
}

/* ====== 响应式 ====== */
@media (max-width: 1200px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 60px;
  }
  .sidebar-logo span,
  .sidebar-nav a span,
  .sidebar-footer {
    display: none;
  }
  .sidebar-nav a {
    justify-content: center;
    padding: 12px;
  }
  .main-content {
    margin-left: 60px;
  }
  .stats-row {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .contract-term-grid {
    grid-template-columns: 1fr;
  }
  .contract-term-payment {
    grid-column: auto;
  }
}

/* ============================================
   2026 UI refresh — Ant Design inspired system
   Keep these overrides last so legacy page-level markup can migrate gradually.
   ============================================ */
:root {
  --primary: #1677ff;
  --primary-dark: #0958d9;
  --primary-light: #e6f4ff;
  --success: #52c41a;
  --warning: #faad14;
  --danger: #ff4d4f;
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #f0f0f0;
  --gray-300: #d9d9d9;
  --gray-400: #bfbfbf;
  --gray-500: #8c8c8c;
  --gray-600: #595959;
  --gray-700: #434343;
  --gray-800: #262626;
  --gray-900: #141414;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.16);
  --focus-ring: 0 0 0 3px rgba(22, 119, 255, 0.18);
  --sidebar-width: 232px;
  --content-max-width: 1600px;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: #f5f7fa;
  color: var(--gray-800);
  font-size: 14px;
  line-height: 1.5715;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea,
[tabindex] {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

::selection {
  color: #fff;
  background: var(--primary);
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 50%;
  z-index: 4000;
  padding: 8px 14px;
  color: #fff;
  background: var(--primary);
  border-radius: 6px;
  transform: translate(-50%, -160%);
  transition: transform var(--transition);
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

.sidebar {
  width: var(--sidebar-width);
  background: #001529;
  box-shadow: 2px 0 8px rgba(0, 21, 41, 0.14);
}

.sidebar-logo {
  min-height: 64px;
  padding: 14px 20px;
  border-bottom-color: rgba(255, 255, 255, 0.1);
  font-size: 17px;
  letter-spacing: 0;
}

.sidebar-logo .icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1677ff, #69b1ff);
  box-shadow: 0 4px 12px rgba(22, 119, 255, 0.34);
}

.sidebar-nav {
  padding: 12px 8px;
  overflow-y: auto;
}

.sidebar-nav a {
  min-height: 42px;
  margin: 4px 0;
  padding: 10px 14px;
  border: 0;
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.68);
}

.sidebar-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-nav a.active {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 4px 12px rgba(22, 119, 255, 0.22);
}

.sidebar-nav a .nav-icon {
  display: inline-flex;
  width: 22px;
  align-items: center;
  justify-content: center;
  filter: saturate(0.9);
}

.sidebar-footer {
  min-height: 52px;
  padding: 14px 20px;
  border-top-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.52);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sidebar-footer a {
  color: rgba(255, 255, 255, 0.82) !important;
  flex: 0 0 auto;
}

.sidebar-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.78);
}

.sidebar-username {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-role-badge {
  flex: 0 0 auto;
  padding: 2px 7px;
  border: 1px solid rgba(94, 234, 212, 0.34);
  border-radius: 999px;
  color: #8ff4e5;
  background: rgba(20, 184, 166, 0.14);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}

.main-content {
  width: calc(100% - var(--sidebar-width));
  max-width: calc(var(--content-max-width) + 48px);
  margin-left: var(--sidebar-width);
  padding: 24px;
}

.page-header {
  min-height: 48px;
  margin-bottom: 18px;
  gap: 16px;
}

.page-header h1 {
  font-size: 24px;
  line-height: 1.35;
  letter-spacing: -0.2px;
}

.page-header .date-display {
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  box-shadow: none;
}

.panel,
.stat-card {
  border-color: var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.panel {
  overflow: hidden;
}

.panel-header {
  min-height: 58px;
  padding: 13px 20px;
  gap: 12px;
  border-bottom-color: var(--gray-200);
}

.panel-header h3 {
  font-size: 16px;
  line-height: 1.5;
}

.panel-body {
  padding: 20px;
}

.table-container {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
}

table {
  min-width: 720px;
  background: #fff;
  font-variant-numeric: tabular-nums;
}

table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 12px 14px;
  color: var(--gray-700);
  background: #fafafa;
  border-bottom: 1px solid var(--gray-200);
}

table tbody td {
  padding: 13px 14px;
  border-bottom-color: var(--gray-200);
  vertical-align: middle;
}

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

table tbody tr:hover {
  background: #f0f7ff;
}

table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.btn {
  min-height: 34px;
  justify-content: center;
  padding: 6px 15px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 500;
  line-height: 1.4;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.02);
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary {
  background: var(--primary);
}

.btn-primary:hover:not(:disabled) {
  background: #4096ff;
}

.btn-success {
  background: #389e0d;
}

.btn-success:hover:not(:disabled) {
  background: #52c41a;
}

.btn-danger {
  background: var(--danger);
}

.btn-danger:hover:not(:disabled) {
  background: #ff7875;
}

.btn-warning {
  color: rgba(0, 0, 0, 0.88);
  background: var(--warning);
}

.btn-outline {
  color: var(--gray-800);
  border-color: var(--gray-300);
}

.btn-outline:hover:not(:disabled) {
  color: var(--primary);
  border-color: var(--primary);
  background: #fff;
}

.btn-sm {
  min-height: 30px;
  padding: 4px 11px;
}

.btn-lg {
  min-height: 40px;
  padding: 8px 20px;
}

.btn:disabled,
.form-control:disabled {
  cursor: not-allowed;
}

.form-group label {
  color: var(--gray-800);
  font-weight: 500;
}

.form-control,
.search-box input {
  min-height: 36px;
  border-color: var(--gray-300);
  border-radius: 6px;
  color: var(--gray-900);
}

.form-control:hover:not(:disabled),
.search-box input:hover {
  border-color: #4096ff;
}

.form-control:focus,
.search-box input:focus {
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

.form-control::placeholder,
.search-box input::placeholder {
  color: var(--gray-400);
}

textarea.form-control {
  min-height: 88px;
  resize: vertical;
}

.form-row {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.form-inline,
.action-bar .left-actions {
  flex-wrap: wrap;
}

.upload-section,
.upload-box {
  border-color: var(--gray-300);
}

.upload-section {
  border-radius: var(--radius-lg);
  background: #fafafa;
}

.upload-box {
  min-height: 132px;
  border-radius: var(--radius);
}

.upload-box:hover,
.upload-box.dragover {
  border-color: var(--primary);
  background: #f0f7ff;
}

.upload-box:focus-within {
  box-shadow: var(--focus-ring);
}

.upload-box.has-file {
  border-color: #95de64;
  background: #f6ffed;
}

.search-box {
  width: min(100%, 320px);
}

.status-badge {
  border: 1px solid transparent;
  border-radius: 999px;
  line-height: 1.5;
  white-space: nowrap;
}

.vehicle-brand-range {
  white-space: nowrap;
  color: var(--gray-700);
  font-weight: 500;
}

/* 合同总表：表头与每列数据统一居中，日期保持单行到日。 */
.contract-list-table {
  min-width: 1480px;
}

.contract-list-table thead th,
.contract-list-table tbody td {
  text-align: center;
  vertical-align: middle;
}

.contract-list-table thead th:first-child,
.contract-list-table tbody td:first-child {
  width: 48px;
  min-width: 48px;
  padding-left: 8px;
  padding-right: 8px;
}

.contract-list-table thead th:nth-child(2),
.contract-list-table tbody td:nth-child(2) {
  min-width: 220px;
}

.contract-list-table thead th:nth-child(3),
.contract-list-table tbody td:nth-child(3) {
  min-width: 90px;
}

.contract-list-table thead th:nth-child(4),
.contract-list-table tbody td:nth-child(4) {
  min-width: 145px;
}

.contract-list-table thead th:nth-child(5),
.contract-list-table tbody td:nth-child(5) {
  min-width: 110px;
}

.contract-list-table thead th:nth-child(6),
.contract-list-table tbody td:nth-child(6),
.contract-list-table thead th:nth-child(9),
.contract-list-table tbody td:nth-child(9),
.contract-list-table thead th:nth-child(10),
.contract-list-table tbody td:nth-child(10),
.contract-list-table thead th:nth-child(11),
.contract-list-table tbody td:nth-child(11) {
  min-width: 82px;
}

.contract-list-table thead th:nth-child(7),
.contract-list-table tbody td:nth-child(7) {
  min-width: 115px;
}

.contract-list-table thead th:nth-child(8),
.contract-list-table tbody td:nth-child(8) {
  min-width: 225px;
}

.contract-list-table thead th:nth-child(12),
.contract-list-table tbody td:nth-child(12) {
  min-width: 105px;
}

.contract-list-table .contract-date-range {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* 车辆总表：各栏表头与内容统一居中。 */
.vehicle-list-table {
  min-width: 1320px;
}

.vehicle-list-table thead th,
.vehicle-list-table tbody td {
  text-align: center;
  vertical-align: middle;
}

/* 已卖车辆保留在列表中，用独立的浅绿色整行背景标识。 */
body .main-content:not(.dashboard-main) .vehicle-list-table tbody tr.row-sold[data-vehicle-sale-state="sold"] {
  background: #e8f8ee;
}

body .main-content:not(.dashboard-main) .vehicle-list-table tbody tr.row-sold[data-vehicle-sale-state="sold"]:hover {
  background: #d8f3e2;
}

.vehicle-table-sort-button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  padding: 5px 8px;
  border-radius: 7px;
  cursor: pointer;
}

.vehicle-table-sort-button:hover,
.vehicle-table-sort-button:focus-visible,
.vehicle-table-sort-button.is-active {
  color: #175cd3;
  background: #eaf2ff;
  outline: none;
}

#vehicle-brand-sort-indicator,
#vehicle-status-sort-indicator {
  display: inline-block;
  min-width: 12px;
  margin-left: 3px;
}

.vehicle-list-table thead th:first-child,
.vehicle-list-table tbody td:first-child {
  width: 48px;
  min-width: 48px;
  padding-left: 8px;
  padding-right: 8px;
}

.vehicle-list-table thead th:nth-child(2),
.vehicle-list-table tbody td:nth-child(2),
.vehicle-list-table thead th:nth-child(7),
.vehicle-list-table tbody td:nth-child(7) {
  min-width: 105px;
}

.vehicle-list-table thead th:nth-child(3),
.vehicle-list-table tbody td:nth-child(3),
.vehicle-list-table thead th:nth-child(4),
.vehicle-list-table tbody td:nth-child(4) {
  min-width: 80px;
}

.vehicle-list-table thead th:nth-child(5),
.vehicle-list-table tbody td:nth-child(5) {
  min-width: 185px;
}

.vehicle-list-table thead th:nth-child(6),
.vehicle-list-table tbody td:nth-child(6) {
  min-width: 190px;
  white-space: nowrap;
}

.vehicle-list-table thead th:nth-child(8),
.vehicle-list-table tbody td:nth-child(8),
.vehicle-list-table thead th:nth-child(9),
.vehicle-list-table tbody td:nth-child(9),
.vehicle-list-table thead th:nth-child(10),
.vehicle-list-table tbody td:nth-child(10) {
  min-width: 112px;
  white-space: nowrap;
}

.vehicle-list-table thead th:nth-child(11),
.vehicle-list-table tbody td:nth-child(11) {
  min-width: 170px;
}

.vehicle-action-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.vehicle-plate-view{display:inline-flex;align-items:center;color:#135ec7;text-decoration:none;font-weight:750;transition:color .16s ease,transform .16s ease}.vehicle-plate-view:hover{color:#084aa5;transform:translateY(-1px);text-decoration:underline;text-underline-offset:3px}
.contract-number-view{color:#175cd3;text-decoration:none}.contract-number-view:hover{color:#0b4db5;text-decoration:underline;text-underline-offset:3px}

/* 托管验车照片批量上传与逐张预览。 */
.inspection-batch-upload {
  min-height: 180px;
  padding: 18px;
  text-align: left;
}

.inspection-batch-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 96px;
  color: var(--gray-600);
  text-align: center;
}

.inspection-batch-icon {
  font-size: 32px;
}

.inspection-photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
  gap: 12px;
  width: 100%;
}

.inspection-photo-gallery:empty {
  display: none;
}

.inspection-photo-item {
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.inspection-photo-item img {
  display: block;
  width: 100%;
  height: 112px;
  object-fit: cover;
  cursor: zoom-in;
  border-radius: 6px;
}

.inspection-photo-name {
  overflow: hidden;
  margin-top: 7px;
  color: var(--gray-700);
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspection-photo-download {
  display: block;
  margin-top: 6px;
  color: var(--primary);
  font-size: 12px;
  text-align: center;
  text-decoration: none;
}

.inspection-photo-download:hover { text-decoration: underline; }

.inspection-photo-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 26px;
  height: 26px;
  padding: 0;
  color: #fff;
  font-size: 19px;
  line-height: 24px;
  background: #ff4d4f;
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: pointer;
}

.inspection-photo-remove:hover {
  background: #cf1322;
}

.status-badge.rented,
.status-badge.active {
  color: #237804;
  background: #f6ffed;
  border-color: #b7eb8f;
}

.status-badge.available {
  color: #0958d9;
  background: #e6f4ff;
  border-color: #91caff;
}

.status-badge.expiring {
  color: #a8071a;
  background: #fff1f0;
  border-color: #ffa39e;
}

.status-badge.warning {
  color: #ad6800;
  background: #fffbe6;
  border-color: #ffe58f;
}

.alert {
  border-radius: var(--radius);
}

.modal-overlay {
  padding: 20px;
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(2px);
}

.modal {
  width: min(100%, 560px);
  max-height: min(84vh, 760px);
  border-radius: var(--radius-lg);
}

.modal-header,
.modal-footer {
  min-height: 56px;
}

.modal-close {
  min-width: 32px;
  min-height: 32px;
  border-radius: 6px;
}

.modal-close:hover {
  color: var(--gray-900);
  background: var(--gray-100);
}

.toast-container {
  top: 24px;
  right: 24px;
  width: min(380px, calc(100vw - 32px));
}

.toast {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.toast.success { background: #389e0d; }
.toast.error { background: #cf1322; }
.toast.info { background: #0958d9; }

.loading-overlay {
  min-height: 76px;
}

.empty-state {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.mobile-topbar,
.sidebar-backdrop {
  display: none;
}

@media (max-width: 1200px) {
  .main-content {
    padding: 20px;
  }

  .panel-body {
    padding: 18px;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 56px;
  }

  body.nav-open {
    overflow: hidden;
  }

  .mobile-topbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 180;
    display: flex;
    height: 56px;
    padding: 0 14px;
    align-items: center;
    gap: 12px;
    color: #fff;
    background: #001529;
    box-shadow: 0 2px 8px rgba(0, 21, 41, 0.18);
  }

  .mobile-menu-button {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: transparent;
    border: 0;
    border-radius: 6px;
    font-size: 22px;
    cursor: pointer;
  }

  .mobile-menu-button:hover {
    background: rgba(255, 255, 255, 0.12);
  }

  .mobile-topbar-title {
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sidebar {
    width: min(82vw, 280px) !important;
    z-index: 220;
    transform: translateX(-102%);
    transition: transform 0.22s ease;
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-logo span,
  .sidebar-nav a span {
    display: inline;
  }

  .sidebar-footer {
    display: flex;
  }

  .sidebar-nav a {
    justify-content: flex-start;
    padding: 10px 14px;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.45);
  }

  body.nav-open .sidebar-backdrop {
    display: block;
  }

  .main-content {
    width: 100%;
    max-width: none;
    margin-left: 0 !important;
    padding: 16px;
  }

  .page-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .page-header h1 {
    font-size: 21px;
  }

  .page-header .date-display {
    padding: 4px 10px;
    font-size: 12px;
  }

  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-header > .form-inline,
  .panel-header > .action-bar {
    width: 100%;
  }

  .panel-header .btn,
  .action-bar .btn {
    min-height: 38px;
  }

  .panel-body {
    padding: 14px;
  }

  .form-inline {
    width: 100%;
  }

  .form-control,
  .search-box input,
  .btn {
    min-height: 40px;
  }

  .btn-sm {
    min-height: 36px;
  }

  .search-box {
    max-width: none !important;
    flex: 1 1 180px;
  }

  .upload-grid {
    grid-template-columns: 1fr;
  }

  .toast-container {
    top: 68px;
    right: 16px;
    left: 16px;
    width: auto;
  }

  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-height: 88vh;
    border-radius: 14px 14px 0 0;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 12px;
  }

  .panel-body {
    padding: 12px;
  }

  .form-inline .btn,
  .action-bar .btn,
  .modal-footer .btn {
    flex: 1 1 auto;
  }

  .modal-footer {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .btn,
  .status-badge,
  .upload-box,
  .panel {
    border: 1px solid CanvasText;
  }
}
.file-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 15, 28, 0.82);
  backdrop-filter: blur(3px);
}
.file-preview-panel {
  display: flex;
  flex-direction: column;
  width: min(1120px, 96vw);
  height: min(860px, 94vh);
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}
.file-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 10px 16px 10px 20px;
  border-bottom: 1px solid #edf0f5;
}
.file-preview-header strong {
  overflow: hidden;
  color: #17233d;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-preview-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.file-preview-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: #f2f4f7;
  color: #344054;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.file-preview-body {
  display: flex;
  flex: 1;
  min-height: 0;
  align-items: center;
  justify-content: center;
  overflow: auto;
  background: #eef1f6;
}
.file-preview-body img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.file-preview-body iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.upload-box.has-file .upload-icon { cursor: zoom-in; }
@media (max-width: 640px) {
  .file-preview-overlay { padding: 0; }
  .file-preview-panel { width: 100vw; height: 100vh; border-radius: 0; }
  .file-preview-header { padding-left: 12px; }
  .file-preview-actions .btn { display: none; }
}
/* Filtered list result indicator used by vehicle and contract management. */
.list-result-count {
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:5px 11px;
  border:1px solid #d6e4ff;
  border-radius:999px;
  background:#f0f5ff;
  color:#475467;
  font-size:12px;
  white-space:nowrap;
}
.list-result-count strong { color:#175cd3; font-size:14px; margin:0 3px; }
.vehicle-link{color:#0958d9;font-weight:700;text-decoration:none}.vehicle-link:hover{text-decoration:underline}

/* Contract/trust list polish: compact columns, clear vehicle jump affordance and no bottom scrollbar. */
.contract-table-shell,
.trust-table-shell { overflow-x: hidden; }
.contract-table-shell .contract-list-table,
.trust-table-shell .trust-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}
.contract-table-shell .contract-list-table th,
.contract-table-shell .contract-list-table td,
.trust-table-shell .trust-table th,
.trust-table-shell .trust-table td {
  min-width: 0 !important;
  padding: 10px 5px;
  text-align: center;
  vertical-align: middle;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.contract-table-shell .contract-list-table th:first-child,
.contract-table-shell .contract-list-table td:first-child { width: 3%; padding-left: 2px; padding-right: 2px; }
.contract-table-shell .contract-list-table th:nth-child(2),
.contract-table-shell .contract-list-table td:nth-child(2) { width: 13%; padding-left: 2px; }
.contract-table-shell .contract-list-table th:nth-child(3),
.contract-table-shell .contract-list-table td:nth-child(3) { width: 7%; }
.contract-table-shell .contract-list-table th:nth-child(4),
.contract-table-shell .contract-list-table td:nth-child(4) { width: 9%; }
.contract-table-shell .contract-list-table th:nth-child(5),
.contract-table-shell .contract-list-table td:nth-child(5) { width: 10%; }
.contract-table-shell .contract-list-table th:nth-child(6),
.contract-table-shell .contract-list-table td:nth-child(6) { width: 6%; }
.contract-table-shell .contract-list-table th:nth-child(7),
.contract-table-shell .contract-list-table td:nth-child(7) { width: 8%; }
.contract-table-shell .contract-list-table th:nth-child(8),
.contract-table-shell .contract-list-table td:nth-child(8) { width: 14%; }
.contract-table-shell .contract-list-table th:nth-child(9),
.contract-table-shell .contract-list-table td:nth-child(9) { width: 6%; }
.contract-table-shell .contract-list-table th:nth-child(10),
.contract-table-shell .contract-list-table td:nth-child(10) { width: 6%; }
.contract-table-shell .contract-list-table th:nth-child(11),
.contract-table-shell .contract-list-table td:nth-child(11) { width: 5%; }
.contract-table-shell .contract-list-table th:nth-child(12),
.contract-table-shell .contract-list-table td:nth-child(12) { width: 13%; }
.contract-table-shell .contract-list-table .contract-date-range { white-space: nowrap; }
.contract-table-shell .contract-list-table td:last-child .btn { margin: 2px 0; }

.trust-table-shell .trust-table th:nth-child(1),
.trust-table-shell .trust-table td:nth-child(1) { width: 11%; }
.trust-table-shell .trust-table th:nth-child(2),
.trust-table-shell .trust-table td:nth-child(2) { width: 8%; }
.trust-table-shell .trust-table th:nth-child(3),
.trust-table-shell .trust-table td:nth-child(3) { width: 8%; }
.trust-table-shell .trust-table th:nth-child(4),
.trust-table-shell .trust-table td:nth-child(4) { width: 13%; }
.trust-table-shell .trust-table th:nth-child(5),
.trust-table-shell .trust-table td:nth-child(5) { width: 11%; }
.trust-table-shell .trust-table th:nth-child(6),
.trust-table-shell .trust-table td:nth-child(6) { width: 6%; }
.trust-table-shell .trust-table th:nth-child(7),
.trust-table-shell .trust-table td:nth-child(7) { width: 14%; }
.trust-table-shell .trust-table th:nth-child(8),
.trust-table-shell .trust-table td:nth-child(8) { width: 8%; }
.trust-table-shell .trust-table th:nth-child(9),
.trust-table-shell .trust-table td:nth-child(9) { width: 6%; }
.trust-table-shell .trust-table th:nth-child(10),
.trust-table-shell .trust-table td:nth-child(10) { width: 6%; }
.trust-table-shell .trust-table th:nth-child(11),
.trust-table-shell .trust-table td:nth-child(11) { width: 9%; }
.trust-table-shell .trust-table td:last-child .btn { margin: 2px 0; }

.record-vehicle-jump {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid #84adff;
  border-radius: 8px;
  background: #eff6ff;
  color: #175cd3;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.record-vehicle-jump:hover {
  border-color: #1677ff;
  background: #dbeafe;
  color: #0958d9;
  transform: translateY(-1px);
}
.record-vehicle-hint {
  display: block;
  margin-top: 4px;
  color: #98a2b3;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.25;
}

.violation-dropzone {
  display: flex;
  min-height: 116px;
  padding: 18px;
  border: 1px dashed #84adff;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  color: #175cd3;
  background: #f5fbff;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.violation-dropzone:hover,
.violation-dropzone.is-dragover {
  border-color: #1677ff;
  background: #eaf3ff;
  box-shadow: inset 0 0 0 2px rgba(22, 119, 255, .1);
}
.violation-drop-hint { display: block; margin-top: 6px; color: #667085; font-size: 12px; font-weight: 400; }
.violation-fields-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.35fr) minmax(140px, .65fr);
  gap: 10px 12px;
  align-items: end;
}
.violation-fields-grid .form-group { min-width: 0; margin-bottom: 0; }
.violation-check-result {
  display: flex;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  align-items: center;
  background: #f2f4f7;
  color: #667085;
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 1100px) {
  .contract-table-shell .contract-list-table th,
  .contract-table-shell .contract-list-table td,
  .trust-table-shell .trust-table th,
  .trust-table-shell .trust-table td { padding-left: 3px; padding-right: 3px; font-size: 12px; }
  .record-vehicle-jump { padding: 4px 6px; font-size: 11px; }
}
@media (max-width: 768px) {
  .contract-table-shell { overflow: visible; }
  .contract-table-shell .contract-list-table,
  .contract-table-shell .contract-list-table tbody { display: block; width: 100%; }
  .contract-table-shell .contract-list-table { min-width: 0 !important; }
  .contract-table-shell .contract-list-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .contract-table-shell .contract-list-table tbody tr {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
    margin-bottom: 12px;
    padding: 15px;
    border: 1px solid #dce5ef;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(25, 50, 80, .055);
  }
  .contract-table-shell .contract-list-table tbody td {
    display: block;
    width: auto !important;
    min-width: 0 !important;
    padding: 0 !important;
    border: 0;
    text-align: left;
    overflow-wrap: anywhere;
  }
  .contract-table-shell .contract-list-table tbody td::before {
    display: block;
    margin-bottom: 3px;
    color: #718197;
    font-size: 10px;
    font-weight: 650;
  }
  .contract-table-shell .contract-list-table tbody td:nth-child(1) {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1;
  }
  .contract-table-shell .contract-list-table tbody td:nth-child(1)::before { display:none; }
  .contract-table-shell .contract-list-table tbody td:nth-child(2),
  .contract-table-shell .contract-list-table tbody td:nth-child(4),
  .contract-table-shell .contract-list-table tbody td:nth-child(5),
  .contract-table-shell .contract-list-table tbody td:nth-child(8),
  .contract-table-shell .contract-list-table tbody td:nth-child(12) { grid-column: 1 / -1; }
  .contract-table-shell .contract-list-table tbody td:nth-child(2) { padding-right:34px !important; }
  .contract-table-shell .contract-list-table tbody td:nth-child(2)::before { content:'合同编号'; }
  .contract-table-shell .contract-list-table tbody td:nth-child(3)::before { content:'承租人'; }
  .contract-table-shell .contract-list-table tbody td:nth-child(4)::before { content:'车辆品牌 / 续航'; }
  .contract-table-shell .contract-list-table tbody td:nth-child(5)::before { content:'关联车牌'; }
  .contract-table-shell .contract-list-table tbody td:nth-child(6)::before { content:'月租金'; }
  .contract-table-shell .contract-list-table tbody td:nth-child(7)::before { content:'租期'; }
  .contract-table-shell .contract-list-table tbody td:nth-child(8)::before { content:'起止日期'; }
  .contract-table-shell .contract-list-table tbody td:nth-child(9)::before { content:'剩余天数'; }
  .contract-table-shell .contract-list-table tbody td:nth-child(10)::before { content:'状态'; }
  .contract-table-shell .contract-list-table tbody td:nth-child(11)::before { content:'合同 PDF'; }
  .contract-table-shell .contract-list-table tbody td:nth-child(12)::before { content:'操作'; }
  .contract-table-shell .contract-list-table tbody td:nth-child(12) .btn { margin:2px 6px 2px 0; }
  .contract-table-shell .contract-pdf-trigger { scroll-margin-top:86px; }
  .trust-table-shell { overflow: visible; }
  .trust-table-shell .trust-table,
  .trust-table-shell .trust-table tbody { display: block; width: 100%; }
  .trust-table-shell .trust-table { min-width: 0 !important; }
  .trust-table-shell .trust-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .trust-table-shell .trust-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
    margin-bottom: 12px;
    padding: 14px;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .04);
  }
  .trust-table-shell .trust-table tbody td {
    display: block;
    width: auto !important;
    min-width: 0 !important;
    padding: 0 !important;
    border: 0;
    text-align: left;
    overflow-wrap: anywhere;
  }
  .trust-table-shell .trust-table tbody td::before {
    display: block;
    margin-bottom: 3px;
    color: #667085;
    font-size: 11px;
    font-weight: 600;
  }
  .trust-table-shell .trust-table tbody td:nth-child(1),
  .trust-table-shell .trust-table tbody td:nth-child(5),
  .trust-table-shell .trust-table tbody td:nth-child(7),
  .trust-table-shell .trust-table tbody td:nth-child(11) { grid-column: 1 / -1; }
  .trust-table-shell .trust-table tbody td:nth-child(1)::before { content: '托管编号'; }
  .trust-table-shell .trust-table tbody td:nth-child(2)::before { content: '托管人'; }
  .trust-table-shell .trust-table tbody td:nth-child(3)::before { content: '手机号'; }
  .trust-table-shell .trust-table tbody td:nth-child(4)::before { content: '托管公司'; }
  .trust-table-shell .trust-table tbody td:nth-child(5)::before { content: '关联车辆'; }
  .trust-table-shell .trust-table tbody td:nth-child(6)::before { content: '月租金'; }
  .trust-table-shell .trust-table tbody td:nth-child(7)::before { content: '起止日期'; }
  .trust-table-shell .trust-table tbody td:nth-child(8)::before { content: '已交押金'; }
  .trust-table-shell .trust-table tbody td:nth-child(9)::before { content: '状态'; }
  .trust-table-shell .trust-table tbody td:nth-child(10)::before { content: '合同 PDF'; }
  .trust-table-shell .trust-table tbody td:nth-child(11)::before { content: '操作'; }
  .trust-table-shell .trust-table tbody td:nth-child(11) .btn { margin: 2px 6px 2px 0; }
  .violation-binding-grid { grid-template-columns: 1fr !important; }
  .violation-fields-grid { grid-template-columns: 1fr; }
}
.finance-upload{border:1px dashed #84adff;background:#f8fbff;border-radius:10px;padding:14px;min-height:104px;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;color:#175cd3;cursor:pointer;transition:.2s;box-sizing:border-box}.finance-upload:hover,.finance-upload.dragover{border-color:#1677ff;background:#eef6ff;box-shadow:0 0 0 3px rgba(22,119,255,.12)}.finance-upload.has-file{border-color:#53b175;background:#f2fff6;color:#067647}.finance-upload.disabled{cursor:not-allowed;opacity:.65}.finance-upload-hint,.finance-upload-name{font-size:12px;color:#667085;margin-top:5px;word-break:break-all}.finance-upload-actions{gap:6px;margin-top:8px}.finance-payment-list{display:flex;flex-direction:column;gap:8px}.finance-payment-row{display:grid;grid-template-columns:180px 150px 170px minmax(280px,1fr) 210px auto;gap:10px;align-items:end;padding:11px;border:1px solid #e4e7ec;border-radius:10px;background:#fff}.finance-payment-row label{font-size:12px;color:#475467;margin:0}.finance-payment-row .form-control{margin-top:4px;padding:7px 9px;font-size:12px}.finance-payment-period{display:flex;flex-direction:column;gap:2px;color:#667085;font-size:12px}.finance-payment-period strong{color:#101828;font-size:13px}.payment-files{display:block;width:100%;font-size:11px;margin-top:5px}.payment-existing{display:flex;gap:6px;flex-wrap:wrap;margin-top:7px}.finance-receipt-chip{display:inline-flex;align-items:center;max-width:100%;background:#eef4ff;border:1px solid #d1e0ff;border-radius:6px;overflow:hidden}.finance-receipt-chip.is-pending{background:#fff8e8;border-color:#fedf89}.finance-receipt-chip small{padding:0 5px;color:#b54708;white-space:nowrap}.finance-receipt-link,.finance-receipt-name,.finance-receipt-download,.finance-receipt-remove,.finance-local-download,.finance-local-remove{border:0;background:transparent;padding:4px 6px;font-size:11px}.finance-receipt-link,.finance-receipt-name{color:#175cd3;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.finance-receipt-link,.finance-receipt-download,.finance-receipt-remove,.finance-local-download,.finance-local-remove{cursor:pointer}.finance-receipt-download,.finance-local-download{color:#067647;border-left:1px solid rgba(23,92,211,.16)}.finance-receipt-remove,.finance-local-remove{color:#b42318;border-left:1px solid rgba(23,92,211,.16)}.finance-empty{padding:18px;text-align:center;color:#667085;background:#f9fafb;border-radius:9px}.finance-error{color:#b42318;background:#fff5f5}@media(max-width:1280px){.finance-payment-row{grid-template-columns:170px 150px 170px minmax(240px,1fr) 190px auto}}@media(max-width:1100px){.finance-payment-row{grid-template-columns:1fr 1fr}.finance-payment-period,.payment-receipt-picker{grid-column:1/-1}}@media(max-width:620px){.finance-payment-row{grid-template-columns:1fr}.finance-payment-period,.payment-receipt-picker{grid-column:auto}}

/* 财务、月租和违章附件采用同一套常驻图片 / PDF 预览。 */
.attachment-preview-host{display:block;width:100%;margin-top:10px}.attachment-preview-host[hidden]{display:none!important}.attachment-inline-preview{position:relative;width:100%;height:156px;overflow:hidden;border:1px solid #bfd0e4;border-radius:10px;background:#eaf1f8;box-shadow:inset 0 0 0 1px rgba(255,255,255,.55)}.attachment-inline-preview img,.attachment-inline-preview iframe{display:block;width:100%;height:100%;border:0;object-fit:contain;background:#fff;pointer-events:none}.attachment-preview-caption{position:absolute;left:8px;right:8px;bottom:8px;padding:5px 8px;overflow:hidden;border-radius:6px;color:#fff;background:rgba(7,21,37,.78);font-size:10px;line-height:1.25;text-overflow:ellipsis;white-space:nowrap;backdrop-filter:blur(4px)}.attachment-inline-preview.is-local{border-color:#f0b84a}.finance-upload-preview{max-width:520px}.finance-upload.has-file{min-height:280px}.finance-upload.has-file .finance-upload-preview{display:block}.violation-upload-column{display:flex;min-width:0;flex-direction:column;gap:10px}.violation-upload-column .attachment-preview-host{margin-top:0}.violation-upload-column .attachment-inline-preview{height:190px}.payment-receipt-picker{display:flex;min-width:0;flex-direction:column;align-self:stretch;color:#475467;font-size:12px}.payment-receipt-label{margin-bottom:4px}.payment-receipt-dropzone{display:flex;min-height:56px;width:100%;padding:8px 10px;border:1px dashed #84adff;border-radius:9px;align-items:center;justify-content:center;flex-direction:column;color:#175cd3;background:#f5f9ff;cursor:pointer;transition:.16s}.payment-receipt-dropzone:hover,.payment-receipt-dropzone.is-dragover{border-color:#1677ff;background:#eaf3ff;box-shadow:0 0 0 3px rgba(22,119,255,.1)}.payment-receipt-dropzone strong{font-size:12px}.payment-receipt-dropzone small{margin-top:1px;color:#7b8ba1;font-size:10px}.finance-receipt-visual{position:relative}.finance-receipt-visual .finance-pdf-badge{position:static;width:34px;height:30px;padding:0;border-radius:5px;background:#fff;font-size:10px}.payment-existing:has(.finance-receipt-chip) .finance-muted{display:none}

html.shell-embedded body{padding-top:0!important}html.shell-embedded .sidebar,html.shell-embedded .mobile-topbar,html.shell-embedded .sidebar-backdrop,html.shell-embedded .skip-link{display:none!important}html.shell-embedded .main-content{width:100%!important;margin-left:0!important;min-height:100vh;min-height:100dvh}html.shell-embedded .app-layout{display:block!important}
.site-compliance-footer{display:flex;justify-content:center;align-items:center;gap:8px;flex-wrap:wrap;padding:22px 12px 10px;color:#98a2b3;font-size:12px}.site-compliance-footer a{color:#667085;text-decoration:none}.site-compliance-footer a:hover{color:#1677ff;text-decoration:underline}

/* ============================================
   2026 unified operations console
   Dashboard-grade visual language for every authenticated module.
   ============================================ */
:root {
  --console-navy: #071525;
  --console-navy-soft: #102b50;
  --console-blue: #2878ff;
  --console-teal: #20bfae;
  --console-canvas: #eef2f7;
  --console-line: #dbe3ed;
  --console-text: #172337;
  --console-muted: #66758a;
  --console-shadow: 0 12px 34px rgba(25, 50, 80, .065);
  --console-shadow-hover: 0 18px 42px rgba(25, 50, 80, .11);
  --sidebar-width: 232px;
}

body {
  background:
    radial-gradient(circle at 92% 0, rgba(35, 112, 255, .075), transparent 25%),
    linear-gradient(180deg, #f2f5f9 0, var(--console-canvas) 38%, #edf2f7 100%);
  color: var(--console-text);
}

body .sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #071525 0%, #071d31 60%, #06131f 100%);
  border-right: 1px solid rgba(153, 190, 225, .08);
  box-shadow: 12px 0 36px rgba(9, 25, 43, .12);
}

body .sidebar-logo {
  min-height: 82px;
  padding: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  color: #f4f8ff;
  font-size: 17px;
  letter-spacing: .045em;
}

body .sidebar-logo .icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(145deg, #2677ff, #20c7bb);
  box-shadow: 0 8px 22px rgba(33, 114, 255, .3);
}

.brand-icon-svg { width: 22px; height: 22px; }

body .sidebar-nav { padding: 18px 12px; }

body .sidebar-nav a {
  min-height: 46px;
  margin: 4px 0;
  padding: 11px 13px;
  border: 0;
  border-radius: 11px;
  color: rgba(224, 235, 248, .6);
  font-size: 13px;
  font-weight: 560;
  letter-spacing: .015em;
}

body .sidebar-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, .065);
}

body .sidebar-nav a.active,
body .sidebar-nav a[aria-current="page"] {
  color: #fff;
  background: linear-gradient(90deg, rgba(41, 119, 255, .36), rgba(41, 119, 255, .12));
  box-shadow: inset 3px 0 #4f91ff, 0 7px 18px rgba(0, 0, 0, .08);
}

body .sidebar-nav a .nav-icon {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  color: #9bb5d2;
  font-size: 0;
  filter: none;
}

body .sidebar-nav a:hover .nav-icon,
body .sidebar-nav a.active .nav-icon,
body .sidebar-nav a[aria-current="page"] .nav-icon { color: #dceaff; }

.nav-icon-svg { width: 19px; height: 19px; }

/* 小浩助手是系统的智能业务入口，由 sidebar.js 统一注入。 */
body .sidebar-nav a.nav-ai-assistant {
  position: relative;
  margin: 0 0 14px;
  overflow: hidden;
  color: #f7fbff;
  background: linear-gradient(105deg, rgba(42, 122, 255, .48), rgba(31, 198, 183, .25));
  box-shadow: inset 0 0 0 1px rgba(143, 207, 255, .18), 0 10px 24px rgba(0, 0, 0, .14);
}
body .sidebar-nav a.nav-ai-assistant::after {
  content: '';
  position: absolute;
  top: -30px;
  right: -18px;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(84, 229, 214, .13);
  pointer-events: none;
}
body .sidebar-nav a.nav-ai-assistant:hover,
body .sidebar-nav a.nav-ai-assistant.active,
body .sidebar-nav a.nav-ai-assistant[aria-current="page"] {
  color: #fff;
  background: linear-gradient(105deg, rgba(42, 122, 255, .72), rgba(31, 198, 183, .36));
  box-shadow: inset 3px 0 #68e6d7, inset 0 0 0 1px rgba(169, 223, 255, .25), 0 12px 27px rgba(0, 0, 0, .18);
}
body .sidebar-nav a.nav-ai-assistant .nav-icon { color: #bffbf4; }
body .sidebar-nav .nav-ai-badge {
  position: relative;
  z-index: 1;
  min-width: 27px;
  margin-left: auto;
  padding: 2px 6px;
  border: 1px solid rgba(199, 247, 241, .28);
  border-radius: 999px;
  color: #c9fff8;
  background: rgba(7, 27, 48, .32);
  font-size: 8px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: .12em;
}

body .sidebar-footer {
  min-height: 64px;
  padding: 15px 18px;
  border-top-color: rgba(255, 255, 255, .08);
  background: rgba(2, 13, 23, .2);
}

.sidebar-user-icon {
  width: 27px;
  height: 27px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  color: #b9cee5;
  background: rgba(255, 255, 255, .055);
}

.sidebar-user-icon-svg { width: 15px; height: 15px; }

body .main-content {
  width: calc(100% - var(--sidebar-width));
  max-width: none;
  margin-left: var(--sidebar-width);
}

body .main-content:not(.dashboard-main) {
  position: relative;
  padding: 30px 34px 26px;
}

body .main-content:not(.dashboard-main)::before {
  content: '';
  position: fixed;
  z-index: -1;
  top: 0;
  right: 0;
  width: 38vw;
  height: 42vh;
  pointer-events: none;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, .55));
  clip-path: polygon(45% 0, 100% 0, 100% 100%);
}

body .main-content:not(.dashboard-main) .page-header {
  position: relative;
  min-height: 116px;
  margin-bottom: 20px;
  padding: 23px 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(118deg, #0a1830 0%, #102b50 58%, #0b4162 100%);
  box-shadow: 0 18px 45px rgba(19, 43, 72, .17);
}

body .main-content:not(.dashboard-main) .page-header::before {
  content: '';
  position: absolute;
  right: 18%;
  bottom: -170px;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(97, 219, 218, .11);
  border-radius: 50%;
  box-shadow: 0 0 0 58px rgba(85, 151, 255, .03), 0 0 0 116px rgba(85, 151, 255, .018);
}

body .main-content:not(.dashboard-main) .page-header::after {
  content: '';
  position: absolute;
  top: -95px;
  right: -55px;
  width: 245px;
  height: 245px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(50, 129, 255, .14), rgba(38, 211, 194, .06));
}

body .main-content:not(.dashboard-main) .page-header > * {
  position: relative;
  z-index: 1;
}

body .main-content:not(.dashboard-main) .page-header h1 {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 0;
  color: #f8fbff;
  font-size: 25px;
  font-weight: 720;
  letter-spacing: .02em;
}

.page-title-icon {
  width: 43px;
  height: 43px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 13px;
  color: #78e4d8;
  background: rgba(255, 255, 255, .075);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.page-title-icon-svg { width: 23px; height: 23px; }
.page-title-copy { display: flex; min-width: 0; flex-direction: column; line-height: 1.2; }
.page-title-copy small {
  margin-top: 7px;
  color: rgba(210, 229, 249, .56);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .19em;
}

body .main-content:not(.dashboard-main) .page-header p {
  color: rgba(220, 234, 249, .62) !important;
}

body .main-content:not(.dashboard-main) .page-header .trust-subtitle {
  color: rgba(220, 234, 249, .62) !important;
}

body .main-content:not(.dashboard-main) .page-header .date-display {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .14);
  color: rgba(230, 240, 252, .72);
  background: rgba(255, 255, 255, .075);
  box-shadow: none;
  backdrop-filter: blur(8px);
}

body .main-content:not(.dashboard-main) .page-header .btn-outline {
  border-color: rgba(255, 255, 255, .24);
  color: #edf6ff;
  background: rgba(255, 255, 255, .08);
}

body .main-content:not(.dashboard-main) .page-header .btn-outline:hover {
  border-color: rgba(255, 255, 255, .46);
  color: #fff;
  background: rgba(255, 255, 255, .14);
}

body .main-content:not(.dashboard-main) .panel {
  border: 1px solid var(--console-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--console-shadow);
  backdrop-filter: blur(10px);
}

body .main-content:not(.dashboard-main) .panel:hover { border-color: #cedae8; }

body .main-content:not(.dashboard-main) .panel-header {
  min-height: 66px;
  padding: 15px 20px;
  border-bottom: 1px solid #e5ebf2;
  background: linear-gradient(180deg, rgba(249, 251, 253, .98), rgba(246, 249, 252, .9));
}

body .main-content:not(.dashboard-main) .panel-header h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--console-text);
  font-size: 14px;
  font-weight: 720;
  letter-spacing: .015em;
}

.section-heading-icon {
  width: 29px;
  height: 29px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  color: #2568df;
  background: #eaf1ff;
}

.section-heading-icon-svg { width: 16px; height: 16px; }

body .main-content:not(.dashboard-main) .panel-body { padding: 20px; }

body .main-content:not(.dashboard-main) .table-container,
body .main-content:not(.dashboard-main) .external-table-wrap {
  border: 1px solid #dde5ee;
  border-radius: 13px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

body .main-content:not(.dashboard-main) table thead th {
  height: 47px;
  border-bottom: 1px solid #dfe7f0;
  color: #526278;
  background: linear-gradient(180deg, #f7f9fc, #f2f6fa);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: .035em;
}

body .main-content:not(.dashboard-main) table tbody td {
  border-bottom-color: #edf1f5;
  color: #26364b;
}

body .main-content:not(.dashboard-main) table tbody tr:hover { background: #edf5ff; }

body .main-content:not(.dashboard-main) .btn {
  min-height: 36px;
  gap: 7px;
  border-radius: 9px;
  font-weight: 620;
  letter-spacing: .005em;
  box-shadow: 0 4px 10px rgba(17, 45, 78, .055);
}

body .main-content:not(.dashboard-main) .btn-primary {
  border-color: #276fe8;
  background: linear-gradient(135deg, #287cff, #1764de);
  box-shadow: 0 7px 16px rgba(31, 105, 225, .2);
}

body .main-content:not(.dashboard-main) .btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #3d8aff, #2371e7);
  box-shadow: 0 9px 20px rgba(31, 105, 225, .26);
}

body .main-content:not(.dashboard-main) .btn-outline {
  border-color: #cfd9e5;
  color: #405169;
  background: #fff;
}

.btn-icon { width: 16px; height: 16px; display: inline-grid; flex: 0 0 auto; place-items: center; }
.btn-icon-svg { width: 15px; height: 15px; }

body .main-content:not(.dashboard-main) .form-control,
body .main-content:not(.dashboard-main) .search-box input,
body .main-content:not(.dashboard-main) select:not(.alert-status-filter select) {
  min-height: 40px;
  border: 1px solid #ccd7e3;
  border-radius: 9px;
  color: #1d2d42;
  background-color: #fff;
  box-shadow: inset 0 1px 2px rgba(17, 45, 78, .025);
}

body .main-content:not(.dashboard-main) .form-control:focus,
body .main-content:not(.dashboard-main) .search-box input:focus,
body .main-content:not(.dashboard-main) select:focus {
  border-color: #4b8ff1;
  box-shadow: 0 0 0 3px rgba(36, 116, 235, .12);
}

body .main-content:not(.dashboard-main) .form-group label {
  margin-bottom: 6px;
  color: #405169;
  font-size: 12px;
  font-weight: 650;
}

body .main-content:not(.dashboard-main) .tab-bar,
body .main-content:not(.dashboard-main) .vehicle-detail-tabs,
body .main-content:not(.dashboard-main) .contract-detail-nav,
body .main-content:not(.dashboard-main) .trust-detail-nav {
  gap: 6px;
  padding: 6px;
  border: 1px solid #d9e2ec;
  border-radius: 14px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 8px 22px rgba(25, 50, 80, .055);
}

body .main-content:not(.dashboard-main) .tab-bar { border-bottom: 1px solid #d9e2ec; }

body .main-content:not(.dashboard-main) .tab-bar .tab,
body .main-content:not(.dashboard-main) .vehicle-detail-tab,
body .main-content:not(.dashboard-main) .contract-detail-nav button,
body .main-content:not(.dashboard-main) .trust-detail-nav button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 8px 16px;
  border: 0;
  border-radius: 9px;
  color: #607086;
  background: transparent;
  font-size: 12px;
  font-weight: 650;
}

body .main-content:not(.dashboard-main) .tab-bar .tab.active,
body .main-content:not(.dashboard-main) .vehicle-detail-tab.active,
body .main-content:not(.dashboard-main) .contract-detail-nav button.active,
body .main-content:not(.dashboard-main) .trust-detail-nav button.active {
  color: #fff;
  background: linear-gradient(135deg, #2476ee, #155acb);
  box-shadow: 0 7px 16px rgba(30, 100, 211, .22);
}

.tab-icon-svg { width: 15px; height: 15px; }

.semantic-service-icon {
  color: #246bd7 !important;
  background: linear-gradient(145deg, #edf4ff, #e6effd) !important;
  font-size: 0 !important;
}

.semantic-service-icon-svg { width: 19px; height: 19px; }

body .main-content:not(.dashboard-main) .info-card,
body .main-content:not(.dashboard-main) .doc-card,
body .main-content:not(.dashboard-main) .trust-card,
body .main-content:not(.dashboard-main) .pdf-card,
body .main-content:not(.dashboard-main) .vehicle-record-card,
body .main-content:not(.dashboard-main) .service-card,
body .main-content:not(.dashboard-main) .metric-card,
body .main-content:not(.dashboard-main) .resource-summary-card,
body .main-content:not(.dashboard-main) .finance-payment-row {
  border: 1px solid #dce5ef;
  border-radius: 14px;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 7px 22px rgba(25, 50, 80, .05);
}

body .main-content:not(.dashboard-main) .info-card:hover,
body .main-content:not(.dashboard-main) .doc-card:hover,
body .main-content:not(.dashboard-main) .service-card:hover,
body .main-content:not(.dashboard-main) .resource-summary-card:hover {
  border-color: #c7d5e5;
  box-shadow: var(--console-shadow-hover);
  transform: translateY(-1px);
}

body .main-content:not(.dashboard-main) .trust-card { border-radius: 16px; }

body .main-content:not(.dashboard-main) .trust-card-title,
body .main-content:not(.dashboard-main) .doc-card-header,
body .main-content:not(.dashboard-main) .info-card-header,
body .main-content:not(.dashboard-main) .pdf-card-header {
  border-bottom-color: #e3eaf2;
  color: #23364e;
  background: linear-gradient(180deg, #f8fafc, #f3f7fb);
}

body .main-content:not(.dashboard-main) .upload-box,
body .main-content:not(.dashboard-main) .record-upload,
body .main-content:not(.dashboard-main) .finance-upload,
body .main-content:not(.dashboard-main) .inspection-batch-upload,
body .main-content:not(.dashboard-main) .violation-dropzone {
  border-color: #8fb5ec;
  border-radius: 12px;
  color: #2864be;
  background: linear-gradient(145deg, #f7fbff, #eef5fd);
}

body .main-content:not(.dashboard-main) .upload-box:hover,
body .main-content:not(.dashboard-main) .record-upload:hover,
body .main-content:not(.dashboard-main) .finance-upload:hover,
body .main-content:not(.dashboard-main) .inspection-batch-upload:hover,
body .main-content:not(.dashboard-main) .violation-dropzone:hover {
  border-color: #3f83ea;
  background: #eaf3ff;
  box-shadow: 0 0 0 3px rgba(37, 112, 226, .1);
}

body .main-content:not(.dashboard-main) .status-badge {
  min-height: 25px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .02em;
}

body .main-content:not(.dashboard-main) .modal-overlay,
body .main-content:not(.dashboard-main) .resource-modal,
body .main-content:not(.dashboard-main) .external-modal,
body .main-content:not(.dashboard-main) #perm-modal {
  background: rgba(5, 17, 31, .68);
  backdrop-filter: blur(7px);
}

body .modal,
body .resource-modal-card,
body .external-modal-card,
body .perm-card,
body .rent-history-modal {
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 20px;
  box-shadow: 0 32px 90px rgba(3, 14, 28, .35);
}

/* 合同类附件统一为与合同文件相同的缩略图卡片。 */
.attachment-pdf-poster {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #315274;
  background: linear-gradient(145deg, #f8fbff, #eaf2fb);
}
.attachment-pdf-poster svg { width: 42px; height: 50px; margin-bottom: 7px; fill: #fff; stroke: #315274; stroke-width: 1.7; }
.attachment-pdf-poster strong { font-size: 13px; letter-spacing: .12em; }
.attachment-pdf-poster small { margin-top: 3px; color: #7b8ba1; font-size: 10px; letter-spacing: 0; }

body .main-content:not(.dashboard-main) .attachment-card-shell.finance-upload {
  display: block;
  width: min(262px, 100%);
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
body .main-content:not(.dashboard-main) .attachment-card-shell.finance-upload:hover { border: 0; background: transparent; box-shadow: none; }
.finance-upload-card {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 252px;
  padding: 15px;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  box-sizing: border-box;
  border: 2px dashed #9fb8d8;
  border-radius: 14px;
  color: #315274;
  text-align: center;
  background: linear-gradient(145deg, #f9fbfe, #eef5fc);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}
.finance-upload-card:hover,.finance-upload-card.dragover { border-color: #4f91f2; background: #eaf3ff; box-shadow: 0 0 0 3px rgba(37,112,226,.1); transform: translateY(-1px); }
.finance-upload-card.has-file { justify-content: flex-start; border-style: solid; border-color: #74a8f4; background: #f2f7fd; }
.finance-upload-card.disabled { cursor: not-allowed; opacity: .66; transform: none; }
.finance-upload-placeholder { display: flex; align-items: center; justify-content: center; flex-direction: column; }
.finance-upload-placeholder svg { width: 40px; height: 46px; margin-bottom: 10px; fill: #fff; stroke: #315274; stroke-width: 1.6; }
.finance-upload-placeholder strong { color: #245a9f; font-size: 13px; }
.finance-upload-placeholder small { margin-top: 5px; color: #8a98aa; font-size: 11px; }
.finance-upload-card.has-file .finance-upload-placeholder { display: none; }
.finance-upload-card .finance-upload-preview { display: block; width: 100%; }
.finance-upload-card .attachment-preview-host { width: 100%; margin: 0; }
.finance-upload-card .attachment-inline-preview { height: 154px; border: 0; border-radius: 9px; background: #fff; box-shadow: 0 4px 14px rgba(25,50,80,.08); }
.finance-upload-card .attachment-preview-caption { display: none; }
.finance-upload-name { display: block; width: 100%; margin-top: 12px; overflow: hidden; color: #65758a; font-size: 11px; line-height: 1.45; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.finance-upload-actions { display: flex; margin-top: 10px; align-items: center; gap: 8px; flex-wrap: wrap; }
.attachment-card-remove { position: absolute; z-index: 3; top: 8px; right: 8px; display: none; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; align-items: center; justify-content: center; color: #fff; background: #ff4d5e; box-shadow: 0 5px 12px rgba(217,45,75,.26); cursor: pointer; font-size: 19px; line-height: 1; }
.finance-upload-card.has-file .attachment-card-remove { display: flex; }
.finance-upload-card .attachment-card-remove:disabled { display: none; cursor: not-allowed; }

.violation-binding-grid {
  display: grid;
  grid-template-columns: minmax(238px, 262px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.violation-upload-card-host { width: min(262px, 100%); }
.violation-upload-column { align-items: flex-start; }
.violation-scan-toolbar { display: flex; min-height: 36px; margin-top: 12px; align-items: center; gap: 10px; flex-wrap: wrap; }

/* 主合同上传也采用同一缩略图规格，避免同一页面出现两套附件视觉。 */
#upload-contract-files,#trust-contract-files {
  grid-template-columns: repeat(auto-fill, minmax(220px, 262px));
  align-items: start;
  justify-content: start;
}
body .main-content:not(.dashboard-main) #upload-contract-files .upload-box,
body .main-content:not(.dashboard-main) #trust-contract-files .upload-box {
  width: 100%;
  min-height: 252px;
  padding: 15px;
  box-sizing: border-box;
  border: 2px dashed #9fb8d8;
  border-radius: 14px;
  background: linear-gradient(145deg, #f9fbfe, #eef5fc);
}
body .main-content:not(.dashboard-main) #upload-contract-files .upload-box.has-file,
body .main-content:not(.dashboard-main) #trust-contract-files .upload-box.has-file { justify-content: flex-start; border-style: solid; border-color: #74a8f4; background: #f2f7fd; }
#upload-contract-files .upload-icon,#trust-contract-files .upload-icon { display: flex; width: 100%; height: 154px; margin: 0 0 11px; align-items: center; justify-content: center; overflow: hidden; border-radius: 9px; color: #315274; background: #fff; box-shadow: 0 4px 14px rgba(25,50,80,.08); font-size: 38px; }
#upload-contract-files .upload-box:not(.has-file) .upload-icon,#trust-contract-files .upload-box:not(.has-file) .upload-icon { height: auto; margin-bottom: 10px; background: transparent; box-shadow: none; }
#upload-contract-files .file-preview,#trust-contract-files .file-preview { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; }
#upload-contract-files .upload-text,#trust-contract-files .upload-text { max-width: 100%; overflow: hidden; color: #65758a; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
#upload-contract-files .upload-hint,#trust-contract-files .upload-hint { color: #98a2b3; }

.violation-date-range { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr); gap: 12px; align-items: end; }
.violation-date-separator { display: flex; height: 40px; align-items: center; justify-content: center; color: #7b8ba1; font-size: 12px; font-weight: 700; }
.violation-date-range .form-control { width: 100%; min-width: 0; box-sizing: border-box; }

@media (max-width: 620px) {
  .violation-upload-card-host,body .main-content:not(.dashboard-main) .attachment-card-shell.finance-upload { width: 100%; }
  .violation-binding-grid { grid-template-columns: 1fr; gap: 14px; }
  .violation-date-range { grid-template-columns: minmax(0,1fr) 22px minmax(0,1fr); gap: 6px; }
  #upload-contract-files,#trust-contract-files { grid-template-columns: 1fr; }
}

@media (max-width: 1000px) {
  body .main-content:not(.dashboard-main) { padding: 24px; }
  body .main-content:not(.dashboard-main) .page-header { min-height: 104px; }
}

@media (max-width: 768px) {
  body .main-content { width: 100%; margin-left: 0; }
  body .main-content:not(.dashboard-main) { padding: 76px 14px 20px; }
  body .main-content:not(.dashboard-main) .page-header {
    min-height: 0;
    padding: 20px;
    border-radius: 17px;
    align-items: flex-start;
  }
  body .main-content:not(.dashboard-main) .page-header h1 { font-size: 21px; }
  .page-title-icon { width: 38px; height: 38px; }
  .page-title-icon-svg { width: 20px; height: 20px; }
  .page-title-copy small { font-size: 8px; letter-spacing: .12em; }
  body .main-content:not(.dashboard-main) .panel { border-radius: 15px; }
  body .main-content:not(.dashboard-main) .panel-header { padding: 13px 15px; }
  body .main-content:not(.dashboard-main) .panel-body { padding: 15px; }
  body .main-content:not(.dashboard-main) .tab-bar,
  body .main-content:not(.dashboard-main) .vehicle-detail-tabs,
  body .main-content:not(.dashboard-main) .contract-detail-nav,
  body .main-content:not(.dashboard-main) .trust-detail-nav { overflow-x: auto; flex-wrap: nowrap; }
  body .main-content:not(.dashboard-main) .tab-bar .tab,
  body .main-content:not(.dashboard-main) .vehicle-detail-tab,
  body .main-content:not(.dashboard-main) .contract-detail-nav button,
  body .main-content:not(.dashboard-main) .trust-detail-nav button { flex: 0 0 auto; padding: 8px 12px; }
}

/* 敏感操作二次验证：由公共请求层统一触发，页面无需重复实现。 */
.sensitive-auth-overlay {
  position: fixed;
  z-index: 12050;
  inset: 0;
  display: flex;
  padding: 24px;
  align-items: center;
  justify-content: center;
  background: rgba(7, 19, 38, .66);
  backdrop-filter: blur(8px);
}
.sensitive-auth-dialog {
  width: min(460px, 100%);
  padding: 30px;
  border: 1px solid rgba(88, 145, 234, .22);
  border-radius: 22px;
  color: #13243a;
  background: linear-gradient(150deg, #fff 0%, #f5f9ff 100%);
  box-shadow: 0 28px 90px rgba(7, 25, 54, .34);
}
.sensitive-auth-eyebrow { margin-bottom: 8px; color: #2674e8; font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.sensitive-auth-dialog h2 { margin: 0; font-size: 23px; line-height: 1.35; }
.sensitive-auth-description { margin: 10px 0 22px; color: #66758a; font-size: 13px; line-height: 1.7; }
.sensitive-auth-tabs { display: flex; gap: 8px; padding: 4px; border-radius: 12px; background: #eaf1fb; }
.sensitive-auth-tabs button { flex: 1; min-height: 38px; border: 0; border-radius: 9px; color: #61738b; background: transparent; cursor: pointer; font-weight: 700; }
.sensitive-auth-tabs button.active { color: #175fc9; background: #fff; box-shadow: 0 4px 14px rgba(35, 83, 148, .12); }
.sensitive-auth-form { margin-top: 20px; }
.sensitive-auth-form label > span { display: block; margin-bottom: 8px; color: #33465d; font-size: 13px; font-weight: 700; }
.sensitive-auth-input-row { display: flex; gap: 9px; }
.sensitive-auth-input-row input { min-width: 0; flex: 1; height: 46px; padding: 0 13px; border: 1px solid #cbd8e9; border-radius: 11px; color: #172b45; background: #fff; outline: none; font-size: 15px; }
.sensitive-auth-input-row input:focus { border-color: #3980ea; box-shadow: 0 0 0 3px rgba(50, 124, 235, .12); }
.sensitive-auth-send-code { flex: 0 0 auto; padding: 0 13px; border: 1px solid #9fc1f1; border-radius: 11px; color: #2467c6; background: #eef5ff; cursor: pointer; font-weight: 700; }
.sensitive-auth-send-code:disabled { color: #8797aa; cursor: not-allowed; }
.sensitive-auth-error { display: none; margin-top: 11px; padding: 9px 11px; border-radius: 9px; color: #c2203a; background: #fff0f2; font-size: 12px; line-height: 1.5; }
.sensitive-auth-error.visible { display: block; }
.sensitive-auth-actions { display: flex; margin-top: 22px; justify-content: flex-end; gap: 10px; }
.sensitive-auth-actions button { min-width: 98px; height: 42px; border-radius: 10px; cursor: pointer; font-weight: 700; }
.sensitive-auth-cancel { border: 1px solid #ccd6e4; color: #53657c; background: #fff; }
.sensitive-auth-confirm { border: 0; color: #fff; background: linear-gradient(135deg, #1673eb, #3c5eea); box-shadow: 0 8px 22px rgba(42, 100, 217, .25); }
.sensitive-auth-actions button:disabled { opacity: .58; cursor: wait; }
@media (max-width: 520px) {
  .sensitive-auth-overlay { padding: 12px; align-items: flex-end; }
  .sensitive-auth-dialog { padding: 23px 18px; border-radius: 20px 20px 12px 12px; }
  .sensitive-auth-input-row { flex-direction: column; }
  .sensitive-auth-send-code { height: 40px; }
}

/* 逐期租金支持一期开多笔实收，欠额时自动追加下一笔。 */
.finance-rule-adjustment {
  margin-bottom: 16px;
  padding: 17px;
  border: 1px solid #9ec5f8;
  border-radius: 15px;
  background: linear-gradient(135deg, #f4f9ff, #eef7ff 58%, #f5fbf9);
  box-shadow: 0 8px 24px rgba(34, 105, 201, .08);
}
.finance-rule-adjustment[hidden] { display: none!important; }
.finance-rule-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.finance-rule-head>div { display: flex; min-width: 0; flex-direction: column; gap: 5px; }
.finance-rule-head strong { color: #183b66; font-size: 16px; }
.finance-rule-head>div span { color: #60738b; font-size: 12px; line-height: 1.6; }
.finance-rule-current { flex: 0 0 auto; padding: 6px 10px; border: 1px solid #bdd5f6; border-radius: 999px; color: #175cd3; background: #fff; font-size: 12px; font-weight: 750; }
.finance-rule-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.finance-rule-grid label { display: flex; min-width: 0; flex-direction: column; gap: 6px; color: #405169; font-size: 12px; }
.finance-rule-grid label>span { font-weight: 700; }
.finance-rule-grid label[hidden] { display: none!important; }
.finance-rule-grid .form-control { width: 100%; margin: 0; }
.finance-rule-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 15px; padding-top: 13px; border-top: 1px solid #d5e5f8; }
.finance-rule-preview { color: #526983; font-size: 11px; line-height: 1.55; }
.finance-rule-actions { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; gap: 10px; }
.finance-rule-status { color: #667085; font-size: 11px; }
.finance-rule-save { min-width: 132px; }
.finance-first-rent-date {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 320px);
  gap: 14px;
  align-items: end;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid #b9d4fb;
  border-radius: 14px;
  background: linear-gradient(135deg, #f4f9ff, #eef6ff);
  box-shadow: 0 7px 22px rgba(34, 105, 201, .07);
}
.finance-first-rent-date-copy { display: flex; min-width: 0; flex-direction: column; gap: 5px; }
.finance-first-rent-date-copy strong { color: #183b66; font-size: 16px; }
.finance-first-rent-date-copy > span { color: #60738b; font-size: 12px; line-height: 1.55; }
.finance-first-rent-date-field { display: flex; min-width: 0; flex-direction: column; gap: 5px; color: #405169; font-size: 12px; }
.finance-first-rent-date-field .form-control { width: 100%; margin: 0; }
.first-rent-date-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: stretch; }
.first-rent-date-controls .first-rent-date-save { min-width: 96px; white-space: nowrap; }
.first-rent-date-status { color: #667085; font-size: 11px; }
.installment-payment-row {
  display: block;
  min-width: 0;
  padding: 16px;
}
.installment-payment-row > .finance-payment-period {
  display: grid;
  grid-template-columns: minmax(80px, auto) minmax(250px, 1.3fr) repeat(3, minmax(125px, auto));
  gap: 8px 24px;
  align-items: center;
  width: 100%;
  margin-bottom: 12px;
  padding: 2px 2px 12px;
  border-bottom: 1px solid #e5edf7;
}
.finance-payment-entries { display: flex; min-width: 0; width: 100%; flex-direction: column; gap: 10px; }
.finance-payment-entry { display: grid; min-width: 0; width: 100%; grid-template-columns: minmax(130px, .7fr) minmax(140px, .75fr) minmax(160px, .8fr) minmax(180px, 1fr) minmax(230px, 1.25fr); gap: 10px; align-items: end; padding: 12px; border: 1px solid #dbe6f4; border-radius: 12px; background: #f8fbff; box-sizing: border-box; }
.finance-payment-entry > label,.finance-payment-entry > .payment-receipt-picker { min-width: 0; }
.finance-payment-entry-title { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; }
.finance-entry-delete,.finance-entry-receipt-remove,.finance-entry-pending-remove { border: 0; background: transparent; color: #d92d20; cursor: pointer; font-size: 12px; }
.finance-payment-balance { margin-top: 5px; font-weight: 700; }
.finance-payment-balance.is-due { color: #d92d20; }
.finance-payment-balance.is-paid { color: #067647; }
.finance-payment-deposit { color: #175cd3; font-weight: 700; }
.finance-muted { font-size: 11px; color: #98a2b3; }
.finance-payment-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.finance-payment-actions .btn { min-width: 150px; }
.finance-deposit-progress { display: grid; grid-template-columns:minmax(0,1fr) minmax(220px,360px); gap:18px; align-items:center; margin-bottom:14px; padding:15px 17px; border:1px solid #b9d4fb; border-radius:14px; background:linear-gradient(135deg,#f5f9ff,#eef6ff); }
.finance-deposit-progress>div:first-child strong,.finance-deposit-progress>div:first-child span { display:block; }
.finance-deposit-progress>div:first-child strong { color:#183b66; font-size:15px; }
.finance-deposit-progress>div:first-child span { margin-top:5px; color:#60738b; font-size:12px; }
.finance-deposit-progress-side { display:grid; gap:7px; text-align:right; color:#b54708; font-size:13px; font-weight:750; }
.finance-deposit-progress-side i { display:block; overflow:hidden; height:8px; border-radius:999px; background:#dbe7f5; }
.finance-deposit-progress-side b { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#1677ff,#19b9a5); }
.finance-deposit-progress.is-paid { border-color:#a9dfc2; background:linear-gradient(135deg,#f1fff7,#f8fffb); }
.finance-deposit-progress.is-paid .finance-deposit-progress-side { color:#067647; }
.installment-payment-row.is-compact { padding:0; }
.installment-payment-row.is-compact>summary { display:flex; align-items:center; gap:16px; padding:15px 17px; cursor:pointer; list-style:none; }
.installment-payment-row.is-compact>summary::-webkit-details-marker { display:none; }
.installment-payment-row.is-compact>summary>.finance-payment-period { display:grid; flex:1; grid-template-columns:minmax(90px,.6fr) minmax(240px,1.4fr) repeat(4,minmax(120px,.8fr)); gap:8px 18px; align-items:center; margin:0; padding:0; border:0; }
.finance-payment-expand { flex:0 0 auto; padding:8px 12px; border:1px solid #b8cdf0; border-radius:9px; color:#175cd3; background:#f6f9ff; font-size:12px; font-weight:750; }
.installment-payment-row.is-compact[open] .finance-payment-expand { color:#fff; border-color:#1677ff; background:#1677ff; }
.finance-payment-editor { padding:0 17px 17px; border-top:1px solid #e5edf7; }
.finance-payment-editor .finance-payment-entries { padding-top:14px; }
@media (max-width: 1200px) {
  .finance-rule-grid { grid-template-columns: 1fr 1fr; }
  .finance-payment-entry { grid-template-columns: 1fr 1fr; }
  .finance-payment-entry .payment-receipt-picker { grid-column: 1 / -1; }
  .installment-payment-row.is-compact>summary>.finance-payment-period { grid-template-columns:1fr 1fr 1fr; }
}
@media (max-width: 760px) {
  .finance-rule-head,.finance-rule-foot { align-items: stretch; flex-direction: column; }
  .finance-rule-current { align-self: flex-start; }
  .finance-rule-grid { grid-template-columns: 1fr; }
  .finance-rule-actions { align-items: stretch; flex-direction: column; }
  .finance-rule-save { width: 100%; }
  .finance-first-rent-date { grid-template-columns: 1fr; align-items: stretch; }
  .first-rent-date-controls { grid-template-columns: 1fr; }
  .installment-payment-row > .finance-payment-period { grid-template-columns: 1fr 1fr; gap: 5px 12px; }
  .finance-payment-entry { grid-template-columns: 1fr; }
  .finance-payment-entry .payment-receipt-picker { grid-column: auto; }
  .finance-deposit-progress { grid-template-columns:1fr; }
  .finance-deposit-progress-side { text-align:left; }
  .finance-payment-actions { flex-direction:column; }
  .finance-payment-actions .btn { width:100%; }
  .installment-payment-row.is-compact>summary { align-items:flex-start; flex-direction:column; }
  .installment-payment-row.is-compact>summary>.finance-payment-period { grid-template-columns:1fr 1fr; width:100%; }
  .finance-payment-expand { width:100%; text-align:center; }
}
.contract-return-dialog { max-width: 650px; }
