/* ===== 门诊部工作信息收集系统 - 样式 ===== */
:root {
  --primary: #2b7fff;
  --primary-dark: #1a66d9;
  --primary-light: #eef5ff;
  --success: #3dc77a;
  --warning: #f5a623;
  --danger: #ff5a5a;
  --info: #36cfc9;
  --purple: #9a6bff;
  --text: #1a1a2e;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --bg: #f8fafc;
  --bg-white: #ffffff;
  --sidebar-width: 240px;
  --header-height: 56px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
  --shadow-card: 0 4px 20px rgba(0,0,0,0.05);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ===== 布局 ===== */
.app-layout { display: flex; min-height: 100vh; }

/* ===== 侧边栏 ===== */
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  color: rgba(255,255,255,0.85);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 24px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-align: center;
}

.sidebar-header .logo {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.sidebar-header .logo .icon { font-size: 26px; }
.sidebar-header .logo img.logo-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: transparent;
}

.sidebar-header .subtitle {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  margin-top: 6px;
}

.nav-section { padding: 12px 0; }

.nav-section-title {
  padding: 8px 24px;
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  cursor: pointer;
  transition: var(--transition);
  border-left: 3px solid transparent;
  font-size: 14px;
  min-height: 46px;
}

.nav-item:hover { background: rgba(255,255,255,0.08); }

.nav-item.active {
  background: rgba(43, 127, 255, 0.9);
  color: #fff;
  border-left-color: #fff;
}

.nav-item .nav-icon { font-size: 18px; width: 22px; text-align: center; flex-shrink: 0; }

/* 可折叠导航 */
.nav-collapsible .nav-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 24px;
  cursor: pointer;
  transition: var(--transition);
}
.nav-collapsible .nav-section-toggle:hover { background: rgba(255,255,255,0.05); }
.nav-collapsible .nav-arrow {
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  transition: transform 0.2s;
  display: inline-block;
}
.nav-collapsible .nav-arrow.expanded { transform: rotate(0deg); }
.nav-collapsible .nav-arrow:not(.expanded) { transform: rotate(-90deg); }
.nav-children { overflow: hidden; }
.nav-child { padding-left: 36px; font-size: 13px; min-height: 42px; }

/* 侧边栏遮罩（移动端） */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 99;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ===== 主内容区 ===== */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

/* ===== 顶部栏 ===== */
.topbar {
  height: var(--header-height);
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  gap: 16px;
}

.topbar-left { display: flex; align-items: center; gap: 12px; flex-shrink: 0; min-width: 0; }
.topbar-title { font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; }

/* 同步状态 */
.sync-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 20px;
  background: var(--bg);
  white-space: nowrap;
}

.sync-status .sync-dot { font-size: 14px; }
.sync-status .sync-text { font-size: 12px; color: var(--text-secondary); }

/* ===== 选择器 ===== */
.select-group {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  padding: 6px 12px;
  border-radius: 24px;
}

.select-group label { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }

.select-group select {
  border: none;
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 13px;
  background: transparent;
  cursor: pointer;
  outline: none;
  min-height: 28px;
  font-weight: 600;
  color: var(--text);
}

.select-group select:focus { color: var(--primary); }

/* ===== 内容区 ===== */
.content-area { padding: 24px; flex: 1; }

/* ===== 卡片 ===== */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.card-header .card-title { margin-right: auto; }
.card-header .btn + .btn { margin-left: 4px; }

.card-title { font-size: 16px; font-weight: 700; }
.card-body { padding: 22px; }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border: none;
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  min-height: 40px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); color: var(--primary); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(43, 127, 255, 0.3);
}

