/* Shenzhen clinic workspace: compact, information-dense layout inspired by
   familiar dental-management systems while keeping DentalLocal workflows. */
:root {
  --teal: #1684c4;
  --line: #d9e1e9;
  --muted: #718394;
}

body { background: #f1f3f6; color: #283847; }
.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 62px minmax(0, 1fr);
}
.shell:has(.reception-workbench) {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 62px minmax(0, 1fr);
}
.sidebar {
  grid-row: 1;
  grid-column: 1;
  z-index: 20;
  height: 62px;
  min-width: 0;
  padding: 0 14px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  background: #1d293e;
  border-bottom: 3px solid #1684c4;
  color: #dce7f1;
  overflow: hidden;
}
.shell:has(.reception-workbench) .sidebar { padding: 0 14px; }
.shell:has(.reception-workbench) .brand { font-size: 17px; }
.brand {
  flex: 0 0 auto;
  padding: 0 9px 0 3px;
  color: #fff;
  font-size: 17px;
  font-weight: 650;
  white-space: nowrap;
}
.brand small {
  display: inline;
  margin: 0 0 0 8px;
  color: #aab9c9;
  font-size: 10px;
  letter-spacing: 0;
  font-weight: 400;
}
.nav {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 3px;
  min-width: 0;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 5px;
  padding: 10px 10px;
  color: #ced9e5;
  font-size: 12px;
  line-height: 1.1;
  white-space: nowrap;
}
.nav button:hover { background: #2a3d58; color: #fff; }
.nav button.active {
  background: #1678c2;
  color: #fff;
  font-weight: 600;
}
.sidebar footer {
  position: static;
  flex: 0 0 auto;
  padding: 0 2px 0 8px;
  color: #b8c8d5;
  font-size: 10px;
  line-height: 1.5;
  white-space: nowrap;
}
.main {
  grid-row: 2;
  grid-column: 1;
  min-width: 0;
  padding: 0 22px 30px;
}
.topbar {
  position: relative;
  height: 50px;
  margin: 0 -22px 16px;
  padding: 0 22px;
  overflow-x: clip;
  background: #fff;
  border-bottom: 1px solid #dce3e9;
}
.topbar > div { display: flex; align-items: center; gap: 8px; }
.topbar button { padding: 6px 10px; font-size: 12px; border-radius: 4px; }
.pagehead { margin-bottom: 15px; }
.pagehead h1 { font-size: 22px; letter-spacing: -.35px; }
.card {
  border-color: #dce3e9;
  border-radius: 7px;
  padding: 17px;
  box-shadow: 0 1px 2px #263c4d08;
}
.metric { border-color: #dce3e9; border-radius: 7px; padding: 16px 18px; }
.metric strong { margin-top: 10px; font-size: 26px; }
button { border-radius: 5px; padding: 7px 12px; }
input, select, textarea { border-color: #cbd6df; border-radius: 4px; }
th { background: #f2f5f8; color: #5e7181; }
td, th { padding: 10px 9px; }
.tabs { gap: 3px; border-bottom: 1px solid #d7e0e7; }
.tabs button { border-radius: 4px 4px 0 0; }
.tabs button.active { background: #e9f3fb; color: #126eae; border-color: #bbd8ec; }

/* Patient directory: a compact group rail and searchable, full-width table. */
.patient-workspace .patient-center { gap: 0; }
.patient-workspace .patient-groups {
  border-radius: 6px 0 0 6px;
  border-right: 0;
  background: #f8fafc;
}
.patient-workspace .patient-list-card {
  border: 1px solid #dfe6eb;
  border-radius: 0 6px 6px 0;
}
.patient-workspace .patient-result-toolbar { padding-bottom: 5px; }
.patient-workspace #patient-results > .tablewrap { border-color: #dfe6eb; }

/* Appointment calendar: keep the mini-calendar/doctor rail and make the day
   board the visual focus, like a clinic scheduling desk. */
.appointment-workspace {
  border: 1px solid #d9e1e9;
  border-radius: 6px;
  box-shadow: 0 1px 2px #263c4d08;
}
.appointment-workspace .schedule-mode-tabs { background: #f7f9fb; }
.appointment-workspace .schedule-mode-tabs button.active {
  color: #1175b8;
  border-bottom: 2px solid #1684c4;
}
.appointment-workspace .schedule-column-title,
.appointment-workspace .schedule-corner { background: #eef3f7; }
.appointment-workspace .schedule-event { box-shadow: 0 1px 2px #253b4a12; }

@media (max-width: 1100px) and (min-width: 721px) {
  .sidebar { gap: 5px; padding: 0 8px; }
  .brand { font-size: 15px; padding-right: 3px; }
  .brand small { display: none; }
  .nav { gap: 1px; }
  .nav button { padding: 9px 7px; font-size: 11px; }
  .sidebar footer { display: none; }
  .main { padding-right: 14px; padding-left: 14px; }
  .topbar { margin-right: -14px; margin-left: -14px; padding: 0 14px; }
}

@media (max-width: 720px) {
  .shell { display: block; }
  .sidebar {
    position: sticky;
    top: 0;
    height: auto;
    min-height: 54px;
    padding: 8px 10px;
    display: block;
    overflow: visible;
  }
  .brand { padding: 0 4px; font-size: 16px; }
  .brand small { display: none; }
  .nav { margin-top: 7px; gap: 2px; }
  .nav button { padding: 8px 9px; }
  .sidebar footer { display: none; }
  .main { padding: 0 10px calc(90px + env(safe-area-inset-bottom)); }
  .topbar { height: 48px; margin: 0 -10px 12px; padding: 0 10px; }
  .topbar > div { gap: 4px; font-size: 12px; }
  .topbar button { padding: 5px 7px; }
  .patient-workspace .patient-groups { border-right: 1px solid #dfe6eb; }
  .patient-workspace .patient-list-card { border-radius: 6px; }
}
