/* ═══════ 医生档案页面样式 ═══════ */

.doctors-page {
  animation: fadeIn 0.3s ease;
}

/* ═══ 统计卡片 ═══ */
.stats-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 24px;
}

.stats-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

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

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

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

.stat-icon-blue {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
}

.stat-icon-green {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.stat-icon-purple {
  background: rgba(124, 58, 237, 0.1);
  color: #7C3AED;
}

.stat-icon-orange {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.stat-content {
  flex: 1;
  min-width: 0;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-unit {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 2px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ═══ 表格卡片 ═══ */
.table-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  background: var(--bg-page);
  border-bottom: 1px solid var(--border);
}

.data-table th {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.data-table td {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: var(--transition);
}

.data-table tbody tr:hover {
  background: var(--primary-bg);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* 表格单元格内容 */
.doctor-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.doctor-avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), #DBEAFE);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  overflow: hidden;
  flex-shrink: 0;
}

.doctor-avatar-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.doctor-name-text {
  font-weight: 500;
  white-space: nowrap;
}

.cell-text {
  color: var(--text-secondary);
  font-size: 13px;
  white-space: nowrap;
}

.cell-specialty {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: var(--text-secondary);
}

/* AI可见度徽章 */
.visibility-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.vis-high {
  background: var(--success-light);
  color: var(--success);
}

.vis-medium {
  background: var(--warning-light);
  color: #B45309;
}

.vis-low {
  background: var(--danger-light);
  color: var(--danger);
}

.vis-none {
  background: var(--border-light);
  color: var(--text-muted);
}

/* 操作按钮 */
.action-btns {
  display: flex;
  gap: 6px;
}

.action-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: var(--transition);
}

.action-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-bg);
}

.action-btn-primary:hover {
  border-color: var(--success);
  color: var(--success);
  background: var(--success-light);
}

/* 标签 */
.tag-info {
  background: var(--primary-bg);
  color: var(--primary);
}

/* 分页 */
.page-dots {
  padding: 0 4px;
  color: var(--text-muted);
  font-size: 13px;
}

/* ═══ 医生详情弹窗 ═══ */
.doctor-detail {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.doctor-detail .detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.detail-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), #DBEAFE);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  overflow: hidden;
  flex-shrink: 0;
}

.detail-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-title-area {
  flex: 1;
}

.detail-title-area h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 6px;
}

.detail-tags {
  display: flex;
  gap: 8px;
}

.doctor-detail .detail-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.doctor-detail .detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.doctor-detail .detail-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.doctor-detail .detail-item {
  padding: 12px;
  background: var(--bg-page);
  border-radius: var(--radius);
}

.doctor-detail .detail-item.full-width {
  grid-column: 1 / -1;
}

.doctor-detail .detail-item label {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}

.doctor-detail .detail-item span {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

/* ═══ 新增医生表单 ═══ */
.add-doctor-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.add-doctor-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.add-doctor-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.add-doctor-form .form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.add-doctor-form .form-group input,
.add-doctor-form .form-group select {
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
  background: var(--bg-card);
  color: var(--text-primary);
}

.add-doctor-form .form-group input:focus,
.add-doctor-form .form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

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

/* 头像上传 */
.avatar-upload {
  display: flex;
  align-items: center;
}

.avatar-preview {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px dashed var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-page);
  color: var(--text-muted);
  font-size: 10px;
  gap: 2px;
}

.avatar-preview:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-bg);
}

.avatar-preview i {
  font-size: 20px;
}

/* ═══ 响应式 ═══ */
@media (max-width: 1200px) {
  .stats-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .stats-grid-4 {
    grid-template-columns: 1fr;
  }
  .add-doctor-form .form-row {
    grid-template-columns: 1fr;
  }
  .data-table {
    font-size: 12px;
  }
  .data-table th,
  .data-table td {
    padding: 10px 8px;
  }
}
