/* ─── RESET & BASE ─────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  height: 100%;
}
body {
  font-family: var(--font-body);
  background: var(--offwhite);
  color: #102a43;
  display: flex;
  min-height: 100vh;
  font-size: 15.5px;
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6,
.topbar-title,
.card-title,
.kpi-value,
.modal-title,
.logo-text strong,
.nav-section-label,
.patient-detail-name,
.kpi-label,
.staff-name {
  font-family: var(--font-heading);
}

/* ─── CSS VARIABLES ─────────────────────────────────────────── */
:root {
  --font-heading: "Montserrat", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --navy: #20344f;
  --navy-dark: #142132;
  --navy-mid: #2c476b;
  --teal: #d5c7ac;
  --teal-light: #e8dbbe;
  --champagne: #d5c7ac;
  --champ-lt: #f3ecd8;
  --white: #ffffff;
  --offwhite: #fdfbf7;
  --gray-100: #f3efeb;
  --gray-200: #e4dfd9;
  --gray-300: #c8c2bc;
  --gray-500: #686460;
  --gray-700: #3a3632;
  --success: #3a7d70;
  --warning: #e2a03f;
  --danger: #d85c49;
  --info: #4a82c2;
  --sidebar-w: 250px;
  --topbar-h: 70px;
  --radius: 16px;
  --radius-sm: 8px;
  --shadow: 0 6px 20px rgba(42, 50, 60, 0.05);
  --shadow-md: 0 12px 36px rgba(42, 50, 60, 0.08);
}

/* ─── SCROLLBAR ─────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 99px;
}

/* ─── SIDEBAR ─────────────────────────────────────────────── */
#sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.25s ease;
}
.sidebar-logo {
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.logo-mark {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--teal);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19.5px;
}
.logo-text {
  color: var(--white);
}
.logo-text strong {
  display: block;
  font-size: 17.5px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.logo-text span {
  font-size: 11.5px;
  color: var(--champagne);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  opacity: 0.8;
}

.nav-section-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(216, 205, 188, 0.5);
  padding: 18px 20px 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin: 2px 12px;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.15s ease;
  font-size: 15px;
  font-weight: 500;
  position: relative;
  border: none;
  background: none;
  width: calc(100% - 24px);
  text-align: left;
}
.nav-item:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
}
.nav-item.active {
  color: var(--white);
  background: rgba(213, 199, 172, 0.25);
}
.nav-item.active::before {
  content: none;
}
.nav-icon {
  width: 18px;
  height: 18px;
  opacity: 0.8;
  flex-shrink: 0;
}
.nav-item.active .nav-icon {
  opacity: 1;
}
.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 99px;
  min-width: 18px;
  text-align: center;
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--navy-dark);
  font-size: 14.5px;
  flex-shrink: 0;
}
.sidebar-user-info {
  flex: 1;
  overflow: hidden;
}
.sidebar-user-info strong {
  display: block;
  color: white;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-info span {
  color: var(--champagne);
  font-size: 12.5px;
  opacity: 0.8;
}

/* ─── MAIN WRAPPER ─────────────────────────────────────────── */
#main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

/* ─── TOP BAR ─────────────────────────────────────────────── */
#topbar {
  height: var(--topbar-h);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-title {
  font-size: 18.5px;
  font-weight: 700;
  color: var(--navy-dark);
  flex: 1;
}
.topbar-branch {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
}
.topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  height: 38px;
  flex: 1;
  max-width: 340px;
}
.topbar-search input {
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--navy-dark);
  width: 100%;
}
.topbar-search input::placeholder {
  color: var(--gray-500);
}
.topbar-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background 0.15s;
}
.topbar-icon-btn:hover {
  background: var(--gray-100);
}
.topbar-notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
  border: 1.5px solid white;
}

/* ─── PAGE CONTENT ─────────────────────────────────────────── */
#content {
  flex: 1;
  padding: 36px;
  overflow-y: auto;
  min-width: 0;
}
.page {
  display: none;
}
.page.active {
  display: block;
}

