/* ===== 医生个人工作助手 v3.9.0 — 专业医疗浅色主题 ===== */
:root {
  --bg-page: #f0f4f8;
  --bg-card: #ffffff;
  --bg-panel: #f7fafc;
  --bg-hover: #eef2f7;
  --sidebar-bg: #1e3a5f;
  --sidebar-hover: #2a4e7c;
  --sidebar-active: #3b82f6;
  --sidebar-text: rgba(255,255,255,0.75);
  --sidebar-text-active: #ffffff;
  --accent: #2563eb;
  --accent-light: #3b82f6;
  --accent-soft: #eff6ff;
  --success: #059669;
  --success-soft: #ecfdf5;
  --warning: #d97706;
  --warning-soft: #fffbeb;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --info: #0891b2;
  --info-soft: #ecfeff;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --border: #e5e7eb;
  --border-focus: #3b82f6;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.10);
  --transition: 0.2s cubic-bezier(.4,0,.2,1);
  --card-bg: #ffffff;
  --bg-primary: #ffffff;
  --bg-secondary: #f7fafc;
  --primary: #2563eb;
  --primary-light: #eff6ff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: 14px;
  overflow: hidden;
}

.hidden { display: none !important; }
.page { width: 100%; height: 100vh; }
.page.active { display: flex; }

/* ===== 登录页 — 专业PC全屏设计 ===== */
.login-bg {
  width: 100%; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: #f5f7fa;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(37,99,235,0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(79,70,229,0.03) 0%, transparent 60%);
  padding: 40px 24px;
  box-sizing: border-box;
}

/* 主卡片 */
.login-card-v2 {
  width: 100%; max-width: 1040px;
  min-height: 600px;
  background: #fff;
  border-radius: 20px;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.03),
    0 2px 8px rgba(0,0,0,0.02),
    0 24px 80px rgba(0,0,0,0.06);
  display: flex;
  overflow: hidden;
  animation: cardSlideIn 0.6s cubic-bezier(0.16,1,0.3,1);
}
@keyframes cardSlideIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== 左侧品牌面板 ===== */
.login-brand {
  flex: 0 0 440px;
  background: linear-gradient(155deg, #0f1b2d 0%, #132744 25%, #1a3a6b 55%, #1e4f96 85%, #2563eb 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 60px 48px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
/* 背景装饰：网格点阵 */
.login-brand::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}
/* 光晕 */
.login-brand::after {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,0.25) 0%, transparent 70%);
  top: -180px; right: -180px;
  pointer-events: none;
}
/* 底部微光 */
.login-brand .brand-glow-bottom {
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
  bottom: -120px; left: -80px;
  pointer-events: none;
}

.brand-top {
  display: flex; flex-direction: column; align-items: center;
  gap: 28px; margin-bottom: 44px;
  position: relative; z-index: 1;
}
.brand-icon {
  width: 80px; height: 80px;
  background: rgba(255,255,255,0.08);
  border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
  transition: transform 0.3s ease;
}
.brand-icon:hover { transform: scale(1.05); }
.brand-icon svg { width: 44px; height: 44px; display: block; }
.brand-title {
  font-size: 32px; font-weight: 700; color: #fff;
  letter-spacing: -0.5px; line-height: 1.3; text-align: center;
}
.brand-sub {
  font-size: 14px; color: rgba(255,255,255,0.55);
  line-height: 1.6; text-align: center; margin: 0; max-width: 280px;
}