.btn-primary:hover { background: linear-gradient(135deg, var(--primary-dark) 0%, #1557b0 100%); color: #fff; }

.btn-success { background: linear-gradient(135deg, var(--success) 0%, #2da562 100%); color: #fff; box-shadow: 0 4px 14px rgba(61, 199, 122, 0.25); }
.btn-success:hover { color: #fff; }

.btn-danger { background: #fff0f0; color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }

.btn-sm { padding: 8px 14px; font-size: 12px; min-height: 34px; }

.btn-group { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== 表单 ===== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.form-item { display: flex; flex-direction: column; gap: 6px; }
.form-item.full { grid-column: 1 / -1; }

.form-item label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
}

.form-item label .required { color: var(--danger); }

.form-item input,
.form-item select,
.form-item textarea {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 14px;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
  min-height: 44px;
  width: 100%;
  background: var(--bg-white);
}

.form-item input:focus,
.form-item select:focus,
.form-item textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.form-item textarea { resize: vertical; min-height: 90px; }

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}

/* ===== 表格 ===== */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 600px;
}

table.data-table th {
  background: #fafafa;
  border-bottom: 2px solid var(--border-light);
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

table.data-table td {
  border-bottom: 1px solid var(--border-light);
  padding: 10px 14px;
}

table.data-table tr:hover td { background: var(--primary-light); }

table.data-table .action-btn {
  padding: 5px 12px;
  font-size: 12px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: #fff;
  margin-right: 4px;
  transition: var(--transition);
  min-height: 30px;
  display: inline-flex;
  align-items: center;
}

table.data-table .action-btn.edit:hover { border-color: var(--primary); color: var(--primary); }
table.data-table .action-btn.delete:hover { border-color: var(--danger); color: var(--danger); }

/* ===== 状态标签 ===== */
.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.tag-present { background: #dcfce7; color: #16a34a; }
.tag-rest { background: #f3f4f6; color: #6b7280; }
.tag-half { background: #fef3c7; color: #d97706; }
.tag-leave { background: #dbeafe; color: #2563eb; }
.tag-absent { background: #fee2e2; color: #dc2626; }
.tag-late { background: #ffedd5; color: #ea580c; }
.tag-early { background: #fce7f3; color: #db2777; }
.tag-holiday { background: #f3e8ff; color: #9333ea; }

/* ===== 仪表盘 ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}

.stat-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.stat-info .stat-value { font-size: 24px; font-weight: 800; }
.stat-info .stat-label { font-size: 13px; color: var(--text-tertiary); }

/* ===== 我的班次提醒卡片 ===== */
.my-shift-card {
  background: linear-gradient(135deg, #faf5ff 0%, #f5f3ff 50%, #fdf4ff 100%);
  border: 1px solid #e9d5ff;
  margin-bottom: 24px;
}
.my-shift-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.shift-today-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ede9fe 0%, #fae8ff 100%);
  color: #6b21a8;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid #d8b4fe;
}
.shift-today-badge.shift-empty {
  background: #f3f4f6;
  color: #6b7280;
  border-color: #e5e7eb;
}
.shift-week-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}
.shift-day {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 14px;
  padding: 14px 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border: 1px solid #f3e8ff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  min-height: 90px;
}
.shift-day:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.12);
}
.shift-today {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-color: #fbbf24;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.25);
}
.shift-today:hover {
  box-shadow: 0 6px 18px rgba(251, 191, 36, 0.35);
}
.shift-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.shift-weekday {
  font-size: 12px;
  color: #7c3aed;
  font-weight: 600;
}
.shift-num {
  font-size: 11px;
  color: #a78bfa;
  font-weight: 500;
}
.shift-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  min-width: 36px;
  min-height: 32px;
  text-align: center;
  letter-spacing: 0.5px;
  line-height: 1;
}
.shift-pill-code {
  font-size: 13px;
  font-weight: 700;
}
.shift-pill-time {
  font-size: 10px;
  font-weight: 500;
  opacity: 0.85;
  margin-top: 1px;
}
.shift-pill-single {
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.shift-day .shift-pill { color: var(--bg-white); }
.shift-day[style*="cursor"] .shift-pill,
.shift-pill.shift-day { background: #dbeafe; color: #2563eb; }
.shift-pill.shift-rest { background: #fef3c7; color: #b45309; }
.shift-pill.shift-leave { background: #fed7aa; color: #c2410c; }
.shift-pill.shift-train { background: #fde68a; color: #a16207; }
.shift-pill.shift-out { background: #d9f99d; color: #4d7c0f; }
.shift-day .shift-pill:not(.shift-rest):not(.shift-leave):not(.shift-train):not(.shift-out) {
  background: #dbeafe;
  color: #1d4ed8;
}
.shift-cell-note {
  font-size: 11px;
  color: #6b7280;
  background: #f9fafb;
  padding: 2px 6px;
  border-radius: 6px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== 模块卡片网格 ===== */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.module-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border-light);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.module-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.module-card .module-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin: 0 auto 14px;
}

.module-card .module-title { font-size: 18px; font-weight: 700; margin-bottom: 6px; text-align: center; }
.module-card .module-desc { font-size: 13px; color: var(--text-tertiary); line-height: 1.5; text-align: center; }
.module-card .module-status {
  margin-top: 16px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.status-badge {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 600;
}

.status-badge.filled { background: #dcfce7; color: #16a34a; }
.status-badge.empty { background: #fee2e2; color: #dc2626; }

/* ===== 手机端欢迎头部 ===== */
.mobile-welcome {
  display: none;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: var(--radius-xl);
  padding: 24px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
}

.mobile-welcome .welcome-subtitle {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.mobile-welcome .welcome-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 8px;
}

.mobile-welcome .welcome-title .accent {
  color: var(--primary);
}

.mobile-welcome .welcome-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.mobile-section-title {
  display: none;
  font-size: 18px;
  font-weight: 700;
  margin: 24px 0 14px 4px;
  color: var(--text);
}

/* ===== 考勤日历 ===== */
.attendance-calendar {
  display: grid;
  grid-template-columns: 80px repeat(7, 1fr);
  gap: 2px;
  font-size: 12px;
}

.calendar-header {
  background: #fafafa;
  padding: 6px 4px;
  text-align: center;
  font-weight: 600;
  border-radius: 4px;
}

.calendar-cell {
  padding: 6px 4px;
  text-align: center;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-cell:hover { border-color: var(--primary); }
.calendar-cell.selected { border-color: var(--primary); background: var(--primary-light); }

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

.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state .empty-text { font-size: 14px; }

/* ===== Toast 提示 ===== */
.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  min-width: 200px;
  animation: slideIn 0.3s ease;
  border-left: 4px solid var(--primary);
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }

@keyframes slideIn {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ===== 模态框 ===== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  background: #fff;
  border-radius: var(--radius-xl);
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-header h3 { font-size: 17px; font-weight: 700; }

.modal-close {
  cursor: pointer;
  font-size: 22px;
  color: var(--text-tertiary);
  border: none;
  background: none;
  padding: 4px 8px;
  min-width: 36px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition: var(--transition);
}

.modal-close:hover { background: var(--bg); color: var(--text); }

.modal-body { padding: 24px; }

/* ===== 移动端菜单按钮 ===== */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  background: var(--bg);
  font-size: 20px;
  flex-shrink: 0;
  transition: var(--transition);
}

.mobile-menu-btn:hover { background: var(--border-light); }

/* ===== 排班申请日历 ===== */
.schedule-calendar { margin-top: 8px; }

.schedule-week-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}

.schedule-week-header {
  text-align: center;
  padding: 8px 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  border-radius: 8px;
  background: var(--bg);
}

.schedule-week-header.weekend { color: var(--danger); }

.schedule-day-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.schedule-cell {
  min-height: 100px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 6px;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-white);
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}

.schedule-cell:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(43,127,255,0.1); }

.schedule-cell.empty { border: 1px dashed var(--border-light); background: transparent; cursor: default; min-height: 100px; }
.schedule-cell.empty:hover { box-shadow: none; border-color: var(--border-light); }

.schedule-cell.weekend { background: #fff8f8; }
.schedule-cell.today { border: 2px solid var(--primary); background: var(--primary-light); }

.schedule-day-num {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 2px;
}

.schedule-cell.today .schedule-day-num { color: var(--primary); }

.schedule-applicants {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.schedule-person {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.schedule-person:hover { transform: scale(1.02); }

.schedule-person .person-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.schedule-person .person-time {
  font-size: 10px;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.schedule-person .person-del {
  border: none;
  background: rgba(255,255,255,0.7);
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 14px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  transition: var(--transition);
}

.schedule-person .person-del:hover { background: var(--danger); color: #fff; }

/* ===== 进度条 ===== */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, #60a5fa 100%);
  transition: width 0.3s ease;
}

/* ===== 搜索框 ===== */
.search-box {
  position: relative;
  margin-bottom: 16px;
}

.search-box input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 14px;
  outline: none;
  min-height: 44px;
  background: var(--bg-white);
}

.search-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }

.search-box .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  font-size: 16px;
}

/* ===== 提示信息 ===== */
.info-banner {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--primary-dark);
}

/* ===== 分隔线 ===== */
.divider {
  height: 1px;
  background: var(--border-light);
  margin: 16px 0;
}

/* ===== 颜色辅助类 ===== */
.bg-blue { background: #dbeafe; color: #2563eb; }
.bg-green { background: #dcfce7; color: #16a34a; }
.bg-orange { background: #ffedd5; color: #ea580c; }
.bg-purple { background: #f3e8ff; color: #9333ea; }
.bg-cyan { background: #ccfbf1; color: #0d9488; }
.bg-red { background: #fee2e2; color: #dc2626; }
.bg-magenta { background: #fce7f3; color: #db2777; }
.bg-geekblue { background: #e0e7ff; color: #4f46e5; }
.bg-volcano { background: #ffedd5; color: #c2410c; }
.bg-gold { background: #fef3c7; color: #d97706; }
.bg-lime { background: #ecfccb; color: #65a30d; }

/* 手机端特殊彩色卡片 */
.card-pastel-blue { background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%); border: 1px solid #bfdbfe; }
.card-pastel-green { background: linear-gradient(135deg, #dcfce7 0%, #f0fdf4 100%); border: 1px solid #bbf7d0; }
.card-pastel-orange { background: linear-gradient(135deg, #ffedd5 0%, #fff7ed 100%); border: 1px solid #fed7aa; }
.card-pastel-purple { background: linear-gradient(135deg, #f3e8ff 0%, #faf5ff 100%); border: 1px solid #e9d5ff; }
.card-pastel-pink { background: linear-gradient(135deg, #fce7f3 0%, #fdf2f8 100%); border: 1px solid #fbcfe8; }
.card-pastel-cyan { background: linear-gradient(135deg, #ccfbf1 0%, #f0fdfa 100%); border: 1px solid #99f6e4; }
.card-pastel-yellow { background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%); border: 1px solid #fde68a; }

/* ===== 响应式：平板 (768px - 1024px) ===== */
@media (max-width: 1024px) {
  :root { --sidebar-width: 220px; }
  .content-area { padding: 20px; }
  .stats-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .module-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}

/* ===== 响应式：手机 (< 768px) ===== */
@media (max-width: 768px) {
  :root { --header-height: 56px; }

  /* 侧边栏改为抽屉模式 */
  .sidebar {
    transform: translateX(-100%);
    box-shadow: 2px 0 24px rgba(0,0,0,0.2);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar.open + .sidebar-overlay { display: block; }

  .main-content { margin-left: 0; }

  /* 顶部栏：更轻盈 */
  .topbar {
    height: var(--header-height);
    padding: 0 16px;
    background: var(--bg);
    border-bottom: none;
    box-shadow: none;
    gap: 10px;
  }

  .topbar-left { gap: 10px; }
  .topbar-right { gap: 8px; }
  .topbar-title { font-size: 16px; }

  .mobile-menu-btn { display: flex; }

  /* 同步状态 */
  .sync-status { padding: 6px; background: var(--bg-white); border-radius: 12px; }
  .sync-status .sync-text { display: none; }
  .sync-status .sync-dot { font-size: 18px; }

  /* 选择器 */
  .select-group { padding: 4px 10px; background: var(--bg-white); border-radius: 20px; }
  .select-group label { display: none; }
  .select-group select { font-size: 13px; font-weight: 600; }

  /* 内容区 */
  .content-area { padding: 12px; }

  /* 手机端欢迎头部 */
  .mobile-welcome { display: block; }
  .mobile-section-title { display: block; }

  /* 卡片 */
  .card {
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    margin-bottom: 16px;
  }
  .card-header { padding: 16px 18px; }
  .card-header .btn-sm { font-size: 11px; padding: 5px 10px; }
  .card-body { padding: 18px; }

  .desktop-only { display: none !important; }
  .mobile-modules-card { border: none; background: transparent; box-shadow: none; }
  .mobile-modules-card .card-body { padding: 0; }

  /* 表单：单列 */
  .form-grid { grid-template-columns: 1fr; gap: 14px; }

  .form-item input,
  .form-item select,
  .form-item textarea {
    padding: 14px 16px;
    font-size: 16px; /* 防止 iOS 缩放 */
    min-height: 48px;
    border-radius: 16px;
  }

  /* 表单按钮全宽 */
  .form-actions { flex-direction: column; gap: 10px; }
  .form-actions .btn { width: 100%; justify-content: center; min-height: 48px; border-radius: 14px; }

  /* 仪表盘统计卡片 - 隐藏原来的，用欢迎头部替代 */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 0; }
  .stat-card { padding: 16px; border-radius: var(--radius-xl); gap: 12px; }

  /* 班次提醒卡片 - 手机版 */
  .my-shift-card { border-radius: var(--radius-xl); margin-bottom: 16px; }
  .my-shift-card .card-header { padding: 14px 16px; }
  .my-shift-card .card-title { font-size: 15px; }
  .shift-today-badge { font-size: 11px; padding: 4px 10px; }
  .shift-week-row { grid-template-columns: repeat(7, 1fr); gap: 5px; }
  .shift-day { padding: 8px 4px 8px; min-height: 76px; border-radius: 10px; gap: 5px; }
  .shift-weekday { font-size: 10px; }
  .shift-num { font-size: 9px; }
  .shift-pill { font-size: 11px; padding: 4px 6px; min-width: 28px; min-height: 26px; border-radius: 7px; line-height: 1; }
  .shift-pill-code { font-size: 11px; line-height: 1; }
  .shift-pill-time { font-size: 8px; line-height: 1; margin-top: 1px; }
  .shift-pill-single { font-size: 12px; line-height: 1; }
  .shift-cell-note { font-size: 9px; padding: 1px 4px; }
  .stat-icon { width: 42px; height: 42px; border-radius: 14px; font-size: 20px; }
  .stat-info .stat-value { font-size: 20px; }
  .stat-info .stat-label { font-size: 11px; }

  /* 模块卡片 - 两列彩色 */
  .module-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .module-card {
    padding: 16px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    border: none;
    min-height: 130px;
    display: flex;
    flex-direction: column;
  }
  .module-card:hover { transform: translateY(-2px); }
  .module-card .module-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 26px;
    margin: 0 auto 10px;
  }
  .module-card .module-title { font-size: 15px; font-weight: 700; line-height: 1.3; text-align: center; }
  .module-card .module-desc {
    display: none;
  }
  .module-card .module-status {
    margin-top: auto;
    padding-top: 8px;
  }
  .status-badge { padding: 3px 8px; font-size: 10px; }

  /* 模态框：底部半屏更现代 */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .modal {
    max-width: 100%;
    width: 100%;
    max-height: 92vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    min-height: auto;
  }
  .modal-header { padding: 18px 20px; border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
  .modal-body { padding: 20px; }

  /* 表格：更紧凑 */
  table.data-table { font-size: 12px; min-width: 500px; }
  table.data-table th { padding: 10px 12px; }
  table.data-table td { padding: 8px 12px; }

  /* 按钮 */
  .btn { min-height: 44px; padding: 12px 18px; border-radius: 14px; }
  .btn-sm { min-height: 38px; padding: 10px 14px; border-radius: 12px; }

  /* Toast 提示 */
  .toast-container { top: auto; bottom: 20px; right: 12px; left: 12px; }
  .toast { min-width: auto; border-radius: var(--radius-xl); }

  /* 考勤日历 */
  .attendance-calendar { grid-template-columns: 50px repeat(7, 1fr); font-size: 11px; }
  .calendar-cell { padding: 4px 2px; min-height: 32px; font-size: 11px; }
  .calendar-header { padding: 4px 2px; font-size: 10px; }

  /* 搜索框 */
  .search-box input { padding: 14px 14px 14px 40px; min-height: 48px; border-radius: 16px; }

  /* 导航项 */
  .nav-item { padding: 14px 20px; font-size: 15px; min-height: 48px; }
  .nav-item .nav-icon { font-size: 18px; }

  /* 进度条卡片 */
  .progress-bar { height: 10px; border-radius: 5px; }

  /* 排班日历 - 手机端 */
  .schedule-cell { min-height: 70px; padding: 4px; border-radius: 8px; }
  .schedule-cell.empty { min-height: 70px; }
  .schedule-week-header { padding: 6px 2px; font-size: 11px; }
  .schedule-day-num { font-size: 12px; }
  .schedule-person { padding: 2px 4px; font-size: 10px; border-radius: 6px; }
  .schedule-person .person-name { font-size: 10px; }
  .schedule-person .person-time { display: none; }
  .schedule-person .person-del { font-size: 12px; width: 16px; height: 16px; }
  .schedule-day-grid { gap: 2px; }
}

/* ===== 响应式：小手机 (< 375px) ===== */
@media (max-width: 375px) {
  .stats-grid { grid-template-columns: 1fr; }
  .topbar-title { font-size: 15px; }
  .mobile-welcome .welcome-title { font-size: 22px; }
  .module-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .module-card { padding: 14px; min-height: 120px; }
  .module-card .module-icon { width: 42px; height: 42px; font-size: 23px; }
  .module-card .module-title { font-size: 14px; }

  /* 排班日历 - 小手机 */
  .schedule-cell { min-height: 56px; padding: 3px; }
  .schedule-cell.empty { min-height: 56px; }
  .schedule-day-num { font-size: 11px; }
  .schedule-person { padding: 1px 3px; font-size: 9px; }
}

/* ===== 大屏优化 (> 1400px) ===== */
@media (min-width: 1400px) {
  :root { --sidebar-width: 260px; }
  .content-area { padding: 28px; max-width: 1600px; }
  .form-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  .stats-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}

/* ===== 登录页面 ===== */
.login-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
  z-index: 9999;
  overflow-y: auto;
}

.login-card {
  background: #fff;
  border-radius: 20px;
  padding: 40px 32px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  text-align: center;
  animation: loginFadeIn 0.4s ease;
}

@keyframes loginFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-logo {
  font-size: 56px;
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.login-logo img.login-logo-img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: transparent;
  box-shadow: 0 4px 16px rgba(43,127,255,0.15);
}

.login-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.login-error {
  background: #fff2f0;
  border: 1px solid #ffccc7;
  color: #ff5a5a;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

.login-form {
  text-align: left;
}

.login-field {
  margin-bottom: 16px;
}

.login-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.login-field input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  transition: var(--transition);
  outline: none;
}

.login-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(43,127,255,0.1);
}

.login-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 4px;
}

.login-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(43,127,255,0.3);
}

.login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.login-hint {
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-tertiary);
  padding: 8px;
  background: var(--bg);
  border-radius: 8px;
}

/* ===== 侧边栏用户信息 ===== */
.sidebar-user {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 8px;
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-user-name {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.sidebar-user-role {
  font-size: 12px;
  display: flex;
  align-items: center;
}

/* ===== 采血室工作量模块 ===== */
.blood-summary-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.blood-summary-item {
  flex: 1;
  min-width: 180px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.blood-summary-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.blood-summary-icon {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.blood-summary-info {
  flex: 1;
}

.blood-summary-value {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
}

.blood-summary-label {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.blood-table .blood-input {
  width: 90px;
  padding: 6px 10px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
  transition: var(--transition);
  background: var(--bg-white);
}

.blood-table .blood-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(43, 127, 255, 0.12);
}

.blood-table .blood-input:hover {
  border-color: var(--primary);
}

.blood-update-time {
  font-size: 12px;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.blood-save-hint {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--success);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(61, 199, 122, 0.35);
  z-index: 999;
  transition: opacity 0.3s ease;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .blood-summary-bar {
    flex-direction: column;
    gap: 12px;
  }
  .blood-summary-item {
    min-width: 100%;
    padding: 16px;
  }
  .blood-summary-value {
    font-size: 24px;
  }
  .blood-table .blood-input {
    width: 70px;
    padding: 4px 6px;
    font-size: 13px;
  }
}

/* ===== 门诊工作量模块 ===== */
.op-summary-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.op-summary-item {
  flex: 1;
  min-width: 160px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.op-summary-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.op-summary-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.op-summary-info {
  flex: 1;
}

.op-summary-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.op-summary-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* 普通员工个人合计卡片 */
.op-personal-card {
  background: linear-gradient(135deg, #e6f7ff 0%, #f6ffed 100%);
  border: 1px solid #91d5ff;
  border-radius: var(--radius);
  padding: 16px 24px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.op-personal-label {
  font-size: 15px;
  font-weight: 600;
  color: #1890ff;
  white-space: nowrap;
}

.op-personal-values {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.op-personal-item {
  font-size: 14px;
  color: var(--text-primary);
}

.op-personal-item strong {
  font-size: 18px;
  color: #1890ff;
  margin-left: 4px;
}

.op-personal-divider {
  color: #d9d9d9;
  font-size: 14px;
}

/* 管理员筛选器 */
.op-filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.op-filter-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.op-filter-select {
  flex: 1;
  max-width: 300px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  background: var(--bg-white);
  color: var(--text-primary);
  cursor: pointer;
}

.op-info-text {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border-radius: 6px;
}

/* 员工分区 */
.op-emp-section {
  margin-bottom: 24px;
}

.op-emp-header {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.op-emp-total {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
}

/* 门诊输入框 */
.op-input {
  width: 70px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
  text-align: center;
  background: var(--bg-white);
  color: var(--text-primary);
  transition: var(--transition);
}

.op-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
  outline: none;
}

.op-input-shift {
  width: 70px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  text-align: center;
  background: var(--bg-white);
  color: var(--text-primary);
  transition: var(--transition);
}

.op-input-shift:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
  outline: none;
}

/* 汇总表格 */
.op-summary-table th,
.op-summary-table td {
  text-align: center;
}

.op-summary-table th:first-child,
.op-summary-table td:first-child {
  text-align: left;
}

/* 班次汇总样式 */
.op-shift-stats-section {
  margin-bottom: 20px;
}
/* ===== 班次明细矩阵表（v12重制） ===== */
.op-shift-matrix-section {
  margin-top: 16px;
}
.op-shift-matrix-wrapper {
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  max-height: 70vh;
}
.op-shift-matrix-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  table-layout: auto;
}
.op-shift-matrix-table th,
.op-shift-matrix-table td {
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 6px 8px;
  text-align: center;
  white-space: nowrap;
  min-width: 44px;
  height: 32px;
}
.op-shift-matrix-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
  font-size: 11px;
  line-height: 1.2;
  position: sticky;
  z-index: 2;
}
.op-shift-header-row1 th {
  top: 0;
  border-bottom: 1px solid #cbd5e1;
}
.op-shift-header-row2 th {
  top: 32px;
  font-size: 10px;
  color: #94a3b8;
  font-weight: 500;
  border-bottom: 2px solid #cbd5e1;
}
.op-shift-name-header {
  position: sticky;
  left: 0;
  z-index: 4 !important;
  background: #f8fafc !important;
  border-right: 2px solid #cbd5e1 !important;
  min-width: 88px !important;
  text-align: center !important;
  vertical-align: middle !important;
  font-size: 12px !important;
  color: #1e293b !important;
}
.op-shift-total-header {
  position: sticky;
  right: 0;
  z-index: 4 !important;
  background: #f8fafc !important;
  border-left: 2px solid #cbd5e1 !important;
  font-size: 12px !important;
  color: #2b7fff !important;
  vertical-align: middle !important;
}
.op-weekend-header {
  background: #fef2f2 !important;
  color: #e11d48 !important;
}
.op-weekend-cell {
  background: #fef2f2;
}
.op-shift-cell {
  transition: background 0.15s;
}
.op-shift-cell:hover {
  background: #dbeafe !important;
  cursor: default;
}
.op-shift-matrix-table tbody td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  font-weight: 600;
  color: #1e293b;
  border-right: 2px solid #e5e7eb;
  text-align: left;
  padding-left: 12px;
}
.op-shift-matrix-table tbody tr:hover td:first-child {
  background: #f1f5f9;
}
.op-shift-matrix-table tbody td:last-child {
  position: sticky;
  right: 0;
  z-index: 1;
  background: #fff;
  border-left: 2px solid #e5e7eb;
  color: #2b7fff;
  font-weight: 700;
}
.op-shift-matrix-table tbody tr:hover td:last-child {
  background: #f1f5f9;
}


.op-shift-matrix-section {
  margin-top: 20px;
}

.op-shift-stats-title {
  font-size: 15px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 10px;
  padding-left: 8px;
  border-left: 3px solid #6366f1;
}

.op-shift-stats-table th,
.op-shift-stats-table td {
  text-align: center;
  padding: 6px 10px;
  font-size: 13px;
}

.op-shift-stats-table th {
  background: #f1f5f9;
}

/* 班次矩阵表 */
.op-shift-matrix-wrapper {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.op-shift-matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.op-shift-matrix-table th,
.op-shift-matrix-table td {
  border: 1px solid #e2e8f0;
  padding: 4px 6px;
  text-align: center;
  white-space: nowrap;
  min-width: 42px;
}

.op-shift-matrix-table thead th {
  background: #f8fafc;
  font-weight: 600;
  font-size: 11px;
  color: #475569;
  position: sticky;
  top: 0;
  z-index: 2;
}

.op-shift-matrix-table thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
}

.op-shift-matrix-table tbody tr:hover {
  background: #f8fafc;
}

.op-shift-matrix-table tbody td:first-child {
  background: #fff;
}

.op-shift-matrix-table tbody tr:hover td:first-child {
  background: #f8fafc;
}

.op-weekend-header {
  color: #dc2626 !important;
}

.op-shift-day-header {
  min-width: 42px;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .op-summary-bar {
    flex-direction: column;
    gap: 12px;
  }
  .op-summary-item {
    min-width: 100%;
    padding: 16px;
  }
  .op-summary-value {
    font-size: 24px;
  }
  .op-personal-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .op-input,
  .op-input-shift {
    width: 55px;
    padding: 4px 4px;
    font-size: 13px;
  }
  .op-filter-select {
    max-width: 100%;
  }
}

/* ===== 导出下拉菜单 ===== */
.op-export-dropdown {
  position: relative;
  display: inline-flex;
  gap: 0;
}
.op-export-dropdown .btn:first-child {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: 1px solid rgba(255,255,255,0.3);
}
.op-export-caret {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  padding: 4px 8px;
  min-width: 28px;
  font-size: 12px;
}
.op-export-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  min-width: 180px;
  z-index: 100;
  overflow: hidden;
}
.op-export-menu.show {
  display: block;
  animation: opMenuFade 0.15s ease;
}
@keyframes opMenuFade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.op-export-menu-item {
  display: block;
  padding: 10px 14px;
  font-size: 13px;
  color: #1e293b;
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
  border-bottom: 1px solid #f1f5f9;
}
.op-export-menu-item:last-child {
  border-bottom: none;
}
.op-export-menu-item:hover {
  background: #f1f5f9;
  color: #2b7fff;
}

/* ===== 科室排班管理模块 ===== */
.dr-header-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* 周选择器 */
.dr-week-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 10px;
}
.dr-week-btn {
  padding: 8px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.dr-week-btn:hover {
  background: #2b7fff;
  color: #fff;
  border-color: #2b7fff;
}
.dr-week-range {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  min-width: 200px;
  text-align: center;
}
.dr-today-btn {
  padding: 6px 14px;
  border: 1px solid #22c55e;
  border-radius: 8px;
  background: #f0fdf4;
  color: #16a34a;
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
}
.dr-today-btn:hover {
  background: #22c55e;
  color: #fff;
}

/* 提醒栏 */
.dr-notice-bar {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #92400e;
  line-height: 1.5;
}
.dr-notice-icon {
  flex-shrink: 0;
  font-size: 16px;
}
.dr-notice-text {
  flex: 1;
}
.dr-notice-edit {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #d97706;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
}
.dr-notice-edit:hover {
  color: #b45309;
}

/* 排班表格 */
.dr-table-wrapper {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 20px;
}
.dr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 800px;
}
.dr-table th,
.dr-table td {
  border: 1px solid #e2e8f0;
  padding: 8px 6px;
  text-align: center;
  white-space: nowrap;
  min-width: 70px;
  height: 38px;
}
.dr-table thead th {
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
  font-size: 12px;
  position: sticky;
  top: 0;
  z-index: 2;
}
.dr-table thead .dr-weekday {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 400;
}
.dr-table thead .dr-weekend {
  background: #fef2f2;
  color: #e11d48;
}
.dr-table thead .dr-today {
  background: #dbeafe;
  color: #2563eb;
}
.dr-name-col {
  min-width: 80px;
  position: sticky;
  left: 0;
  z-index: 3;
  background: #f8fafc;
}
.dr-remark-col {
  min-width: 100px;
}
.dr-name-cell {
  font-weight: 600;
  color: #1e293b;
  text-align: left;
  padding-left: 12px;
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
}
.dr-table tbody tr:hover .dr-name-cell {
  background: #f1f5f9;
}
.dr-remark-cell {
  font-size: 12px;
  color: #64748b;
  text-align: left;
  padding: 4px 8px;
}
.dr-cell {
  cursor: pointer;
  transition: opacity 0.15s;
  font-weight: 500;
}
.dr-cell:hover {
  opacity: 0.8;
  outline: 2px solid #2b7fff;
  outline-offset: -2px;
}
.dr-cell.dr-empty {
  color: #cbd5e1;
  font-weight: 400;
}
.dr-cell.dr-weekend {
  background: #fef9f9;
}
.dr-cell.dr-weekend:hover {
  background: #fee2e2;
}

/* 班次代码字典 */
.dr-code-dict-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
}
.dr-code-dict-title {
  font-size: 15px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 12px;
  padding-left: 8px;
  border-left: 3px solid #6366f1;
}
.dr-code-dict-grid {
  margin-bottom: 12px;
}
.dr-code-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.dr-code-table th,
.dr-code-table td {
  border: 1px solid #e2e8f0;
  padding: 4px 8px;
  text-align: center;
}
.dr-code-table th {
  background: #f1f5f9;
  font-weight: 600;
  color: #475569;
}
.dr-code-table .dr-code-cell {
  font-weight: 700;
  color: #2b7fff;
}
.dr-code-dict-extra {
  font-size: 12px;
  color: #64748b;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}
.dr-code-dict-extra p {
  margin: 2px 0;
}

/* 编辑弹窗 */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-card {
  background: #fff;
  border-radius: 12px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
}
.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}
.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  color: #9ca3af;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  line-height: 30px;
}
.modal-close:hover {
  color: #1e293b;
}
.modal-body {
  padding: 20px;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid #e5e7eb;
}
.dr-edit-info {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: #f1f5f9;
  border-radius: 8px;
}
.dr-edit-name {
  font-weight: 700;
  color: #1e293b;
  font-size: 15px;
}
.dr-edit-date {
  color: #64748b;
  font-size: 13px;
}
.dr-edit-field {
  margin-bottom: 14px;
}
.dr-edit-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}
.dr-edit-input,
.dr-edit-select {
  width: 100%;
  padding: 8px 12px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.dr-edit-input:focus,
.dr-edit-select:focus {
  border-color: #2b7fff;
}
.dr-edit-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  resize: vertical;
  font-family: inherit;
}
.dr-edit-textarea:focus {
  border-color: #2b7fff;
}

/* 批量排班弹窗 */
.dr-batch-modal {
  max-width: 640px;
}
.dr-batch-section {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}
.dr-batch-section:last-child {
  border-bottom: none;
}
.dr-batch-label {
  display: block;
  font-weight: 600;
  color: #374151;
  font-size: 13px;
  margin-bottom: 8px;
}
.dr-batch-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 8px;
  background: #f9fafb;
  border-radius: 8px;
}
.dr-batch-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  white-space: nowrap;
}
.dr-batch-check input {
  cursor: pointer;
}
.btn-link {
  background: none;
  border: none;
  color: #2b7fff;
  cursor: pointer;
  font-size: 12px;
  padding: 2px 6px;
}
.btn-link:hover {
  text-decoration: underline;
}
.btn-xs {
  padding: 2px 8px;
  font-size: 11px;
}

/* 按钮 */
.btn-warning {
  background: #f59e0b;
  color: #fff;
  border: none;
}
.btn-warning:hover {
  background: #d97706;
}



/* ===== 今日排班详情页面 ===== */
.today-detail-overlay {
  z-index: 10000;
}

.today-detail-modal {
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.today-detail-modal .modal-body {
  overflow-y: auto;
  flex: 1;
}

.today-detail-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.today-detail-search {
  flex: 1;
  min-width: 200px;
  padding: 8px 12px;
  border: 1px solid var(--border-color, #ddd);
  border-radius: 6px;
  font-size: 14px;
  background: var(--input-bg, #fff);
  color: var(--text-primary, #333);
}

.today-detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.today-detail-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: var(--bg-secondary, #f5f7fa);
  border-radius: 6px;
  font-size: 13px;
}

.today-stat-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary, #666);
}

.today-stat-working {
  color: #1890ff;
  font-weight: 600;
}

.today-stat-rest {
  color: #fa8c16;
  font-weight: 600;
}

.today-detail-table-wrapper {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border-color, #eee);
}

.today-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.today-detail-table th {
  background: var(--bg-secondary, #f5f7fa);
  color: var(--text-secondary, #666);
  font-weight: 600;
  padding: 10px 8px;
  border-bottom: 2px solid var(--border-color, #eee);
  white-space: nowrap;
}

.today-detail-table td {
  padding: 8px;
  border-bottom: 1px solid var(--border-color, #f0f0f0);
}

.today-detail-table tbody tr:hover {
  background: var(--bg-hover, #f5f7fa);
}

@media (max-width: 600px) {
  .today-detail-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .today-detail-actions {
    justify-content: flex-end;
  }
  .today-detail-modal {
    max-width: 95vw !important;
  }
}

/* 打印样式 */
@media print {
  .today-detail-overlay {
    position: static !important;
    background: none !important;
  }
  .today-detail-modal {
    max-width: 100% !important;
    max-height: none !important;
  }
  .no-print {
    display: none !important;
  }
}

/* 单元格内备注样式 */
.dr-cell .dr-cell-code {
  font-weight: 600;
  text-align: center;
}
.dr-cell .dr-cell-note {
  font-size: 10px;
  color: #666;
  text-align: center;
  margin-top: 2px;
  line-height: 1.2;
}
/* 机动复选框样式 */
.dr-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-weight: 600;
  color: #1a1a2e;
}
.dr-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #2b7fff;
  cursor: pointer;
}
/* 右侧备注列可点击提示 */
.dr-remark-cell {
  font-size: 13px;
  color: #555;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dr-remark-cell:hover {
  background: #f0f4ff;
}


/* ===== 通知系统 ===== */
.notif-bell {
  position: relative;
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  transition: transform 0.2s;
}
.notif-bell:hover { transform: scale(1.15); }
.notif-badge {
  position: absolute;
  top: -2px;
  right: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #f5222d;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  border: 1.5px solid #fff;
}

.notif-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 8px;
  margin-bottom: 12px;
  border: 1px solid transparent;
  transition: all 0.3s;
}
.notif-bar-unread {
  background: linear-gradient(135deg, #fff8e1 0%, #fff3cd 100%);
  border-color: #ffc107;
  box-shadow: 0 2px 8px rgba(255,193,7,0.15);
}
.notif-bar-empty {
  background: #f6f8fa;
  border-color: #e1e4e8;
}
.notif-bar-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.notif-bar-content {
  flex: 1;
  min-width: 0;
}
.notif-bar-title {
  font-weight: 600;
  font-size: 13px;
  color: #333;
  margin-bottom: 2px;
}
.notif-bar-text {
  font-size: 13px;
  color: #666;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notif-bar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.notif-bar-count {
  font-size: 11px;
  color: #fa8c16;
  white-space: nowrap;
}
.notif-bar-btn {
  padding: 3px 10px;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  background: #1890ff;
  color: #fff;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.notif-bar-btn:hover { opacity: 0.85; }
.notif-bar-btn-secondary {
  background: #f0f0f0;
  color: #666;
}

/* 通知列表（弹窗内） */
.notif-list-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s;
}
.notif-list-item:hover { background: #fafafa; }
.notif-list-item.unread { background: #fffbe6; }
.notif-list-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}
.notif-list-body {
  flex: 1;
  min-width: 0;
}
.notif-list-title {
  font-weight: 600;
  font-size: 14px;
  color: #333;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.notif-list-text {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
  word-break: break-word;
}
.notif-list-time {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
}
.notif-unread-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f5222d;
  flex-shrink: 0;
}

/* 排班申请状态徽章 */
.schedule-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.schedule-status.pending {
  background: #fff7e6;
  color: #fa8c16;
  border: 1px solid #ffd591;
}
.schedule-status.approved {
  background: #f6ffed;
  color: #52c41a;
  border: 1px solid #b7eb8f;
}
.schedule-status.rejected {
  background: #fff2f0;
  color: #ff4d4f;
  border: 1px solid #ffccc7;
}

/* 审核按钮样式 */
.action-btn.approve {
  color: #52c41a;
  border: 1px solid #b7eb8f;
  background: #f6ffed;
}
.action-btn.approve:hover {
  background: #52c41a;
  color: #fff;
}
.action-btn.reject {
  color: #ff4d4f;
  border: 1px solid #ffccc7;
  background: #fff2f0;
}
.action-btn.reject:hover {
  background: #ff4d4f;
  color: #fff;
}
.btn-danger {
  background: #ff4d4f;
  color: #fff;
  border: none;
}
.btn-danger:hover { opacity: 0.85; }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}


/* ===== 满意度整改系统样式 (v29) ===== */
.rect-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.rect-status-pending {
  background: #fffbe6;
  color: #d48806;
  border: 1px solid #ffe58f;
}
.rect-status-valid {
  background: #f6ffed;
  color: #389e0d;
  border: 1px solid #b7eb8f;
}
.rect-status-invalid {
  background: #fff2f0;
  color: #cf1322;
  border: 1px solid #ffccc7;
}
.rect-status-rectifying {
  background: #e6f7ff;
  color: #096dd9;
  border: 1px solid #91d5ff;
}
.rect-status-completed {
  background: #f6ffed;
  color: #389e0d;
  border: 1px solid #b7eb8f;
}
.notif-bar-reminder {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  margin-top: 4px;
  border-radius: 8px;
  font-size: 13px;
}
.notif-bar-reminder .notif-bar-icon {
  font-size: 16px;
}
.rect-problem-type:checked + span {
  color: #722ed1;
  font-weight: 500;
}
.form-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* ===== 改班申请模块 ===== */
.sc-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.sc-tab {
  padding: 8px 18px;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  color: #666;
  transition: all 0.2s;
}
.sc-tab:hover { border-color: #1890ff; color: #1890ff; }
.sc-tab.active {
  background: #1890ff;
  color: #fff;
  border-color: #1890ff;
}
.sc-table th { white-space: nowrap; }
.sc-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
}
.sc-status.st-pending { background: #fff7e6; color: #d48806; border: 1px solid #ffe58f; }
.sc-status.st-approved { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.sc-status.st-rejected { background: #fff1f0; color: #cf1322; border: 1px solid #ffa39e; }
.sc-status.st-cancelled { background: #f5f5f5; color: #999; border: 1px solid #d9d9d9; }

.sc-review-info {
  background: #fafafa;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}
.sc-review-row {
  display: flex;
  padding: 4px 0;
  font-size: 14px;
}
.sc-review-row .sc-label {
  min-width: 90px;
  color: #888;
  flex-shrink: 0;
}
.sc-conflict-warning {
  background: #fffbe6;
  border: 1px solid #ffe58f;
  border-radius: 6px;
  padding: 10px 14px;
  margin: 12px 0;
  font-size: 13px;
  color: #ad6800;
}