/* ─── CARDS ─────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  min-width: 0;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.card-header {
  padding: 24px 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title {
  font-size: 17.5px;
  font-weight: 700;
  color: var(--navy-dark);
}
.card-body {
  padding: 24px 28px;
}

/* ─── KPI CARDS ─────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}
.kpi-card {
  position: relative;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 1;
  min-width: 0;
}
.kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(32, 52, 79, 0.08);
}
.kpi-card.kpi-primary {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  border-color: var(--navy-dark);
  color: var(--white);
  box-shadow: 0 12px 24px rgba(32, 52, 79, 0.15);
}
.kpi-card.kpi-primary .kpi-label {
  color: rgba(213, 199, 172, 0.8);
}
.kpi-card.kpi-primary .kpi-value {
  color: var(--white);
}
.kpi-card.kpi-primary .kpi-sub {
  color: rgba(255, 255, 255, 0.7);
}
.kpi-card.kpi-primary .kpi-trend-up {
  color: var(--champagne);
  background: rgba(213, 199, 172, 0.15);
}
.kpi-card.kpi-primary .kpi-icon-wrap {
  background: rgba(213, 199, 172, 0.15) !important;
  color: var(--champagne) !important;
}
.kpi-card::before {
  content: "";
  position: absolute;
  top: -20px;
  right: -20px;
  width: 120px;
  height: 120px;
  background: radial-gradient(
    circle,
    rgba(213, 199, 172, 0.15) 0%,
    transparent 70%
  );
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
}
.kpi-card.kpi-primary::before {
  background: radial-gradient(
    circle,
    rgba(213, 199, 172, 0.1) 0%,
    transparent 70%
  );
  width: 180px;
  height: 180px;
  top: -40px;
  right: -40px;
}
.kpi-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.kpi-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--navy-dark);
  letter-spacing: -1px;
  line-height: 1;
  margin-top: 6px;
}
.kpi-sub {
  font-size: 13.5px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-weight: 500;
}
.kpi-trend-up {
  color: var(--success);
  font-weight: 700;
  background: rgba(58, 125, 112, 0.1);
  padding: 3px 6px;
  border-radius: 6px;
}
.kpi-trend-dn {
  color: var(--danger);
  font-weight: 700;
  background: rgba(216, 92, 73, 0.1);
  padding: 3px 6px;
  border-radius: 6px;
}
.kpi-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
}
.kpi-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

/* ─── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--navy);
  color: white;
}
.btn-primary:hover {
  background: var(--navy-mid);
}
.btn-teal {
  background: var(--teal);
  color: var(--navy-dark);
}
.btn-teal:hover {
  background: var(--teal-light);
}
.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--gray-300);
}
.btn-outline:hover {
  background: var(--gray-100);
}
.btn-ghost {
  background: transparent;
  color: var(--gray-700);
  border: none;
}
.btn-ghost:hover {
  background: var(--gray-100);
}
.btn-danger {
  background: var(--danger);
  color: white;
}
.btn-sm {
  padding: 5px 11px;
  font-size: 13.5px;
}
.btn-xs {
  padding: 3px 8px;
  font-size: 12.5px;
}
.btn-topbar {
  height: 38px;
  padding: 0 16px;
  font-size: 15px;
}

/* ─── BADGES ─────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 600;
}
.badge-success {
  background: #e6f9e8;
  color: var(--success);
}
.badge-warning {
  background: #fef9ea;
  color: #c29100;
}
.badge-danger {
  background: #fdf0ec;
  color: var(--danger);
}
.badge-info {
  background: #eaf3fd;
  color: var(--info);
}
.badge-neutral {
  background: var(--gray-100);
  color: var(--gray-700);
}
.badge-navy {
  background: #e8edf3;
  color: var(--navy);
}

/* ─── GRID HELPERS ─────────────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.grid-3-1 {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 20px;
}
.grid-2-1 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}
.gap-16 {
  gap: 16px;
}
.mb-16 {
  margin-bottom: 16px;
}
.mb-24 {
  margin-bottom: 24px;
}
.flex {
  display: flex;
}
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.flex-center {
  display: flex;
  align-items: center;
}
.gap-8 {
  gap: 8px;
}
.gap-12 {
  gap: 12px;
}

/* ─── TABLES ─────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
thead tr {
  border-bottom: 1.5px solid var(--gray-200);
}
th {
  text-align: left;
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  white-space: nowrap;
}
td {
  padding: 12px 14px;
  font-size: 14.5px;
  color: var(--navy-dark);
  border-bottom: 1px solid var(--gray-100);
}
tr:last-child td {
  border-bottom: none;
}
tbody tr:nth-child(even) {
  background: var(--offwhite);
}
tbody tr:hover {
  background: var(--gray-100);
}
.table-action-btn {
  opacity: 0;
  transition: opacity 0.2s;
}
tbody tr:hover .table-action-btn {
  opacity: 1;
}

/* ─── AVATAR ─────────────────────────────────────────────── */
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}
.avatar-lg {
  width: 52px;
  height: 52px;
  font-size: 19.5px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  flex-shrink: 0;
}
.av-teal {
  background: var(--teal);
}
.av-navy {
  background: var(--navy);
}
.av-warn {
  background: var(--warning);
  color: var(--navy-dark);
}
.av-info {
  background: var(--info);
}
.av-champ {
  background: var(--champagne);
  color: var(--navy-dark);
}
.av-danger {
  background: var(--danger);
}

/* ─── FORM ELEMENTS ─────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.form-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gray-700);
}
.form-input,
.form-select,
.form-textarea {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--navy-dark);
  background: var(--white);
  outline: none;
  transition: border-color 0.15s;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--teal);
}
.form-textarea {
  resize: vertical;
  min-height: 80px;
}

/* ─── MODAL ─────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 42, 67, 0.45);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}
.modal-overlay.open {
  display: flex;
}
.modal {
  background: var(--white);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  width: 520px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.2s ease;
}
.modal-lg {
  width: 720px;
}
@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.modal-header {
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title {
  font-size: 17.5px;
  font-weight: 700;
  color: var(--navy-dark);
}
.modal-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gray-100);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15.5px;
  color: var(--gray-500);
}
.modal-close:hover {
  background: var(--gray-200);
}
.modal-body {
  padding: 22px 24px;
}
.modal-footer {
  padding: 16px 24px 20px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* ─── TABS ─────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  gap: 2px;
  border-bottom: 1.5px solid var(--gray-200);
  margin-bottom: 20px;
}
.tab-btn {
  padding: 10px 18px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--gray-500);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1.5px;
  transition: color 0.15s;
}
.tab-btn.active {
  color: var(--navy);
  border-bottom-color: var(--teal);
}
.tab-btn:hover:not(.active) {
  color: var(--navy-dark);
}
.tab-pane {
  display: none;
}
.tab-pane.active {
  display: block;
}

/* ─── STATUS DOT ─────────────────────────────────────────── */
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-green {
  background: var(--success);
}
.dot-yellow {
  background: var(--warning);
}
.dot-red {
  background: var(--danger);
}
.dot-gray {
  background: var(--gray-300);
}
.dot-blue {
  background: var(--info);
}

/* ─── PROGRESS BAR ─────────────────────────────────────────── */
.progress {
  height: 6px;
  background: var(--gray-200);
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  border-radius: 99px;
  transition: width 0.3s ease;
}
.pb-green {
  background: var(--success);
}
.pb-warn {
  background: var(--warning);
}
.pb-danger {
  background: var(--danger);
}
.pb-info {
  background: var(--info);
}