/* 功能列表-简洁版 */
.brand-features {
  display: flex; flex-direction: column; gap: 14px;
  position: relative; z-index: 1;
}
.brand-feat {
  display: flex; align-items: center; gap: 12px;
  font-size: 13.5px; color: rgba(255,255,255,0.75);
  font-weight: 400;
}
.brand-feat .feat-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  flex-shrink: 0;
}
.brand-feat:first-child .feat-dot { background: #60a5fa; }
.brand-feat:nth-child(2) .feat-dot { background: #818cf8; }
.brand-feat:nth-child(3) .feat-dot { background: #a78bfa; }
.brand-feat:nth-child(4) .feat-dot { background: #c084fc; }

.brand-version {
  margin-top: 52px; font-size: 11px;
  color: rgba(255,255,255,0.2);
  letter-spacing: 1px; position: relative; z-index: 1;
}

/* ===== 右侧表单面板 ===== */
.login-form-col {
  flex: 1; display: flex; flex-direction: column;
  background: #fff; min-width: 0;
}
.form-card {
  padding: 48px 56px 40px;
  display: flex; flex-direction: column;
  justify-content: center; min-height: 100%;
}

.form-header { margin-bottom: 36px; }
.form-header h2 {
  font-size: 24px; font-weight: 700; color: #0f172a;
  letter-spacing: -0.3px; margin: 0 0 8px;
}
.form-header p {
  font-size: 14px; color: #94a3b8; margin: 0; font-weight: 400;
}

/* 表单 */
.login-form-v2 { margin: 0; }
.form-group-v2 { margin-bottom: 20px; position: relative; }
.form-group-v2 label {
  display: block; font-size: 13px; font-weight: 600; color: #334155;
  margin-bottom: 8px;
}
.form-group-v2 .input-wrapper { position: relative; }
.form-group-v2 .input-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; display: flex; align-items: center; justify-content: center;
  pointer-events: none; z-index: 1;
}
.form-group-v2 .input-icon svg { width: 18px; height: 18px; display: block; }
.form-group-v2 input {
  width: 100%; padding: 14px 16px 14px 42px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px; color: #0f172a; font-size: 14.5px;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
  box-sizing: border-box;
}
.form-group-v2 input::placeholder { color: #94a3b8; font-size: 14px; }
.form-group-v2 input:focus {
  border-color: #2563eb;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.08);
}
.form-group-v2 input:hover:not(:focus) {
  border-color: #cbd5e1;
}

/* 登录按钮 */
.btn-login-v2 {
  width: 100%; padding: 15px; margin-top: 12px;
  background: #2563eb;
  border: none; border-radius: 12px;
  color: #fff; font-size: 15px; font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.2s;
}
.btn-login-v2:hover {
  background: #1d4ed8;
  box-shadow: 0 4px 16px rgba(37,99,235,0.25);
  transform: translateY(-1px);
}
.btn-login-v2:active { transform: translateY(0); box-shadow: none; }

/* 错误提示 */
.login-error-v2 {
  color: #dc2626; font-size: 13px; margin-top: 14px;
  padding: 12px 16px; background: #fef2f2;
  border: 1px solid #fecaca; border-radius: 10px;
  display: flex; align-items: center; gap: 8px; line-height: 1.5;
}
.login-error-v2 .err-icon-svg { flex-shrink: 0; width: 16px; height: 16px; }

/* 链接 */
.login-links-v2 {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 22px; font-size: 13px;
}
.login-links-v2 a { color: #64748b; text-decoration: none; transition: color .15s; font-weight: 500; }
.login-links-v2 a:hover { color: #2563eb; }
.link-register { color: #2563eb !important; font-weight: 600; }

/* 注册积分提示 */
.register-points-hint {
  background: #eff6ff; border: 1px solid #bfdbfe;
  border-radius: 10px; padding: 12px 16px; margin-bottom: 20px;
  font-size: 13px; color: #1e40af; line-height: 1.6;
  text-align: center;
}
.register-points-hint strong { color: #1d4ed8; }

/* 注册页管理员联系方式 */
.register-contact-info {
  display: flex; align-items: center; gap: 8px;
  margin-top: 16px; padding: 14px 16px;
  background: #fefce8; border: 1px solid #fde68a;
  border-radius: 10px; font-size: 13px;
}
.register-contact-info .contact-icon {
  flex-shrink: 0; display: flex; align-items: center;
}
.register-contact-info .contact-text {
  color: #92400e; font-weight: 500; white-space: nowrap;
}
.register-contact-info .contact-detail {
  color: #b45309; font-weight: 600; word-break: break-all;
}

/* 个人收款码上传预览 */
.qr-upload-preview {
  width: 100%; height: 140px;
  background: #f8fafc; border: 1px dashed #d1d5db;
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.qr-upload-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }

.reg-fields { display: none; }
.reg-fields.active { display: block; }

/* 免责声明 */
.login-disclaimer-v2 {
  padding: 20px 56px 36px;
  background: #fafbfc;
  border-top: 1px solid #f1f5f9;
}
.disclaimer-title {
  font-size: 11px; font-weight: 600; color: #94a3b8;
  margin-bottom: 10px; letter-spacing: 0.3px;
  display: flex; align-items: center; gap: 6px; cursor: pointer; user-select: none;
}
.disclaimer-title .disc-arrow {
  width: 14px; height: 14px; transition: transform 0.2s; color: #94a3b8;
}
.disclaimer-title .disc-arrow.open { transform: rotate(180deg); }
.disclaimer-list {
  list-style: none; padding: 0; margin: 0;
  font-size: 11.5px; color: #94a3b8; line-height: 1.9;
}
.disclaimer-list li { position: relative; padding-left: 12px; }
.disclaimer-list li::before { content: ''; position: absolute; left: 0; top: 8px; width: 4px; height: 4px; border-radius: 50%; background: #cbd5e1; }

/* 医院下拉 */
.hospital-dropdown {
  position: absolute; z-index: 100;
  background: #fff; border: 1px solid #e2e8f0;
  border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,0.1);
  max-height: 220px; overflow-y: auto; width: calc(100% - 2px);
  margin-top: 4px;
}
.hospital-dropdown .hospital-item {
  padding: 10px 14px; cursor: pointer; font-size: 13px; color: #334155;
  border-bottom: 1px solid #f8fafc; transition: background .15s;
}
.hospital-dropdown .hospital-item:hover { background: #f1f5f9; }
.hospital-dropdown .hospital-item .province-tag {
  font-size: 11px; color: #94a3b8; float: right;
}
.hospital-select-wrap { position: relative; }

/* ===== 响应式 ===== */
@media(max-width: 900px) {
  .login-bg { padding: 20px; }
  .login-card-v2 { flex-direction: column; max-width: 480px; min-height: auto; }
  .login-brand {
    flex: none; padding: 44px 32px 36px;
    border-radius: 20px 20px 0 0;
  }
  .brand-top { margin-bottom: 28px; gap: 20px; }
  .brand-icon { width: 64px; height: 64px; border-radius: 18px; }
  .brand-icon svg { width: 36px; height: 36px; }
  .brand-title { font-size: 26px; }
  .brand-sub { font-size: 13px; }
  .brand-features { gap: 10px; }
  .brand-version { margin-top: 32px; }
  .form-card { padding: 36px 32px 32px; }
  .login-disclaimer-v2 { padding: 16px 32px 28px; }
}
@media(max-width: 480px) {
  .login-bg { padding: 12px; }
  .login-card-v2 { border-radius: 16px; }
  .login-brand { border-radius: 16px 16px 0 0; padding: 36px 24px 28px; }
  .form-card { padding: 28px 20px 24px; }
  .form-header h2 { font-size: 20px; }
  .login-disclaimer-v2 { padding: 14px 20px 24px; }
}

/* ===== 主布局 ===== */
#main-page { display: flex; }
.sidebar {
  width: 240px; height: 100vh; overflow-y: auto; flex-shrink: 0;
  background: var(--sidebar-bg);
  display: flex; flex-direction: column;
  transition: width var(--transition), transform 0.3s ease;
  position: relative; z-index: 10;
}
.sidebar.collapsed { width: 64px; }

/* 侧边栏遮罩层（移动端弹出时显示） */
.sidebar-overlay {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5); z-index: 1998;
  animation: fadeIn 0.25s ease;
}
.sidebar-overlay.active { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* body 侧边栏打开时，阻止背景内容响应点击 */
body.sidebar-open { overflow: hidden; }

.sidebar-logo {
  padding: 20px 16px; display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-logo-icon { width: 32px; height: 32px; flex-shrink: 0; }
.sidebar-logo-text { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; color: #fff; }

.nav-menu { flex: 1; padding: 12px 0; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  cursor: pointer; border-radius: 8px; margin: 2px 8px;
  transition: var(--transition); color: var(--sidebar-text);
  white-space: nowrap; overflow: hidden;
}
.nav-item:hover { background: var(--sidebar-hover); color: #fff; }
.nav-item.active {
  background: var(--sidebar-active);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59,130,246,0.4);
}
.nav-icon { font-size: 16px; flex-shrink: 0; width: 24px; text-align: center; }
.nav-label { font-size: 13px; font-weight: 500; }
.nav-section { padding: 10px 16px 4px; font-size: 10px; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: 1px; }

.sidebar-footer { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,0.1); }
.user-info { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.user-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--sidebar-active); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0; color: #fff; }
.user-name { font-size: 13px; font-weight: 600; color: #fff; }
.user-role { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 1px; }
.btn-logout { width: 100%; padding: 7px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); color: rgba(255,255,255,0.7); border-radius: 7px; cursor: pointer; font-size: 12px; transition: var(--transition); }
.btn-logout:hover { background: rgba(220,38,38,0.25); border-color: rgba(220,38,38,0.4); color: #fca5a5; }

/* ===== 顶栏 ===== */
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; position: relative; }
.topbar {
  height: 58px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between;
  background: #fff; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.sidebar-toggle { background: none; border: none; color: var(--text-muted); font-size: 20px; cursor: pointer; padding: 6px 8px; border-radius: 6px; transition: var(--transition); display: flex; align-items: center; justify-content: center; }
.sidebar-toggle:hover { color: var(--text-primary); background: var(--bg-hover); }
.sidebar-toggle svg { display: block; }
.breadcrumb { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.token-badge {
  display: flex; align-items: center; gap: 6px; padding: 6px 14px;
  background: var(--accent-soft); border: 1px solid #bfdbfe;
  border-radius: 20px; font-size: 12px; color: var(--accent); font-weight: 600;
}
.token-icon { font-size: 13px; }
.time-display { font-size: 12px; color: var(--text-muted); font-family: "SFMono-Regular", Consolas, monospace; }

/* ===== 页面内容区 ===== */
.page-content { flex: 1; overflow-y: auto; padding: 24px; }

/* ===== 卡片 ===== */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.glass-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.card-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-size: 15px; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.card-body { padding: 20px; }

/* ===== 统计卡片 ===== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-bottom: 28px; }
.stat-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px 22px;
  position: relative; overflow: hidden;
  transition: all 0.3s cubic-bezier(.4,0,.2,1);
  box-shadow: var(--shadow-sm);
}
.stat-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.10); transform: translateY(-3px); border-color: #bfdbfe; }
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--accent), #6366f1);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.stat-card.type-success::before { background: linear-gradient(90deg, #10b981, #34d399); }
.stat-card.type-warning::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.stat-card.type-danger::before { background: linear-gradient(90deg, #ef4444, #f87171); }
.stat-card.type-info::before { background: linear-gradient(90deg, #6366f1, #818cf8); }
.stat-card.type-purple::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.stat-card.type-teal::before { background: linear-gradient(90deg, #0891b2, #22d3ee); }
.stat-label { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; font-weight: 600; letter-spacing: 0.3px; }
.stat-value { font-size: 32px; font-weight: 800; color: var(--text-primary); letter-spacing: -1.5px; line-height: 1.1; }
.stat-value.success { color: #059669; }
.stat-value.warning { color: #d97706; }
.stat-value.danger { color: #dc2626; }
.stat-value.info { color: #4f46e5; }
.stat-sub { font-size: 12px; color: var(--text-muted); margin-top: 8px; display: flex; align-items: center; gap: 6px; }
.stat-sub .dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.stat-sub .dot.green { background: #10b981; }
.stat-sub .dot.red { background: #ef4444; }
.stat-sub .dot.yellow { background: #f59e0b; }
.stat-trend { font-size: 11px; color: var(--text-muted); margin-top: 6px; }
.stat-icon { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 42px; opacity: 0.06; }
.stat-card.clickable { cursor: pointer; }
.stat-card.clickable:hover { border-color: var(--accent); box-shadow: 0 8px 30px rgba(37,99,235,0.15); }
.stat-card.clickable:active { transform: scale(0.98); }

.stat-card-inner { display: flex; flex-direction: column; height: 100%; }
.stat-card-row { display: flex; align-items: center; gap: 8px; }

/* 双数字并列 */
.stat-dual { display: flex; gap: 20px; align-items: baseline; }
.stat-dual-item { display: flex; flex-direction: column; }
.stat-dual-item .stat-value { font-size: 24px; }
.stat-dual-item .stat-label { font-size: 11px; margin-bottom: 4px; }

/* ===== 图表区 ===== */
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 28px; }
.chart-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm); }
.chart-title { font-size: 14px; font-weight: 700; margin-bottom: 20px; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.chart-container { height: 200px; position: relative; }
.chart-card-full { grid-column: 1 / -1; }

/* 增强趋势图 */
.trend-chart-wrap { margin-top: 12px; position: relative; }
.trend-chart-wrap canvas { width: 100% !important; border-radius: 8px; }

/* 医院排行卡片增强 */
.ranking-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; margin-bottom: 6px; transition: background 0.2s; }
.ranking-item:hover { background: var(--bg-hover); }
.ranking-item .rank-num { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; }
.ranking-item .rank-num.gold { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.ranking-item .rank-num.silver { background: linear-gradient(135deg, #94a3b8, #cbd5e1); }
.ranking-item .rank-num.bronze { background: linear-gradient(135deg, #d97706, #f59e0b); }
.ranking-item .rank-num.normal { background: #94a3b8; }

/* ===== 表格 ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  background: #f8fafc; padding: 11px 14px;
  text-align: left; font-weight: 600;
  color: var(--text-secondary); font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
}
tbody td { padding: 12px 14px; border-bottom: 1px solid #f3f4f6; color: var(--text-primary); }
tbody tr:hover { background: var(--bg-hover); }
tbody tr:last-child td { border-bottom: none; }

/* 选中行高亮 */
tr.row-selected { background: rgba(37,99,235,0.06) !important; }
tr.row-selected:hover { background: rgba(37,99,235,0.1) !important; }

/* 表格内复选框 */
table input[type="checkbox"] {
  width: 16px; height: 16px; cursor: pointer; accent-color: var(--accent);
}

/* ===== 风险标签 ===== */
.risk-badge { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; display: inline-block; }
.risk-high { background: var(--danger-soft); color: var(--danger); border: 1px solid #fecaca; }
.risk-mid { background: var(--warning-soft); color: var(--warning); border: 1px solid #fde68a; }
.risk-low { background: var(--info-soft); color: var(--info); border: 1px solid #a5f3fc; }
.risk-pass { background: var(--success-soft); color: var(--success); border: 1px solid #6ee7b7; }

/* ===== 理疗单时间验证 ===== */
.physio-time-alert {
  padding: 8px 12px; border-radius: 6px; font-size: 12px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.physio-time-alert-danger {
  background: rgba(220,38,38,0.06); border: 1px solid rgba(220,38,38,0.2);
  color: var(--danger);
}
.physio-time-alert-warning {
  background: rgba(245,158,11,0.06); border: 1px solid rgba(245,158,11,0.2);
  color: var(--warning);
}
.physio-time-alert-info {
  background: rgba(37,99,235,0.04); border: 1px solid rgba(37,99,235,0.1);
  color: var(--info);
}
.physio-time-grid {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 12px;
  font-size: 13px;
}
.physio-time-grid > span:nth-child(odd) {
  color: var(--text-muted); white-space: nowrap;
}

/* ===== 上传区 ===== */
.upload-zone {
  border: 2px dashed #d1d5db; border-radius: var(--radius-lg); padding: 40px;
  text-align: center; cursor: pointer; transition: var(--transition);
  background: #fafafa;
}
.upload-zone:hover, .upload-zone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.upload-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.45; }
.upload-text { color: var(--text-secondary); font-size: 14px; font-weight: 500; }
.upload-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* ===== 审查结果 ===== */
.check-result { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); margin-top: 20px; box-shadow: var(--shadow-sm); }
.result-header { padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; }
.result-header.pass { background: var(--success-soft); border-bottom: 1px solid #6ee7b7; }
.result-header.low { background: var(--info-soft); border-bottom: 1px solid #a5f3fc; }
.result-header.mid { background: var(--warning-soft); border-bottom: 1px solid #fde68a; }
.result-header.high { background: var(--danger-soft); border-bottom: 1px solid #fecaca; }
.result-score { font-size: 28px; font-weight: 800; }
.result-body { padding: 20px; background: #fff; }
.issue-item { padding: 10px 14px; border-radius: 8px; margin-bottom: 8px; border-left: 3px solid; }
.issue-high { background: #fff5f5; border-color: var(--danger); }
.issue-mid { background: #fffcf0; border-color: var(--warning); }
.issue-low { background: #f0f9ff; border-color: var(--info); }
.issue-rule { font-size: 11px; color: var(--text-muted); margin-bottom: 3px; }
.issue-problem { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.suggestion-list { list-style: none; }
.suggestion-list li { padding: 6px 0; font-size: 13px; color: var(--text-secondary); display: flex; gap: 8px; }
.suggestion-list li::before { content: '→'; color: var(--accent); flex-shrink: 0; }

/* ===== 规则库 ===== */
.rule-badge { padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.rule-national { background: var(--info-soft); color: var(--info); border: 1px solid #a5f3fc; }
.rule-beijing { background: var(--accent-soft); color: var(--accent); border: 1px solid #bfdbfe; }
.rule-custom { background: var(--warning-soft); color: var(--warning); border: 1px solid #fde68a; }

/* ===== 表单 ===== */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-row.single { grid-template-columns: 1fr; }
.form-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; display: block; font-weight: 500; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 9px 12px;
  background: #f9fafb; border: 1.5px solid var(--border);
  border-radius: 7px; color: var(--text-primary); font-size: 13px;
  transition: var(--transition); outline: none; font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--border-focus); background: #fff;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-select option { background: #fff; color: var(--text-primary); }

/* ===== 分页 ===== */
.pagination { display: flex; align-items: center; gap: 8px; justify-content: center; margin-top: 20px; }
.page-btn { padding: 6px 12px; border: 1.5px solid var(--border); background: #fff; color: var(--text-secondary); border-radius: 6px; cursor: pointer; transition: var(--transition); font-size: 13px; }
.page-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.page-btn:hover:not(.active) { border-color: var(--accent); color: var(--accent); }

/* ===== 弹窗 ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-box { background: #fff; border: 1px solid var(--border); border-radius: 16px; width: 500px; max-width: 92vw; max-height: 85vh; display: flex; flex-direction: column; animation: popIn .22s; box-shadow: var(--shadow-md); }
@keyframes popIn { from{opacity:0;transform:scale(0.94)} to{opacity:1;transform:scale(1)} }
.modal-header { padding: 18px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: 15px; color: var(--text-primary); }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 16px; padding: 4px; border-radius: 4px; transition: var(--transition); }
.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; background: #fafafa; border-radius: 0 0 16px 16px; }

/* ===== 法律免责声明弹窗 ===== */
.legal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px); display: flex; align-items: center;
  justify-content: center; z-index: 10000;
  animation: legalFadeIn .35s;
}
@keyframes legalFadeIn { from{opacity:0} to{opacity:1} }
.legal-box {
  background: #fff; border: 1px solid var(--border);
  border-radius: 16px; width: 700px; max-width: 94vw;
  max-height: 90vh; display: flex; flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,0.25);
  animation: legalSlideUp .4s cubic-bezier(0.16,1,0.3,1);
}
@keyframes legalSlideUp { from{opacity:0;transform:translateY(30px)} to{opacity:1;transform:translateY(0)} }
.legal-header {
  padding: 28px 32px 16px; border-bottom: 1px solid var(--border);
  text-align: center; flex-shrink: 0;
}
.legal-header-icon { font-size: 36px; margin-bottom: 8px; }
.legal-header h2 {
  font-size: 18px; font-weight: 700; color: var(--text-primary);
  margin: 0 0 6px;
}
.legal-header-sub {
  font-size: 12.5px; color: var(--text-muted); margin: 0;
  line-height: 1.5;
}
.legal-body {
  flex: 1; overflow-y: auto; padding: 20px 32px;
  background: #fafbfc;
  /* 阅读进度指示 */
  background-image: linear-gradient(to bottom, #fafbfc, #f0f4f8);
}
.legal-body::-webkit-scrollbar { width: 6px; }
.legal-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.legal-body::-webkit-scrollbar-track { background: transparent; }
.legal-content { max-width: 620px; margin: 0 auto; }
.legal-content .legal-preamble {
  font-size: 13px; color: var(--text-secondary); line-height: 1.8;
  margin-bottom: 24px; padding: 14px 16px;
  background: #fff; border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
}
.legal-content h3 {
  font-size: 14px; font-weight: 700; color: var(--text-primary);
  margin: 24px 0 10px; padding-bottom: 6px;
  border-bottom: 1px dashed var(--border);
}
.legal-content h3:first-of-type { margin-top: 0; }
.legal-content p {
  font-size: 12.5px; color: var(--text-secondary); line-height: 1.85;
  margin: 0 0 10px; text-align: justify;
}
.legal-footer {
  padding: 16px 32px 24px; border-top: 1px solid var(--border);
  flex-shrink: 0; background: #fff;
  border-radius: 0 0 16px 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.legal-checkbox-label {
  display: flex; align-items: flex-start; gap: 10px;
  cursor: pointer; font-size: 13px; color: var(--text-primary);
  line-height: 1.6; user-select: none;
  padding: 12px 14px; background: var(--accent-soft);
  border-radius: 10px; border: 1px solid #bfdbfe;
  transition: var(--transition);
}
.legal-checkbox-label:hover { background: #dbeafe; border-color: #93c5fd; }
.legal-checkbox-label input[type="checkbox"] {
  width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0;
  accent-color: var(--primary); cursor: pointer;
}
.legal-checkbox-label.checked {
  background: #dcfce7; border-color: #86efac;
}
.btn-legal-confirm {
  width: 100%; padding: 13px; font-size: 15px; font-weight: 600;
  border-radius: 10px; transition: all .2s;
}
.btn-legal-confirm:disabled {
  opacity: 0.45; cursor: not-allowed; filter: grayscale(0.5);
}
.btn-legal-confirm:not(:disabled):hover {
  transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,99,235,0.3);
}

@media (max-width: 768px) {
  .legal-box { max-width: 98vw; max-height: 95vh; border-radius: 12px; }
  .legal-header { padding: 20px 18px 12px; }
  .legal-header h2 { font-size: 16px; }
  .legal-body { padding: 16px 18px; }
  .legal-footer { padding: 12px 18px 20px; }
  .legal-content { max-width: 100%; }
}

/* ===== Toast ===== */
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 12px 18px; border-radius: 9px; font-size: 13px;
  border: 1px solid; max-width: 320px;
  animation: toastIn .28s; font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}
.toast-success { background: var(--success-soft); border-color: #6ee7b7; color: #065f46; }
.toast-error { background: var(--danger-soft); border-color: #fca5a5; color: #991b1b; }
.toast-info { background: var(--accent-soft); border-color: #93c5fd; color: #1e40af; }
.toast-warning { background: var(--warning-soft); border-color: #fcd34d; color: #92400e; }
@keyframes toastIn { from{opacity:0;transform:translateX(20px)} to{opacity:1;transform:translateX(0)} }

/* ===== 进度条 ===== */
.progress-bar { height: 7px; background: #e5e7eb; border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), #06b6d4); transition: width .5s ease; }

/* ===== 开关 ===== */
.toggle { position: relative; width: 40px; height: 22px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: #d1d5db; border-radius: 11px; cursor: pointer; transition: var(--transition); }
.toggle-slider::before { content: ''; position: absolute; width: 18px; height: 18px; top: 2px; left: 2px; background: #fff; border-radius: 50%; transition: var(--transition); box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.toggle input:checked + .toggle-slider { background: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ===== SVG 简易条形迷你图 ===== */
.mini-chart { display: flex; align-items: flex-end; gap: 4px; height: 40px; }
.mini-bar { flex: 1; border-radius: 3px 3px 0 0; background: var(--accent); opacity: 0.5; min-height: 4px; transition: height .4s; }

/* ===== 数字翻牌 ===== */
.count-up { display: inline-block; }

/* ===== 章节标题 ===== */
.section-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--border); }
.section-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; font-weight: 400; }

/* ===== 信息行 ===== */
.info-row { display: flex; align-items: center; padding: 10px 0; border-bottom: 1px solid #f3f4f6; font-size: 13px; }
.info-row:last-child { border-bottom: none; }
.info-label { width: 120px; color: var(--text-muted); flex-shrink: 0; }
.info-value { color: var(--text-primary); font-weight: 500; }

/* ===== 空状态 ===== */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.35; }
.empty-text { font-size: 14px; }

/* ===== 加载中 ===== */
.loading-spin { display: inline-block; width: 16px; height: 16px; border: 2px solid #e5e7eb; border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ===== 审查页面布局 v2.0 ===== */
.check-page-layout { display: grid; grid-template-columns: 380px 1fr; gap: 20px; align-items: start; }
.check-left { min-width: 0; }
.check-right { min-width: 0; }

/* ===== 多图上传文件芯片 ===== */
.multi-upload { border-style: dashed; border-width: 2px; }
.file-chip {
  display: flex; align-items: center; gap: 8px; padding: 7px 12px;
  background: #f9fafb; border: 1px solid var(--border); border-radius: 6px;
  margin-bottom: 6px; font-size: 12px; color: var(--text-primary);
  transition: var(--transition);
}
.file-chip:hover { border-color: var(--accent); background: var(--accent-soft); }

/* ===== 批量审查汇总条 ===== */
.batch-summary { display: flex; gap: 16px; padding: 10px 14px; background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 14px; }
.batch-summary-item { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; }

/* ===== 审查结果紧凑表格 ===== */
.result-table-wrap { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: #fff; }
.result-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.result-table thead th {
  padding: 8px 12px; text-align: left; font-weight: 600; font-size: 11px;
  color: var(--text-muted); background: #f8fafc; border-bottom: 1px solid var(--border);
  user-select: none; white-space: nowrap;
}
.result-row { transition: background .15s; border-bottom: 1px solid #f3f4f6; }
.result-row:last-child { border-bottom: none; }
.result-row td { padding: 6px 12px; vertical-align: middle; line-height: 1.3; }
.result-row-actionable { cursor: pointer; }
.result-row-actionable:hover { background: #f0f5ff; }
.result-row-num { color: var(--text-muted); font-size: 11px; font-weight: 600; text-align: center; }
.result-row-rxno { font-family: monospace; font-size: 12px; color: var(--accent); font-weight: 600; }

/* ===== 结果卡片网格 ===== */
.result-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 12px; }
.result-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: var(--transition); box-shadow: var(--shadow-sm); position: relative; }
.result-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.result-card-header { padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(0,0,0,0.05); }
.result-card-header-pass { background: var(--success-soft); }
.result-card-header-low { background: var(--info-soft); }
.result-card-header-mid { background: var(--warning-soft); }
.result-card-header-high { background: var(--danger-soft); }
.result-card-title { display: flex; align-items: center; gap: 8px; }
.result-card-num { font-weight: 700; font-size: 11px; color: var(--text-muted); background: rgba(0,0,0,0.05); padding: 2px 8px; border-radius: 4px; }
.result-card-rxno { font-weight: 600; font-size: 11px; color: var(--accent); font-family: monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.result-card-body { padding: 12px 14px; }
.result-card-score-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.result-card-score { font-size: 32px; font-weight: 800; line-height: 1; }
.risk-color-pass { color: var(--success); }
.risk-color-low { color: var(--info); }
.risk-color-mid { color: var(--warning); }
.risk-color-high { color: var(--danger); }
.result-card-label { font-size: 13px; font-weight: 600; }
.result-card-summary { font-size: 12px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 8px; }
.result-card-issues { margin-top: 4px; }
.result-card-issue { display: flex; align-items: flex-start; gap: 6px; padding: 4px 0; font-size: 11px; border-bottom: 1px dashed #f0f0f0; }
.result-card-issue:last-child { border-bottom: none; }
.issue-rule-code { font-family: monospace; color: var(--text-muted); flex-shrink: 0; font-size: 10px; }

/* ===== 状态标签 ===== */
.status-badge { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; display: inline-block; }
.status-pass { background: var(--success-soft); color: var(--success); border: 1px solid #6ee7b7; }
.status-warning { background: var(--warning-soft); color: var(--warning); border: 1px solid #fde68a; }
.status-block { background: var(--danger-soft); color: var(--danger); border: 1px solid #fecaca; }
.status-pending { background: #f3f4f6; color: var(--text-muted); border: 1px solid #e5e7eb; }

/* ===== 详情弹窗（宽版） ===== */
.modal-box.modal-wide { width: 750px; max-width: 95vw; }
.detail-container { font-size: 13px; }
.detail-section { margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid #f3f4f6; }
.detail-section:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.detail-section-title { font-size: 13px; font-weight: 700; color: var(--text-primary); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.detail-summary { padding: 10px 14px; background: #f8fafc; border-radius: 8px; color: var(--text-secondary); line-height: 1.6; font-size: 13px; }
.detail-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.detail-info-item { display: flex; flex-direction: column; gap: 2px; padding: 6px 10px; background: #f9fafb; border-radius: 6px; }
.detail-label { font-size: 11px; color: var(--text-muted); }
.detail-value { font-size: 13px; color: var(--text-primary); font-weight: 500; }

/* ===== 详情弹窗 - Issues/Suggestions 序号化列表 ===== */
.detail-issue-list,
.detail-suggestion-list { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.detail-issue-item { display: flex; gap: 10px; padding: 12px 14px; border-radius: 8px; margin-bottom: 8px; border-left: 3px solid; font-size: 13px; line-height: 1.6; }
.detail-issue-item:last-child { margin-bottom: 0; }
.detail-issue-num { font-weight: 700; font-size: 13px; color: var(--text-muted); min-width: 24px; flex-shrink: 0; text-align: right; }
.detail-issue-body { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.detail-issue-rule { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; background: #f1f5f9; color: var(--text-muted); white-space: nowrap; }
.detail-issue-dim { font-size: 10px; padding: 1px 5px; border-radius: 4px; background: #eef2ff; color: #6366f1; white-space: nowrap; }
.detail-issue-text { color: var(--text-primary); }
.detail-issue-high { background: #fef2f2; border-color: var(--danger); }
.detail-issue-mid { background: #fffbeb; border-color: var(--warning); }
.detail-issue-low { background: #f0f9ff; border-color: var(--info); }
.detail-suggestion-item { display: flex; gap: 10px; padding: 10px 14px; background: #f0fdf4; border-radius: 8px; margin-bottom: 8px; font-size: 13px; line-height: 1.6; border-left: 3px solid var(--success); }
.detail-suggestion-item:last-child { margin-bottom: 0; }
.detail-suggestion-num { font-weight: 700; font-size: 13px; color: var(--success); min-width: 24px; flex-shrink: 0; text-align: right; }
.detail-suggestion-text { color: var(--text-primary); }

/* ===== 详情弹窗 - 理疗单执行记录小表格 ===== */
.detail-mini-table-wrap { overflow-x: auto; margin-top: 6px; }
.detail-mini-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.detail-mini-table th { background: #f1f5f9; color: var(--text-muted); font-weight: 600; padding: 7px 10px; text-align: left; border-bottom: 2px solid #e2e8f0; white-space: nowrap; }
.detail-mini-table td { padding: 6px 10px; border-bottom: 1px solid #f1f5f9; color: var(--text-primary); }
.detail-mini-table tbody tr:hover { background: #f8fafc; }
.detail-mini-table tbody tr:nth-child(even) { background: #fafafa; }

/* ===== 详情弹窗 - 行内字段 ===== */
.detail-row { display: flex; align-items: baseline; gap: 8px; padding: 4px 0; font-size: 13px; }
.detail-row .detail-label { min-width: 80px; flex-shrink: 0; }

/* ===== 编辑表单 ===== */
.edit-form { font-size: 13px; }
.edit-form .form-label { margin-bottom: 4px; }
.edit-form .form-textarea { min-height: 100px; }

/* ===== 编辑按钮 ===== */
.btn-edit { color: var(--warning) !important; border-color: #fde68a !important; }
.btn-edit:hover { background: var(--warning-soft) !important; }

/* ===== 结果卡片增强 v2.0 ===== */
.result-card {
  animation: cardEnter .35s cubic-bezier(.4,0,.2,1);
  animation-fill-mode: both;
}
.result-card:nth-child(1) { animation-delay: 0.02s; }
.result-card:nth-child(2) { animation-delay: 0.06s; }
.result-card:nth-child(3) { animation-delay: 0.10s; }
.result-card:nth-child(4) { animation-delay: 0.14s; }
.result-card:nth-child(5) { animation-delay: 0.18s; }
.result-card:nth-child(6) { animation-delay: 0.22s; }
.result-card:nth-child(7) { animation-delay: 0.26s; }
.result-card:nth-child(8) { animation-delay: 0.30s; }
.result-card:nth-child(9) { animation-delay: 0.34s; }
.result-card:nth-child(10) { animation-delay: 0.38s; }

@keyframes cardEnter {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 卡片底部操作区 */
.result-card-footer {
  padding: 8px 14px;
  border-top: 1px solid #f3f4f6;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  background: #fafafa;
}

/* 已编辑标记 */
.edited-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 7px; border-radius: 10px;
  font-size: 10px; font-weight: 600;
  background: #fef3c7; color: #92400e;
  border: 1px solid #fcd34d;
  margin-left: 6px;
}

/* 无问题状态 */
.no-issues {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px; background: var(--success-soft);
  border-radius: 6px; font-size: 11px; color: #065f46;
  border: 1px solid #6ee7b7;
}

/* ===== 骨架屏加载 ===== */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 6px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-card {
  height: 180px; border-radius: var(--radius-lg);
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

/* ============================================================
   世界顶级设计：审查按钮 + 进度交响乐
   ============================================================ */

/* ── 审查按钮 · Obsidian Lux ── */
.btn-review-lux {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 1;
  height: 52px;
  padding: 0 28px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.4px;
  color: #fff;
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 40%, #3b82f6 65%, #1e3a5f 100%);
  background-size: 300% 100%;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    0 2px 12px rgba(37, 99, 235, 0.25),
    0 0 0 0 rgba(37, 99, 235, 0);
  transition:
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.4s ease,
    background-position 0.6s ease;
  animation: btnShimmer 4s ease-in-out infinite;
}
.btn-review-lux::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, #2563eb, #7c3aed, #ec4899, #2563eb);
  background-size: 400% 400%;
  opacity: 0;
  transition: opacity 0.5s ease;
  border-radius: 14px;
}
.btn-review-lux::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(255,255,255,0.15) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}
.btn-review-lux:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 8px 28px rgba(37, 99, 235, 0.40),
    0 0 0 4px rgba(37, 99, 235, 0.12);
  background-position: 100% 0;
}
.btn-review-lux:hover::before { opacity: 1; }
.btn-review-lux:hover::after { opacity: 1; }
.btn-review-lux:active {
  transform: translateY(0) scale(0.98);
  box-shadow:
    0 2px 8px rgba(37, 99, 235, 0.30),
    0 0 0 2px rgba(37, 99, 235, 0.08);
}
.btn-review-lux:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 1px 6px rgba(37, 99, 235, 0.10);
  animation: none;
  background: linear-gradient(135deg, #94a3b8, #64748b);
  filter: grayscale(0.5);
}
.btn-review-lux .lux-icon {
  display: inline-flex;
  align-items: center;
  font-size: 20px;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 0 4px rgba(255,255,255,0.4));
}
.btn-review-lux:not(:disabled):hover .lux-icon {
  transform: rotate(-12deg) scale(1.2);
}
.btn-review-lux .lux-text {
  position: relative;
  z-index: 1;
}
/* Ripple */
.btn-review-lux .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transform: scale(0);
  animation: rippleBurst 0.7s ease-out forwards;
  pointer-events: none;
}
@keyframes rippleBurst {
  to { transform: scale(4); opacity: 0; }
}
@keyframes btnShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ── 进度交响乐容器 · Glass Stage ── */
.progress-orchestra {
  position: relative;
  background: linear-gradient(145deg, rgba(255,255,255,0.95), rgba(247,250,252,0.9));
  backdrop-filter: blur(20px);
  border: 1px solid rgba(37, 99, 235, 0.08);
  border-radius: 20px;
  padding: 48px 36px 36px;
  text-align: center;
  box-shadow:
    0 4px 24px rgba(0,0,0,0.04),
    0 0 0 1px rgba(37,99,235,0.04),
    inset 0 1px 0 rgba(255,255,255,0.8);
  overflow: hidden;
}
.progress-orchestra::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(37,99,235,0.03) 0%, transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(124,58,237,0.03) 0%, transparent 50%);
  animation: orchestraAmbient 8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes orchestraAmbient {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(2%, 1%) rotate(1deg); }
  66% { transform: translate(-1%, -2%) rotate(-1deg); }
}

/* ── 中央旋转器 · Pulse Ring ── */
.pulse-ring {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
}
.pulse-ring-inner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  z-index: 2;
  box-shadow: 0 4px 16px rgba(37,99,235,0.3);
  animation: pulseBreathe 2s ease-in-out infinite;
}
.pulse-ring-orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(37, 99, 235, 0.15);
  animation: ringExpand 2s ease-in-out infinite;
}
.pulse-ring-orbit:nth-child(2) { animation-delay: 0.5s; }
.pulse-ring-orbit:nth-child(3) { animation-delay: 1.0s; }
.pulse-ring-orbit:nth-child(4) { animation-delay: 1.5s; }
@keyframes pulseBreathe {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 16px rgba(37,99,235,0.3); }
  50% { transform: scale(1.08); box-shadow: 0 8px 32px rgba(37,99,235,0.45); }
}
@keyframes ringExpand {
  0% { transform: scale(0.6); opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ── 进度条本体 · Molten Track ── */
.progress-molten-wrap {
  max-width: 480px;
  margin: 0 auto;
}
.progress-molten-track {
  position: relative;
  height: 10px;
  background: linear-gradient(180deg, #e8ecf0 0%, #dde2e7 100%);
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    inset 0 2px 4px rgba(0,0,0,0.06),
    0 1px 0 rgba(255,255,255,0.9);
}
.progress-molten-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0%;
  border-radius: 10px;
  background: linear-gradient(90deg,
    #2563eb 0%, #3b82f6 20%, #6366f1 40%,
    #8b5cf6 60%, #7c3aed 80%, #2563eb 100%
  );
  background-size: 200% 100%;
  animation: moltenFlow 2s linear infinite;
  box-shadow:
    0 0 12px rgba(37, 99, 235, 0.45),
    inset 0 1px 0 rgba(255,255,255,0.3);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.progress-molten-fill::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; right: -100%; bottom: 0;
  background: linear-gradient(90deg,
    transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%
  );
  animation: shimmerSweep 1.5s ease-in-out infinite;
}
@keyframes moltenFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
@keyframes shimmerSweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ── 阶段步骤指示器 ── */
.step-indicators {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 500px;
  margin: 18px auto 0;
  padding: 0 4px;
}
.step-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  position: relative;
}
.step-dot::after {
  content: '';
  position: absolute;
  top: 14px;
  left: calc(50% + 16px);
  right: calc(-50% + 16px);
  height: 2px;
  background: var(--border);
  border-radius: 1px;
  transition: background 0.5s ease;
}
.step-dot:last-child::after { display: none; }
.step-dot.completed::after { background: var(--accent); }

.step-circle {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-muted);
  transition: all 0.4s ease;
  z-index: 1;
  position: relative;
}
.step-dot.active .step-circle {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 6px rgba(37,99,235,0.12);
  animation: stepPulse 1.5s ease-in-out infinite;
}
.step-dot.completed .step-circle {
  border-color: var(--success);
  background: var(--success);
  color: #fff;
}
.step-label {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color 0.3s;
  font-weight: 500;
}
.step-dot.active .step-label {
  color: var(--accent);
  font-weight: 700;
}
.step-dot.completed .step-label {
  color: var(--success);
}
@keyframes stepPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(37,99,235,0.15); }
  50% { box-shadow: 0 0 0 10px rgba(37,99,235,0.05); }
}

/* ── 统计信息栏 ── */
.progress-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-muted);
}
.progress-stats span {
  display: flex;
  align-items: center;
  gap: 5px;
  font-variant-numeric: tabular-nums;
}
.progress-stats .stat-val {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 14px;
}

/* ── 阶段文字动效 ── */
.stage-text-lux {
  font-size: 16px;
  font-weight: 650;
  color: var(--text-primary);
  margin-bottom: 4px;
  position: relative;
  display: inline-block;
}
.stage-text-lux .dot-anim::after {
  content: '';
  animation: ellipsis 1.4s steps(4, end) infinite;
}
@keyframes ellipsis {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}

/* ── 旧样式保留（兼容 task-panel 小进度条） ── */
.batch-loading {
  text-align: center; padding: 40px 20px;
}
.batch-loading-spin {
  display: inline-block; width: 36px; height: 36px;
  border: 3px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite;
  margin-bottom: 12px;
}
.batch-loading-text { font-size: 13px; color: var(--text-secondary); }
.batch-loading-progress { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

/* ===== 合规预警横幅 ===== */
.compliance-alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 18px; border-radius: 10px; margin-bottom: 14px;
  border: 1px solid; font-size: 13px; line-height: 1.6;
}
.compliance-alert-danger {
  background: #fff5f5; border-color: #fecaca; color: #991b1b;
}
.compliance-alert-warning {
  background: #fffbeb; border-color: #fde68a; color: #92400e;
}
.compliance-alert-info {
  background: var(--info-soft); border-color: #a5f3fc; color: #0e7490;
}
.alert-icon { font-size: 20px; flex-shrink: 0; line-height: 1; }
.alert-content { flex: 1; }
.alert-title { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.alert-message { font-size: 12px; opacity: 0.85; }
.alert-close {
  background: none; border: none; color: inherit; opacity: 0.5;
  cursor: pointer; font-size: 16px; padding: 2px 6px; border-radius: 4px;
  flex-shrink: 0; transition: var(--transition);
}
.alert-close:hover { opacity: 1; background: rgba(0,0,0,0.06); }

/* ===== 风险等级色带 ===== */
.risk-stripe {
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}
.risk-stripe-high { background: var(--danger); }
.risk-stripe-mid { background: var(--warning); }
.risk-stripe-low { background: var(--info); }
.risk-stripe-pass { background: var(--success); }

/* ===== 文件芯片增强 ===== */
.file-chip-thumb {
  width: 32px; height: 32px; border-radius: 4px; overflow: hidden;
  background: var(--bg-hover); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.file-chip-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-chip-info { flex: 1; min-width: 0; }
.file-chip-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-chip-size { font-size: 10px; color: var(--text-muted); margin-top: 1px; }
.file-chip-status { font-size: 10px; margin-top: 2px; }
.file-chip-status.ready { color: var(--success); }
.file-chip-status.error { color: var(--danger); }
.file-chip-status.processing { color: var(--accent); }
.file-chip-remove {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; font-size: 14px; padding: 4px 6px; border-radius: 4px;
  flex-shrink: 0; transition: var(--transition); line-height: 1;
}
.file-chip-remove:hover { color: var(--danger); background: var(--danger-soft); }

/* ===== 上传区拖拽覆盖层 ===== */
.drag-overlay {
  position: absolute; inset: 0;
  background: rgba(37,99,235,0.06); border: 3px dashed var(--accent);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600; color: var(--accent);
  pointer-events: none; z-index: 10;
}

/* ===== 详情弹窗增强 ===== */
.detail-image-preview {
  position: relative; border-radius: 8px; overflow: hidden;
  background: #1a1a2e; cursor: pointer; text-align: center;
  transition: var(--transition);
}
.detail-image-preview:hover { opacity: 0.92; }
.detail-image-preview img {
  max-width: 100%; max-height: 280px; object-fit: contain; display: block;
}
.detail-image-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,0.3);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: var(--transition);
  color: #fff; font-size: 13px; gap: 6px;
}
.detail-image-preview:hover .detail-image-overlay { opacity: 1; }

/* 全屏图片查看 */
.image-fullscreen {
  position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.92);
  display: flex; align-items: center; justify-content: center;
  cursor: zoom-out; animation: fadeIn .2s;
}
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
@keyframes fadeInUp { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:translateY(0)} }
.image-fullscreen img {
  max-width: 95vw; max-height: 95vh; object-fit: contain;
  border-radius: 4px; box-shadow: 0 8px 48px rgba(0,0,0,0.5);
}
.image-fullscreen-close {
  position: absolute; top: 20px; right: 20px;
  background: rgba(255,255,255,0.15); border: none;
  color: #fff; font-size: 24px; width: 44px; height: 44px;
  border-radius: 50%; cursor: pointer; transition: var(--transition);
}
.image-fullscreen-close:hover { background: rgba(255,255,255,0.25); }

/* ===== 审计项样式 ===== */
.audit-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; background: #f9fafb; border-radius: 6px;
  font-size: 12px; margin-bottom: 4px;
}
.audit-icon { font-size: 14px; flex-shrink: 0; }
.audit-icon.ok { color: var(--success); }
.audit-icon.warn { color: var(--warning); }
.audit-icon.err { color: var(--danger); }
.audit-text { color: var(--text-primary); }

/* ===== 表单增强 ===== */
.form-hint {
  font-size: 11px; color: var(--text-muted);
  margin-top: 4px; line-height: 1.4;
}
.form-section-title {
  font-size: 13px; font-weight: 700; color: var(--text-primary);
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}

/* ===== 选中/活跃卡片 ===== */
.result-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

/* ===== 标签组 ===== */
.tag-group { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  padding: 3px 10px; border-radius: 6px; font-size: 11px; font-weight: 500;
  background: #f3f4f6; color: var(--text-secondary);
  border: 1px solid var(--border);
}
.tag-danger { background: var(--danger-soft); color: var(--danger); border-color: #fecaca; }
.tag-warning { background: var(--warning-soft); color: var(--warning); border-color: #fde68a; }
.tag-success { background: var(--success-soft); color: var(--success); border-color: #6ee7b7; }
.tag-info { background: var(--info-soft); color: var(--info); border-color: #a5f3fc; }

/* ===== 响应式 ===== */
@media(max-width:768px) {
  /* 移动端侧边栏 — 从左侧滑入覆盖，z-index 最高 */
  .sidebar {
    position: fixed !important; top: 0; left: 0; height: 100vh;
    z-index: 1999 !important; transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1); width: 280px !important;
    box-shadow: 6px 0 32px rgba(0,0,0,0.35);
    will-change: transform;
  }
  .sidebar.open { transform: translateX(0) !important; }
  .sidebar.collapsed { width: 280px !important; transform: translateX(-100%); }
  .sidebar.collapsed.open { transform: translateX(0) !important; }

  /* 汉堡按钮始终在最顶层可点击 */
  .sidebar-toggle {
    font-size: 22px; padding: 10px; color: var(--text-primary);
    position: relative; z-index: 50;
    -webkit-tap-highlight-color: rgba(0,0,0,0.08);
    touch-action: manipulation;
  }
  .topbar { padding: 0 12px; position: relative; z-index: 20; }
  .topbar-left { gap: 10px; }

  /* 移动端内容区宽度占满，sidebar 浮层不占空间 */
  .main-content { margin-left: 0 !important; flex: 1; }
  .page-content { padding: 16px; }
  
  .chart-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .check-page-layout { grid-template-columns: 1fr; }
  .result-cards-grid { grid-template-columns: 1fr; }
  .modal-box.modal-wide { width: 95vw; margin: 0 8px; }
  .detail-info-grid { grid-template-columns: 1fr; }
  .batch-summary { flex-wrap: wrap; gap: 8px; }
  .batch-summary-item { min-width: calc(50% - 8px); }
  .compliance-alert { flex-direction: column; padding: 12px 14px; }
  .image-fullscreen img { max-width: 98vw; max-height: 90vh; }
  .image-fullscreen-close { top: 12px; right: 12px; width: 36px; height: 36px; font-size: 20px; }
  /* 登录页响应式 */
  .login-left { display: none; }
  .login-right { width: 100%; padding: 24px; }
  .login-card { max-width: 100%; padding: 32px 24px; }
}

@media(max-width:480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .result-card-score { font-size: 26px; }
  .result-card-header { flex-direction: column; align-items: flex-start; gap: 6px; }
  .batch-summary-item { min-width: 100%; }
}

/* ===== 医生手写体库 ===== */
.doctor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.doctor-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s;
}

.doctor-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(26, 110, 255, 0.08);
}

.doctor-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border);
}

.doctor-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.doctor-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}

.doctor-dept {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.doctor-title-tag {
  margin-left: auto;
  font-size: 11px;
  background: rgba(74, 144, 226, 0.1);
  color: var(--accent);
  padding: 3px 8px;
  border-radius: 12px;
  white-space: nowrap;
}

.doctor-card-body {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.doctor-stat {
  text-align: center;
}

.doctor-stat-value {
  font-size: 24px;
  font-weight: 700;
}

.doctor-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

/* ===== 算力耗尽锁定遮罩 ===== */
.token-lock-overlay {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  animation: tokenLockFadeIn 0.4s ease;
}
.token-lock-overlay::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.15);
  pointer-events: none;
}
.token-lock-card {
  position: relative; z-index: 1001;
  background: #fff; border-radius: 20px; padding: 48px 40px;
  text-align: center; max-width: 420px; width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: tokenLockBounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.token-lock-icon { font-size: 64px; margin-bottom: 16px; }
.token-lock-title { font-size: 20px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.token-lock-desc { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; line-height: 1.6; }
.token-lock-balance { display: inline-block; background: #fef2f2; color: var(--danger); padding: 6px 16px; border-radius: 20px; font-size: 14px; font-weight: 600; margin-bottom: 20px; }
.token-lock-btn { display: inline-block; padding: 12px 36px; font-size: 16px; font-weight: 600; border-radius: 12px; cursor: pointer; transition: all 0.2s; border: none; color: #fff; background: linear-gradient(135deg, var(--accent), #1d4ed8); box-shadow: 0 4px 14px rgba(37,99,235,0.4); }
.token-lock-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(37,99,235,0.5); }

@keyframes tokenLockFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes tokenLockBounce { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: scale(1); } }

.doctor-card-actions {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  flex-wrap: wrap;
}

/* 手写体分析区域样式 */
.hw-zone-card {
  background: rgba(26, 110, 255, 0.04);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  transition: all 0.2s;
}

.hw-zone-card.other {
  background: rgba(100, 100, 100, 0.04);
  border-color: var(--border);
}

.hw-sig-match {
  padding: 10px;
  background: rgba(26, 110, 255, 0.03);
  border-radius: 8px;
  margin-top: 8px;
}

/* 响应式: 医生卡片 */
@media(max-width:768px) {
  .doctor-grid {
    grid-template-columns: 1fr;
  }
  
  .doctor-card-actions {
    justify-content: flex-start;
  }
  
  .doctor-card-actions .btn {
    flex: 1;
  }
}

/* ===== 任务面板（浮动） ===== */
.task-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 320px;
  max-height: 60vh;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08);
  z-index: 1000;
  overflow: hidden;
  transition: all 0.3s ease;
}

.task-panel.hidden {
  display: none;
}

.task-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  cursor: pointer;
  user-select: none;
}

.task-panel-title {
  font-weight: 600;
  font-size: 13px;
  flex: 1;
}

.task-panel-count {
  background: rgba(255,255,255,0.3);
  color: white;
  border-radius: 10px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

.task-panel-toggle {
  font-size: 10px;
  opacity: 0.7;
}

.task-panel:not(.expanded) .task-panel-body {
  display: none;
}

.task-panel.expanded .task-panel-body {
  display: block;
}

.task-panel-body {
  padding: 8px;
  max-height: calc(60vh - 42px);
  overflow-y: auto;
}

.task-panel-item {
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 6px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
}

.task-panel-item-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
}

.task-panel-item-stage {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── 任务面板小进度条（侧栏 task-panel 用） ── */
.task-panel-progress {
  height: 5px;
  background: rgba(0,0,0,0.06);
  border-radius: 5px;
  margin-top: 6px;
  overflow: hidden;
}
.task-panel-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  border-radius: 5px;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}
.progress-percent-text { display: none; }

/* 旧审查页面进度区域（保留兼容） */
#async-stage-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  transition: all 0.3s;
}
#async-file-count {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  transition: all 0.3s;
}

/* ── 提交中 loading 动画升级 ── */
.submit-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 20px;
}
.submit-loader .pulse-ring {
  margin-bottom: 0;
}
.submit-loader-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
  animation: textFadeIn 0.5s ease;
}
@keyframes textFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.task-panel-item-meta {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  display: flex;
  justify-content: space-between;
}

/* 任务通知浮窗 */
.task-notification {
  position: fixed;
  top: 80px;
  right: 20px;
  background: var(--bg-primary);
  border: 1px solid var(--success);
  border-left: 4px solid var(--success);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  z-index: 1001;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.3s ease;
  cursor: pointer;
  max-width: 380px;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* 任务状态颜色 */
.task-status-completed { border-left: 3px solid var(--success); }
.task-status-failed { border-left: 3px solid var(--danger); }
.task-status-processing { border-left: 3px solid var(--warning); }
.task-status-pending { border-left: 3px solid var(--accent); }
.task-status-cancelled { border-left: 3px solid var(--text-muted); }

.task-status-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}

/* 下拉搜索 */
.form-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.dropdown-item:hover {
  background: var(--bg-hover);
}
.dropdown-item.selected {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

/* 积分耗尽：侧边栏菜单禁用 */
.nav-item.disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: not-allowed;
}

/* 禁用按钮样式 */
.btn:disabled, .btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 日志行悬停 */
.log-row:hover {
  background: rgba(102, 126, 234, 0.04);
}

/* 响应式任务面板 */
@media(max-width:768px) {
  .task-panel {
    width: 100%;
    right: 0;
    bottom: 0;
    border-radius: 12px 12px 0 0;
    max-height: 50vh;
  }
  
  .task-notification {
    right: 10px;
    left: 10px;
    max-width: none;
  }
}

/* ===== 支付充值 ===== */
.package-card:hover {
  border-color: var(--accent) !important;
  box-shadow: 0 4px 20px rgba(37,99,235,0.1);
  transform: translateY(-2px);
}

.package-card.selected {
  border-color: var(--accent) !important;
  background: var(--accent-soft);
}

#qr-section {
  margin-bottom: 20px;
}

#qr-container img {
  image-rendering: auto;
}

/* 支付方式选中状态 */
.pay-option-selected {
  border-color: var(--accent) !important;
  background: var(--accent-soft);
}
