* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; background: #f0f2f5; color: #333; min-height: 100vh; }

/* Stage9.5：最小 Agent 对话界面，沿用既有管理端颜色与卡片风格。 */
.agent-chat { max-width: 920px; margin: 0 auto; }
.agent-chat-heading { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.agent-chat-heading p { color: #666; line-height: 1.6; }
.agent-chat-log { display: flex; flex-direction: column; gap: 12px; min-height: 180px; max-height: 52vh; overflow-y: auto; padding: 16px; background: #fff; border: 1px solid #dfe5ec; border-radius: 8px; }
.agent-message { max-width: 88%; padding: 11px 13px; border-radius: 8px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.agent-message-user { align-self: flex-end; background: #e8f1ff; color: #174a8b; }
.agent-message-assistant { align-self: flex-start; background: #f5f7fa; color: #303846; }
.agent-message-label { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 600; color: #6b7785; }
.agent-tool-status { margin: 4px 0; font-size: 13px; color: #536273; }
.agent-citations { margin: 10px 0 0; padding-left: 18px; color: #536273; font-size: 12px; }
.agent-stream-status { margin: 12px 0; padding: 9px 12px; border-radius: 6px; background: #eaf3ff; color: #225f9c; }
.agent-stream-error { margin: 12px 0; }
.agent-chat-form { margin-top: 16px; padding: 16px; background: #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.agent-chat-form label { display: block; margin-bottom: 8px; font-weight: 600; }
.agent-chat-form textarea { display: block; width: 100%; resize: vertical; }
.agent-chat-actions { display: flex; gap: 8px; margin-top: 12px; }
body.modal-open { overflow: hidden; }
body.login-page { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%); }

.login-box { background: #fff; padding: 40px; border-radius: 8px; box-shadow: 0 4px 24px rgba(0,0,0,.2); width: 400px; max-width: 95vw; }
.login-box h1 { text-align: center; margin-bottom: 30px; color: #1a73e8; font-size: 22px; }

.topbar { background: #1a73e8; color: #fff; padding: 0 20px; }
.topbar-inner { max-width: 1400px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 56px; }
.topbar h1 { font-size: 18px; font-weight: 600; }
.topbar nav a { color: rgba(255,255,255,.9); margin-left: 20px; text-decoration: none; font-size: 14px; }
.topbar nav a:hover, .topbar nav a.active { color: #fff; text-decoration: underline; }
.user-info { margin-left: 20px; font-size: 13px; opacity: .85; }

h2 { margin-bottom: 20px; color: #1a73e8; font-size: 22px; }

.container { max-width: 1400px; margin: 20px auto; padding: 0 20px; }

.card { background: #fff; padding: 24px; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.08); margin-bottom: 16px; }
.card h3 { margin-bottom: 16px; }
.card h4 { margin-bottom: 12px; }
.card ul, .card ol { margin: 8px 0 8px 20px; line-height: 1.8; }

.stats-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.08); text-align: center; }
.stat-card .stat-num { font-size: 32px; font-weight: 700; color: #1a73e8; }
.stat-card.warning .stat-num { color: #e67e22; }
.stat-card.danger .stat-num { color: #e74c3c; }
.stat-card .stat-label { font-size: 13px; color: #888; margin-top: 4px; }

.toolbar { margin-bottom: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.search-bar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.search-bar input, .search-bar select { padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; flex: 1; min-width: 120px; }
.search-bar .search-select { flex: 1; min-width: 120px; }

.sort-bar { margin-bottom: 12px; font-size: 14px; }
.sort-bar select { padding: 4px 8px; border: 1px solid #ddd; border-radius: 4px; }

.btn { padding: 8px 16px; border: 1px solid #ddd; border-radius: 4px; cursor: pointer; font-size: 14px; background: #fff; color: #333; }
.btn:hover { background: #f5f5f5; }
.btn-primary { background: #1a73e8; color: #fff; border-color: #1a73e8; }
.btn-primary:hover { background: #1557b0; }
.btn-success { background: #27ae60; color: #fff; border-color: #27ae60; }
.btn-success:hover { background: #1e8449; }
#configure-review-finalize:disabled { opacity: .55; cursor: not-allowed; filter: grayscale(1); }
.btn-warning { background: #e67e22; color: #fff; border-color: #e67e22; }
.btn-warning:hover { background: #c0651c; }
.btn-info { background: #2980b9; color: #fff; border-color: #2980b9; }
.btn-info:hover { background: #1f6da0; }
.btn-danger { background: #e74c3c; color: #fff; border-color: #e74c3c; }
.btn-danger:hover { background: #c0392b; }
.btn-full { width: 100%; padding: 12px; font-size: 16px; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

.table-wrap { background: #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.08); overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { background: #f8f9fa; padding: 12px 10px; text-align: left; border-bottom: 2px solid #e0e0e0; font-weight: 600; white-space: nowrap; }
.data-table td { padding: 10px; border-bottom: 1px solid #f0f0f0; vertical-align: top; }
.data-table tr:hover td { background: #f5f8ff; }
.data-table .certificate-business-cell.certificate-expiry-expired { background: #ffeaea; color: #b42318; }
.data-table .certificate-business-cell.certificate-expiry-within_30 { color: #d35400; background: #fff4e5; }
.data-table .certificate-business-cell.certificate-expiry-within_60 { color: #9a6700; background: #fff8dc; }
.data-table .certificate-business-cell.certificate-expiry-within_90 { color: #79620a; background: #fffbe6; }
.data-table .text-center { text-align: center; color: #999; }
.data-table .certificate-employee-group-start td { border-top: 2px solid #d9e2ec; }
.data-table .certificate-employee-group-start:first-child td { border-top: 0; }
.data-table .certificate-employee-group-inner td { border-top: 1px dashed #dce3ea; }
.data-table .certificate-group-index, .data-table .certificate-group-name { background: #f8fafc; vertical-align: middle; font-weight: 400; }
.data-table .certificate-empty { color: #999; }
.certificate-risk-summary { display:flex; flex-wrap:wrap; gap:4px; margin-top:5px; }
.certificate-risk-tag { display:inline-block; border-radius:10px; padding:1px 6px; font-size:12px; font-weight:400; background:#fff4e5; color:#9a6700; }
.certificate-risk-expired { background:#ffeaea; color:#b42318; }
.certificate-history-message { margin-bottom:8px; }
.certificate-history-table-wrap { overflow-x:auto; margin:8px 0; background:#fff; border:1px solid #ead9a1; border-radius:4px; }
.certificate-history-table { width:100%; min-width:780px; border-collapse:collapse; color:#333; }
.certificate-history-table th, .certificate-history-table td { padding:7px 8px; text-align:left; vertical-align:top; border-bottom:1px solid #eee4c5; line-height:1.45; }
.certificate-history-table th { background:#fff9e8; color:#6b5200; font-weight:600; white-space:nowrap; }
.certificate-history-table tbody tr:last-child td { border-bottom:0; }
.certificate-history-table .certificate-history-archived { color:#777; background:#f7f7f7; }
.certificate-history-status { white-space:nowrap; font-weight:600; }
.certificate-history-checkbox:disabled { cursor:not-allowed; }
.certificate-history-actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.certificate-history-actions .btn-warning:disabled,
.certificate-history-actions .btn-warning:disabled:hover { background:#e0e0e0; color:#777; border-color:#c8c8c8; cursor:not-allowed; opacity:1; }
.certificate-archive-confirm { margin-top:8px; padding:8px; border:1px solid #e6a23c; background:#fff8dc; }

.pagination { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 14px; }
.pagination select { padding: 4px 8px; border: 1px solid #ddd; border-radius: 4px; }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 600; color: #555; }
.form-group input, .form-group select { width: 100%; padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: #1a73e8; }
.required { color: #e74c3c; }
.error-msg { color: #e74c3c; font-size: 13px; margin-bottom: 10px; }
.certificate-history-success { background: #e8f5e9; color: #2e7d32; font-size: 13px; margin-bottom: 10px; padding: 8px 10px; border-radius: 4px; }
.warning-msg { color: #9a6700; background: #fff8dc; border: 1px solid #f0cf65; border-radius: 4px; padding: 9px 10px; font-size: 13px; margin-bottom: 10px; }

.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal[hidden] { display: none !important; }
.modal-content { background: #fff; border-radius: 8px; padding: 24px; max-width: 500px; width: 90vw; max-height: 90vh; overflow-y: auto; position: relative; }
.modal-content .close, .vision-health-indicators-dialog .close { position: absolute; top: 12px; right: 16px; display:block; width:28px; height:28px; padding:0; border:0; background:transparent; font-size:24px; line-height:28px; cursor:pointer; color:#999; }
.modal-content .close:hover, .vision-health-indicators-dialog .close:hover { color: #333; }
.modal-content h3 { margin-bottom: 16px; }

.employee-delete-modal-content { max-width: 680px; }
.employee-delete-modal-content h3, .employee-history-modal-content h3 { padding-right: 30px; }
.employee-delete-employee { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; margin: 0 0 18px; padding: 14px 16px; border: 1px solid #e4e7eb; border-radius: 6px; background: #fafbfc; }
.employee-delete-employee div, .employee-delete-impact-grid div { min-width: 0; }
.employee-delete-label { display: block; margin-bottom: 3px; color: #687078; font-size: 12px; }
.employee-delete-value { display: block; color: #263238; font-weight: 600; overflow-wrap: anywhere; }
.employee-delete-section { margin: 0 0 18px; }
.employee-delete-section h4 { margin: 0 0 9px; color: #30363b; font-size: 14px; }
.employee-delete-impact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.employee-delete-impact-grid div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 11px; border: 1px solid #e9ecef; border-radius: 5px; background: #fff; color: #4d555c; font-size: 13px; }
.employee-delete-impact-grid strong { color: #20262b; font-size: 15px; }
.employee-delete-files { padding: 12px 14px; border: 1px solid #dce7f5; border-radius: 6px; background: #f6faff; color: #4d5965; font-size: 13px; line-height: 1.65; }
.employee-delete-files p { margin: 0 0 4px; }
.employee-delete-files p:last-child { margin-bottom: 0; }
.employee-delete-warning { margin: 0 0 18px; padding: 11px 13px; border-left: 4px solid #dc3545; border-radius: 4px; background: #fff1f1; color: #962c35; line-height: 1.6; }
.employee-delete-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.user-delete-modal-content { max-width: 620px; }
.user-delete-modal-content h3 { padding-right: 30px; }
.user-delete-identity { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; margin: 0 0 18px; padding: 14px 16px; border: 1px solid #e4e7eb; border-radius: 6px; background: #fafbfc; }
.user-delete-identity > div { min-width: 0; }
.user-delete-label { display: block; margin-bottom: 3px; color: #687078; font-size: 12px; }
.user-delete-identity strong { display: block; color: #263238; overflow-wrap: anywhere; }
.user-delete-warning { margin: 0 0 14px; padding: 11px 13px; border-left: 4px solid #dc3545; border-radius: 4px; background: #fff1f1; color: #962c35; line-height: 1.6; }
.user-delete-impact { margin: 0 0 18px; padding: 12px 14px; border: 1px solid #dce7f5; border-radius: 6px; background: #f6faff; color: #4d5965; font-size: 13px; line-height: 1.65; }
.user-delete-impact p { margin: 0 0 4px; }
.user-delete-impact ul { margin: 0; padding-left: 20px; }
.user-delete-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
@media (max-width: 560px) { .user-delete-identity { grid-template-columns: 1fr; } }
.employee-batch-delete-modal-content { max-width: 960px; }
.employee-batch-delete-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 12px; margin: 0 0 14px; }
.employee-batch-delete-summary div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid #e9ecef; border-radius: 5px; background: #fafbfc; color: #4d555c; font-size: 13px; }
.employee-batch-delete-summary strong { color: #20262b; font-size: 17px; }
.employee-batch-delete-summary .is-danger { border-color: #f1c4c7; background: #fff5f5; color: #962c35; }
.employee-batch-delete-summary .is-warning { border-color: #f0cf65; background: #fffaf0; color: #8a6500; }
.employee-batch-delete-summary .is-success { border-color: #b8dfbd; background: #f3fbf4; color: #2e7d32; }
.employee-batch-delete-filters { margin-bottom: 14px; }
.employee-batch-delete-table-wrap { max-height: 56vh; }
.employee-batch-delete-table { min-width: 820px; }
.employee-batch-delete-table th { white-space: nowrap; }
.employee-batch-delete-table td { vertical-align: middle; }
.employee-batch-delete-result { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.employee-batch-delete-result.is-permanent { background: #e8f5e9; color: #2e7d32; }
.employee-batch-delete-result.is-archive { background: #fff8dc; color: #8a6500; }
.employee-batch-delete-result.is-blocked { background: #ffebee; color: #c62828; }
.employee-batch-delete-reason { min-width: 260px; color: #4d555c; line-height: 1.5; }
.employee-batch-delete-notice { margin: 0 0 14px; padding: 10px 12px; border-left: 4px solid #1a73e8; border-radius: 4px; background: #f3f8ff; color: #40566d; font-size: 13px; line-height: 1.6; }
.employee-task-references { max-height: 300px; overflow: auto; margin: 0 0 18px; border: 1px solid #e4e7eb; border-radius: 6px; background: #fff; }
.employee-task-references table { min-width: 760px; }
.employee-task-references th, .employee-task-references td { white-space: nowrap; font-size: 12px; }
.employee-task-reference-actions { display: inline-flex; gap: 6px; }
.employee-task-delete-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin: 14px 0; }
.employee-task-delete-summary div { padding: 9px 11px; border: 1px solid #e9ecef; border-radius: 5px; }
.employee-history-modal-content { max-width: 860px; }
.employee-history-filters { margin: 0 0 14px; padding: 12px 14px; border: 1px solid #e6e9ed; border-radius: 6px; background: #fafbfc; }
.employee-history-filters label { display: block; margin-bottom: 6px; color: #555; font-size: 13px; font-weight: 600; }
.employee-history-search-row { display: flex; gap: 8px; align-items: center; }
.employee-history-search-row input { flex: 1; min-width: 0; padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }
.employee-history-search-row input:focus { outline: none; border-color: #1a73e8; }
.employee-history-table-wrap { max-height: 56vh; overflow: auto; border: 1px solid #e4e7eb; border-radius: 6px; background: #fff; }
.employee-history-table { min-width: 760px; margin: 0; }
.employee-history-table th { white-space: nowrap; }
.employee-history-table td { vertical-align: middle; }
.employee-history-action-cell { white-space: nowrap; }
.employee-history-empty { padding: 26px 12px; color: #777; text-align: center; }
@media (max-width: 560px) {
  .employee-delete-employee, .employee-delete-impact-grid, .employee-batch-delete-summary { grid-template-columns: 1fr; }
  .employee-history-search-row { align-items: stretch; flex-direction: column; }
}

.import-result { padding: 12px; margin-bottom: 16px; border-radius: 4px; font-size: 13px; }
.import-result.success { background: #e8f5e9; color: #2e7d32; }
.import-result.error { background: #ffebee; color: #c62828; }

.vision-hidden-input { display: none; }
.vision-upload-actions { align-items: center; }
.vision-file-summary {
  color: #555;
  font-size: 13px;
  margin: 4px 0 16px;
  border: 1px solid #e4e7eb;
  background: #fafbfc;
  padding: 12px 14px;
  min-height: 46px;
}
.vision-empty-selection { color: #888; line-height: 20px; }
.vision-selected-section + .vision-selected-section { margin-top: 14px; padding-top: 12px; border-top: 1px solid #e6e8eb; }
.vision-selected-title { display: block; margin-bottom: 6px; color: #333; }
.vision-folder-name { color: #1a73e8; word-break: break-all; }
.vision-file-list { width: fit-content; max-width: 100%; margin: 0 0 0 auto; padding: 0; line-height: 1.7; list-style-position: inside; text-align: left; }
.vision-file-list li { padding: 2px 32px 2px 0; position: relative; word-break: break-all; text-align: left; }
.vision-remove-file {
  position: absolute;
  right: 0;
  top: 2px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #888;
  cursor: pointer;
  font-size: 20px;
  line-height: 24px;
}
.vision-remove-file:hover { color: #e74c3c; }
.vision-remove-file:disabled { display: none; }
.vision-preview-wrap { box-shadow: none; border: 1px solid #e6e8eb; }
.vision-classification-wrap { box-shadow: none; border: 1px solid #e6e8eb; margin-bottom: 16px; }
.vision-classification-table { min-width: 960px; }
.vision-classification-table th { white-space: nowrap; }
.vision-classification-table td { vertical-align: middle; }
.vision-classification-check-col, .vision-classification-checkbox-cell { width: 58px; text-align: center; }
.vision-classification-checkbox { width: 18px; height: 18px; cursor: pointer; }
.vision-classification-table select { width: 100%; min-width: 140px; padding: 7px 8px; border: 1px solid #d8dde3; border-radius: 4px; background: #fff; }
.vision-classification-table tr.vision-classification-failed td { background: #fff0f0; }
.vision-classification-table tr.vision-classification-failed select { border: 2px solid #c62828; background: #fff4f4; }
.vision-review-group { margin: 18px 0 24px; }
.vision-review-group h5 { margin: 0 0 8px; color: #333; font-size: 15px; }
.vision-review-group .vision-preview-wrap { width: 100%; max-width: 100%; max-height: 58vh; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.vision-preview-table { min-width: 1500px; table-layout: fixed; }
.vision-preview-table th:first-child { width: 86px; text-align: center; }
.vision-preview-table th:nth-child(2) { width: 190px; }
.vision-preview-table th { width: 155px; }
.vision-preview-table th:nth-child(4), .vision-preview-table td:nth-child(4) {
  width: 190px;
}
.vision-preview-table td:nth-child(4) input[data-field="id-card-number"],
.vision-preview-table td:nth-child(4) input[data-field="other-id-card-number"] {
  min-width: 13ch;
}
.vision-preview-table th:nth-child(5), .vision-preview-table td:nth-child(5) {
  width: 220px;
}
.vision-preview-table td { vertical-align: middle; }
.vision-preview-scroll-container { overflow-x: auto; overflow-y: auto; position: relative; }
.vision-preview-table { border-collapse: separate; border-spacing: 0; }
.vision-preview-scroll-container .vision-preview-table thead { position: sticky; top: 0; z-index: 3; }
.vision-preview-scroll-container .vision-preview-table thead th { position: sticky; top: 0; z-index: 3; background: #f7f9fc; border-bottom: 1px solid #cfd8e3; }
.vision-import-check-col span { display: block; margin-top: 3px; }
.vision-import-checkbox-cell { text-align: center; vertical-align: middle !important; }
.vision-import-checkbox { width: 18px !important; height: 18px; cursor: pointer; }
.vision-preview-table input,
.vision-preview-table select,
.vision-preview-table textarea {
  width: 100%;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #d9dde3;
  border-radius: 4px;
  font: inherit;
  background: #fff;
  box-sizing: border-box;
}
.vision-preview-table textarea {
  min-height: 52px;
  max-height: 52px;
  line-height: 18px;
  resize: vertical;
  overflow: hidden;
  white-space: normal;
  word-break: break-word;
}
.vision-preview-table td.vision-file-name {
  text-align: center;
  vertical-align: middle;
}

.vision-health-indicator-cell {
  min-width: 420px;
}

.vision-health-indicator {
  display: grid;
  grid-template-columns: minmax(110px, 1.4fr) minmax(70px, 0.8fr) minmax(55px, 0.6fr) minmax(90px, 1fr);
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid #edf0f4;
  text-align: left;
}

.vision-health-indicator:last-child {
  border-bottom: 0;
}
.vision-health-indicators-modal { position:fixed; inset:0; z-index:1100; display:grid; place-items:center; padding:20px; background:rgba(0,0,0,.42); }
.vision-health-indicators-modal[hidden] { display:none; }
.vision-health-indicators-dialog { position:relative; width:min(900px, 100%); height:min(88vh, 820px); display:flex; flex-direction:column; overflow:hidden; padding:18px; border-radius:8px; background:#fff; box-shadow:0 12px 35px rgba(0,0,0,.28); }
.vision-health-indicators-dialog > #vision-health-indicators-content { flex:1; min-height:0; display:flex; flex-direction:column; overflow:hidden; }
.vision-health-indicators-dialog table { width:max-content; min-width:100%; }
.vision-health-modal-body { flex:1; min-height:0; overflow-y:auto; padding:0 0 10px; }
.vision-health-modal-body section { margin:0 0 16px; }
.vision-health-modal-body h5 { margin:12px 0 6px; }
.vision-health-table-scroll { max-height:28vh; overflow:auto; border:1px solid #e5e7eb; }
.vision-health-table-scroll-indicators, .vision-health-table-scroll-diseases { min-height:96px; }
.vision-health-detail-table thead th { position:sticky; top:0; z-index:2; background:#fff; box-shadow:0 1px 0 #d0d7de; white-space:nowrap; }
.vision-health-detail-table input, .vision-health-detail-table select { min-width:110px; }
.vision-health-indicator-actions { position:sticky; bottom:0; z-index:3; display:flex; gap:8px; padding:12px 0 0; background:#fff; border-top:1px solid #e5e7eb; }
.vision-file-name-text {
  word-break: break-all;
  font-size: 12px;
  line-height: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vision-table-select { min-width: 220px; width: 220px; }
.vision-table-select input { height: 36px; }
.vision-table-select .search-results { z-index: 30; max-height: 240px; overflow-y: auto; overscroll-behavior: contain; }
.search-results-portal { position: fixed !important; right: auto !important; z-index: 1000 !important; max-height: 300px; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; pointer-events:auto; scrollbar-gutter:stable; }
[id^="vision-employee-results-"].search-results-portal { width: 340px; max-width: calc(100vw - 16px); }
[id^="vision-employee-results-"] .search-result-item { min-height: 58px; box-sizing: border-box; }
.vision-date-field { display: flex; flex-direction: column; gap: 4px; }
.vision-date-field span, .vision-field-hint { color: #667085; font-size: 12px; line-height: 16px; white-space: nowrap; }
.vision-certificate-category { min-width: 228px; }
.vision-certificate-category select { width: 228px; min-width: 228px; }
.vision-certificate-category .vision-field-hint { display: block; margin-top: 4px; }
.vision-preview-table th:nth-child(7), .vision-preview-table td:nth-child(7) { width: 240px; min-width: 240px; }
.vision-preview-table tr.vision-unknown td { background: #fff8e1; }
.vision-preview-table tr.vision-recognition-failed td { background: #fff0f0; }
.vision-recognition-error { color: #c62828; font-size: 12px; line-height: 1.5; word-break: break-word; }
.vision-recognition-ok { color: #2e7d32; font-size: 12px; }
.vision-employee-option-name, .vision-employee-option-detail { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vision-employee-option-name { color: #1f2937; font-weight: 600; }
.vision-employee-option-detail { color: #667085; font-size: 12px; margin-top: 2px; }
.vision-field-disabled { color: #aaa; background: #f5f5f5 !important; }
.vision-preview-table .vision-field-error {
  border: 2px solid #c62828 !important;
  background: #fff4f4 !important;
}
.vision-name-candidates { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.vision-name-candidate { border: 1px solid #d0d7de; background: #fff; color: #334155; border-radius: 4px; padding: 3px 6px; font-size: 12px; line-height: 1.4; text-align: left; cursor: pointer; }
.vision-name-candidate:hover:not(:disabled) { background: #f6f8fa; }
/* Contract-only review fields retain the global table's horizontal scrolling
   while allowing the long OCR content and candidates to remain readable. */
.vision-review-group[data-category="contract"] .vision-preview-table { min-width: 1900px; }
.vision-review-group[data-category="contract"] .vision-contract-name-cell { width: 280px; min-width: 280px; }
.vision-review-group[data-category="contract"] .vision-contract-party-a-cell { width: 250px; min-width: 250px; }
.vision-review-group[data-category="contract"] .vision-contract-duration-cell { width: 350px; min-width: 350px; }
.vision-preview-table textarea.vision-contract-textarea { min-height: 36px; max-height: none; line-height: 18px; resize: vertical; overflow-y: hidden; }
.vision-preview-table textarea.vision-contract-name-textarea,
.vision-preview-table textarea.vision-contract-party-a-textarea { min-height: 54px; }
.vision-preview-table textarea.vision-contract-duration-textarea { min-height: 72px; }
.vision-contract-candidates { min-width: 0; overflow: visible; }

.modal-lg { max-width: 700px; width: 95vw; }
.modal-wide { max-width: 850px; width: 92vw; }

.form-row { display: flex; gap: 16px; margin-bottom: 14px; }
.form-row .form-group { flex: 1; margin-bottom: 0; }
.form-row-full { margin-bottom: 14px; }
.form-row-full > label { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 600; color: #555; }

.long-term-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #f8f9fa; border-radius: 6px; border: 1px solid #e8e8e8; }
.long-term-row input[type="date"] { flex: 1; padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }
.long-term-row label { display: flex; align-items: center; gap: 4px; font-weight: normal; white-space: nowrap; cursor: pointer; margin: 0; font-size: 14px; }
.long-term-row input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }

.batch-delete-bar { margin-left: 16px; }
.certificate-permanent-controls { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:10px 0; }
.certificate-permanent-controls > span { color:#666; font-size:13px; margin-right:4px; }
.certificate-permanent-controls .btn-danger:disabled { opacity:.55; cursor:not-allowed; }
.certificate-history-error { margin:8px 0; }
.certificate-history-delete-cell { white-space:nowrap; }
.certificate-permanent-delete-content { max-height:88vh; overflow-y:auto; }
.certificate-permanent-warning { margin:10px 0; padding:10px 12px; border-left:4px solid #c62828; background:#fff1f1; color:#8d1c1c; line-height:1.55; }
.certificate-permanent-warning.warning { border-color:#d78a00; background:#fff8e6; color:#6d5100; }
.certificate-permanent-summary { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:8px; margin:12px 0; }
.certificate-permanent-summary div { padding:8px; border:1px solid #e2e8f0; border-radius:4px; background:#f8fafc; }
.certificate-permanent-summary span { display:block; font-size:12px; color:#667085; }
.certificate-permanent-list { max-height:180px; overflow-y:auto; margin:10px 0; padding-left:20px; }
.certificate-permanent-details { width:100%; border-collapse:collapse; margin:10px 0; }
.certificate-permanent-details th,.certificate-permanent-details td { padding:6px 8px; border-bottom:1px solid #eee; text-align:left; }
.certificate-permanent-details th { width:130px; color:#555; white-space:nowrap; }
.certificate-permanent-delete-actions { display:flex; gap:8px; margin-top:14px; }

.search-results {
  position: absolute;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  max-height: 300px;
  overflow-y: auto;
  width: 100%;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.search-select { position: relative; }
.search-select input { width: 100%; }
.search-select .search-results { top: calc(100% + 4px); left: 0; right: 0; width: 100%; background: #fff; }
.search-select-option {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #333;
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
}
.search-result-item {
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 1px solid #f0f0f0;
  line-height: 1.45;
  white-space: normal;
}
.search-result-item:last-child { border-bottom: 0; }
.search-result-item:hover, .search-result-item.is-selected { background: #f5f8ff; }
.search-no-result {
  padding: 8px 12px;
  font-size: 13px;
  color: #999;
}

.form-group { position: relative; }

/* ==================== Owner template workflow ==================== */
.owner-template-workflow { max-width: 1120px; }
.workflow-page-header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.workflow-page-header .toolbar { margin-bottom: 8px; }
.workflow-lead, .workflow-muted, .workflow-hint { color: #666; font-size: 13px; line-height: 1.6; }
.workflow-lead { margin: -8px 0 16px; }
.workflow-section { padding: 20px 24px; }
.workflow-message { margin: 0 0 12px; padding: 10px 12px; border-radius: 4px; background: #ffebee; color: #b71c1c; font-size: 14px; }
.workflow-message.error { background: #ffebee; color: #b71c1c; }
.workflow-message.success { background: #e8f5e9; color: #2e7d32; }
.workflow-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 14px; }
.workflow-summary-item { padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 6px; background: #f8fafc; }
.workflow-summary-label { display: block; margin-bottom: 4px; color: #667085; font-size: 12px; }
.workflow-summary-item strong { display: block; color: #1f2937; font-size: 14px; line-height: 1.5; }
.workflow-status { display: inline-block; margin-bottom: 14px; padding: 5px 10px; border-radius: 12px; background: #e8f0fe; color: #1557b0; font-size: 13px; }
.template-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.template-info div { padding: 10px; background: #f8f9fa; border-radius: 4px; }
.employee-picker { position: relative; max-width: 560px; }
.employee-picker input { width: 100%; padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; }
.employee-picker .search-results { top: 42px; left: 0; right: 0; background: #fff; max-height: 300px; overflow-y: auto; }
#workflow-employee-results .search-result-item {
  text-align: left;
  border: 0;
  border-bottom: 1px solid #f0f0f0;
  border-radius: 0;
  background: #fff;
  color: #333;
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
}
#workflow-employee-results .search-result-item:hover,
#workflow-employee-results .search-result-item.is-selected { background: #f5f8ff; }
#workflow-employee-results .search-no-result { background: #fff; }
.user-employee-select .search-results { background: #fff; max-height: 300px; overflow-y: auto; }
.workflow-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.configure-stepper { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: 18px 0 20px; padding: 0; list-style-type: none; }
.configure-step { display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 52px; padding: 10px 12px; border: 1px solid #d9e2ec; border-radius: 6px; background: #f8fafc; color: #4d5d6c; line-height: 1.35; }
.configure-step::marker { content: none; }
.configure-step-number { display: inline-flex; flex: 0 0 28px; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #e5ebf2; color: #526273; font-weight: 700; }
.configure-step-label { min-width: 0; overflow-wrap: anywhere; }
.configure-step.is-active { border-color: #6d9ed0; background: #eef5fc; color: #174a7a; box-shadow: 0 0 0 2px rgba(109, 158, 208, .12); }
.configure-step.is-active .configure-step-number { background: #2f6fae; color: #fff; }
.configure-step.is-complete { border-color: #9fc8ad; background: #f1f8f3; color: #2f6340; }
.configure-step.is-complete .configure-step-number { background: #4f9864; color: #fff; }
@media (max-width: 980px) { .configure-stepper { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px) { .configure-stepper { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .configure-step { padding: 9px 10px; } }
.workflow-tag { display: inline-flex; gap: 8px; align-items: center; background: #e8f0fe; color: #1557b0; padding: 5px 8px; border-radius: 4px; font-size: 13px; }
.workflow-tag button { border: 0; background: transparent; color: #1557b0; cursor: pointer; font-size: 17px; }
.workflow-employee-card { border: 1px solid #e3e7ed; border-radius: 6px; padding: 16px; margin-top: 14px; }
.workflow-employee-card h4 { display: flex; gap: 10px; align-items: baseline; }
.workflow-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px 14px; margin-top: 12px; }
.workflow-grid label { display: block; font-size: 13px; color: #555; }
.workflow-grid input, .workflow-grid select { width: 100%; margin-top: 4px; padding: 7px 8px; border: 1px solid #ddd; border-radius: 4px; font: inherit; }
.workflow-multi-select { margin-top: 4px; border: 1px solid #d9e2ec; border-radius: 6px; background: #fff; overflow: hidden; }
.workflow-multi-select > summary { list-style: none; cursor: pointer; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.workflow-multi-select > summary::-webkit-details-marker { display: none; }
.workflow-multi-select-summary { font-weight: 600; color: #243447; }
.workflow-multi-panel { border-top: 1px solid #e2e8f0; padding: 12px; background: #f8fafc; }
.workflow-multi-filter { display: block; margin-bottom: 10px; font-size: 13px; color: #555; }
.workflow-multi-filter input { width: 100%; margin-top: 4px; padding: 7px 8px; border: 1px solid #d7dde6; border-radius: 4px; font: inherit; }
.workflow-multi-options { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding-right: 4px; }
.workflow-multi-option { display: flex !important; align-items: center; gap: 8px; margin: 0; padding: 6px 8px; border-radius: 4px; }
.workflow-multi-option:hover { background: #eef5fc; }
.workflow-multi-option input { width: auto !important; margin: 0 !important; }
.workflow-checkbox-group { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 4px; }
.workflow-form-field { display: block; font-size: 13px; color: #555; }
.workflow-field-label { display: block; }
.workflow-checkbox-group label { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: #243447; }
.workflow-checkbox-group input[type="checkbox"] { width: auto; margin: 0; }
.workflow-region-members { display: flex; flex-direction: column; gap: 6px; }
.workflow-region-actions { margin: 0 0 8px; }
.workflow-region-members label { display: inline-flex; align-items: center; gap: 6px; }
.workflow-region-members input[type="checkbox"] { width: auto; margin: 0; padding: 0; }
.workflow-region-order { margin: 10px 0 0; padding-left: 24px; }
.workflow-region-order li { margin: 4px 0; }
.workflow-create-form { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto auto; gap: 10px 14px; align-items: end; margin-top: 12px; padding: 12px; border: 1px solid #d9e2ec; border-radius: 6px; background: #f8fafc; }
.workflow-create-form label { display: block; font-size: 13px; color: #555; }
.workflow-create-form input { width: 100%; margin-top: 4px; padding: 7px 8px; border: 1px solid #ddd; border-radius: 4px; font: inherit; }
@media (max-width: 720px) { .workflow-create-form { grid-template-columns: 1fr; } }
.workflow-medical-note { margin: 12px 0 2px; padding: 8px 10px; border-left: 3px solid #e67e22; background: #fff8e8; color: #76550f; font-size: 13px; }
.workflow-file-row { display: grid; grid-template-columns: minmax(170px, 1fr) minmax(170px, 1fr) 130px auto; gap: 8px; align-items: end; border-bottom: 1px solid #eee; padding: 10px 0; }
.workflow-file-row select, .workflow-file-row input { width: 100%; padding: 7px 8px; border: 1px solid #ddd; border-radius: 4px; }
.workflow-file-row label { font-size: 12px; color: #666; display: block; }
.workflow-file-row .workflow-remove-row { padding: 7px 9px; }
.workflow-add-file { margin-top: 12px; }
.workflow-warning-group { margin: 8px 0; padding: 10px 12px; background: #fff8e8; border-left: 3px solid #e67e22; }
.workflow-warning-group ul { margin: 5px 0 0 20px; }
.workflow-dirty { color: #c0651c; margin-bottom: 10px; font-weight: 600; }
.workflow-actions a.btn { text-decoration: none; display: inline-block; }
.workflow-actions button:disabled { opacity: .55; cursor: not-allowed; }
#configure-register:disabled { opacity: .55; cursor: not-allowed; filter: grayscale(1); }
.workflow-history-content { display: flex; flex-direction: column; max-width: 90vw; min-width: 1000px; width: 90vw; overflow: hidden; }
.workflow-history-filters { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(260px, 1fr) auto auto; gap: 10px 12px; align-items: end; margin-bottom: 14px; }
.workflow-history-filters label { display: block; font-size: 13px; color: #555; }
.workflow-history-filters .search-select { margin-top: 4px; }
.workflow-history-error { margin-bottom: 14px; padding: 12px 14px; border: 1px solid #f1b4b4; border-radius: 6px; background: #fff5f5; color: #9f1d1d; }
.workflow-history-error p { margin: 6px 0 10px; white-space: pre-line; }
.workflow-history-table { box-shadow: none; border: 0; border-radius: 0; flex: 1 1 auto; min-height: 240px; overflow: auto; }
.workflow-history-table table { min-width: 1180px; table-layout: auto; }
.workflow-history-table th, .workflow-history-table td { white-space: nowrap; }
.workflow-history-actions { display: inline-flex; gap: 6px; align-items: center; }
.workflow-history-view { display: inline-flex; align-items: center; justify-content: center; width: 52px; min-width: 52px; white-space: nowrap; line-height: 1.2; text-decoration: none; }
.workflow-history-pagination { justify-content: flex-end; margin-bottom: 0; }
.configure-basic-stack { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.configure-basic-row { display: grid; grid-template-columns: minmax(260px, 420px) auto; gap: 12px; align-items: end; }
.configure-basic-row label { display: block; font-size: 13px; color: #555; }
.configure-basic-row input, .configure-basic-row select { width: 100%; margin-top: 4px; padding: 7px 8px; border: 1px solid #ddd; border-radius: 4px; font: inherit; }
.configure-basic-row .search-select { margin-top: 4px; }
.configure-basic-actions { align-items: center; margin: 0; }
@media (max-width: 720px) { .workflow-page-header { display: block; } .workflow-file-row { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .configure-basic-row { grid-template-columns: 1fr; } .configure-basic-actions { margin-top: 0; } .workflow-history-content { min-width: 0; width: 96vw; } .workflow-history-filters { grid-template-columns: 1fr; } }

/* ==================== Acceptance test console ==================== */
.acceptance-console { max-width: 1120px; }
.acceptance-meta { text-align: right; color: #555; font-size: 13px; line-height: 1.7; }
.acceptance-result { margin-top: 12px; padding: 10px 12px; border: 1px solid #e3e7ed; border-radius: 6px; background: #fbfcfe; min-height: 42px; font-size: 13px; line-height: 1.7; }
.acceptance-pass td { background: #eefaf2; }
.acceptance-fail td { background: #fff0f0; }
.acceptance-unknown td { background: #fff8e8; }
@media (max-width: 720px) { .acceptance-meta { text-align: left; } }

/* ==================== Export Module Styles ==================== */
.export-filter-card { }
.export-filter-card .filter-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.export-filter-card .filter-group {
  flex: 1;
  min-width: 200px;
}
.export-filter-card .filter-group > label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #555;
}
.filter-hint {
  font-weight: normal;
  font-size: 12px;
  color: #999;
}

/* Multi-select */
.multi-select-wrap {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 4px 8px;
  min-height: 40px;
  background: #fff;
  cursor: text;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.multi-select-wrap:focus-within {
  border-color: #1a73e8;
}
.multi-select-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.multi-tag {
  display: inline-flex;
  align-items: center;
  background: #e8f0fe;
  color: #1a73e8;
  border-radius: 3px;
  padding: 2px 6px;
  font-size: 13px;
  gap: 4px;
}
.multi-tag-remove {
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: #1a73e8;
}
.multi-tag-remove:hover { color: #e74c3c; }
.multi-select-input {
  border: none;
  outline: none;
  flex: 1;
  min-width: 100px;
  padding: 4px 0;
  font-size: 14px;
  background: transparent;
}
.export-employee-picker {
  position: relative;
  width: 100%;
}
.export-file-picker { position: relative; width: 100%; }
.export-employee-select-wrap,
.export-employee-select-wrap::before,
.export-employee-select-wrap::after {
  position: relative;
  background-image: none;
  box-shadow: none;
}
.export-employee-select-wrap #export-employee-search {
  height: 30px;
  line-height: 30px;
  border: 0;
  border-top: 0;
  border-bottom: 0;
  box-shadow: none;
  background: transparent;
  background-image: none;
  appearance: none;
  -webkit-appearance: none;
}
.export-employee-select-wrap #export-employee-search:focus {
  outline: none;
  border: 0;
  box-shadow: none;
}
.export-employee-results {
  display: none;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  width: 100%;
  z-index: 50;
}
.export-file-results {
  display: none;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  width: 100%;
  z-index: 60;
}
.export-file-result { display: flex; align-items: flex-start; gap: 8px; }
.export-file-result.active { background: #e8f0fe; }
.export-file-result-main { flex: 1; min-width: 0; }
.export-file-result-name { display: block; color: #333; word-break: break-all; }
.export-file-result-meta { display: block; color: #888; font-size: 12px; margin-top: 2px; }
.export-related-files { margin-top: 20px; border-top: 1px solid #e6e8eb; padding-top: 16px; }
.card.export-related-files { border-top: 0; padding-top: 20px; }
.export-related-files-header { margin-bottom: 10px; }
.export-file-preview-body { max-height: 430px; overflow-y: auto; border: 1px solid #e6e8eb; }
.export-file-employee-group + .export-file-employee-group { border-top: 1px solid #e6e8eb; }
.export-file-employee-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: #f8f9fa;
  font-weight: 600;
}
.export-file-items { padding: 2px 12px 8px 34px; }
.export-file-item {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 110px 160px;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}
.export-file-item:last-child { border-bottom: 0; }
.export-file-item-name { display: flex; align-items: flex-start; gap: 8px; min-width: 0; word-break: break-all; }
.export-file-item-category, .export-file-item-time { color: #777; }

@media (max-width: 700px) {
  .export-file-item { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .export-file-items { padding-left: 18px; }
}

/* Multi-select dropdown for certs */
.multi-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  max-height: 220px;
  overflow-y: auto;
  z-index: 20;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.multi-select-item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.multi-select-item:hover { background: #e8f0fe; }

/* Radio group */
.radio-group {
  display: flex;
  gap: 20px;
  padding: 8px 0;
}
.radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: normal;
  font-size: 14px;
  cursor: pointer;
}
.radio-label input[type="radio"] { margin: 0; }

/* Export actions */
.export-actions-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.export-operation-status {
  flex-basis: 100%;
  margin: 0;
}
.export-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.export-format-select {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}
.export-format-select select {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

/* Preview header */
.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}
.preview-header h3 {
  margin-bottom: 0;
  font-size: 16px;
}

/* OCR 管理员审核工作台 */
.ocr-review-entry, .ocr-review-heading, .ocr-detail-header { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.ocr-review-entry h3, .ocr-review-heading h2 { margin-bottom:4px; }
.ocr-review-entry p, .ocr-review-heading p { margin:0; color:#666; }
.ocr-status { display:inline-block; padding:3px 8px; border-radius:12px; background:#e8f0fe; color:#2158a8; font-size:12px; white-space:nowrap; }
.status-failed { background:#fdecea; color:#b3261e; }.status-completed { background:#e6f4ea; color:#22743a; }.status-created { background:#fff4df; color:#8a5b00; }
.ocr-detail { margin-top:16px; }.ocr-detail-header { margin-bottom:12px; }.ocr-detail-header h2 { flex:1; margin:0; font-size:20px; }
.ocr-employee-card h3 { margin-top:0; }.ocr-match-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }.ocr-match-actions input, .ocr-match-actions select { min-height:34px; padding:6px 8px; border:1px solid #ccc; border-radius:4px; }
#ocr-create-employee { margin-top:14px; padding-top:14px; border-top:1px solid #eee; }.ocr-confirm-note { color:#8a5b00; }.ocr-confirm-check { display:block; margin:10px 0; }
.ocr-workspace { display:grid; grid-template-columns:minmax(0, 1.15fr) minmax(320px, .85fr); gap:16px; }.ocr-preview-toolbar { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:10px; }.ocr-preview-toolbar strong { margin-right:auto; }.ocr-preview-toolbar select { padding:5px; }
.ocr-file-preview { height:620px; overflow:auto; background:#f3f5f7; border:1px solid #dfe3e8; }.ocr-file-preview iframe { width:100%; height:610px; border:0; }.ocr-pdf-stage, .ocr-image-stage { position:relative; min-height:100%; display:flex; justify-content:center; align-items:flex-start; padding:18px; }.ocr-pdf-stage { padding:0; }.ocr-image-stage img { max-width:100%; transform-origin:top center; }.ocr-evidence-highlight { position:absolute; border:3px solid #ef8d00; background:rgba(255,196,0,.22); pointer-events:none; box-sizing:border-box; }
.ocr-facts h3 { margin-top:0; }.ocr-fact { position:relative; padding:12px 0; border-bottom:1px solid #e6e8eb; }.ocr-fact:last-child { border:0; }.ocr-fact h4 { margin:0 0 8px; }.ocr-fact p { margin:5px 0; font-size:14px; }.ocr-fact p span { display:inline-block; width:54px; color:#777; }.ocr-fact-actions { display:flex; gap:8px; margin-top:10px; }.ocr-fact-finished { color:#22743a; font-size:13px; }.ocr-region { display:none; }
.empty-cell { text-align:center; color:#777; padding:18px !important; }
.preview-actions {
  display: flex;
  gap: 8px;
}

@media (max-width: 768px) {
  .topbar-inner { flex-direction: column; height: auto; padding: 12px 0; }
  .topbar nav { margin-top: 8px; flex-wrap: wrap; }
  .topbar nav a { margin: 4px 8px; }
  .search-bar { flex-direction: column; }
  .data-table { font-size: 12px; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .form-row { flex-direction: column; gap: 0; }
  .ocr-workspace { grid-template-columns:1fr; }.ocr-file-preview { height:420px; }.ocr-review-entry, .ocr-review-heading { align-items:flex-start; flex-direction:column; }
}
