/* 基础重置与全局样式 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #f0f2f5;
  min-height: 100vh;
  color: #1e293b;
}

/* ==================== Lucide 图标样式 ==================== */
.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-icon-sm {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.btn-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.action-icon {
  width: 24px;
  height: 24px;
}

.card-title-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.panel-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.filter-icon {
  width: 18px;
  height: 18px;
  color: #666;
}

.stat-icon i {
  width: 28px;
  height: 28px;
  color: #2563eb;
}

.overview-icon i {
  width: 28px;
  height: 28px;
  color: #2563eb;
}

/* 登录页面 */
.page {
  min-height: 100vh;
}

.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-card {
  background: #ffffff;
  border-radius: 8px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-header h1 {
  font-size: 28px;
  color: #2563eb;
  margin-bottom: 8px;
}

.login-header p {
  color: #666;
  font-size: 14px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  color: #555;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s;
  outline: none;
}

.form-group input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.error-msg {
  color: #e74c3c;
  font-size: 13px;
  text-align: center;
  margin-top: 12px;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  outline: none;
}

.btn-primary {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
  background: #1d4ed8;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.btn-ghost {
  background: #fff;
  border: 1px solid #ddd;
  color: #555;
}

.btn-ghost:hover {
  background: #f8f9fa;
  border-color: #ccc;
}

.btn-success {
  background: #27ae60;
  color: #fff;
}

.btn-danger {
  background: #e74c3c;
  color: #fff;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

/* 主界面布局 */
#main-page {
  display: flex;
  background: #f5f6fa;
  min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
  width: 240px;
  background: #1e293b;
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  z-index: 100;
  border-right: 1px solid #334155;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
  font-size: 20px;
  margin-bottom: 12px;
}

.user-info {
  font-size: 13px;
  opacity: 0.9;
}

.badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  margin-left: 6px;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.2s;
  font-size: 14px;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

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

/* 下拉菜单组 */
.nav-group {
  position: relative;
}

.nav-parent {
  justify-content: flex-start;
}

.nav-arrow {
  margin-left: auto;
  font-size: 10px;
  transition: transform 0.2s;
}

.nav-submenu {
  display: none;
  background: rgba(0, 0, 0, 0.1);
}

.nav-sub {
  padding-left: 48px !important;
  font-size: 13px;
}

.nav-sub .icon {
  font-size: 14px;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 主内容区 */
.main-content {
  flex: 1;
  margin-left: 240px;
  padding: 24px;
  min-height: 100vh;
  position: relative;
  overflow-y: auto;
}

.content-page {
  display: none;
}

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

.page-header h1 {
  font-size: 24px;
  color: #2d3436;
  font-weight: 600;
}

.page-header p {
  color: #666;
  margin-top: 4px;
}

.page-actions {
  display: flex;
  gap: 10px;
}

/* 仪表盘 */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: #fff;
  border-radius: 6px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid #e8e8e8;
  cursor: pointer;
  transition: all 0.2s;
}

.stat-card:hover {
  border-color: #2563eb;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

.stat-icon {
  font-size: 36px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f5ff;
  border-radius: 8px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #2d3436;
}

.stat-label {
  font-size: 13px;
  color: #888;
  margin-top: 4px;
}

/* 快捷操作 */
.quick-actions {
  background: #fff;
  border-radius: 6px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid #e8e8e8;
}

.quick-actions h3 {
  font-size: 16px;
  margin-bottom: 16px;
  color: #2d3436;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn:hover {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.action-btn .icon {
  font-size: 24px;
}

/* 搜索栏和筛选栏 */
.search-bar,
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-bar input,
.filter-bar input,
.filter-bar select {
  padding: 10px 14px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}

.search-bar input {
  flex: 1;
  min-width: 250px;
}

.search-bar input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #2563eb;
}

/* 表格 */
.table-container {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid #e8e8e8;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
}

.data-table thead th {
  background: #fafbfc;
  font-weight: 600;
  color: #555;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table tbody tr:hover {
  background: #f8f9ff;
}

.data-table tbody td {
  font-size: 14px;
  color: #2d3436;
}

/* 状态标签 */
.status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.status-pending {
  background: #fff3cd;
  color: #856404;
}

.status-accepted {
  background: #cce5ff;
  color: #004085;
}

.status-processing {
  background: #d4edda;
  color: #155724;
}

.status-completed {
  background: #e2e3e5;
  color: #383d41;
}

.status-unpaid {
  background: #f8d7da;
  color: #721c24;
}

.status-partial {
  background: #fff3cd;
  color: #856404;
}

.status-paid {
  background: #d4edda;
  color: #155724;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state p {
  color: #888;
  font-size: 15px;
}

/* 汇总卡片 */
.summary-cards {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
}

.summary-card {
  background: #fff;
  border-radius: 6px;
  padding: 16px 24px;
  flex: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid #e8e8e8;
}

.summary-label {
  font-size: 13px;
  color: #888;
  margin-bottom: 8px;
}

.summary-value {
  font-size: 28px;
  font-weight: 700;
  color: #2d3436;
}

/* 统计页面 */
.stats-section {
  background: #fff;
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid #e8e8e8;
}

.stats-section h3 {
  font-size: 16px;
  margin-bottom: 16px;
  color: #2d3436;
}

.stats-desc {
  font-size: 13px;
  color: #888;
  margin-bottom: 16px;
}

.stats-subtitle {
  font-size: 14px;
  font-weight: 600;
  color: #555;
  margin: 16px 0 12px 0;
  padding-bottom: 6px;
  border-bottom: 1px dashed #e8ecf4;
}

.stats-subtitle:first-of-type {
  margin-top: 0;
}

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

.stats-grid.single {
  grid-template-columns: 1fr;
}

.stats-card {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 16px;
  text-align: center;
  border: 1px solid #e8e8e8;
}

.stats-card.wide {
  max-width: none;
}

.stats-card.highlight {
  background: #2563eb;
  color: #fff;
}

.stats-card.highlight .stats-label {
  color: rgba(255, 255, 255, 0.8);
}

.stats-card.clickable {
  cursor: pointer;
  transition: all 0.2s;
}

.stats-card.clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}

.stats-label {
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
}

.stats-value {
  font-size: 24px;
  font-weight: 700;
}

.stats-value.sales {
  color: #27ae60;
}

.stats-value.cost {
  color: #e74c3c;
}

.stats-value.profit {
  color: #2d3436;
}


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

.modal {
  background: #fff;
  border-radius: 8px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #eee;
  background: #2563eb;
  color: #fff;
}

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

.modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  font-size: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-body {
  padding: 24px;
  max-height: 60vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #fafbfc;
}

/* 模态框表单 */
.modal-form .form-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 12px;
}

