:root {
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --sidebar-bg: #0f172a;
  --sidebar-hover: #1e293b;
  --sidebar-active: #134e4a;
  --content-bg: #f1f5f9;
}

body {
  background: var(--content-bg);
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  min-height: 100vh;
  background: var(--sidebar-bg);
  color: #cbd5e1;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid #334155;
}

.sidebar-brand .bi {
  font-size: 1.75rem;
  color: var(--primary);
}

.nav-sidebar .nav-link {
  color: #94a3b8;
  padding: 0.55rem 1rem;
  border-radius: 0.5rem;
  margin: 0.1rem 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-sidebar .nav-link:hover {
  background: var(--sidebar-hover);
  color: #e2e8f0;
}

.nav-sidebar .nav-link.active {
  background: var(--sidebar-active);
  color: #fff;
}

.nav-sidebar .nav-link.sub {
  padding-left: 2.5rem;
  font-size: 0.875rem;
}

.nav-group-toggle {
  cursor: pointer;
}

.main-content {
  flex: 1;
  padding: 1.5rem 2rem;
  min-width: 0;
}

.stat-card {
  border: none;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.stat-card .icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
}

.card-panel {
  background: #fff;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

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

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

.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #e0f2f1 0%, #f0fdfa 100%);
}

.login-card {
  max-width: 400px;
  border-radius: 1rem;
  border: none;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.badge-status {
  font-weight: 500;
}

.user-footer {
  border-top: 1px solid #334155;
  padding: 1rem;
  margin-top: auto;
}

.table thead th {
  background: rgba(13, 148, 136, 0.08);
  font-weight: 600;
  font-size: 0.875rem;
}

/* 预约看板 */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

.week-strip .week-day-cell {
  flex: 1;
  min-width: 88px;
  text-align: center;
  padding: 0.75rem 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  color: inherit;
  background: #fff;
}

.week-strip .week-day-cell:hover {
  border-color: var(--primary);
}

.week-strip .week-day-cell.active {
  background: var(--sidebar-active);
  color: #fff;
  border-color: var(--primary);
}

.week-strip .week-day-cell.active .text-muted {
  color: rgba(255, 255, 255, 0.75) !important;
}

.month-cal td {
  height: 42px;
  vertical-align: middle;
  padding: 2px !important;
}

.month-cal td.selected {
  background: rgba(13, 148, 136, 0.15);
}

.month-day-link {
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.month-badge {
  display: block;
  font-size: 0.65rem;
  color: var(--primary);
  font-weight: 600;
}

.schedule-wrap {
  max-height: calc(100vh - 320px);
}

.schedule-table {
  table-layout: fixed;
  min-width: 720px;
}

.schedule-table .time-col {
  width: 64px;
  background: #f8fafc;
  font-weight: 500;
  position: sticky;
  left: 0;
  z-index: 2;
}

.schedule-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f0fdfa;
}

.schedule-table .doctor-col {
  min-width: 140px;
  text-align: center;
}

.schedule-cell {
  height: 28px;
  padding: 2px !important;
  vertical-align: top;
}

.schedule-slot-30 .schedule-cell {
  height: 56px;
}

.schedule-slot-30 .appt-block {
  min-height: 104px;
}

.schedule-empty {
  background: #fafafa;
}

.appt-block {
  border-left: 4px solid;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 0.75rem;
  line-height: 1.3;
  height: 100%;
  min-height: 52px;
  overflow: hidden;
}

.appt-block .appt-time {
  font-size: 0.65rem;
  color: #64748b;
}

.appt-block .appt-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin-top: 2px;
}

.appt-block {
  cursor: grab;
}

.appt-block.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.schedule-cell.drop-target.drag-over {
  background: rgba(13, 148, 136, 0.2);
  outline: 2px dashed var(--primary);
}

.detail-dl dt {
  font-size: 0.8rem;
}

.detail-dl dd {
  font-size: 0.875rem;
  margin-bottom: 0.35rem;
}

.patient-form .form-label {
  font-size: 0.85rem;
}