/* ═══════════════════════════════════════════════════════════
   DASHBOARD PAGE
════════════════════════════════════════════════════════════*/
.dash-activity {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}
.activity-item:last-child {
  border-bottom: none;
}
.activity-dot-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding-top: 4px;
}
.activity-dot-col .dot {
  flex-shrink: 0;
}
.activity-info {
  flex: 1;
}
.activity-text {
  font-size: 14.5px;
  color: var(--navy-dark);
  line-height: 1.45;
}
.activity-time {
  font-size: 12.5px;
  color: var(--gray-500);
  margin-top: 2px;
}
.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.quick-btn {
  background: var(--offwhite);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.quick-btn:hover {
  background: var(--champ-lt);
  border-color: var(--champagne);
}
.quick-btn-icon {
  font-size: 21.5px;
}
.quick-btn-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--navy-dark);
}

.mini-cal {
}
.mini-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.mini-cal-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--navy-dark);
}
.mini-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  text-align: center;
}
.cal-day-name {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--gray-500);
  padding: 3px 0;
}
.cal-day {
  font-size: 13.5px;
  padding: 5px 3px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.1s;
  position: relative;
}
.cal-day:hover {
  background: var(--gray-100);
}
.cal-day.today {
  background: var(--navy);
  color: white;
  font-weight: 700;
  border-radius: 50%;
}
.cal-day.has-apt::after {
  content: "";
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--teal);
  margin: 2px auto 0;
}
.cal-day.today.has-apt::after {
  background: var(--champagne);
}
.cal-day.other-month {
  color: var(--gray-300);
}

/* ═══════════════════════════════════════════════════════════
   SCHEDULE PAGE
════════════════════════════════════════════════════════════*/
.schedule-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.schedule-view-toggle {
  display: flex;
  gap: 2px;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 3px;
}
.sv-btn {
  padding: 5px 13px;
  font-size: 13.5px;
  font-weight: 600;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 5px;
  color: var(--gray-500);
  transition: all 0.15s;
}
.sv-btn.active {
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow);
}

.week-grid {
  display: grid;
  grid-template-columns: 60px repeat(7, 1fr);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}
.week-header {
  background: var(--gray-100);
  border-bottom: 1.5px solid var(--gray-200);
  padding: 10px 6px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy-dark);
}
.week-header.today-col {
  background: var(--navy);
  color: white;
}
.week-header span {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  opacity: 0.7;
  margin-top: 1px;
}
.week-time-label {
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 11.5px;
  color: var(--gray-500);
  border-right: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-100);
  height: 52px;
}
.week-cell {
  border-right: 1px solid var(--gray-100);
  border-bottom: 1.5px solid var(--gray-200);
  height: 52px;
  position: relative;
  cursor: pointer;
}
.week-cell:hover {
  background: var(--champ-lt);
}
.week-cell.today-col {
  background: rgba(213, 199, 172, 0.15);
}
.apt-block {
  position: absolute;
  left: 2px;
  right: 2px;
  top: 2px;
  border-radius: 5px;
  padding: 3px 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
  cursor: pointer;
  z-index: 2;
}
.apt-block:hover {
  filter: brightness(0.93);
}
.apt-teal {
  background: #e6f9e8;
  color: var(--success);
  border-left: 3px solid var(--success);
}
.apt-navy {
  background: #dce7f3;
  color: #1a4070;
  border-left: 3px solid var(--navy);
}
.apt-warn {
  background: #fef5d6;
  color: #8c6c00;
  border-left: 3px solid var(--warning);
}
.apt-info {
  background: #ddeeff;
  color: #265e9e;
  border-left: 3px solid var(--info);
}
.apt-champ {
  background: var(--champ-lt);
  color: #7a6a55;
  border-left: 3px solid var(--champagne);
}
.apt-danger {
  background: #fdf0ec;
  color: var(--danger);
  border-left: 3px solid var(--danger);
}
.apt-block.apt-flag {
  animation: flag-pulse 2s infinite;
}
@keyframes flag-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.75; }
}

/* ── Schedule: count row ─────────────────────────────────── */
.sched-count-row {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
}
.sched-count-label {
  font-size: 13.5px;
  color: var(--gray-500);
}
.sched-count-label strong {
  color: var(--navy-dark);
}

/* ── Schedule: nav button ────────────────────────────────── */
.sched-nav-btn {
  font-size: 14.5px !important;
  padding: 5px 12px !important;
}

