/* ===== 口腔义诊系统 公共样式 ===== */
:root {
  --primary: #FF8A4C;
  --primary-light: #FFB088;
  --primary-dark: #E67035;
  --bg: #FFF9F2;
  --bg-warm: #FFF3E0;
  --mint: #4ECDC4;
  --sky: #5BA4F7;
  --card: #FFFFFF;
  --text: #2D2A26;
  --text-secondary: #8A8580;
  --text-light: #B5B0AB;
  --border: #F0E8DF;
  --shadow: 0 4px 20px rgba(255, 138, 76, 0.08);
  --shadow-lg: 0 8px 32px rgba(255, 138, 76, 0.12);
  --radius: 20px;
  --radius-sm: 12px;
  --success: #52C41A;
  --warning: #FAAD14;
  --danger: #FF4D4F;
  --info: #1890FF;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
}
body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  touch-action: pan-y;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }

/* ===== 顶部栏 ===== */
.top-bar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.brand-title { font-size: 18px; font-weight: 700; }
.brand-sub { font-size: 12px; color: var(--text-secondary); }
.top-user { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.top-user .avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white; display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.logout-btn {
  padding: 6px 14px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--card); cursor: pointer; font-size: 13px; color: var(--text-secondary);
}
.logout-btn:hover { color: var(--danger); border-color: var(--danger); }

