/* ========================================
 * 人事信息采集系统 全局样式
 *   - H5 优先 + PC 自适应
 *   - A4 横向打印 @page landscape
 *   - 配色：主蓝 #1976D2 + 次蓝 #42A5F5 + 强调 #E3F2FD
 * ======================================== */

/* ---- 基础重置 ---- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px; color: #1f2937; background: #f5f5f7;
  -webkit-text-size-adjust: 100%;
  line-height: 1.5;
}
h1, h2, h3, h4 { margin: 0 0 8px; font-weight: 600; color: #111827; }
a { color: #1976D2; text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; border: none; border-radius: 6px; padding: 8px 14px; }
input, textarea, select, button { font: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }

/* ---- 颜色变量 ---- */
:root {
  --primary: #1976D2;
  --primary-dark: #1565C0;
  --primary-light: #E3F2FD;
  --accent: #FF6F00;
  --danger: #D32F2F;
  --success: #2E7D32;
  --warning: #F57C00;
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --border: #e5e7eb;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 20px rgba(0,0,0,0.1);
}

/* ---- 按钮 ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 6px; background: var(--gray-200); color: var(--gray-700); transition: all 0.15s; border: 1px solid transparent; }
.btn:hover:not(:disabled) { background: var(--gray-300); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-info { background: #17a2b8; color: #fff; }
.btn-info:hover:not(:disabled) { background: #138496; }
.text-warning { color: var(--warning); }
.text-info { color: #17a2b8; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--gray-700); }
.btn-outline:hover:not(:disabled) { background: var(--gray-100); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-lg { padding: 12px 22px; font-size: 16px; }
.btn-block { width: 100%; }

/* ---- 表单 ---- */
.form-group { margin-bottom: 14px; }
.form-label { display: block; margin-bottom: 5px; font-weight: 500; color: var(--gray-700); }
.form-label .req { color: var(--danger); margin-left: 3px; }
.form-control {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: 6px; background: #fff; transition: border-color 0.15s;
  font-size: 14px; color: var(--gray-900);
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.form-control::placeholder { color: #9ca3af; }
textarea.form-control { min-height: 80px; resize: vertical; }
.form-hint { font-size: 12px; color: var(--gray-500); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }

/* ---- 卡片 ---- */
.card { background: #fff; border-radius: 8px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.card-header { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-header h3 { margin: 0; font-size: 15px; }
.card-body { padding: 16px; }
.card-footer { padding: 10px 16px; border-top: 1px solid var(--border); background: var(--gray-50); border-radius: 0 0 8px 8px; }

/* ---- 顶部导航 ---- */
.navbar { background: var(--primary); color: #fff; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; box-shadow: var(--shadow-md); position: sticky; top: 0; z-index: 50; }
.navbar-brand { font-size: 17px; font-weight: 600; color: #fff; }
.navbar-brand:hover { text-decoration: none; }
.navbar-nav { display: flex; gap: 4px; align-items: center; flex-wrap: nowrap; }
.navbar-nav a, .navbar-nav button { color: rgba(255,255,255,0.9); padding: 6px 12px; border-radius: 6px; background: transparent; font-size: 14px; cursor: pointer; transition: background .15s ease, box-shadow .15s ease, transform .15s ease; }
.navbar-nav a:hover, .navbar-nav button:hover { background: rgba(255,255,255,0.22); text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.18); transform: translateY(-1px); }
.navbar-nav .active { background: rgba(255,255,255,0.28); font-weight: 600; }

/* ---- 容器布局 ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 16px; }
.container-sm { max-width: 560px; margin: 0 auto; padding: 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.col { flex: 1; min-width: 0; }

/* ---- 标签/徽章 ---- */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 500; }
.badge-primary { background: var(--primary-light); color: var(--primary-dark); }
.badge-success { background: #E8F5E9; color: var(--success); }
.badge-warning { background: #FFF3E0; color: var(--warning); }
.badge-danger { background: #FFEBEE; color: var(--danger); }
.badge-gray { background: var(--gray-200); color: var(--gray-700); }

/* ---- 表格 ---- */
.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th, .table td { padding: 8px 10px; border: 1px solid var(--border); text-align: left; vertical-align: top; font-size: 13px; }
.table th { background: var(--gray-50); font-weight: 600; color: var(--gray-700); white-space: nowrap; }
.table tbody tr:hover { background: var(--gray-50); }
.table-striped tbody tr:nth-child(even) { background: #fafbfc; }

/* 表格横向滚动容器：宽表在小屏下左右滑动而非溢出页面 */
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll .table { min-width: 560px; margin-bottom: 0; }
/* 操作列按钮不换行、不被挤压 */
.table td .btn, .table th .btn { white-space: nowrap; }
.table td.row-actions { white-space: nowrap; }

/* ---- 工具类 ---- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--gray-500); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-primary { color: var(--primary); }
.text-sm { font-size: 12px; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 18px; }
.font-bold { font-weight: 600; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.ml-1 { margin-left: 4px; } .ml-2 { margin-left: 8px; }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.w-full { width: 100%; }

/* ---- 提示框 ---- */
.alert { padding: 10px 14px; border-radius: 6px; margin-bottom: 12px; border: 1px solid transparent; }
#msg.alert { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 999; min-width: 280px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.alert-info { background: var(--primary-light); color: var(--primary-dark); border-color: #BBDEFB; }
.alert-success { background: #E8F5E9; color: var(--success); border-color: #C8E6C9; }
.alert-warning { background: #FFF3E0; color: var(--warning); border-color: #FFE0B2; }
.alert-danger { background: #FFEBEE; color: var(--danger); border-color: #FFCDD2; }

/* ---- 模态框 ---- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal { background: #fff; border-radius: 8px; max-width: 640px; width: 100%; max-height: 90vh; overflow: auto; box-shadow: var(--shadow-lg); }
.modal-header { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: #fff; z-index: 1; }
.modal-body { padding: 16px; }
.modal-footer { padding: 10px 16px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; position: sticky; bottom: 0; background: #fff; }

/* ---- 二维码 ---- */
.qr-box { display: inline-block; padding: 12px; background: #fff; border: 1px solid var(--border); border-radius: 6px; }
.qr-box img { width: 220px; height: 220px; }

/* ---- 空状态 ---- */
.empty { text-align: center; padding: 40px 20px; color: var(--gray-500); }
.empty-icon { font-size: 48px; opacity: 0.4; margin-bottom: 8px; }

/* ---- 加载中 ---- */
.loading { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--gray-200); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- 字段分组（左树右字段） ---- */
.field-tree { background: #fff; border-right: 1px solid var(--border); min-width: 220px; padding: 12px 8px; height: 100%; overflow: auto; }
.field-tree-item { padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; user-select: none; }
.field-tree-item:hover { background: var(--gray-100); }
.field-tree-item.active { background: var(--primary-light); color: var(--primary-dark); font-weight: 500; }
.field-tree-group { font-weight: 600; color: var(--gray-700); padding: 8px 10px 4px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ---- 差异对比表 ---- */
.diff-table { width: 100%; border-collapse: collapse; }
.diff-table th, .diff-table td { padding: 8px 10px; border: 1px solid var(--border); font-size: 13px; }
.diff-table th { background: var(--gray-50); }
.diff-old { color: var(--danger); text-decoration: line-through; opacity: 0.7; }
.diff-new { color: var(--success); font-weight: 500; }
.diff-same { color: var(--gray-500); }

/* ---- AI 问答框 ---- */
.ai-box { background: linear-gradient(135deg, #E3F2FD 0%, #F3E5F5 100%); border-radius: 10px; padding: 16px; border: 1px solid #BBDEFB; }
.ai-input { display: flex; flex-direction: column; gap: 10px; }
.ai-input-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ai-input select { width: auto; min-width: 180px; }
.ai-question-input {
  width: 100%; min-height: 76px; resize: vertical;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; line-height: 1.6; font-family: inherit; background: #fff;
}
.ai-question-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.ai-answer { background: #fff; border-radius: 8px; padding: 12px 14px; margin-top: 10px; border: 1px solid var(--border); font-size: 14px; line-height: 1.6; white-space: pre-wrap; max-height: 500px; overflow-y: auto; }
.ai-history-item { padding: 10px 0; border-bottom: 1px dashed var(--border); }
.ai-history-item:last-child { border-bottom: none; }
.ai-q { font-weight: 600; color: var(--primary); margin-bottom: 4px; }
.ai-a { color: var(--text); }
.ai-query-detail { background: var(--gray-50); padding: 8px 10px; border-radius: 6px; margin-top: 8px; font-size: 12px; color: var(--gray-500); font-family: monospace; white-space: pre-wrap; }

/* AI 高级功能 */
.ai-advanced { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(25,118,210,0.2); }
.ai-advanced-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.ai-tab-btn { flex: 1; min-width: 110px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; background: #fff; font-size: 13px; cursor: pointer; transition: all 0.15s; color: var(--gray-700); }
.ai-tab-btn:hover { background: var(--primary-light); border-color: var(--primary); }
.ai-tab-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.ai-tab-panel { background: #fff; border-radius: 8px; padding: 14px; border: 1px solid var(--border); }
.ai-tab-row { display: flex; gap: 14px; margin-bottom: 10px; flex-wrap: wrap; }
.ai-radio-label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; font-size: 13px; }
.ai-radio-label input { cursor: pointer; }
.ai-report-result { background: #fff; border-radius: 8px; padding: 14px 16px; margin-top: 12px; border: 1px solid var(--border); font-size: 14px; line-height: 1.7; max-height: 600px; overflow-y: auto; }
.ai-report-result h1, .ai-report-result h2, .ai-report-result h3 { margin-top: 16px; margin-bottom: 8px; color: var(--primary-dark); }
.ai-report-result h1:first-child, .ai-report-result h2:first-child, .ai-report-result h3:first-child { margin-top: 0; }
.ai-report-result p { margin-bottom: 10px; }
.ai-report-result table { width: 100%; border-collapse: collapse; margin: 10px 0; }
.ai-report-result th, .ai-report-result td { border: 1px solid var(--border); padding: 6px 10px; font-size: 13px; }
.ai-report-result th { background: var(--gray-50); font-weight: 600; }
.ai-table-result { margin-top: 12px; }
.ai-image-tabs { display: flex; gap: 4px; margin-bottom: 12px; }
.ai-subtab-btn { flex: 1; padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--gray-50); font-size: 12px; cursor: pointer; transition: all 0.15s; color: var(--gray-700); }
.ai-subtab-btn:hover { background: var(--primary-light); }
.ai-subtab-btn.active { background: var(--primary-light); color: var(--primary-dark); border-color: var(--primary); font-weight: 500; }
.ai-subtab-panel { padding: 4px 0; }
.ai-image-upload { margin-bottom: 10px; }
.ai-image-upload input[type="file"] { font-size: 13px; padding: 6px; background: #fff; border: 1px dashed var(--border); border-radius: 6px; width: 100%; cursor: pointer; }
.ai-image-preview { margin-top: 10px; max-width: 100%; max-height: 200px; overflow: hidden; border-radius: 6px; border: 1px solid var(--border); background: #fff; display: flex; align-items: center; justify-content: center; }
.ai-image-preview img { max-width: 100%; max-height: 200px; object-fit: contain; }
.ai-recognized { background: #FFF8E1; border: 1px solid #FFE082; border-radius: 6px; padding: 10px 12px; margin: 10px 0; font-size: 13px; color: #6D4C00; }
.ai-recognized::before { content: '🤖 识别结果：'; font-weight: 600; }
.mb-2 { margin-bottom: 8px; }
.text-muted { color: var(--gray-500); }
.text-sm { font-size: 12px; }
.hidden { display: none !important; }

/* ---- 折叠面板 ---- */
.collapsible {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}
.collapsible > summary {
  padding: 12px 16px;
  font-weight: 500;
  font-size: 14px;
  color: #1F2937;
  cursor: pointer;
  background: #F9FAFB;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  transition: background 0.15s;
}
.collapsible > summary:hover { background: #F3F4F6; }
.collapsible > summary::-webkit-details-marker { display: none; }
.collapsible > summary::before {
  content: '▶';
  font-size: 10px;
  color: #9CA3AF;
  transition: transform 0.2s;
  display: inline-block;
}
.collapsible[open] > summary::before { transform: rotate(90deg); }
.collapsible > summary::after {
  content: '';
  flex: 1;
}
.collapsible > *:not(summary) {
  padding: 0 16px 12px;
  animation: slideDown 0.2s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========================================
 * 响应式：移动端优先
 * ======================================== */
@media (max-width: 768px) {
  body { font-size: 13px; }
  .container { padding: 10px; }
  .navbar { padding: 8px 10px; flex-wrap: wrap; }
  .navbar-brand { font-size: 15px; }
  .navbar-nav { width: 100%; margin-top: 6px; overflow-x: auto; }
  .navbar-nav a, .navbar-nav button { padding: 6px 8px; font-size: 13px; white-space: nowrap; }
  .card-header, .card-body, .card-footer { padding: 10px 12px; }
  .table th, .table td { padding: 6px 8px; font-size: 12px; }
  .row { flex-direction: column; }
  .col { width: 100%; }
  .modal { max-height: 95vh; }
  .field-tree { min-width: 100%; border-right: none; border-bottom: 1px solid var(--border); max-height: 200px; }
}

/* ---- 字段管理（左树右字段） ---- */
.field-chip { user-select: none; transition: all 0.12s; }
.field-chip:hover { border-color: var(--primary) !important; }
.field-chip-on { border-color: var(--primary) !important; background: var(--primary-light) !important; }
.field-group { margin-bottom: 8px; }
.field-group-header:hover { background: var(--gray-100) !important; }
.field-group-body { margin-top: 0; }
.req-toggle { font-size: 11px; color: var(--gray-600); }
.req-toggle input { margin: 0; }
code { background: var(--gray-100); padding: 1px 6px; border-radius: 3px; font-size: 12px; }


/* ========================================
 * 打印样式：A4 横向
 * ======================================== */
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: #fff !important; font-size: 11pt; }
  .navbar, .btn, .no-print { display: none !important; }
  .container { max-width: none; padding: 0; }
  .card { box-shadow: none; border: none; }
  .table th, .table td { font-size: 10pt; padding: 4px 6px; }
  /* 打印页字号自适应（JS 会按列数动态调字号） */
  .print-page { width: 100%; }
  .print-table { width: 100%; border-collapse: collapse; }
  .print-table th, .print-table td { border: 1px solid #000; padding: 4px 6px; font-size: 10pt; }
  .print-title { font-size: 16pt; font-weight: 700; text-align: center; margin-bottom: 6pt; }
  .print-meta { font-size: 9pt; color: #555; margin-bottom: 4pt; }
  a { color: #000; text-decoration: none; }
}

/* 打印专用：避免分页截断 */
.print-table tr { page-break-inside: avoid; }
.print-table thead { display: table-header-group; }

/* ========================================
 * 填报页（fill）专业化样式
 * ======================================== */

/* 填报页容器：PC 居中限宽，移动端全宽 */
.fill-container { max-width: 960px; margin: 0 auto; padding: 20px 16px 120px; }

/* 填报页顶部 hero 区 */
.fill-hero {
  background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
  color: #fff;
  padding: 28px 24px 24px;
  border-radius: 0 0 16px 16px;
  margin: -20px -16px 20px;
  box-shadow: 0 4px 20px rgba(25, 118, 210, 0.25);
}
.fill-hero h1 { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.fill-hero p { font-size: 13px; opacity: 0.9; margin: 0; line-height: 1.6; }
.fill-hero .fill-progress {
  margin-top: 14px;
  background: rgba(255,255,255,0.2);
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
}
.fill-hero .fill-progress-bar {
  height: 100%;
  background: #fff;
  border-radius: 999px;
  transition: width 0.3s ease;
  width: 0%;
}
.fill-hero .fill-progress-text {
  font-size: 12px;
  margin-top: 6px;
  opacity: 0.85;
}

/* 填报说明 */
.fill-tips {
  background: #FFF8E1;
  border: 1px solid #FFE082;
  border-left: 4px solid #F9A825;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 18px;
  font-size: 13px;
  color: #5D4037;
  line-height: 1.8;
}
.fill-tips ol { margin: 4px 0 0 18px; padding: 0; }
.fill-tips li { margin-bottom: 2px; }

/* 分组卡片 */
.fill-group {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid #EEF2F7;
  margin-bottom: 18px;
  overflow: hidden;
}
.fill-group-header {
  padding: 14px 20px;
  background: linear-gradient(90deg, #F5F9FF 0%, #fff 100%);
  border-bottom: 1px solid #EEF2F7;
  display: flex;
  align-items: center;
  gap: 12px;
}
.fill-group-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fill-group-title {
  font-size: 15px;
  font-weight: 600;
  color: #1A237E;
  flex: 1;
}
.fill-group-body {
  padding: 18px 20px;
}

/* 双列网格（PC 端） */
.fill-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}
/* 整行占满的字段（textarea、文件上传等） */
.fill-grid .fill-item-full { grid-column: 1 / -1; }

/* 单个字段项 */
.fill-item { display: flex; flex-direction: column; }
.fill-item-label {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 2px;
}
.fill-item-label .req { color: #D32F2F; font-weight: 600; margin-left: 2px; }
.fill-item-label .opt-tag {
  font-size: 10px;
  color: #9CA3AF;
  background: #F3F4F6;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
  font-weight: 400;
}

/* 输入框统一美化 */
.fill-item input[type="text"],
.fill-item input[type="tel"],
.fill-item input[type="email"],
.fill-item input[type="number"],
.fill-item input[type="date"],
.fill-item input[type="file"],
.fill-item textarea,
.fill-item select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  color: #1F2937;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}
.fill-item input:focus,
.fill-item textarea:focus,
.fill-item select:focus {
  outline: none;
  border-color: #1976D2;
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.15);
}
.fill-item textarea { min-height: 80px; resize: vertical; }
.fill-item input[type="file"] {
  padding: 8px;
  border-style: dashed;
  background: #FAFBFC;
}
.fill-item input[type="file"]:hover { border-color: var(--primary); background: #F5F9FF; }

/* 选项卡样式（radio/checkbox） */
.fill-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.fill-opt {
  position: relative;
  padding: 8px 16px;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.fill-opt:hover { border-color: #1976D2; color: #1976D2; }
.fill-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.fill-opt-selected {
  border-color: #1976D2;
  background: #E3F2FD;
  color: #1565C0;
  font-weight: 500;
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

/* 提示文字 */
.fill-item-hint {
  font-size: 12px;
  color: #9CA3AF;
  margin-top: 4px;
  line-height: 1.5;
}
.fill-item-error {
  font-size: 12px;
  color: #D32F2F;
  margin-top: 4px;
  background: #FFEBEE;
  padding: 4px 8px;
  border-radius: 4px;
}

/* 提交按钮吸底 */
.fill-submit-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  padding: 12px 20px;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
  z-index: 100;
  display: flex;
  gap: 12px;
  align-items: center;
}
.fill-submit-bar .btn-submit {
  flex: 1;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
  background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
  transition: transform 0.1s, box-shadow 0.15s;
}
.fill-submit-bar .btn-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(25, 118, 210, 0.4);
}
.fill-submit-bar .btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.fill-submit-bar .fill-submit-info {
  font-size: 12px;
  color: #6B7280;
  white-space: nowrap;
}

/* 文件上传预览 */
.fill-file-preview { margin-top: 8px; }
.fill-file-preview img {
  max-height: 140px;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
}
.fill-file-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #F0F9FF;
  border: 1px solid #BAE6FD;
  border-radius: 8px;
  color: #0369A1;
  font-size: 13px;
}
.fill-file-link:hover { background: #E0F2FE; text-decoration: none; }

/* 响应式：填报页 */
@media (max-width: 768px) {
  .fill-container { padding: 12px 12px 100px; }
  .fill-hero { padding: 20px 16px 18px; margin: -12px -12px 16px; border-radius: 0 0 12px 12px; }
  .fill-hero h1 { font-size: 17px; }
  .fill-group-header { padding: 12px 14px; }
  .fill-group-num { width: 24px; height: 24px; font-size: 12px; }
  .fill-group-title { font-size: 14px; }
  .fill-group-body { padding: 14px; }
  .fill-grid { grid-template-columns: 1fr; gap: 14px; }
  .fill-submit-bar { padding: 10px 14px; }
  .fill-submit-bar .btn-submit { padding: 12px; font-size: 15px; }
}

/* ---------- 多条目 list 字段 ---------- */
.fill-list-wrap { border: 1px dashed #D1D5DB; border-radius: 8px; padding: 10px; background: #FAFBFC; }
.fill-list-entry {
  position: relative;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 12px 14px 12px;
  margin-bottom: 10px;
}
.fill-list-entry:last-child { margin-bottom: 0; }
.fill-list-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px 14px;
}
.fill-list-cell { display: flex; flex-direction: column; gap: 4px; }
.fill-list-cell label { font-size: 12px; color: #6B7280; font-weight: 500; }
.fill-list-cell input,
.fill-list-cell select {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
}
.fill-list-cell input:focus,
.fill-list-cell select:focus {
  outline: none;
  border-color: #1976D2;
  box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.15);
}
.fill-list-del {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 11px;
  padding: 2px 8px;
  background: #FEF2F2;
  color: #B91C1C;
  border: 1px solid #FECACA;
  border-radius: 4px;
  cursor: pointer;
}
.fill-list-del:hover { background: #FEE2E2; }
/* list 行内联动：条件子字段隐藏 + 数字单位后缀 */
.fill-list-cell.list-cell-off { display: none; }
.fill-input-unit { position: relative; display: flex; align-items: center; }
.fill-input-unit input { flex: 1; padding-right: 28px; }
.fill-list-unit { position: absolute; right: 10px; font-size: 12px; color: #6B7280; pointer-events: none; }

/* ========================================
 * 后台档案编辑/新增弹窗
 * ======================================== */
.rec-edit-group { margin-bottom: 14px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.rec-edit-group-header { padding: 8px 12px; background: #F5F9FF; font-weight: 600; font-size: 13px; color: #1A237E; border-bottom: 1px solid var(--border); }
.rec-edit-group-body { padding: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.rec-edit-field { display: flex; flex-direction: column; gap: 4px; }
.rec-edit-field.full { grid-column: 1 / -1; }
.rec-edit-field > label { font-size: 12px; color: var(--gray-700); font-weight: 500; }
.rec-edit-field input, .rec-edit-field select, .rec-edit-field textarea {
  width: 100%; padding: 7px 10px; border: 1px solid #D1D5DB; border-radius: 6px; font-size: 13px; font-family: inherit; background: #fff;
}
.rec-edit-field textarea { min-height: 64px; resize: vertical; }
.rec-edit-opts { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.rec-edit-opts label { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 400; }
.rec-edit-list-wrap { border: 1px dashed #D1D5DB; border-radius: 6px; padding: 8px; background: #FAFBFC; }
.rec-edit-list-entry { position: relative; background: #fff; border: 1px solid #E5E7EB; border-radius: 6px; padding: 10px 10px 12px; margin-bottom: 8px; }
.rec-edit-list-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 12px; }
.rec-edit-list-cell { display: flex; flex-direction: column; gap: 3px; }
.rec-edit-list-cell label { font-size: 11px; color: #6B7280; }
.rec-edit-list-cell input, .rec-edit-list-cell select { width: 100%; padding: 6px 8px; border: 1px solid #D1D5DB; border-radius: 6px; font-size: 12px; }
.rec-edit-list-del { position: absolute; top: 6px; right: 6px; font-size: 11px; padding: 2px 8px; background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; border-radius: 4px; }
/* list 行内联动：条件子字段隐藏 + 数字单位后缀 */
.rec-edit-list-cell.list-cell-off { display: none; }
.rec-input-unit { position: relative; display: flex; align-items: center; }
.rec-input-unit input { flex: 1; padding-right: 26px; }
.rec-list-unit { position: absolute; right: 8px; font-size: 11px; color: #6B7280; pointer-events: none; }
@media (max-width: 768px) {
  .rec-edit-group-body { grid-template-columns: 1fr; }
}

/* ---------- 云存储教程 ---------- */
.guide-tab {
  padding: 6px 14px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: all .15s;
}
.guide-tab:hover { background: #f5f5f5; }
.guide-tab.active { background: #1976d2; color: #fff; border-color: #1976d2; }
.guide-step {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed #e0e0e0;
  font-size: 13px;
  line-height: 1.7;
  color: #333;
}
.guide-step:last-child { border-bottom: none; }
.step-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: #1976d2;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}
.guide-body a { color: #1976d2; text-decoration: underline; }
.guide-body code {
  background: #eef;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 12px;
  color: #555;
}

/* ---------- 账户有效期横幅 ---------- */
.validity-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid transparent;
}
.validity-banner.hidden { display: none; }
.validity-banner .vb-icon { font-size: 18px; line-height: 1; }
.validity-banner .vb-text b { font-size: 18px; font-weight: 700; margin: 0 2px; }
.validity-banner .vb-user { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; opacity: 0.92; }
.validity-banner .vb-user .vb-user-label { font-weight: 400; opacity: 0.75; }
.validity-banner .vb-user b { font-weight: 600; }
/* 回收站折叠箭头 */
.recycle-toggle { display: inline-block; width: 16px; text-align: center; font-size: 12px; opacity: 0.7; transition: transform 0.15s; }
.validity-banner.validity-ok {
  background: #ECFDF5; color: #065F46; border-color: #A7F3D0;
}
.validity-banner.validity-permanent {
  background: #EFF6FF; color: #1E40AF; border-color: #BFDBFE;
}
.validity-banner.validity-warning {
  background: #FFFBEB; color: #92400E; border-color: #FDE68A;
  animation: vb-blink 2.5s ease-in-out infinite;
}
.validity-banner.validity-expired {
  background: #FEF2F2; color: #991B1B; border-color: #FECACA;
  font-weight: 600;
}
@keyframes vb-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

/* ---------- 设置页有效期详情卡片 ---------- */
.tenant-validity-card {
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 18px;
  background: #fff;
}
.tenant-validity-card .tv-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.tenant-validity-card .tv-title {
  font-size: 14px; font-weight: 600; color: #374151;
}
.tenant-validity-card .tv-body p { margin: 4px 0; font-size: 13px; color: #4B5563; }
.tenant-validity-card .tv-hint { font-size: 12px; color: #9CA3AF; }
.tenant-validity-card.tv-ok { border-color: #A7F3D0; background: #ECFDF5; }
.tenant-validity-card.tv-permanent { border-color: #BFDBFE; background: #EFF6FF; }
.tenant-validity-card.tv-warning { border-color: #FDE68A; background: #FFFBEB; }
.tenant-validity-card.tv-expired { border-color: #FECACA; background: #FEF2F2; }