/* ── Schedule: legend pills ──────────────────────────────── */
.sched-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding: 14px 18px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.legend-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--offwhite);
  border: 1px solid var(--gray-200);
  border-radius: 99px;
  padding: 5px 12px 5px 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  transition: background 0.15s;
}
.legend-pill:hover {
  background: var(--gray-100);
}
.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
  /* uses apt-* colour classes but we override to show just the bg */
}
/* Reuse apt colour classes for swatches — remove absolute positioning */
.legend-swatch.apt-teal   { background: #e6f9e8; border-left: 3px solid var(--success); position:static; }
.legend-swatch.apt-navy   { background: #dce7f3; border-left: 3px solid var(--navy);    position:static; }
.legend-swatch.apt-warn   { background: #fef5d6; border-left: 3px solid var(--warning); position:static; }
.legend-swatch.apt-info   { background: #ddeeff; border-left: 3px solid var(--info);    position:static; }
.legend-swatch.apt-champ  { background: var(--champ-lt); border-left: 3px solid var(--champagne); position:static; }
.legend-swatch.apt-danger { background: #fdf0ec; border-left: 3px solid var(--danger);  position:static; }

/* ── Day view tabs ───────────────────────────────────────── */
.sched-day-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--gray-100);
  padding: 4px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
}
.sched-day-tab {
  flex: 1;
  min-width: 64px;
  padding: 8px 6px;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
  text-align: center;
  transition: all 0.15s;
  white-space: nowrap;
}
.sched-day-tab span {
  display: block;
  font-size: 11px;
  font-weight: 500;
  margin-top: 1px;
  opacity: 0.8;
}
.sched-day-tab:hover { background: var(--white); color: var(--navy-dark); }
.sched-day-tab.active {
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow);
}
.sched-day-tab.today { color: var(--danger); }
.sched-day-tab.today.active { color: var(--navy); }

/* ── Day view list ───────────────────────────────────────── */
.day-view-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.day-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.day-row-time {
  width: 68px;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
  padding-top: 14px;
  text-align: right;
}
.day-row-blocks {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.day-apt-card {
  border-radius: 10px;
  padding: 12px 16px;
  cursor: pointer;
  transition: filter 0.15s;
}
.day-apt-card:hover { filter: brightness(0.94); }
.day-apt-patient {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
}
.day-apt-meta {
  font-size: 13px;
  opacity: 0.75;
}

/* ── List view ───────────────────────────────────────────── */
.list-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.list-day-section { }
.list-day-header {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--gray-500);
  padding: 8px 0 8px 2px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1.5px solid var(--gray-200);
  margin-bottom: 4px;
}
.list-day-header.today { color: var(--navy); }
.today-chip {
  font-size: 11px;
  font-weight: 700;
  background: var(--navy);
  color: white;
  padding: 2px 7px;
  border-radius: 99px;
  letter-spacing: 0.5px;
}
.list-rows {
  display: flex;
  flex-direction: column;
}
.list-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.1s;
}
.list-row:hover { background: var(--gray-100); }
.list-row-time {
  width: 64px;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
}
.apt-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}
/* Override absolute positioning for apt-dot usage */
.apt-dot.apt-teal   { position:static; background:#e6f9e8; border-left:3px solid var(--success); }
.apt-dot.apt-navy   { position:static; background:#dce7f3; border-left:3px solid var(--navy);    }
.apt-dot.apt-warn   { position:static; background:#fef5d6; border-left:3px solid var(--warning); }
.apt-dot.apt-info   { position:static; background:#ddeeff; border-left:3px solid var(--info);    }
.apt-dot.apt-champ  { position:static; background:var(--champ-lt); border-left:3px solid var(--champagne); }
.apt-dot.apt-danger { position:static; background:#fdf0ec; border-left:3px solid var(--danger);  }
.list-row-info { flex: 1; min-width: 0; }
.list-row-patient {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--navy-dark);
}
.list-row-sub {
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 1px;
}
.list-row-dentist {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 500;
  white-space: nowrap;
}
.flag-chip {
  display: inline;
  font-size: 12px;
  font-weight: 600;
  background: #fdf0ec;
  color: var(--danger);
  border-radius: 6px;
  padding: 1px 6px;
  margin-left: 6px;
}

/* ── Empty state ─────────────────────────────────────────── */
.sched-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 60px 24px;
  color: var(--gray-300);
  text-align: center;
}
.sched-empty p {
  font-size: 15px;
  color: var(--gray-500);
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════
   PATIENTS PAGE
════════════════════════════════════════════════════════════*/
.patients-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  height: calc(100vh - var(--topbar-h) - 56px);
}
.patients-list {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
.patients-list-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-200);
}
.patients-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
}
.patients-search input {
  border: none;
  background: none;
  outline: none;
  font-size: 14.5px;
  width: 100%;
  font-family: "Inter", sans-serif;
}
.patient-list-items {
  flex: 1;
  overflow-y: auto;
}
.patient-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.1s;
}
.patient-list-item:hover {
  background: var(--gray-100);
}
.patient-list-item.active {
  background: var(--champ-lt);
}
.pli-info {
  flex: 1;
  overflow: hidden;
}
.pli-name {
  font-size: 18.5px;
  font-weight: 600;
  color: var(--navy-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pli-sub {
  font-size: 16px;
  color: var(--gray-500);
  margin-top: 1px;
}

.patient-detail {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-y: auto;
  min-width: 0;
}
.patient-detail-header {
  padding: 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: flex-start;
  gap: 18px;
}
.patient-photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 27.5px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
  border: 3px solid var(--champ-lt);
}
.patient-detail-info {
  flex: 1;
}
.patient-detail-name {
  font-size: 27.5px;
  font-weight: 800;
  color: var(--navy-dark);
  letter-spacing: -0.4px;
}
.patient-detail-meta {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.meta-item {
  font-size: 16.5px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 4px;
}
.meta-item strong {
  color: var(--navy-dark);
  font-weight: 600;
}

/* ── Tooth Chart Container ───────────────────────────────────── */
.tooth-chart {
  background: var(--offwhite);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px;
  margin: 0;
}

/* Header */
.tooth-chart-header {
  margin-bottom: 14px;
}
.tooth-chart-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--navy-dark);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.tooth-chart-subtitle {
  font-size: 11.5px;
  color: var(--gray-500);
  margin-top: 2px;
  letter-spacing: 0.3px;
}

/* ── Condition Picker Bar ──────────────────────────────────────── */
.tooth-condition-bar {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
}
.condition-bar-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-top: 3px;
  white-space: nowrap;
}
.condition-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.cond-chip {
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.12s;
}
.cond-chip:hover { background: var(--gray-100); }
.cond-chip.active { background: var(--navy); color: white; border-color: var(--navy); }
.cond-chip.cond-caries   { border-color: #e55; color: #c33; }
.cond-chip.cond-caries.active   { background:#e55; color:white; }
.cond-chip.cond-amalgam  { border-color: #7c5cbf; color: #5a3a9a; }
.cond-chip.cond-amalgam.active  { background:#7c5cbf; color:white; }
.cond-chip.cond-composite{ border-color: #3a8fc0; color: #206090; }
.cond-chip.cond-composite.active{ background:#3a8fc0; color:white; }
.cond-chip.cond-crown    { border-color: var(--warning); color: #8c6c00; }
.cond-chip.cond-crown.active    { background:var(--warning); color:white; }
.cond-chip.cond-rct      { border-color: #2aaa94; color: #1a8070; }
.cond-chip.cond-rct.active      { background:#2aaa94; color:white; }
.cond-chip.cond-bridge   { border-color: #e09030; color: #a06010; }
.cond-chip.cond-bridge.active   { background:#e09030; color:white; }
.cond-chip.cond-implant  { border-color: #4a9e55; color: #2a7035; }
.cond-chip.cond-implant.active  { background:#4a9e55; color:white; }
.cond-chip.cond-missing  { border-color: #999; color: #666; }
.cond-chip.cond-missing.active  { background:#999; color:white; }
.cond-chip.cond-extracted{ border-color: var(--gray-300); color: var(--gray-500); }
.cond-chip.cond-extracted.active{ background:var(--gray-500); color:white; }
.cond-chip.cond-sealant  { border-color: #82d9a0; color: #2a7050; }
.cond-chip.cond-sealant.active  { background:#82d9a0; color:var(--navy-dark); }

/* ── Jaw Sections ─────────────────────────────────────────────── */
.jaw-section {
  padding: 4px 0;
}
.jaw-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  margin-top: 4px;
}
.jaw-name-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.jaw-side-label {
  font-size: 10.5px;
  color: var(--gray-500);
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* ── Tooth Type Row ───────────────────────────────────────────── */
.tooth-type-row {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin: 2px 0;
}
.ttype {
  width: 28px;
  text-align: center;
  font-size: 9.5px;
  font-weight: 800;
  color: var(--gray-300);
  letter-spacing: 0.3px;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* ── Midline Divider ──────────────────────────────────────────── */
.jaw-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}
.jaw-divider-line {
  flex: 1;
  height: 1px;
  background: var(--gray-300);
}
.jaw-divider-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-300);
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ── Tooth Cells ──────────────────────────────────────────────── */
.tooth-row {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-bottom: 2px;
}
.tooth {
  width: 28px;
  height: 32px;
  border: 1.5px solid var(--gray-300);
  border-radius: 4px 4px 6px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gray-500);
  background: var(--white);
  cursor: pointer;
  transition: all 0.12s;
  position: relative;
  flex-shrink: 0;
  user-select: none;
}
.tooth:hover {
  border-color: var(--navy);
  background: var(--champ-lt);
  transform: translateY(-1px);
  z-index: 2;
}

/* ── Tooth Condition Classes (FDI / PDA Standard) ──────────────── */
.tooth.caries    { background:#fff0f0; border-color:#e55;       color:#c33; }
.tooth.amalgam   { background:#e8e0f7; border-color:#7c5cbf;    color:#5a3a9a; }
.tooth.composite { background:#e0f4ff; border-color:#3a8fc0;    color:#206090; }
.tooth.crown     { background:#fef9ea; border-color:var(--warning); color:#8c6c00; }
.tooth.rct       { background:#e0f7f4; border-color:#2aaa94;    color:#1a8070; }
.tooth.bridge    { background:#fff4e0; border-color:#e09030;    color:#a06010; }
.tooth.implant   { background:#eaf4e8; border-color:#4a9e55;    color:#2a7035; }
.tooth.missing   { background:#f3f3f3; border-color:#999;       color:#999;   border-style:dashed; opacity:0.7; }
.tooth.extracted { background:var(--gray-100); border-color:var(--gray-300); opacity:0.45; color:var(--gray-500); }
.tooth.sealant   { background:#f0fff4; border-color:#82d9a0;    color:#2a7050; }

/* Legacy aliases kept for backward compat */
.tooth.filled    { background:#e8e0f7; border-color:#7c5cbf; color:#5a3a9a; }
.tooth.treatment { background:#e0f7f4; border-color:#2aaa94; color:#1a8070; }

/* ── Legend ───────────────────────────────────────────────────── */
.tooth-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--gray-200);
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--gray-700);
}
.legend-box {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  border: 1.5px solid;
  flex-shrink: 0;
}

/* ── Tooth Info Bar ───────────────────────────────────────────── */
.tooth-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--navy);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 13px;
  animation: toastIn 0.18s ease;
}
.tooth-info-bar strong {
  font-weight: 700;
}

/* ── Tooth Tooltips (kept from before) ───────────────────────── */

/* ═══════════════════════════════════════════════════════════
   BILLING PAGE
════════════════════════════════════════════════════════════*/
.bar-chart-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 120px;
  padding: 0 4px;
}
.bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.bar-rect {
  width: 100%;
  border-radius: 4px 4px 0 0;
  transition: height 0.4s ease;
  cursor: pointer;
}
.bar-rect:hover {
  filter: brightness(0.88);
}
.bar-label {
  font-size: 11.5px;
  color: var(--gray-500);
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════
   INVENTORY PAGE
════════════════════════════════════════════════════════════*/
.inv-stock-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.inv-stock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.inv-stock-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--navy-dark);
}
.inv-stock-count {
  font-size: 13.5px;
  color: var(--gray-500);
}

/* ═══════════════════════════════════════════════════════════
   STAFF PAGE
════════════════════════════════════════════════════════════*/
.staff-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.staff-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.staff-name {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--navy-dark);
}
.staff-role {
  font-size: 13.5px;
  color: var(--gray-500);
  margin-top: -6px;
}

.permissions-grid table th:first-child,
.permissions-grid table td:first-child {
  position: sticky;
  left: 0;
  background: var(--white);
  z-index: 1;
}
.perm-check {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--gray-300);
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  transition: all 0.12s;
  margin: 0 auto;
}
.perm-check.on {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
}

/* ═══════════════════════════════════════════════════════════
   CONTACTS / LEADS PAGE (KANBAN)
════════════════════════════════════════════════════════════*/
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: start;
}
.kanban-col {
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 12px;
  max-height: 480px;
  overflow-y: auto;
}
.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.kanban-col-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy-dark);
  display: flex;
  align-items: center;
  gap: 7px;
}
.kanban-count {
  background: var(--gray-300);
  color: var(--gray-700);
  font-size: 12.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 99px;
}
.kanban-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.kanban-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.kanban-card-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--navy-dark);
}
.kanban-card-meta {
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 3px;
}
.kanban-card-footer {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ═══════════════════════════════════════════════════════════
   REMINDERS PAGE
════════════════════════════════════════════════════════════*/
.sms-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
}
.sms-item:last-child {
  border-bottom: none;
}
.sms-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e6f9f7;
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17.5px;
  flex-shrink: 0;
}
.sms-info {
  flex: 1;
}
.sms-patient {
  font-size: 18.5px;
  font-weight: 600;
  color: var(--navy-dark);
}
.sms-msg {
  font-size: 16.5px;
  color: var(--gray-500);
  margin-top: 4px;
  line-height: 1.5;
}
.sms-time {
  font-size: 15.5px;
  color: var(--gray-500);
  flex-shrink: 0;
}

/* ─── TOGGLE SWITCH ─────────────────────────────────────────── */
.toggle {
  width: 36px;
  height: 20px;
  background: var(--gray-300);
  border-radius: 99px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
  border: none;
}
.toggle.on {
  background: var(--teal);
}
.toggle::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  top: 3px;
  left: 3px;
  transition: left 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.toggle.on::after {
  left: 19px;
}

/* ─── SECTION TITLE ─────────────────────────────────────────── */
.section-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
  margin-top: 4px;
}

/* ─── EMPTY STATE ─────────────────────────────────────────── */
.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--gray-500);
}
.empty-state-icon {
  font-size: 40px;
  margin-bottom: 12px;
}
.empty-state-text {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--gray-700);
}
.empty-state-sub {
  font-size: 14px;
  color: var(--gray-500);
  margin-top: 4px;
}

/* ─── TOAST ─────────────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--navy);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  z-index: 9999;
  display: none;
  gap: 8px;
  align-items: center;
  animation: toastIn 0.2s ease;
  max-width: 320px;
}
#toast.show {
  display: flex;
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
#toast .toast-icon {
  font-size: 17.5px;
}

/* ─── PATIENT DETAIL SMS TOGGLE ─────────────────────────────── */
.patient-sms-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--champ-lt);
  border-radius: var(--radius-sm);
  border: 1px solid var(--champagne);
}
.patient-sms-info strong {
  display: block;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--navy-dark);
}
.patient-sms-info span {
  font-size: 14.5px;
  color: var(--gray-500);
}

/* ─── SPACING UTILS ─────────────────────────────────────────── */
.mt-4 {
  margin-top: 4px;
}
.mt-8 {
  margin-top: 8px;
}
.mt-12 {
  margin-top: 12px;
}
.mt-16 {
  margin-top: 16px;
}
.mt-20 {
  margin-top: 20px;
}
.p-16 {
  padding: 16px;
}
.p-20 {
  padding: 20px;
}
.fw-600 {
  font-weight: 600;
}
.fw-700 {
  font-weight: 700;
}
.text-sm {
  font-size: 13.5px;
}
.text-gray {
  color: var(--gray-500);
}
.text-navy {
  color: var(--navy);
}
.text-teal {
  color: var(--teal);
}
.text-danger {
  color: var(--danger);
}

/* ─── DIVIDER ─────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--gray-200);
  margin: 16px 0;
}

/* ─── CHIP FILTER ─────────────────────────────────────────── */
.chip-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.chip {
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 13.5px;
  font-weight: 600;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.12s;
}
.chip.active {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}
.chip:hover:not(.active) {
  background: var(--gray-100);
}

/* ─── PREMIUM UI ENHANCEMENTS ───────────────────────────────── */
/* Skeleton Loader */
@keyframes skeleton-loading {
  0% {
    background-color: var(--gray-100);
  }
  50% {
    background-color: var(--gray-200);
  }
  100% {
    background-color: var(--gray-100);
  }
}
.skeleton {
  animation: skeleton-loading 1.5s infinite ease-in-out;
  border-radius: var(--radius-sm);
  color: transparent !important;
}
.skeleton * {
  visibility: hidden;
}

/* Tooltips */
.tooltip-container {
  position: relative;
  display: inline-block;
}
.tooltip-container .tooltip-text {
  visibility: hidden;
  background-color: var(--navy-dark);
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 6px 10px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition:
    opacity 0.2s,
    visibility 0.2s;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: var(--shadow-md);
}
.tooltip-container .tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.kanban-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.kanban-card-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--navy-dark);
}
.kanban-card-meta {
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 3px;
}
.kanban-card-footer {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ═══════════════════════════════════════════════════════════
   REMINDERS PAGE
════════════════════════════════════════════════════════════*/
.sms-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
}
.sms-item:last-child {
  border-bottom: none;
}
.sms-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e6f9f7;
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17.5px;
  flex-shrink: 0;
}
.sms-info {
  flex: 1;
}
.sms-patient {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy-dark);
}
.sms-msg {
  font-size: 13.5px;
  color: var(--gray-500);
  margin-top: 2px;
}
.sms-time {
  font-size: 13px;
  color: var(--gray-500);
  flex-shrink: 0;
}

