* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #f0f2f5;
  height: 100%;
  overflow: hidden;
}

#app {
  width: 100%;
  height: 100%;
}

.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
  width: 420px;
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-header h1 {
  font-size: 28px;
  color: #333;
  margin-bottom: 8px;
}

.login-header p {
  color: #999;
  font-size: 14px;
}

.login-form {
  margin-bottom: 20px;
}

.login-tip {
  text-align: center;
  color: #999;
  font-size: 12px;
}

.login-tip p {
  padding: 10px;
  background: #f9f9f9;
  border-radius: 6px;
}

.login-redirect {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.login-redirect p {
  font-size: 18px;
  color: #666;
  margin-bottom: 20px;
}

.login-redirect button {
  padding: 12px 36px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
}

.login-redirect button:hover {
  opacity: 0.9;
}

.main-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 16px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.header-left h1 {
  color: #fff;
  font-size: 20px;
  font-weight: 600;
}

.header-left p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  margin-top: 2px;
}

.header-right {
  display: flex;
  align-items: center;
}

.logout-btn {
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.search-panel {
  background: #fff;
  margin: 12px;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

.search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.search-item {
  display: flex;
  flex-direction: column;
  min-width: 120px;
  flex: 1;
  max-width: 180px;
}

.search-item label {
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
}

.search-item input {
  padding: 6px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 13px;
}

.search-item input:focus {
  outline: none;
  border-color: #667eea;
}

.search-item.date-range {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  max-width: 250px;
}

.search-item.date-range label {
  margin-bottom: 0;
  white-space: nowrap;
}

.search-item.date-range input {
  flex: 1;
  max-width: 80px;
}

.search-buttons {
  display: flex;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

.btn {
  padding: 6px 16px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn.loading {
  position: relative;
  color: transparent !important;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  top: 50%;
  left: 50%;
  margin-left: -7px;
  margin-top: -7px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-success {
  background: #52c41a;
  color: #fff;
}

.btn-success:hover {
  background: #43a047;
}

.btn-default {
  background: #f5f5f5;
  color: #666;
}

.btn-default:hover {
  background: #e8e8e8;
}

.btn-danger {
  background: #ff4d4f;
  color: #fff;
}

.btn-danger:hover {
  background: #cf1322;
}

.btn-info {
  background: #1890ff;
  color: #fff;
}

.btn-info:hover {
  background: #096dd9;
}

.btn-sm {
  padding: 3px 10px;
  font-size: 11px;
}

.content-panel {
  flex: 1;
  margin: 0 12px 12px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 16px;
  display: flex;
  flex-direction: column;
  overflow: auto;  /* 允许滚动 */
}

.table-wrapper {
  flex: 1;
  overflow-y: auto;  /* 垂直方向允许滚动 */
  overflow-x: auto;  /* 水平方向也允许滚动 */
  border-radius: 8px;
  border: 1px solid #e8e8e8;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  position: sticky;
  top: 0;
  background: #fafafa;
  z-index: 1;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}

.data-table th {
  font-weight: 600;
  color: #666;
  background: #fafafa;
}

.data-table tbody {
  display: block;
  max-height: calc(100vh - 320px);
  /*overflow-y: auto;*/
}

.data-table thead,
.data-table tbody tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

/* 为特定列设置相对宽度 */
.data-table th:nth-child(1),
.data-table td:nth-child(1) {
  width: 5%; /* 序号 */
}

.data-table th:nth-child(2),
.data-table td:nth-child(2) {
  width: 10%; /* 创建时间 */
}

.data-table th:nth-child(3),
.data-table td:nth-child(3) {
  width: 10%; /* 二维码 */
}

.data-table th:nth-child(4),
.data-table td:nth-child(4) {
  width: 8%; /* 评估单位 */
}

.data-table th:nth-child(5),
.data-table td:nth-child(5) {
  width: 8%; /* 被审单位 */
}

.data-table th:nth-child(6),
.data-table td:nth-child(6) {
  width: 8%; /* 报告文号 */
}

.data-table th:nth-child(7),
.data-table td:nth-child(7) {
  width: 8%; /* 报告日期 */
}

.data-table th:nth-child(8),
.data-table td:nth-child(8) {
  width: 10%; /* 签字注册评估师1 */
}

.data-table th:nth-child(9),
.data-table td:nth-child(9) {
  width: 10%; /* 签字注册评估师2 */
}

.data-table th:nth-child(10),
.data-table td:nth-child(10) {
  width: 12%; /* 免责声明 */
}

.data-table th:nth-child(11),
.data-table td:nth-child(11) {
  width: 6%; /* 状态 */
}

.data-table th:nth-child(12),
.data-table td:nth-child(12) {
  width: 10%; /* 操作 */
}

.data-table tbody tr:hover {
  background: #f9fafb;
}

.data-table .secondary-text {
  color: #999;
  font-size: 11px;
}

.data-table .empty-row {
  text-align: center;
  color: #999;
  padding: 30px;
}

.data-table .qr-code-canvas {
  width: 100px;
  height: 100px;
  border: 1px solid #f0f0f0;
  border-radius: 4px;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.status-enabled {
  background-color: #f6ffed;
  color: #52c41a;
  border: 1px solid #b7eb8f;
}

.status-disabled {
  background-color: #fff2f0;
  color: #ff4d4f;
  border: 1px solid #ffccc7;
}

.data-table th:first-child,
.data-table td:first-child {
  width: 50px;
  text-align: center;
  padding: 10px 4px;
}

.disabled-input {
  background-color: #f5f5f5;
  color: #666;
  cursor: not-allowed;
  border-color: #d9d9d9;
}

.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.pagination-info {
  color: #999;
  font-size: 12px;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination-buttons select {
  padding: 3px 6px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 12px;
}

.pagination-current {
  padding: 3px 10px;
  font-size: 13px;
  color: #667eea;
  font-weight: 600;
}

.footer {
  padding: 12px;
  text-align: center;
  flex-shrink: 0;
}

.footer-line {
  height: 3px;
  background: linear-gradient(90deg, transparent, #667eea, transparent);
  margin-bottom: 10px;
}

.footer p {
  color: #999;
  font-size: 12px;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 550px;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid #f0f0f0;
  position: sticky;
  top: 0;
  background: #fff;
}

.modal-header h3 {
  font-size: 15px;
  color: #333;
}

.modal-close {
  width: 26px;
  height: 26px;
  border: none;
  background: #f5f5f5;
  border-radius: 50%;
  font-size: 18px;
  color: #999;
  cursor: pointer;
}

.modal-close:hover {
  background: #e8e8e8;
}

.modal-body {
  padding: 16px;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 12px;
}

.form-item {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 180px;
}

.form-item label {
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
}

.form-item input {
  padding: 6px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 13px;
}

.form-item input:focus {
  outline: none;
  border-color: #667eea;
}

.form-item.full-width {
  width: 100%;
  min-width: auto;
}

.form-item.full-width textarea {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 13px;
  resize: vertical;
  min-height: 60px;
}

.form-item.full-width textarea:focus {
  outline: none;
  border-color: #667eea;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid #f0f0f0;
}

@media (max-width: 768px) {
  .login-card {
    width: 90%;
    padding: 24px;
  }
  
  .header {
    padding: 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .header-left h1 {
    font-size: 18px;
  }
  
  .search-panel {
    margin: 8px;
    padding: 12px;
  }
  
  .search-row {
    gap: 10px;
  }
  
  .search-item {
    max-width: 100%;
  }
  
  .search-buttons {
    flex-wrap: wrap;
  }
  
  .content-panel {
    margin: 0 8px 8px;
    padding: 12px;
  }
  
  .data-table th,
  .data-table td {
    padding: 6px 4px;
    font-size: 11px;
  }
  
  .btn-sm {
    padding: 2px 6px;
    font-size: 10px;
  }
  
  .pagination-container {
    flex-direction: column;
    gap: 10px;
  }
  
  .footer p {
    font-size: 11px;
  }
}

.qrcode-modal {
  max-width: 380px;
}

.qrcode-body {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.qrcode-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qrcode-wrapper #qrcode-display {
  border: 2px solid #f0f0f0;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.qrcode-report-no {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin: 12px 0 6px;
  text-align: center;
}

.qrcode-tip {
  font-size: 12px;
  color: #999;
  margin: 0;
}

.detail-container .detail-header {
  text-align: center;
}

.detail-container .main-title {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  text-align: center;
}

.detail-container .section-title.large-title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  text-align: center;
}