/* ===== 管理端布局 ===== */
.admin-layout { display: flex; min-height: calc(100vh - 64px); }
.admin-sidebar {
  width: 220px; background: var(--card); border-right: 1px solid var(--border);
  padding: 16px 10px; flex-shrink: 0;
}
.sidebar-section {
  font-size: 11px; color: var(--text-light); text-transform: uppercase;
  letter-spacing: 1px; padding: 12px 12px 8px; font-weight: 700;
}
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  border-radius: var(--radius-sm); cursor: pointer; color: var(--text-secondary);
  font-size: 14px; transition: all 0.2s ease; margin-bottom: 2px;
}
.nav-item:hover { background: var(--bg-warm); color: var(--text); }
.nav-item.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white; font-weight: 600; box-shadow: 0 4px 12px rgba(255,138,76,0.25);
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.admin-main { flex: 1; padding: 24px 28px; min-width: 0; }
.page-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;
}
.page-title { font-size: 22px; font-weight: 700; }
.page-desc { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

/* ===== 卡片 ===== */
.card {
  background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
}
.card-title {
  font-size: 16px; font-weight: 700; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}

/* ===== 统计卡片 ===== */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px; margin-bottom: 20px;
}
.stat-card {
  background: var(--card); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--primary);
}
.stat-card.mint::before { background: var(--mint); }
.stat-card.sky::before { background: var(--sky); }
.stat-card.warning::before { background: var(--warning); }
.stat-label { font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.stat-value { font-size: 28px; font-weight: 900; }
.stat-trend { font-size: 12px; color: var(--success); margin-top: 4px; }

/* ===== 表格 ===== */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th {
  text-align: left; padding: 11px 14px; background: var(--bg-warm);
  color: var(--text-secondary); font-weight: 600; font-size: 13px;
}
.data-table th:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.data-table th:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.data-table tr:hover td { background: var(--bg); }
.data-table tr:last-child td { border-bottom: none; }

/* ===== 标签 ===== */
.tag {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
}
.tag-normal { background: #E8F5E9; color: #2E7D32; }
.tag-obs { background: #FFF8E1; color: #F57F17; }
.tag-treat { background: #FFF3E0; color: #E65100; }
.tag-refer { background: #FFEBEE; color: #C62828; }
.tag-pending { background: #FFF3E0; color: #E65100; }
.tag-done { background: #E8F5E9; color: #2E7D32; }

/* ===== 按钮 ===== */
.btn {
  padding: 9px 18px; border-radius: var(--radius-sm); border: none;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s ease;
  font-family: inherit; display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white; box-shadow: 0 4px 12px rgba(255,138,76,0.3);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-outline {
  background: var(--card); color: var(--primary); border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: var(--bg-warm); }
.btn-danger { background: var(--danger); color: white; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }

/* ===== 表单 ===== */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px; font-family: inherit;
  background: var(--card);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--primary);
}
.form-textarea { min-height: 80px; resize: vertical; }
.search-bar { display: flex; gap: 10px; margin-bottom: 16px; }

/* ===== 上传区 ===== */
.upload-zone {
  border: 2px dashed var(--primary-light); border-radius: var(--radius);
  padding: 40px; text-align: center; background: var(--bg-warm);
  cursor: pointer; transition: all 0.2s ease;
}
.upload-zone:hover { border-color: var(--primary); background: #FFE8D6; }

/* ===== 筛选标签 ===== */
.filter-chips { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-chip {
  padding: 6px 14px; border-radius: 20px; background: var(--card);
  border: 1px solid var(--border); font-size: 13px; cursor: pointer;
  color: var(--text-secondary); transition: all 0.2s ease;
}
.filter-chip.active {
  background: var(--primary); color: white; border-color: var(--primary); font-weight: 600;
}

/* ===== 登录页 ===== */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #FFF9F2 0%, #FFE8D6 100%);
  padding: 20px;
}
.login-box {
  background: var(--card); border-radius: var(--radius); padding: 40px;
  width: 100%; max-width: 400px; box-shadow: var(--shadow-lg);
}
.login-logo {
  width: 64px; height: 64px; margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 20px; display: flex; align-items: center; justify-content: center;
}
.login-title { text-align: center; font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.login-sub { text-align: center; font-size: 13px; color: var(--text-secondary); margin-bottom: 28px; }
.login-error {
  background: #FFEBEE; color: #C62828; padding: 10px 14px; border-radius: 8px;
  font-size: 13px; margin-bottom: 16px;
}
.login-tip { text-align: center; font-size: 12px; color: var(--text-light); margin-top: 16px; }
.login-links { text-align: center; margin-top: 16px; font-size: 13px; }
.login-links a { color: var(--primary); }

/* ===== 移动端框架（医生端/家长端） ===== */
.mobile-stage {
  display: flex; justify-content: center; padding: 24px 16px;
  min-height: calc(100vh - 64px); background: var(--bg);
}
.phone-frame {
  width: 390px; background: var(--card); border-radius: 40px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 0 0 10px #1a1a1a, 0 0 0 12px #333;
  overflow: hidden; position: relative; flex-shrink: 0;
}
.phone-notch {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 140px; height: 28px; background: #1a1a1a;
  border-radius: 0 0 18px 18px; z-index: 10;
}
.phone-status {
  height: 44px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px 0 24px; font-size: 14px; font-weight: 600; background: var(--card);
}
.phone-content {
  height: 700px; overflow-y: auto; background: var(--bg); position: relative;
}
.phone-content::-webkit-scrollbar { width: 0; }
.phone-tabbar {
  display: flex; background: var(--card); border-top: 1px solid var(--border);
  padding: 8px 0 18px;
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer; color: var(--text-light); font-size: 11px; padding: 4px 0;
}
.tab-item.active { color: var(--primary); font-weight: 600; }
.tab-item svg { width: 22px; height: 22px; }
.m-page { padding: 16px; padding-bottom: 20px; display: none; }
.m-page.active { display: block; }
.m-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px;
}
.m-title { font-size: 20px; font-weight: 700; }
.m-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 16px;
}

/* 任务卡片 */
.task-card {
  background: var(--card); border-radius: var(--radius-sm); padding: 14px;
  margin-bottom: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  transition: transform 0.15s ease;
}
.task-card:active { transform: scale(0.98); }
.task-avatar {
  width: 44px; height: 44px; border-radius: 50%; background: var(--bg-warm);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--primary); flex-shrink: 0;
}
.task-info { flex: 1; min-width: 0; }
.task-name { font-size: 15px; font-weight: 600; }
.task-meta { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* ===== FDI 牙位图 ===== */
.tooth-chart {
  background: var(--card); border-radius: var(--radius); padding: 18px; margin-bottom: 14px;
}
.tooth-chart-title {
  font-size: 15px; font-weight: 700; margin-bottom: 10px;
  display: flex; justify-content: space-between; align-items: center;
}
.tooth-type-switch {
  display: flex; background: var(--bg); border-radius: 8px; padding: 2px; gap: 2px;
}
.tooth-type-btn {
  padding: 4px 12px; border: none; background: transparent; border-radius: 6px;
  font-size: 12px; cursor: pointer; color: var(--text-secondary); font-family: inherit;
}
.tooth-type-btn.active { background: var(--primary); color: white; font-weight: 600; }
.tooth-svg-wrap { display: flex; justify-content: center; padding: 8px 0; overflow: hidden; }
.tooth-svg-wrap svg { width: 100%; max-width: 100%; height: auto; display: block; }
.tooth-number {
  font-size: 7px; fill: var(--text-secondary); text-anchor: middle;
  pointer-events: none; font-weight: 600;
}
.tooth-shape {
  stroke: var(--primary-light); stroke-width: 1;
  cursor: pointer; transition: all 0.15s ease;
}
.tooth-shape:hover { fill: #FFE0CC !important; }
.tooth-shape.marked { fill: var(--danger) !important; stroke: var(--danger) !important; }
.tooth-legend {
  display: flex; justify-content: center; gap: 20px; margin-top: 10px;
  font-size: 12px; color: var(--text-secondary);
}
.legend-dot {
  display: inline-block; width: 12px; height: 12px; border-radius: 3px;
  margin-right: 5px; vertical-align: middle;
}

/* ===== 六项判读 ===== */
.check-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px;
}
.check-item {
  background: var(--card); border-radius: var(--radius-sm); padding: 12px;
  display: flex; align-items: center; justify-content: space-between;
  overflow: hidden; min-width: 0;
}
.check-label { font-size: 14px; font-weight: 600; flex-shrink: 0; margin-right: 8px; }
.check-toggle {
  display: flex; background: var(--bg); border-radius: 8px; padding: 2px; gap: 2px;
  flex-shrink: 0;
}
.check-toggle button {
  padding: 5px 10px; border: none; background: transparent; border-radius: 6px;
  font-size: 12px; cursor: pointer; color: var(--text-secondary); font-family: inherit;
}
.check-toggle button.active-normal { background: var(--success); color: white; font-weight: 600; }
.check-toggle button.active-abnormal { background: var(--danger); color: white; font-weight: 600; }

/* 需要数量统计的项目：橙色背景突出 */
.check-item-highlight {
  background: linear-gradient(135deg, #FFF5EB, #FFE8D6) !important;
  border: 1px solid #FF8A4C;
}
.check-item-highlight .check-label { color: #E8652A; }

/* 数量统计区域 */
.check-count {
  display: flex; align-items: center; gap: 6px; margin-left: 8px;
  opacity: 0.5; transition: opacity 0.2s; flex-shrink: 0;
}
.check-count.active { opacity: 1; }
.count-btn {
  width: 24px; height: 24px; border-radius: 50%; border: 1px solid #FF8A4C;
  background: white; color: #FF8A4C; font-size: 14px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  line-height: 1; padding: 0; font-family: inherit;
}
.count-btn:hover { background: #FF8A4C; color: white; }
.count-btn:active { transform: scale(0.95); }
.count-num {
  font-size: 13px; font-weight: 700; color: #E8652A; min-width: 36px; text-align: center;
}

/* ===== 现场检查模式 ===== */
.task-card.checking-mine {
  border-left: 4px solid #FF8A4C;
  background: linear-gradient(135deg, #FFF9F2, #FFF5EB);
}
.task-card.checking-other {
  opacity: 0.6;
  pointer-events: none;
}

/* ===== 健康评分 ===== */
.health-score-card {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
  border-radius: var(--radius); padding: 16px; margin-bottom: 14px;
  border: 1px solid #A5D6A7; transition: all 0.3s ease;
}
.health-score-card.score-good {
  background: linear-gradient(135deg, #FFF8E1, #FFECB3);
  border-color: #FFD54F;
}
.health-score-card.score-fair {
  background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
  border-color: #FFB74D;
}
.health-score-card.score-poor {
  background: linear-gradient(135deg, #FFEBEE, #FFCDD2);
  border-color: #EF9A9A;
}
.health-score-left {
  display: flex; flex-direction: column; align-items: center;
  min-width: 70px; border-right: 1px solid rgba(0,0,0,0.1); padding-right: 16px;
}
.health-score-num {
  font-size: 36px; font-weight: 800; line-height: 1; color: #2E7D32;
}
.health-score-card.score-good .health-score-num { color: #F57F17; }
.health-score-card.score-fair .health-score-num { color: #E65100; }
.health-score-card.score-poor .health-score-num { color: #C62828; }
.health-score-label {
  font-size: 11px; color: var(--text-secondary); margin-top: 4px;
}
.health-score-right { flex: 1; min-width: 0; }
.health-score-level {
  font-size: 16px; font-weight: 700; margin-bottom: 4px; color: #2E7D32;
}
.health-score-level.level-good { color: #F57F17; }
.health-score-level.level-fair { color: #E65100; }
.health-score-level.level-poor { color: #C62828; }
.health-score-detail {
  font-size: 12px; color: var(--text-secondary); line-height: 1.5;
  word-break: break-all;
}

/* ===== 结论分级 ===== */
.conclusion-row { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.conclusion-btn {
  flex: 1; min-width: 70px; padding: 10px 8px; border: 2px solid var(--border);
  border-radius: var(--radius-sm); background: var(--card); cursor: pointer;
  font-size: 13px; font-weight: 600; text-align: center; transition: all 0.2s ease;
  font-family: inherit;
}
.conclusion-btn.active { border-color: currentColor; transform: scale(1.02); }
.conclusion-btn.c-normal { color: var(--success); }
.conclusion-btn.c-normal.active { background: #E8F5E9; }
.conclusion-btn.c-obs { color: var(--warning); }
.conclusion-btn.c-obs.active { background: #FFF8E1; }
.conclusion-btn.c-treat { color: var(--primary); }
.conclusion-btn.c-treat.active { background: var(--bg-warm); }
.conclusion-btn.c-refer { color: var(--danger); }
.conclusion-btn.c-refer.active { background: #FFEBEE; }

/* 拍照区 */
.photo-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px;
}
.photo-slot {
  aspect-ratio: 1; background: var(--card); border: 2px dashed var(--border);
  border-radius: var(--radius-sm); display: flex; flex-direction: column;
  align-items: center; justify-content: center; cursor: pointer;
  color: var(--text-light); font-size: 12px; gap: 6px; transition: all 0.2s ease;
  position: relative; overflow: hidden;
}
.photo-slot:hover { border-color: var(--primary); color: var(--primary); }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-slot input[type=file] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}

/* ===== 签字板 ===== */
.sign-pad {
  background: var(--card); border: 2px solid var(--border);
  border-radius: var(--radius-sm); position: relative; overflow: hidden;
}
.sign-pad canvas { display: block; width: 100%; touch-action: none; }
.sign-placeholder {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  color: var(--text-light); font-size: 14px; pointer-events: none;
}
.sign-actions { display: flex; gap: 10px; margin-top: 10px; }

/* ===== 时间轴 ===== */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: ''; position: absolute; left: 8px; top: 8px; bottom: 8px;
  width: 2px; background: var(--primary-light);
}
.timeline-item { position: relative; margin-bottom: 18px; }
.timeline-item::before {
  content: ''; position: absolute; left: -24px; top: 6px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--primary); border: 3px solid var(--bg-warm);
}
.timeline-date { font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.timeline-card {
  background: var(--card); border-radius: var(--radius-sm); padding: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.timeline-card-title { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.timeline-card-meta { font-size: 12px; color: var(--text-secondary); }

/* ===== 报告详情 ===== */
.report-detail-card {
  background: var(--card); border-radius: var(--radius); padding: 18px;
  margin-bottom: 14px; box-shadow: var(--shadow);
}
.report-student-info {
  display: flex; align-items: center; gap: 14px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border); margin-bottom: 14px;
}
.report-result-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--bg); font-size: 14px;
}
.report-result-item:last-child { border-bottom: none; }
.result-ok { color: var(--success); font-weight: 600; }
.result-bad { color: var(--danger); font-weight: 600; }

/* ===== Toast ===== */
.toast {
  position: fixed; top: 80px; left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: var(--text); color: white; padding: 12px 24px;
  border-radius: var(--radius-sm); font-size: 14px; opacity: 0;
  transition: all 0.3s ease; z-index: 1000; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== 分页 ===== */
.pagination {
  display: flex; justify-content: center; gap: 6px; margin-top: 20px;
}
.pagination a, .pagination span {
  padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border);
  font-size: 13px; color: var(--text-secondary); background: var(--card);
}
.pagination .active {
  background: var(--primary); color: white; border-color: var(--primary);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .top-bar { padding: 0 16px; height: 56px; }
  .brand-title { font-size: 15px; }
  .brand-sub { display: none; }
  .admin-sidebar {
    position: fixed; left: -240px; top: 56px; bottom: 0; z-index: 90;
    transition: left 0.3s ease; box-shadow: 4px 0 20px rgba(0,0,0,0.1);
  }
  .admin-sidebar.open { left: 0; }
  .admin-main { padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .page-title { font-size: 18px; }
  .hamburger { display: flex !important; }
  .sidebar-overlay {
    display: none; position: fixed; inset: 56px 0 0 0;
    background: rgba(0,0,0,0.4); z-index: 80;
  }
  .sidebar-overlay.show { display: block; }
  .phone-frame {
    width: 100%; max-width: 390px; box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    border-radius: 32px;
  }
  .mobile-stage { padding: 16px 8px; }
}
.hamburger {
  display: none; width: 40px; height: 40px;
  align-items: center; justify-content: center; cursor: pointer; border-radius: 8px;
}
.hamburger:hover { background: var(--bg-warm); }

/* ===== 统一Tab导航样式（方案一） ===== */
.tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  background: var(--card);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: 0 8px;
}
.tab-nav-item {
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border-top: none;
  border-left: none;
  border-right: none;
}
.tab-nav-item:hover {
  color: var(--primary);
  background: var(--bg);
}
.tab-nav-item.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: transparent;
}
.tab-nav-item .tab-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ===== 统一紧凑筛选栏样式（方案一） ===== */
.compact-filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.compact-filter-bar .filter-item {
  position: relative;
  flex: 1;
  min-width: 140px;
}
.compact-filter-bar .filter-item .filter-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.compact-filter-bar .filter-item .filter-input,
.compact-filter-bar .filter-item .filter-select {
  width: 100%;
  padding: 10px 12px 10px 36px;
  border: none;
  background: var(--bg);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}
.compact-filter-bar .filter-item .filter-input:focus,
.compact-filter-bar .filter-item .filter-select:focus {
  background: var(--bg-warm);
  box-shadow: 0 0 0 2px rgba(255, 138, 76, 0.2);
}
.compact-filter-bar .filter-item .filter-input:hover,
.compact-filter-bar .filter-item .filter-select:hover {
  background: var(--bg-warm);
}
.compact-filter-bar .filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.compact-filter-bar .selected-count {
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg);
  padding: 6px 12px;
  border-radius: 6px;
}
.compact-filter-bar .selected-count strong {
  color: var(--primary);
  font-weight: 700;
}

/* ===== 统一主按钮样式（带图标） ===== */
.btn-primary-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(255, 138, 76, 0.3);
}
.btn-primary-icon:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 138, 76, 0.4);
}
.btn-primary-icon:disabled {
  background: var(--text-light);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn-primary-icon .btn-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sidebar-overlay { display: none; }

/* 空状态 */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-light); }