/* ─── TOGGLE SWITCH ─────────────────────────────────────────── */
.toggle {
  width: 36px;
  height: 20px;
  background: var(--gray-300);
  border-radius: 99px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
  border: none;
}
.toggle.on {
  background: var(--teal);
}
.toggle::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  top: 3px;
  left: 3px;
  transition: left 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.toggle.on::after {
  left: 19px;
}

/* ─── SECTION TITLE ─────────────────────────────────────────── */
.section-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
  margin-top: 4px;
}

/* ─── EMPTY STATE ─────────────────────────────────────────── */
.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--gray-500);
}
.empty-state-icon {
  font-size: 40px;
  margin-bottom: 12px;
}
.empty-state-text {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--gray-700);
}
.empty-state-sub {
  font-size: 14px;
  color: var(--gray-500);
  margin-top: 4px;
}

/* ─── TOAST ─────────────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--navy);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  z-index: 9999;
  display: none;
  gap: 8px;
  align-items: center;
  animation: toastIn 0.2s ease;
  max-width: 320px;
}
#toast.show {
  display: flex;
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
#toast .toast-icon {
  font-size: 17.5px;
}

/* ─── PATIENT DETAIL SMS TOGGLE ─────────────────────────────── */
.patient-sms-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--champ-lt);
  border-radius: var(--radius-sm);
  border: 1px solid var(--champagne);
}
.patient-sms-info strong {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--navy-dark);
}
.patient-sms-info span {
  font-size: 13px;
  color: var(--gray-500);
}