.modal-form .form-row label {
  width: 80px;
  font-size: 14px;
  color: #555;
  padding-top: 10px;
  flex-shrink: 0;
}

.modal-form .form-row input,
.modal-form .form-row select,
.modal-form .form-row textarea {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid #e8ecf4;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}

.modal-form .form-row input:focus,
.modal-form .form-row select:focus,
.modal-form .form-row textarea:focus {
  border-color: #2563eb;
}

.modal-form .form-row textarea {
  min-height: 80px;
  resize: vertical;
}

.modal-form .form-section-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin: 20px 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #e8ecf4;
}

.modal-form .form-hint {
  font-size: 12px;
  color: #999;
  margin: -8px 0 12px 0;
  padding-left: 120px;
}

/* 销售明细表格 */
.items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}

.items-table th,
.items-table td {
  padding: 10px 8px;
  border: 1px solid #e8ecf4;
  font-size: 13px;
}

.items-table th {
  background: #f5f6fa;
  font-weight: 500;
}

.items-table input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
}

.items-table .btn-remove {
  background: #e74c3c;
  color: #fff;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

/* Toast 提示 */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 2000;
  animation: toastIn 0.3s ease;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.toast.success {
  background: #27ae60;
}

.toast.error {
  background: #e74c3c;
}

/* 操作按钮组 */
.btn-group {
  display: flex;
  gap: 6px;
}

.btn-group .btn {
  padding: 6px 12px;
  font-size: 12px;
}

/* ==================== 响应式设计 ==================== */

/* 平板设备 (768px - 1024px) */
@media (max-width: 1024px) {
  .main-content {
    padding: 16px;
  }

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

  .page-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .stats-overview {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-two-column {
    grid-template-columns: 1fr;
  }

  .summary-cards {
    flex-direction: column;
  }

  .rental-form-row {
    flex-wrap: wrap;
  }

  .rental-form-group {
    min-width: calc(50% - 10px);
  }
}

/* 移动设备 (最大 768px) */
@media (max-width: 768px) {
  /* 侧边栏收缩 */
  .sidebar {
    width: 60px;
  }

  .sidebar-header h2,
  .sidebar-nav span:not(.icon),
  .user-info,
  .sidebar-footer {
    display: none;
  }

  .nav-item {
    justify-content: center;
    padding: 14px;
  }

  .nav-arrow {
    display: none;
  }

  .main-content {
    margin-left: 60px;
    padding: 12px;
  }

  /* 页面头部 */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
  }

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

  .page-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  /* 仪表盘 */
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-icon {
    font-size: 28px;
    width: 48px;
    height: 48px;
  }

  .stat-value {
    font-size: 24px;
  }

  /* 快捷操作 */
  .action-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .action-btn {
    padding: 16px 12px;
  }

  /* 搜索和筛选栏 */
  .search-bar,
  .filter-bar {
    flex-direction: column;
    gap: 10px;
  }

  .search-bar input {
    min-width: 100%;
  }

  .filter-bar input,
  .filter-bar select {
    width: 100%;
  }

  /* 表格容器 - 横向滚动 */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .data-table {
    min-width: 600px;
  }

  .data-table th,
  .data-table td {
    padding: 12px 10px;
    font-size: 13px;
  }

  /* 汇总卡片 */
  .summary-cards {
    flex-direction: column;
    gap: 12px;
  }

  .summary-card {
    padding: 16px 20px;
  }

  .summary-value {
    font-size: 24px;
  }

  /* 统计页面 */
  .stats-overview {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .stats-overview-card {
    padding: 16px;
  }

  .overview-value {
    font-size: 20px;
  }

  .stats-two-column {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .expiry-cards {
    flex-direction: column;
    gap: 12px;
  }

  .expiry-card {
    padding: 20px;
  }

  /* 租赁表单 */
  .rental-card {
    padding: 16px;
    margin-bottom: 16px;
  }

  .rental-form-row {
    flex-direction: column;
    gap: 12px;
  }

  .rental-form-group {
    width: 100%;
  }

  .rental-preview-card {
    padding: 16px;
  }

  /* 销售单生成 */
  .bill-header-row {
    flex-direction: column;
    gap: 8px;
  }

  .bill-preview-table {
    font-size: 12px;
  }

  .bill-preview-table th,
  .bill-preview-table td {
    padding: 8px 6px;
  }

  /* 模态框 */
  .modal {
    max-width: 95%;
    margin: 10px;
  }

  .modal-body {
    padding: 16px;
    max-height: 70vh;
  }

  .modal-footer {
    padding: 12px 16px;
    flex-wrap: wrap;
  }

  .modal-form .form-row {
    flex-direction: column;
    gap: 8px;
  }

  .modal-form .form-row label {
    width: 100%;
    padding-top: 0;
  }

  /* 按钮组 */
  .btn-group {
    flex-wrap: wrap;
  }

  /* 日历 */
  .calendar-wrapper {
    padding: 12px;
  }

  .calendar-nav-btn .nav-text {
    display: none;
  }

  .calendar-grid-new .calendar-day {
    min-height: 36px;
  }

  .calendar-grid-new .day-num {
    font-size: 12px;
  }

  /* 合同操作按钮 */
  .contract-actions {
    flex-direction: column;
    gap: 12px;
  }

  .contract-actions .btn {
    width: 100%;
  }

  /* 账户信息卡片 */
  .account-info-card {
    padding: 16px;
  }
}

/* 小屏手机 (最大 640px) */
@media (max-width: 640px) {
  .login-card {
    padding: 30px 24px;
  }

  .login-header h1 {
    font-size: 24px;
  }

  /* 更紧凑的按钮 */
  .btn {
    padding: 10px 16px;
    font-size: 13px;
  }

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

  /* 统计卡片更紧凑 */
  .stat-card {
    flex-direction: column;
    text-align: center;
    padding: 16px;
  }

  .stat-icon {
    margin: 0 auto 12px;
  }

  /* 快捷操作单列 */
  .action-grid {
    grid-template-columns: 1fr;
  }

  /* 表格字体更小 */
  .data-table th,
  .data-table td {
    padding: 10px 8px;
    font-size: 12px;
  }

  /* 租赁下拉框 */
  .rental-dropdown {
    max-height: 300px;
  }

  .rental-dropdown-item {
    padding: 12px 16px;
  }

  .rental-dropdown-item .name {
    font-size: 16px;
  }

  /* 销售单客户下拉 */
  .bill-customer-dropdown .dropdown-item {
    padding: 20px 24px;
    font-size: 16px;
    min-height: 60px;
  }

  .bill-customer-dropdown .dropdown-item strong {
    font-size: 18px;
  }

  .bill-customer-dropdown .dropdown-item span {
    font-size: 15px;
    margin-left: 12px;
  }

  /* 订单项更紧凑 */
  .bill-order-item {
    padding: 12px;
  }

  /* 抄表图片 */
  .meter-reading-image-item {
    width: 100px;
    height: 100px;
  }

  /* 提醒项 */
  .reminder-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .reminder-detail {
    flex-wrap: wrap;
  }

  /* 合同单选按钮 */
  .contract-radio-group {
    flex-direction: column;
    gap: 12px;
  }

  .contract-radio {
    width: 100%;
  }
}

/* 超小屏手机 (最大 480px) */
@media (max-width: 480px) {
  /* 侧边栏完全隐藏，使用汉堡菜单 */
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 200;
  }

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

  .main-content {
    margin-left: 0;
    padding: 10px;
  }

  /* 页面头部 */
  .page-header h1 {
    font-size: 18px;
  }

  /* 统计值更小 */
  .stat-value {
    font-size: 20px;
  }

  .summary-value {
    font-size: 20px;
  }

  .overview-value {
    font-size: 18px;
  }

  /* 表单输入框 */
  .form-group input,
  .rental-form-group input,
  .rental-form-group select {
    font-size: 16px; /* 防止iOS自动缩放 */
  }

  /* 模态框全屏 */
  .modal {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
    margin: 0;
  }

  .modal-body {
    max-height: calc(100vh - 140px);
  }

  /* Toast提示 */
  .toast {
    left: 10px;
    right: 10px;
    transform: none;
    max-width: calc(100% - 20px);
  }

  /* 日历 */
  .calendar-wrapper {
    padding: 8px;
  }

  .calendar-grid-new .calendar-day {
    min-height: 32px;
  }

  .calendar-grid-new .day-num {
    font-size: 11px;
  }

  .calendar-grid-new .day-badge {
    font-size: 9px;
    padding: 1px 4px;
  }

  /* 到期卡片 */
  .expiry-count {
    font-size: 36px;
  }

  /* 按钮全宽 */
  .page-actions .btn {
    width: 100%;
  }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
  /* 增大可点击区域 */
  .btn {
    min-height: 44px;
    padding: 12px 20px;
  }

  .nav-item {
    min-height: 48px;
  }

  .data-table tbody tr {
    cursor: pointer;
  }

  /* 移除hover效果，使用active */
  .btn:hover {
    transform: none;
  }

  .btn:active {
    transform: scale(0.98);
    opacity: 0.9;
  }

  .stat-card:hover {
    transform: none;
  }

  .stat-card:active {
    transform: scale(0.98);
  }

  /* 输入框焦点优化 */
  input:focus,
  select:focus,
  textarea:focus {
    font-size: 16px; /* 防止iOS缩放 */
  }
}

/* ==================== 租赁费用单专用样式 ==================== */
.rental-card {
  background: #fff;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid #e8e8e8;
}

.rental-card-title {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #2563eb;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rental-form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
}

.rental-form-row:last-child {
  margin-bottom: 0;
}

.rental-form-group {
  flex: 1;
  position: relative;
}

.rental-form-group label {
  display: block;
  font-size: 13px;
  color: #666;
  margin-bottom: 6px;
  font-weight: 500;
}

.rental-form-group input,
.rental-form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s;
  background: #fafafa;
}

.rental-form-group input:focus,
.rental-form-group select:focus {
  outline: none;
  border-color: #2563eb;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.rental-form-group input.auto-calc {
  background: #e8f5e9;
  border-color: #a5d6a7;
}

.rental-hint {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
}

.rental-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 2px solid #2563eb;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 400px;
  /* Increased from 300px */
  overflow-y: auto;
  display: none;
  z-index: 100;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.rental-dropdown.show {
  display: block;
}

.rental-dropdown-item {
  padding: 16px 20px;
  /* Increased padding */
  cursor: pointer;
  border-bottom: 1px solid #eee;
}

.rental-dropdown-item:hover {
  background: #f0f3ff;
}

.rental-dropdown-item .name {
  font-weight: 600;
  color: #1a1a2e;
  font-size: 18px;
  /* Used to be 15px */
}

.rental-dropdown-item .info {
  font-size: 13px;
  color: #666;
  margin-top: 4px;
}

.rental-preview-card {
  background: #2563eb;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 16px;
  color: #fff;
}

.rental-preview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.rental-preview-row:last-child {
  border-bottom: none;
}

.rental-preview-row .label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

.rental-preview-row .value {
  font-size: 16px;
  font-weight: 600;
}

.rental-preview-total {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 2px solid rgba(255, 255, 255, 0.3);
}

.rental-preview-total .label {
  font-size: 16px;
  color: #fff;
}

.rental-preview-total .value {
  font-size: 24px;
  color: #fff;
}

.rental-records-list {
  margin-top: 15px;
  max-height: 300px;
  overflow-y: auto;
}

.rental-record-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 8px;
}