/* ─── SPACING UTILS ─────────────────────────────────────────── */
.mt-4 {
  margin-top: 4px;
}
.mt-8 {
  margin-top: 8px;
}
.mt-12 {
  margin-top: 12px;
}
.mt-16 {
  margin-top: 16px;
}
.mt-20 {
  margin-top: 20px;
}
.p-16 {
  padding: 16px;
}
.p-20 {
  padding: 20px;
}
.fw-600 {
  font-weight: 600;
}
.fw-700 {
  font-weight: 700;
}
.text-sm {
  font-size: 13.5px;
}
.text-gray {
  color: var(--gray-500);
}
.text-navy {
  color: var(--navy);
}
.text-teal {
  color: var(--teal);
}
.text-danger {
  color: var(--danger);
}

/* ─── DIVIDER ─────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--gray-200);
  margin: 16px 0;
}

/* ─── CHIP FILTER ─────────────────────────────────────────── */
.chip-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.chip {
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 13.5px;
  font-weight: 600;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.12s;
}
.chip.active {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}
.chip:hover:not(.active) {
  background: var(--gray-100);
}

/* ─── PREMIUM UI ENHANCEMENTS ───────────────────────────────── */
/* Skeleton Loader */
@keyframes skeleton-loading {
  0% {
    background-color: var(--gray-100);
  }
  50% {
    background-color: var(--gray-200);
  }
  100% {
    background-color: var(--gray-100);
  }
}
.skeleton {
  animation: skeleton-loading 1.5s infinite ease-in-out;
  border-radius: var(--radius-sm);
  color: transparent !important;
}
.skeleton * {
  visibility: hidden;
}