.rental-record-item:hover {
  background: #e9ecef;
}

.rental-record-info {
  flex: 1;
}

.rental-record-info .company {
  font-weight: 600;
  color: #1a1a2e;
}

.rental-record-info .detail {
  font-size: 12px;
  color: #666;
  margin-top: 3px;
}

.rental-record-amount {
  font-size: 18px;
  font-weight: 600;
  color: #2563eb;
}

.rental-records-list {
  margin-top: 10px;
  max-height: 400px;
  overflow-y: auto;
}

.rental-record-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 10px;
  border-bottom: 1px solid #f0f0f0;
}

.rental-record-item:hover {
  background-color: #f9f9fc;
}

.rental-record-info .company {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.rental-record-info .detail {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
}

/* 优化带图标的统计卡片 */
.stats-card.flex-row {
  display: flex !important;
  align-items: center;
  text-align: left !important;
  gap: 15px;
}

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

.stats-card .stats-info {
  flex: 1;
}

.stats-card .stats-info .stats-label {
  margin-bottom: 4px;
}

.stats-card .stats-info .stats-value {
  font-size: 20px;
  margin-top: 5px;
}


/* 提醒样式（包含收款提醒和叫修提醒） */
.billing-reminder-section {
  background: #fff;
  border-radius: 6px;
  padding: 16px;
  margin-top: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid #e8e8e8;
}

.billing-reminder-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.billing-reminder-section h3 {
  font-size: 18px;
  color: #333;
  margin: 0;
}

.reminder-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reminder-empty {
  text-align: center;
  color: #999;
  padding: 20px;
}

.reminder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 6px;
  background: #f8f9fa;
  border: 1px solid #e8e8e8;
}

.reminder-item.overdue {
  background: #fef0f0;
  border: 1px solid #fde2e2;
}

.reminder-item.urgent {
  background: #fff7e6;
  border: 1px solid #ffe7ba;
}

.reminder-item.upcoming {
  background: #e6f7ff;
  border: 1px solid #bae7ff;
}

.reminder-info {
  flex: 1;
}

.reminder-company {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.reminder-detail {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.reminder-type {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.reminder-type.overage {
  background: #e6f7ff;
  color: #1890ff;
}

.reminder-type.rent {
  background: #f6ffed;
  color: #52c41a;
}

.reminder-type.repair {
  background: #fff3e0;
  color: #f57c00;
}

.reminder-date {
  color: #666;
}

.reminder-item.repair-reminder {
  border-left: 3px solid #ff9800;
}

.reminder-desc {
  font-size: 12px;
  color: #666;
  margin-left: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
  display: inline-block;
}

.reminder-status {
  color: #e74c3c;
  font-weight: 500;
}

.reminder-item.urgent .reminder-status {
  color: #d46b08;
}

.reminder-item.upcoming .reminder-status {
  color: #1890ff;
}

.form-value {
  color: #999;
  font-size: 14px;
}

/* 收款日历样式 */
.calendar-container {
  background: #fff;
  border-radius: 6px;
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid #e8e8e8;
}

.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}

.calendar-weekday {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #666;
  padding: 6px 0;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  min-height: 30px;
}

.calendar-day:hover {
  background: #f0f2ff;
}

.calendar-day.empty {
  cursor: default;
}

.calendar-day.empty:hover {
  background: transparent;
}

.calendar-day.today .day-num {
  background: #2563eb;
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-day.selected {
  background: #f0f2ff;
  border: 2px solid #2563eb;
}

.calendar-day.has-items {
  background: #fef0f0;
}

.calendar-day.has-items:hover {
  background: #fde2e2;
}

.day-num {
  font-size: 12px;
  font-weight: 500;
  color: #333;
}

.day-badge {
  position: absolute;
  bottom: 3px;
  background: #e74c3c;
  color: #fff;
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 8px;
  min-width: 14px;
  text-align: center;
}

.calendar-detail {
  background: #fff;
  border-radius: 6px;
  padding: 12px;
  margin-top: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid #e8e8e8;
}

.calendar-detail h3 {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #eee;
}

#calendar-detail-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calendar-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 8px;
  background: #f9f9f9;
  border-radius: 8px;
}

.calendar-item-info {
  flex: 1;
}

.calendar-item-company {
  font-size: 12px;
  font-weight: 600;
  color: #333;
  margin-bottom: 2px;
}

.calendar-item-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
}

.calendar-item-type {
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 10px;
}

.calendar-item-type.overage {
  background: #e6f7ff;
  color: #1890ff;
}

.calendar-item-type.rent {
  background: #f6ffed;
  color: #52c41a;
}

.calendar-item-cycle {
  color: #999;
}


/* 租赁成本详情样式 */
.rental-cost-detail {
  padding: 0 4px;
}

.cost-summary {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  padding: 16px;
  background: #2563eb;
  border-radius: 12px;
  color: #fff;
}

.cost-summary-item {
  flex: 1;
  text-align: center;
}

.cost-summary-item .label {
  display: block;
  font-size: 13px;
  opacity: 0.9;
  margin-bottom: 6px;
}

.cost-summary-item .value {
  display: block;
  font-size: 24px;
  font-weight: 700;
}

.detail-section-title {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin: 20px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #2563eb;
}

.data-table.compact {
  font-size: 13px;
}

.data-table.compact th,
.data-table.compact td {
  padding: 10px 12px;
}

.rank-badge {
  display: inline-block;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.rank-badge.rank-1 {
  background: linear-gradient(135deg, #ffd700 0%, #ffb800 100%);
}

.rank-badge.rank-2 {
  background: linear-gradient(135deg, #c0c0c0 0%, #a8a8a8 100%);
}

.rank-badge.rank-3 {
  background: linear-gradient(135deg, #cd7f32 0%, #b87333 100%);
}

.rank-badge.rank-other {
  background: #e0e0e0;
  color: #666;
}

.detail-records {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-record-card {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 14px;
  border: 1px solid #e8ecf4;
}

.record-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
}

.record-time {
  color: #888;
}

.record-customer {
  font-weight: 600;
  color: #333;
}

.record-parts {
  margin-bottom: 10px;
}

.part-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed #e0e0e0;
  font-size: 13px;
}

.part-row:last-child {
  border-bottom: none;
}

.part-name {
  flex: 1;
  color: #333;
}

.part-qty {
  width: 50px;
  text-align: center;
  color: #666;
}

.part-cost {
  width: 70px;
  text-align: right;
  color: #e74c3c;
}

.record-footer {
  text-align: right;
  font-size: 13px;
  color: #666;
  padding-top: 8px;
  border-top: 1px solid #e8ecf4;
}

.empty-hint {
  text-align: center;
  color: #999;
  padding: 20px;
  font-size: 14px;
}


/* 记录类型标签 */
.type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.type-badge.type-1 {
  background: #fef0f0;
  color: #f56c6c;
}

.type-badge.type-2 {
  background: #f0f9eb;
  color: #67c23a;
}

.type-badge.type-3 {
  background: #fdf6ec;
  color: #e6a23c;
}

.type-badge.type-99 {
  background: #ecf5ff;
  color: #409eff;
}


/* ==================== 销售单生成页面样式 ==================== */

/* 客户搜索下拉框 */
.bill-customer-search {
  position: relative;
}

.bill-customer-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 2px solid #2563eb;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 600px;
  min-height: 400px;
  overflow-y: auto;
  display: none;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  width: 100%;
}

.bill-customer-dropdown .dropdown-item {
  padding: 28px 32px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  transition: background 0.2s;
  font-size: 18px;
  line-height: 1.8;
  min-height: 80px;
  display: flex;
  align-items: center;
  user-select: none;
  -webkit-user-select: none;
}

.bill-customer-dropdown .dropdown-item strong {
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.bill-customer-dropdown .dropdown-item span {
  font-size: 17px;
  margin-left: 16px;
}

.bill-customer-dropdown .dropdown-item:hover {
  background: #f0f3ff;
}

.bill-customer-dropdown .dropdown-item.disabled {
  color: #999;
  cursor: default;
}

.bill-customer-dropdown .dropdown-item.disabled:hover {
  background: transparent;
}

/* 订单选择卡片 */
.bill-orders-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.bill-orders-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #2563eb;
}

.bill-orders-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0;
}

.bill-select-all {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #666;
}

.bill-select-all input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* 订单列表 */
.bill-orders-list {
  max-height: 350px;
  overflow-y: auto;
}

.bill-order-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: #f8f9fa;
  border-radius: 10px;
  margin-bottom: 10px;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.bill-order-item:hover {
  background: #f0f3ff;
}

.bill-order-item.selected {
  background: #e8f0fe;
  border-color: #2563eb;
}

.bill-order-checkbox {
  display: flex;
  align-items: center;
  padding-top: 2px;
}

.bill-order-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.bill-order-info {
  flex: 1;
}

.bill-order-date {
  font-size: 13px;
  color: #888;
  margin-bottom: 4px;
}

.bill-order-items {
  font-size: 14px;
  color: #333;
  font-weight: 500;
  margin-bottom: 4px;
}

.bill-order-amount {
  font-size: 16px;
  font-weight: 600;
  color: #2563eb;
}

.bill-order-remark {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

/* 销售单预览卡片 */
.bill-preview-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.bill-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid #2563eb;
}

.bill-preview-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a2e;
  text-align: center;
  flex: 1;
}

.bill-preview-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 10px;
}