/* Tooltips */
.tooltip-container {
  position: relative;
  display: inline-block;
}
.tooltip-container .tooltip-text {
  visibility: hidden;
  background-color: var(--navy-dark);
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 6px 10px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition:
    opacity 0.2s,
    visibility 0.2s;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: var(--shadow-md);
}
.tooltip-container .tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--navy-dark) transparent transparent transparent;
}
.tooltip-container:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Tooth Tooltips */
.tooth[data-tooltip]::after {
  content: attr(data-tooltip);
  visibility: hidden;
  background-color: var(--navy-dark);
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 6px 10px;
  position: absolute;
  z-index: 10;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition:
    opacity 0.2s,
    visibility 0.2s;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: var(--shadow-md);
}
.tooth[data-tooltip]::before {
  content: "";
  visibility: hidden;
  position: absolute;
  top: -25%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--navy-dark) transparent transparent transparent;
  z-index: 10;
  opacity: 0;
  transition:
    opacity 0.2s,
    visibility 0.2s;
}
.tooth[data-tooltip]:hover::after,
.tooth[data-tooltip]:hover::before {
  visibility: visible;
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE DESIGN (TABLET & MOBILE)
════════════════════════════════════════════════════════════*/
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--navy-dark);
  cursor: pointer;
  padding: 4px;
}
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(16, 42, 67, 0.45);
  z-index: 90;
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

@media (max-width: 1024px) {
  /* Layout */
  #main {
    margin-left: 0;
  }

  /* Sidebar Off-canvas */
  #sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-md);
  }
  #sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.open {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }
  .sidebar-overlay {
    display: block;
    pointer-events: none;
  }

  /* Topbar */
  .menu-toggle {
    display: block;
  }
  #topbar {
    padding: 0 16px;
    gap: 12px;
  }

  /* Grid Adjustments */
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3-1,
  .grid-2-1 {
    grid-template-columns: 1fr;
  }

  .kanban-board {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding-bottom: 8px;
  }
  .kanban-col {
    min-width: 85%;
    scroll-snap-align: start;
    flex-shrink: 0;
  }
}

@media (max-width: 768px) {
  html,
  body {
    overflow-x: hidden;
  }

  /* Topbar */
  .topbar-search {
    display: none;
  }
  .topbar-branch {
    display: none;
  }

  /* Grid Adjustments */
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  /* Content Area */
  #content {
    padding: 16px;
  }

  /* Modals */
  .modal {
    width: 95vw;
    border-radius: 12px;
  }
  .modal-body,
  .modal-header,
  .modal-footer {
    padding: 16px;
  }

  /* Patients Layout */
  .patients-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  .patients-list {
    max-height: 400px;
  }

  /* Utilities */
  .quick-actions {
    grid-template-columns: repeat(2, 1fr);
  }
  .week-grid {
    overflow-x: auto;
  }
  .week-grid {
    grid-template-columns: 60px repeat(7, minmax(100px, 1fr));
  }

  /* Schedule Topbar */
  .schedule-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .schedule-topbar > .flex-center {
    flex-wrap: wrap;
    width: 100%;
  }

  /* Kanban Board Vertical Stack */
  .kanban-board {
    flex-direction: column;
    overflow-x: visible;
  }
  .kanban-col {
    min-width: 0;
    width: 100%;
    max-height: none;
  }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — 820 × 1180 (iPad Air / Portrait Tablet)