.bill-preview-info-item {
  display: flex;
  gap: 8px;
}

.bill-preview-info-item label {
  font-size: 13px;
  color: #888;
  min-width: 70px;
}

.bill-preview-info-item span {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

/* 销售单预览表格 */
.bill-preview-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}

.bill-preview-table th,
.bill-preview-table td {
  padding: 12px 10px;
  border: 1px solid #e8ecf4;
  font-size: 13px;
}

.bill-preview-table thead th {
  background: #2563eb;
  color: #fff;
  font-weight: 600;
  text-align: center;
}

.bill-preview-table tbody td {
  text-align: center;
}

.bill-preview-table tbody td:first-child {
  text-align: left;
}

.bill-preview-table tbody td:last-child {
  text-align: left;
  font-size: 12px;
  color: #666;
}

/* 销售单总计 */
.bill-preview-total {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
  padding: 16px;
  background: #2563eb;
  border-radius: 10px;
  color: #fff;
}

.bill-total-num {
  font-size: 24px;
  font-weight: 700;
}

.bill-total-cn {
  font-size: 14px;
  opacity: 0.9;
}

/* 应付款/历史销售单页面 */
.bills-summary {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
}

.bills-summary-card {
  background: #2563eb;
  border-radius: 12px;
  padding: 20px 30px;
  color: #fff;
  flex: 1;
  max-width: 250px;
}