════════════════════════════════════════════════════════════*/
@media (min-width: 769px) and (max-width: 900px) {
  /* ── Patients Layout — use natural page scroll, NOT a viewport-locked box.
     Fixed height was cutting off content (Photos tab, long notes, etc.)  */
  .patients-layout {
    grid-template-columns: 240px 1fr;
    gap: 14px;
    height: auto;          /* let content define the height                */
    align-items: start;    /* columns don't stretch to match each other     */
  }

  /* Cap the patient list so it doesn't grow infinitely */
  .patients-list {
    max-height: calc(100vh - var(--topbar-h) - 48px);
    position: sticky;      /* list stays in view while detail scrolls */
    top: calc(var(--topbar-h) + 24px);
  }

  /* Release the detail panel — page-level scroll handles it */
  .patient-detail {
    overflow-y: visible;
    height: auto;
  }

  /* Shrink oversized list-item font sizes */
  .pli-name {
    font-size: 14px;
    font-weight: 600;
  }
  .pli-sub {
    font-size: 12.5px;
  }

  /* List header tighter */
  .patients-list-header {
    padding: 10px 12px;
  }
  .patient-list-item {
    padding: 10px 12px;
    gap: 10px;
  }

  /* ── Patient Detail Header ──────────────────────────────── */
  .patient-detail-header {
    padding: 16px;
    gap: 12px;
    flex-wrap: wrap;
  }

  /* Scale down avatar */
  .patient-photo {
    width: 56px;
    height: 56px;
    font-size: 21px;
  }

  /* Scale down patient name */
  .patient-detail-name {
    font-size: 19px;
    letter-spacing: -0.2px;
  }

  /* Tighter meta row */
  .patient-detail-meta {
    gap: 10px;
    margin-top: 6px;
  }
  .meta-item {
    font-size: 13px;
  }

  /* Action buttons — move below info on narrow detail panel */
  .patient-detail-header > div:last-child {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: flex-start;
  }

  /* ── Tabs ───────────────────────────────────────────────── */
  .tab-btn {
    padding: 8px 12px;
    font-size: 13px;
  }

  /* ── Overview: stack Medical Info + Appointments ────────── */
  #tab-overview .grid-2 {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* ── Tooth Chart ────────────────────────────────────────── */
  .tooth-chart {
    padding: 12px;
  }
  .tooth {
    width: 24px;
    height: 28px;
    font-size: 11px;
  }
  .tooth-row {
    gap: 3px;
  }

  /* ── Content padding ────────────────────────────────────── */
  #content {
    padding: 20px;
  }
}

/* ═══════════════════════════════════════════════════════════
   PATIENT PHOTOS TAB
════════════════════════════════════════════════════════════*/

/* Section label row */
.photo-section-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--navy);
  margin-bottom: 12px;
}
.photo-section-badge {
  font-size: 10.5px;
  font-weight: 600;
  background: var(--champ-lt);
  color: var(--gray-500);
  border: 1px solid var(--champagne);
  border-radius: 99px;
  padding: 2px 8px;
  text-transform: none;
  letter-spacing: 0;
}
.photo-section-badge-xray {
  background: #eaf0f8;
  border-color: #b0c4de;
  color: var(--navy);
}

/* ── Photo Grid ───────────────────────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.photo-grid-xray {
  grid-template-columns: repeat(2, 1fr);
}

/* ── Photo Card ───────────────────────────────────────────── */
.photo-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
}
.photo-card:hover {
  border-color: var(--champagne);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.photo-card-xray {
  border-color: #b0c4de;
}
.photo-card-xray:hover {
  border-color: var(--navy);
}

/* ── Placeholder Area ─────────────────────────────────────── */
.photo-placeholder {
  height: 120px;
  background: var(--gray-100);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--gray-300);
  transition: background 0.15s;
  position: relative;
  overflow: hidden;
}
.photo-card:hover .photo-placeholder {
  background: var(--offwhite);
}
.photo-placeholder-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--gray-300);
  letter-spacing: 0.3px;
}
/* Intraoral placeholder — slightly warmer tint */
.photo-placeholder-intra {
  background: #f8f3ee;
  color: var(--champagne);
}
/* Arch view placeholder */
.photo-placeholder-arch {
  background: #f0f5fb;
  color: #a0b8d0;
}
/* X-ray placeholder — dark film look */
.photo-placeholder-xray {
  background: #1c2b3a;
  color: #4a6a88;
  height: 140px;
}
.photo-placeholder-xray .photo-placeholder-label {
  color: #4a6a88;
}
.photo-card-xray:hover .photo-placeholder-xray {
  background: #243545;
}

/* Uploaded photo preview */
.photo-placeholder.has-photo {
  background: #000;
}
.photo-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Upload hover overlay */
.photo-placeholder::after {
  content: "Click to upload";
  position: absolute;
  inset: 0;
  background: rgba(32, 52, 79, 0.55);
  color: white;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}
.photo-card:hover .photo-placeholder::after {
  opacity: 1;
}

/* ── Card Info Strip ──────────────────────────────────────── */
.photo-card-info {
  padding: 10px 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}
.photo-card-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy-dark);
  line-height: 1.3;
}
.photo-card-hint {
  font-size: 10.5px;
  color: var(--gray-500);
  line-height: 1.4;
}
.photo-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}
.photo-date {
  font-size: 10px;
  color: var(--gray-500);
  font-weight: 500;
}
.photo-upload-btn {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--navy);
  background: var(--champ-lt);
  border: 1px solid var(--champagne);
  border-radius: 99px;
  padding: 2px 8px;
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
}
.photo-upload-btn:hover {
  background: var(--champagne);
}
/* X-ray card upload button */
.photo-card-xray .photo-upload-btn {
  background: #eaf0f8;
  border-color: #b0c4de;
}
.photo-card-xray .photo-upload-btn:hover {
  background: #c5d8ee;
}

/* ── Responsive: photo grid collapses on tablet ───────────── */
@media (max-width: 1100px) {
  .photo-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 900px) {
  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .photo-grid-xray {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .photo-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ─── BILLING REVENUE BAR CHART ─────────────────────────────── */
.bar-chart-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 160px;
  padding: 10px 0;
  border-bottom: 2px solid var(--gray-200);
  margin-top: 10px;
}
.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 8px;
}
.bar-rect {
  width: 70%;
  max-width: 45px;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.15s ease;
  position: relative;
}
.bar-rect:hover {
  transform: scaleY(1.05);
  filter: brightness(0.92);
}
.bar-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  margin-top: 4px;
}