.bills-summary-card .label {
  font-size: 13px;
  opacity: 0.9;
  margin-bottom: 8px;
}

.bills-summary-card .value {
  font-size: 28px;
  font-weight: 700;
}

.bills-filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.bills-filter-bar input,
.bills-filter-bar select {
  padding: 10px 14px;
  border: 2px solid #e8ecf4;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}

.bills-filter-bar input:focus {
  border-color: #2563eb;
}

/* 空状态 */
.bill-empty {
  text-align: center;
  padding: 40px 20px;
  color: #888;
}

.bill-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

/* 统计页面应付款卡片 */
.stats-card.payable {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
  color: #fff;
}

.stats-card.payable .stats-label {
  color: rgba(255, 255, 255, 0.9);
}

.stats-card.payable .stats-value {
  color: #fff;
}


/* 销售单预览头部和底部 */
.bill-header {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}

.bill-header-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 14px;
  color: #333;
}

.bill-header-row:last-child {
  margin-bottom: 0;
}

.bill-header-row input[type="date"] {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

.bill-footer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px solid #2563eb;
}

.bill-total {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  font-size: 16px;
}

.bill-total-cn {
  color: #666;
  font-size: 14px;
}

.bill-total-num {
  font-size: 24px;
  font-weight: 700;
  color: #e74c3c;
}

/* 抄表图片预览样式 */
.meter-reading-images {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.meter-reading-image-item {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #e8e8e8;
  cursor: pointer;
  transition: all 0.3s;
  background: #f5f5f5;
}

.meter-reading-image-item:hover {
  border-color: #2563eb;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.meter-reading-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.meter-reading-image-item .image-index {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: #fff;
  font-size: 11px;
  padding: 4px 8px;
  text-align: center;
}

/* 到期统计样式 */
.stats-card.overdue {
  border-left: 4px solid #e74c3c;
}

.stats-card.urgent {
  border-left: 4px solid #f39c12;
}

.stats-card.upcoming {
  border-left: 4px solid #3498db;
}

.status-overdue {
  background: #e74c3c;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.status-urgent {
  background: #f39c12;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.status-upcoming {
  background: #3498db;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.expiry-list-container {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 账户管理 */
.account-info-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  max-width: 600px;
}

.account-info-card .info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
}

.account-info-card .info-item:last-child {
  border-bottom: none;
}

.account-info-card .info-item label {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

.account-info-card .info-item span {
  font-size: 14px;
  color: #333;
  font-weight: 600;
}

/* ==================== 新版统计分析页面样式 ==================== */

/* 时间筛选器 */
.stats-filter-bar {
  background: #fff;
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #e8e8e8;
}

.stats-filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-icon {
  font-size: 20px;
}

.filter-separator {
  color: #999;
  font-weight: 500;
}

.stats-filter-group input[type="date"] {
  padding: 10px 14px;
  border: 2px solid #e8ecf4;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.stats-filter-group input[type="date"]:focus {
  border-color: #2563eb;
}

/* 核心指标概览卡片 */
.stats-overview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stats-overview-card {
  background: #fff;
  border-radius: 6px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #e8e8e8;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.stats-overview-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.stats-overview-card.sales-card::before { background: #27ae60; }
.stats-overview-card.profit-card::before { background: #2563eb; }
.stats-overview-card.rental-card::before { background: #3498db; }
.stats-overview-card.warning-card::before { background: #f39c12; }

.stats-overview-card:hover {
  border-color: #2563eb;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

.overview-icon {
  font-size: 28px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9ff;
  border-radius: 8px;
}

.overview-content {
  flex: 1;
}

.overview-label {
  font-size: 13px;
  color: #888;
  margin-bottom: 4px;
}

.overview-value {
  font-size: 24px;
  font-weight: 700;
  color: #2d3436;
}

.overview-arrow {
  font-size: 24px;
  color: #ccc;
  transition: transform 0.2s;
}

.stats-overview-card:hover .overview-arrow {
  transform: translateX(4px);
  color: #2563eb;
}

/* 两栏布局 */
.stats-two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.stats-column {
  min-width: 0;
}

.stats-panel {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #e8e8e8;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  background: #2563eb;
  color: #fff;
}

.panel-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.panel-icon {
  font-size: 20px;
}

.panel-body {
  padding: 8px 0;
}

.panel-divider {
  height: 1px;
  background: #f0f0f0;
  margin: 8px 20px;
}

.panel-section-title {
  font-size: 12px;
  font-weight: 600;
  color: #888;
  padding: 12px 20px 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.panel-section-title.success { color: #27ae60; }
.panel-section-title.warning { color: #e67e22; }

.stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  cursor: pointer;
  transition: background 0.2s;
}

.stats-row:hover {
  background: #f8f9ff;
}

.stats-row.highlight {
  background: #2563eb;
  margin: 8px 12px;
  border-radius: 10px;
}

.stats-row.highlight .row-label,
.stats-row.highlight .row-value {
  color: #fff !important;
}

.row-label {
  font-size: 14px;
  color: #555;
}

.row-value {
  font-size: 18px;
  font-weight: 600;
  color: #2d3436;
}

.row-value.green { color: #27ae60; }
.row-value.red { color: #e74c3c; }
.row-value.orange { color: #e67e22; }

/* 到期提醒区域 */
.stats-expiry-section {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #e8e8e8;
}

.stats-expiry-section .panel-header {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.expiry-hint {
  margin-left: auto;
  font-size: 12px;
  opacity: 0.8;
  background: rgba(255,255,255,0.2);
  padding: 4px 10px;
  border-radius: 12px;
}

.expiry-cards {
  display: flex;
  gap: 16px;
  padding: 20px;
}

.expiry-card {
  flex: 1;
  padding: 20px;
  border-radius: 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.expiry-card.overdue {
  background: #fff5f5;
  border: 1px solid #ffcccc;
}

.expiry-card.urgent {
  background: #fffbf0;
  border: 1px solid #ffe4a0;
}

.expiry-card.upcoming {
  background: #f0f7ff;
  border: 1px solid #b3d4ff;
}

.expiry-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.expiry-count {
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
}

.expiry-card.overdue .expiry-count { color: #e74c3c; }
.expiry-card.urgent .expiry-count { color: #f39c12; }
.expiry-card.upcoming .expiry-count { color: #3498db; }

.expiry-label {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

/* ==================== 新版日历页面样式 ==================== */

/* 月份导航 */
.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
}

.calendar-nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #fff;
  border: 2px solid #e8ecf4;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
  color: #555;
}

.calendar-nav-btn:hover {
  background: #2563eb;
  border-color: transparent;
  color: #fff;
}

.nav-icon {
  font-size: 16px;
  font-weight: 300;
}

.calendar-month-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
}

.calendar-year {
  font-size: 12px;
  color: #888;
}

.calendar-month {
  font-size: 20px;
  font-weight: 700;
  color: #2d3436;
}

/* 日历主体 */
.calendar-wrapper {
  background: #fff;
  border-radius: 6px;
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #e8e8e8;
  max-width: 560px;
  margin: 0 auto;
}

.calendar-header-new {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}

.calendar-weekday-new {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #888;
  padding: 8px 0;
}

.calendar-weekday-new.sun { color: #e74c3c; }
.calendar-weekday-new.sat { color: #3498db; }

.calendar-grid-new {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.calendar-grid-new .calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  background: #fafbfc;
  min-height: 44px;
}

.calendar-grid-new .calendar-day:hover {
  background: #f0f3ff;
  transform: scale(1.03);
}

.calendar-grid-new .calendar-day.empty {
  background: transparent;
  cursor: default;
}

.calendar-grid-new .calendar-day.empty:hover {
  transform: none;
}

.calendar-grid-new .calendar-day.today {
  background: #2563eb;
}

.calendar-grid-new .calendar-day.today .day-num {
  color: #fff;
  background: none;
  width: auto;
  height: auto;
}

.calendar-grid-new .calendar-day.today:hover {
  transform: scale(1.03);
}

.calendar-grid-new .calendar-day.has-items {
  background: linear-gradient(135deg, #fff5f5 0%, #ffe6e6 100%);
  border: 2px solid #ffcccc;
}

.calendar-grid-new .calendar-day.has-items:hover {
  background: linear-gradient(135deg, #ffe6e6 0%, #ffd6d6 100%);
}

.calendar-grid-new .calendar-day.selected {
  background: #e8f0fe;
  border: 2px solid #2563eb;
}

.calendar-grid-new .day-num {
  font-size: 14px;
  font-weight: 600;
  color: #2d3436;
}

.calendar-grid-new .day-badge {
  position: absolute;
  bottom: 3px;
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: #fff;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(231,76,60,0.3);
}

/* 日期详情 */
.calendar-detail-new {
  background: #fff;
  border-radius: 12px;
  margin-top: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.calendar-detail-new .detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #2563eb;
  color: #fff;
}

.calendar-detail-new .detail-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.detail-close {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 20px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.detail-close:hover {
  background: rgba(255,255,255,0.3);
}

.detail-list {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-list .calendar-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 12px;
  border-left: 4px solid #2563eb;
  transition: all 0.2s;
}

.detail-list .calendar-item:hover {
  background: #f0f3ff;
  transform: translateX(4px);
}

.detail-list .calendar-item-company {
  font-size: 15px;
  font-weight: 600;
  color: #2d3436;
  margin-bottom: 4px;
}

.detail-list .calendar-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.detail-list .calendar-item-type {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.detail-list .calendar-item-type.overage {
  background: #e6f7ff;
  color: #1890ff;
}

.detail-list .calendar-item-type.rent {
  background: #f6ffed;
  color: #52c41a;
}

.detail-list .calendar-item-cycle {
  color: #888;
}

/* 响应式调整 */
@media (max-width: 1024px) {
  .stats-overview {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-two-column {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .stats-overview {
    grid-template-columns: 1fr;
  }

  .expiry-cards {
    flex-direction: column;
  }

  .calendar-nav-btn .nav-text {
    display: none;
  }
}

/* ==================== 合同管理页面样式 ==================== */

/* 合同类型选择区 */
.contract-type-section {
  padding: 10px 0;
}

.contract-type-row {
  display: flex;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
}

.contract-type-row:last-child {
  border-bottom: none;
}

.contract-label {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  min-width: 100px;
}

.contract-radio-group {
  display: flex;
  gap: 24px;
}

.contract-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #555;
  padding: 10px 20px;
  border-radius: 8px;
  border: 2px solid #e8ecf4;
  transition: all 0.2s;
}

.contract-radio:hover {
  border-color: #2563eb;
  background: #f8f9ff;
}

.contract-radio input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #2563eb;
}

.contract-radio input[type="radio"]:checked + span,
.contract-radio:has(input:checked) {
  color: #2563eb;
  font-weight: 600;
}

.contract-radio:has(input:checked) {
  border-color: #2563eb;
  background: #eff6ff;
}

/* 合同操作按钮区 */
.contract-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin: 20px 0;
  padding: 16px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #e8e8e8;
}

.contract-actions .btn {
  min-width: 140px;
  height: 48px;
  font-size: 15px;
  font-weight: 600;
}

.contract-actions .btn-success {
  background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(39, 174, 96, 0.35);
}

.contract-actions .btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(39, 174, 96, 0.45);
}

/* 合同历史状态标签 */
.contract-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.contract-status.active {
  background: #d4edda;
  color: #155724;
}

.contract-status.expired {
  background: #e2e3e5;
  color: #383d41;
}

.contract-status.terminated {
  background: #f8d7da;
  color: #721c24;
}

/* 合同详情模态框 */
.contract-detail-section {
  margin-bottom: 20px;
}

.contract-detail-title {
  font-size: 14px;
  font-weight: 600;
  color: #2563eb;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #2563eb;
}

.contract-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}

.contract-detail-row:last-child {
  border-bottom: none;
}

.contract-detail-label {
  font-size: 13px;
  color: #888;
}

.contract-detail-value {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

/* 合同上传区域 */
.contract-upload-area {
  border: 2px dashed #ddd;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 16px;
}

.contract-upload-area:hover {
  border-color: #2563eb;
  background: #f8f9ff;
}

.contract-upload-area .upload-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.contract-upload-area .upload-text {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.contract-upload-area .upload-hint {
  font-size: 12px;
  color: #999;
}

/* 已上传的合同文件 */
.contract-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-top: 12px;
}

.contract-file-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contract-file-icon {
  font-size: 28px;
}

.contract-file-name {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.contract-file-date {
  font-size: 12px;
  color: #888;
}

.contract-file-actions {
  display: flex;
  gap: 8px;
}

/* 合同PDF预览 */
.contract-preview-modal {
  max-width: 900px;
}

.contract-preview-content {
  background: #fff;
  padding: 40px;
  min-height: 500px;
  font-family: 'SimSun', 'Microsoft YaHei', serif;
  line-height: 1.8;
}

.contract-preview-header {
  text-align: center;
  margin-bottom: 30px;
}

.contract-preview-header h2 {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 10px;
}

.contract-preview-no {
  font-size: 14px;
  color: #666;
}

.contract-preview-parties {
  margin-bottom: 24px;
}

.contract-preview-party {
  margin-bottom: 16px;
}

.contract-preview-party-label {
  font-weight: bold;
  margin-right: 8px;
}

.contract-preview-terms {
  margin-bottom: 24px;
}

.contract-preview-term {
  margin-bottom: 16px;
}

.contract-preview-term-title {
  font-weight: bold;
  margin-bottom: 8px;
}

.contract-preview-signatures {
  display: flex;
  justify-content: space-between;
  margin-top: 60px;
}

.contract-preview-signature {
  width: 45%;
}

.contract-preview-signature-label {
  font-weight: bold;
  margin-bottom: 40px;
}

.contract-preview-signature-line {
  border-bottom: 1px solid #000;
  height: 30px;
  margin-bottom: 10px;
}

.contract-preview-date {
  margin-top: 20px;
}

/* 机器类型标签 */
.machine-type-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.machine-type-badge.black {
  background: #e2e3e5;
  color: #383d41;
}

.machine-type-badge.color {
  background: #2563eb;
  color: #fff;
}

/* ==================== 合同上传样式 ==================== */
.contract-upload-zone {
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fafafa;
}

.contract-upload-zone:hover {
  border-color: #667eea;
  background: #f5f7ff;
}

.contract-upload-zone.dragover {
  border-color: #667eea;
  background: #eef2ff;
}

.contract-file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: 8px;
  margin-bottom: 8px;
  border: 1px solid #e2e8f0;
}

.contract-file-item:hover {
  background: #f1f5f9;
}

.contract-file-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contract-file-icon.pdf {
  background: #fee2e2;
  color: #dc2626;
}

.contract-file-icon.word {
  background: #dbeafe;
  color: #2563eb;
}

.contract-file-icon.image {
  background: #d1fae5;
  color: #059669;
}

.contract-file-info {
  flex: 1;
  min-width: 0;
}

.contract-file-name {
  font-weight: 500;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contract-file-meta {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.contract-file-actions {
  display: flex;
  gap: 8px;
}

.contract-file-actions .btn {
  padding: 6px 12px;
  font-size: 12px;
}

/* 合同分组样式 */
.contract-group {
  background: #f8fafc;
  border-radius: 10px;
  margin-bottom: 12px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.contract-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  cursor: pointer;
  transition: background 0.2s;
}

.contract-group-header:hover {
  background: #f1f5f9;
}

.contract-group-info {
  flex: 1;
}

.contract-group-name {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
}

.contract-group-meta {
  font-size: 13px;
  color: #64748b;
  margin-top: 4px;
}

.contract-group-expand {
  padding: 8px;
}

.contract-group-expand .expand-icon {
  transition: transform 0.2s;
  color: #94a3b8;
}

.contract-group-files {
  padding: 16px;
  background: #fff;
  border-top: 1px solid #e2e8f0;
}

/* 图片画廊导航按钮 */
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 10;
  transition: all 0.2s;
}

.gallery-nav:hover {
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.gallery-nav.prev {
  left: 16px;
}

.gallery-nav.next {
  right: 16px;
}

.gallery-thumbnails {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.gallery-thumb {
  border: 2px solid transparent;
  transition: all 0.2s;
}

.gallery-thumb:hover {
  opacity: 0.8 !important;
}

.gallery-thumb.active {
  border-color: #667eea;
  opacity: 1 !important;
}

/* 按钮小尺寸 */
.btn.btn-sm {
  padding: 6px 10px;
  font-size: 12px;
}

/* 合同预览模态框 */
.contract-preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.contract-preview-content {
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.contract-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
}

.contract-preview-header h3 {
  font-size: 16px;
  color: #1e293b;
}

.contract-preview-body {
  flex: 1;
  overflow: auto;
  padding: 20px;
}

.contract-preview-body img {
  max-width: 100%;
  height: auto;
}

.contract-preview-body iframe {
  width: 100%;
  height: 70vh;
  border: none;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #e2e8f0;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* 底部备案信息 */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 10px;
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid #e2e8f0;
  z-index: 999;
}

.site-footer a {
  color: #666;
  font-size: 13px;
  text-decoration: none;
}

.site-footer a:hover {
  color: #667eea;
  text-decoration: underline;
}