/* Circular avatar for doctor profile images */
.avatar-circle {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  object-fit: cover;
  background: #e6e6e6;
  display: inline-block;
}
.avatar-placeholder {
  background: #e6e6e6;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: inline-block;
}
:root {
  --bg: #edf5ff;
  --surface: #ffffff;
  --surface-2: #f6faff;
  --ink: #10224f;
  --muted: #63739a;
  --line: #cfe0f7;
  --blue: #2563eb;
  --blue-dark: #1746ad;
  --blue-deep: #0b3f9c;
  --blue-soft: #dceaff;
  --green: #0f9f6e;
  --red: #dc3545;
  --amber: #d97706;
  --shadow: 0 18px 45px rgba(23, 70, 173, .12);
  --font-admin: "Inter", "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-admin);
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, filter .16s ease, opacity .16s ease; }
button:hover:not(:disabled) { transform: translateY(-1px); }
button:active:not(:disabled) { transform: translateY(0) scale(.98); }
button:disabled { cursor: wait; opacity: .72; }
h1, h2, p { margin: 0; }
h1 { font-size: 28px; line-height: 1.08; font-weight: 850; letter-spacing: 0; }
h2 { font-size: 18px; line-height: 1.18; font-weight: 820; letter-spacing: 0; }
.muted { color: var(--muted); line-height: 1.55; }
.eyebrow {
  margin-bottom: 7px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #f8fbff, #dbeaff);
}
body.signed-in .auth-screen { display: none; }
body:not(.signed-in) .sidebar,
body:not(.signed-in) .shell { display: none; }
.auth-card {
  width: min(540px, 100%);
  display: grid;
  gap: 24px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.brand-row { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--blue);
  color: white;
  font-size: 22px;
  font-weight: 900;
}
.brand-row strong { display: block; font-weight: 900; }
.brand-row small { color: var(--muted); font-weight: 700; }
.auth-form, .form-panel { display: grid; gap: 13px; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
input, select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
  outline: none;
}
textarea { min-height: 110px; padding: 12px 13px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37,99,235,.13); }
.primary, .secondary, .danger, .text-button, .icon-button {
  min-height: 42px;
  border-radius: 8px;
  padding: 0 15px;
  font-weight: 850;
}
.primary { background: var(--blue); color: white; box-shadow: 0 10px 24px rgba(37,99,235,.24); }
.secondary { background: var(--blue-soft); color: var(--blue-dark); }
.danger { background: #ffe3e8; color: var(--red); }
.text-button { background: transparent; color: var(--blue); padding: 0 7px; }
.icon-button { display: none; background: var(--blue-soft); color: var(--blue-dark); }
.primary.is-loading, .secondary.is-loading, .danger.is-loading {
  position: relative;
  color: transparent;
}
.primary.is-loading::after, .secondary.is-loading::after, .danger.is-loading::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 999px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  color: white;
  animation: spin .7s linear infinite;
}
.secondary.is-loading::after { color: var(--blue-dark); }
.danger.is-loading::after { color: var(--red); }
.form-note { min-height: 20px; color: var(--muted); font-size: 13px; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 18px;
  overflow-y: auto;
  border-right: 1px solid rgba(255,255,255,.22);
  background: linear-gradient(180deg, var(--blue), var(--blue-deep));
  color: white;
  box-shadow: 10px 0 35px rgba(11,63,156,.18);
}
.sidebar .brand-mark { background: white; color: var(--blue); }
.sidebar .brand-row small { color: rgba(255,255,255,.72); }
.nav-label {
  margin: 12px 8px 2px;
  color: rgba(255,255,255,.58);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.nav { display: grid; gap: 7px; }
.nav-item {
  min-height: 42px;
  padding: 0 13px;
  border-radius: 8px;
  background: transparent;
  color: rgba(255,255,255,.8);
  text-align: left;
  font-weight: 800;
}
.nav-item.active, .nav-item:hover { background: white; color: var(--blue-dark); }
.connection-box {
  margin-top: auto;
  display: flex;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 8px;
  background: rgba(255,255,255,.12);
}
.admin-card {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 8px;
  background: rgba(255,255,255,.12);
}
.admin-card small { color: rgba(255,255,255,.72); }
.connection-box small { display: block; color: rgba(255,255,255,.72); margin-top: 2px; }
.live-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 0 0 5px rgba(217,119,6,.12);
}
.live-dot.connected { background: #44f0ad; box-shadow: 0 0 0 5px rgba(68,240,173,.18); }
.shell { min-width: 0; padding: 22px 28px 28px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  min-height: 70px;
  padding: 0 0 18px;
  background: rgba(237,245,255,.92);
  backdrop-filter: blur(14px);
}
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
#globalSearch { width: min(430px, 38vw); background: white; }
.module { display: none; }
.module.active { display: grid; gap: 18px; }
.overview-page-head h2,
.patients-page-head h2 {
  margin-top: 6px;
  font-size: 31px;
  line-height: 1.08;
  font-weight: 860;
}
.overview-page-head .muted,
.patients-page-head .muted {
  font-size: 14px;
}
.metrics-grid,
.sync-grid {
  display: none;
}
.module[data-panel="overview"] .metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 8px 22px rgba(16, 34, 79, .055);
}
.sync-grid { grid-template-columns: repeat(3, minmax(180px, 1fr)); }
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.quick-actions button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
  color: var(--blue-dark);
  font-weight: 850;
  box-shadow: none;
}
.metric, .panel, .data-card, .sync-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(16, 34, 79, .055);
}
.metric, .panel, .data-card, .sync-card, .list-row, .timeline-row {
  animation: riseIn .28s ease both;
}
.data-card, .list-row, tr {
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease, border-color .18s ease, background .18s ease;
}
.data-card.is-busy, .list-row.is-busy, tr.is-busy {
  opacity: .68;
  transform: scale(.992);
}
.data-card.action-success, .list-row.action-success, tr.action-success {
  border-color: rgba(15, 159, 110, .55);
  background: #f0fff8;
  animation: successPulse .72s ease;
}
.data-card.action-error, .list-row.action-error, tr.action-error {
  border-color: rgba(220, 53, 69, .45);
  background: #fff5f6;
  animation: errorShake .34s ease;
}
.metric {
  min-height: 112px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
}
.module[data-panel="overview"] .metric {
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.module[data-panel="overview"] .metric:nth-child(4n) {
  border-right: 0;
}
.module[data-panel="overview"] .metric:nth-last-child(-n + 4) {
  border-bottom: 0;
}
.metric-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eef4ff;
  color: var(--blue);
}
.metric-icon svg { display: block; }
.metric span:not(.metric-icon) {
  display: block;
  color: #536381;
  font-size: 13px;
  font-weight: 780;
}
.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 27px;
  line-height: 1;
}
.metric small {
  display: block;
  margin-top: 8px;
}
.overview-main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 14px;
}
.overview-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, .8fr);
  gap: 14px;
}
.overview-bottom-grid .quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.overview-bottom-grid .quick-actions button {
  min-height: 68px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.overview-bottom-grid .quick-actions button:nth-child(3n) {
  border-right: 0;
}
.overview-bottom-grid .quick-actions button:nth-last-child(-n + 3) {
  border-bottom: 0;
}
.analytics-panel strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
}
.trend-chart {
  height: 178px;
  display: flex;
  align-items: end;
  gap: 8px;
  padding: 18px 8px 4px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfdff, #fff);
}
.trend-chart span {
  flex: 1;
  min-height: 8px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, var(--blue), #b9d5ff);
}
.appointment-donut {
  min-height: 178px;
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}
.donut-ring {
  width: 140px;
  height: 140px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 999px;
  background: radial-gradient(circle at center, white 48%, transparent 49%), conic-gradient(var(--blue) 0 64%, #24b8a7 64% 78%, #8b5cf6 78% 90%, #d7e4fb 90%);
}
.donut-ring strong { font-size: 24px; }
.donut-ring small { color: var(--muted); }
.donut-legend,
.recent-list {
  display: grid;
  gap: 10px;
}
.donut-legend div,
.recent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.donut-legend span,
.recent-row small {
  color: var(--muted);
}
.recent-row {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.recent-row:last-child { border-bottom: 0; }
.overview-verification-table { display: grid; gap: 0; }
.overview-verification-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 130px 100px 90px;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.overview-verification-row:last-child { border-bottom: 0; }
.sync-card { display: grid; gap: 8px; padding: 16px; border-left: 4px solid var(--blue); }
.sync-card strong { font-size: 15px; }
.sync-card small { color: var(--muted); line-height: 1.45; }
.sync-card .status-line { display: flex; align-items: center; gap: 8px; color: var(--blue-dark); font-weight: 900; }
.mini-dot { width: 9px; height: 9px; border-radius: 999px; background: var(--green); }
.metric span { color: var(--muted); font-size: 12px; font-weight: 850; text-transform: uppercase; }
.metric strong { display: block; margin-top: 9px; font-size: 30px; }
.metric small { color: var(--muted); }
.panel { padding: 18px; }
.panel-head, .toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.split-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 18px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.card-grid.compact { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.data-card { display: grid; gap: 12px; padding: 16px; }
.card-top { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.doctor-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 8px;
}
.doctor-page-head h2 {
  font-size: 31px;
  line-height: 1.08;
  font-weight: 860;
}
.doctor-page-head .muted {
  margin-top: 8px;
  font-size: 14px;
}
.doctor-metrics {
  display: none;
}
.doctor-metric {
  min-height: 116px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}
.doctor-metric span { color: #415071; font-size: 13px; font-weight: 760; }
.doctor-metric strong { font-size: 29px; line-height: 1; font-weight: 860; }
.doctor-metric small { color: var(--muted); font-size: 12px; }
.doctor-metric-blue { border-left: 4px solid var(--blue); }
.doctor-metric-green { border-left: 4px solid var(--green); }
.doctor-metric-red { border-left: 4px solid var(--red); }
.doctor-metric-amber { border-left: 4px solid var(--amber); }
.doctor-tabs-row {
  display: flex;
  justify-content: space-between;
  margin: 4px 0 -2px;
}
.doctor-tabs {
  display: flex;
  gap: 20px;
  overflow-x: auto;
}
.doctor-tabs button {
  min-height: 42px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
  white-space: nowrap;
}
.doctor-tabs button.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}
.doctor-directory-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}
.doctor-table-card,
.doctor-detail-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 8px 22px rgba(16, 34, 79, .055);
  overflow: hidden;
}
.doctor-table-tools {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 160px auto;
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfdff;
}
.doctor-table {
  display: grid;
  min-width: 960px;
}
.doctor-table-head,
.doctor-table-row {
  display: grid;
  grid-template-columns: minmax(230px, 1.35fr) minmax(120px, .76fr) minmax(86px, .48fr) minmax(100px, .55fr) minmax(120px, .62fr) minmax(104px, .56fr) minmax(70px, .38fr) minmax(126px, .72fr);
  align-items: center;
  gap: 12px;
}
.doctor-table-head {
  min-height: 52px;
  padding: 0 16px;
  color: #42526f;
  font-size: 12px;
  font-weight: 820;
}
.doctor-table-row {
  min-height: 76px;
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  transition: background .16s ease, box-shadow .16s ease;
}
.doctor-table-row:hover,
.doctor-table-row.active {
  background: #f7fbff;
  box-shadow: inset 3px 0 0 var(--blue);
}
.doctor-table-row.is-busy,
.doctor-detail-card.is-busy {
  opacity: .68;
  pointer-events: none;
}
.doctor-table-row.action-success,
.doctor-detail-card.action-success {
  animation: successPulse .72s ease;
}
.doctor-table-row.action-error,
.doctor-detail-card.action-error {
  background: #fff5f6;
  animation: errorShake .34s ease;
}
.doctor-person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.doctor-person strong,
.doctor-person small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.doctor-person strong { font-size: 14.5px; font-weight: 850; }
.doctor-person small { color: var(--muted); font-size: 12px; font-weight: 650; margin-top: 3px; }
.rating-cell {
  color: var(--ink);
  font-weight: 850;
}
.rating-cell b {
  color: #f59e0b;
  margin-left: 3px;
}
.rating-cell small {
  color: var(--muted);
  font-weight: 650;
}
.doctor-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.doctor-detail-card {
  padding: 18px;
  position: sticky;
  top: 88px;
}
.doctor-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}
.doctor-detail-profile {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.doctor-detail-avatar {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  object-fit: cover;
}
.doctor-detail-profile h2 {
  font-size: 18px;
  font-weight: 860;
}
.doctor-contact-list {
  display: grid;
  gap: 13px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.doctor-contact-list div,
.doctor-detail-section dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.doctor-contact-list span,
.doctor-detail-section dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.doctor-contact-list strong,
.doctor-detail-section dd {
  margin: 0;
  text-align: right;
  font-size: 13px;
  font-weight: 820;
}
.doctor-detail-section {
  display: grid;
  gap: 14px;
  padding-top: 18px;
}
.doctor-detail-section h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 860;
}
.doctor-detail-section dl {
  display: grid;
  gap: 12px;
  margin: 0;
}
.doctor-detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.patients-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 8px;
}
.breadcrumb {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}
.breadcrumb span { margin: 0 8px; }
.patients-head-actions {
  display: flex;
  gap: 10px;
}
.patient-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 14px;
}
.patient-metric {
  min-height: 132px;
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 10px 26px rgba(16, 34, 79, .07);
}
.patient-metric span {
  color: #415071;
  font-size: 13px;
  font-weight: 760;
}
.patient-metric strong {
  font-size: 27px;
  line-height: 1;
  font-weight: 860;
}
.patient-metric small {
  color: var(--muted);
  font-size: 12px;
}
.metric-wave {
  position: absolute;
  inset: auto 0 0;
  height: 36px;
  opacity: .36;
  background: linear-gradient(135deg, transparent 0 35%, var(--blue-soft) 36% 60%, transparent 61%);
}
.patient-metric-green .metric-wave { background: linear-gradient(135deg, transparent 0 35%, #c7f8df 36% 60%, transparent 61%); }
.patient-metric-purple .metric-wave { background: linear-gradient(135deg, transparent 0 35%, #ead8ff 36% 60%, transparent 61%); }
.patient-metric-amber .metric-wave { background: linear-gradient(135deg, transparent 0 35%, #ffe0c2 36% 60%, transparent 61%); }
.patient-metric-cyan .metric-wave { background: linear-gradient(135deg, transparent 0 35%, #c9f4ff 36% 60%, transparent 61%); }
.patient-filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 150px 150px 150px 150px auto;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 10px 26px rgba(16, 34, 79, .06);
}
.patient-table-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 10px 28px rgba(16, 34, 79, .07);
}
.patient-table { display: grid; min-width: 900px; }
.patient-table-head,
.patient-table-row {
  display: grid;
  grid-template-columns: minmax(230px, 1.2fr) minmax(240px, 1.2fr) 120px 100px 135px 110px 130px;
  align-items: center;
  gap: 12px;
}
.patient-table-head {
  min-height: 54px;
  padding: 0 20px;
  color: #42526f;
  font-size: 12px;
  font-weight: 820;
}
.patient-table-row {
  min-height: 86px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}
.patient-person {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.patient-person strong,
.patient-person small,
.patient-contact small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.patient-person strong { font-size: 14.5px; font-weight: 850; }
.patient-person small,
.patient-contact small { color: var(--muted); font-size: 12px; margin-top: 3px; }
.gender-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
}
.gender-chip.female { background: #ffe8f5; color: #e11d83; }
.gender-chip.male { background: #e6f0ff; color: var(--blue); }
.patient-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.patient-table-footer {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.patient-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
}
.patient-pagination button {
  min-width: 42px;
  padding: 0 12px;
}
.verification-hero h2 { font-size: 28px; }
.verification-metrics {
  display: none;
}
.verification-metric {
  min-height: 112px;
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}
.verification-metric span { color: var(--muted); font-size: 12px; font-weight: 900; }
.verification-metric strong { font-size: 30px; }
.verification-metric small { color: var(--muted); }
.verification-metric-blue { border-left: 4px solid var(--blue); }
.verification-metric-green { border-left: 4px solid var(--green); }
.verification-metric-red { border-left: 4px solid var(--red); }
.verification-metric-amber { border-left: 4px solid var(--amber); }
.verification-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 220px 180px;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}
.verification-workspace {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) minmax(420px, .92fr);
  gap: 0;
  align-items: start;
}
.verification-list { border-radius: 8px 0 0 8px; }
.verification-detail { border-left: 0; border-radius: 0 8px 8px 0; }
.verification-table {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.verification-head-row,
.verification-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(210px, 1.35fr) minmax(120px, .78fr) minmax(110px, .74fr) 118px 96px 120px 42px;
  align-items: center;
  gap: 12px;
}
.verification-head-row {
  min-height: 46px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfdff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.verification-row {
  min-height: 74px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: white;
  color: var(--ink);
  text-align: left;
}
.verification-row:last-child { border-bottom: 0; }
.verification-row:hover, .verification-row.active { background: #f3f8ff; box-shadow: inset 3px 0 0 var(--blue); }
.verification-doctor { display: flex; align-items: center; gap: 10px; min-width: 0; }
.verification-doctor strong, .verification-doctor small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.verification-doctor small { color: var(--muted); margin-top: 3px; }
.location-cell { display: flex; align-items: center; gap: 7px; color: var(--muted); font-weight: 800; }
.flag-dot {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #f4f7fc;
  color: var(--green);
  font-size: 10px;
  font-weight: 900;
}
.row-menu {
  justify-self: center;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
}
.mini-avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  object-fit: cover;
  flex: 0 0 auto;
}
.completion-ring {
  --value: 0;
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: conic-gradient(var(--green) calc(var(--value) * 1%), var(--blue-soft) 0);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}
.completion-ring::before {
  content: "";
  position: absolute;
}
.verification-detail-head { display: flex; justify-content: space-between; gap: 14px; align-items: start; }
.profile-lockup { display: flex; gap: 14px; align-items: center; min-width: 0; }
.detail-avatar { width: 92px; height: 92px; border-radius: 8px; object-fit: cover; }
.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 18px;
}
.detail-grid div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
.detail-grid span { display: block; color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.detail-grid strong { display: block; margin-top: 5px; font-size: 13px; }
.detail-section { display: grid; gap: 12px; margin-top: 20px; }
.detail-section.two-col { grid-template-columns: 1fr 1fr; gap: 18px; }
.document-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.document-review-card {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  min-width: 0;
}
.document-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.document-icon {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-weight: 900;
}
.document-review-card strong, .document-review-card small { display: block; }
.document-review-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.document-review-card small { color: var(--muted); margin-top: 3px; }
.checklist { display: grid; gap: 9px; }
.checklist div { display: flex; align-items: center; gap: 9px; color: var(--muted); font-weight: 800; }
.check-ok, .check-missing {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}
.check-ok { background: #dff8ef; color: var(--green); }
.check-missing { background: #ffe3e8; color: var(--red); }
.verification-actions {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
}
.success-action { background: var(--green); box-shadow: 0 10px 24px rgba(15,159,110,.22); }
.document-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.document-list { display: grid; gap: 9px; }
.document-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
.document-row small { color: var(--muted); }
.document-link {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.document-link:hover { transform: translateY(-1px); border-color: var(--blue); background: var(--blue-soft); }

.verification-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.verification-page-head h2 {
  margin-top: 6px;
  font-size: 30px;
  letter-spacing: 0;
}
.verification-tabs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 26px 0 16px;
}
.verification-tabs {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
  overflow-x: auto;
}
.verification-tabs button {
  min-height: 42px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
  white-space: nowrap;
}
.verification-tabs button.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}
.verification-table-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 8px 22px rgba(16, 34, 79, .055);
}
.verification-table {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.verification-head-row,
.verification-row {
  grid-template-columns: minmax(260px, 1.45fr) minmax(130px, .8fr) minmax(95px, .58fr) minmax(128px, .72fr) minmax(132px, .72fr) minmax(110px, .6fr) minmax(190px, .9fr);
}
.verification-head-row {
  min-height: 52px;
  padding: 0 20px;
  background: white;
  color: #42526f;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}
.verification-row {
  min-height: 92px;
  padding: 16px 20px;
  border: 0;
  border-top: 1px solid var(--line);
  transition: background .16s ease, box-shadow .16s ease, transform .16s ease;
}
.verification-row:hover {
  background: #f8fbff;
  box-shadow: inset 3px 0 0 var(--blue);
}
.verification-row.is-busy {
  opacity: .68;
  pointer-events: none;
}
.verification-row.action-success {
  border-color: rgba(15, 159, 110, .35);
  animation: successPulse .72s ease;
}
.verification-row.action-error {
  background: #fff5f6;
  animation: errorShake .34s ease;
}
.verification-doctor strong {
  font-size: 14px;
}
.verification-doctor small {
  font-size: 12px;
  line-height: 1.35;
}
.specialty-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 7px;
  background: #eef4ff;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 850;
}
.document-summary {
  display: grid;
  gap: 5px;
}
.document-summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.document-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}
.doc-icon,
.doc-extra {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfdff;
  color: #263755;
  font-size: 9px;
  font-weight: 900;
  text-decoration: none;
}
.doc-icon:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-soft);
}
.muted-doc {
  color: var(--muted);
}
.doc-extra {
  color: var(--muted);
  background: var(--surface-2);
}
.verification-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}
.small-action {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 7px;
  font-size: 12px;
}
.icon-only-action {
  width: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 7px;
  font-weight: 900;
}

.verification-page-head {
  margin: 4px 0 24px;
  max-width: 880px;
}
.verification-page-head h2 {
  font-size: 31px;
  line-height: 1.08;
  font-weight: 860;
}
.verification-page-head .muted {
  max-width: 820px;
  margin-top: 8px;
  font-size: 14px;
}
.verification-metric {
  min-height: 116px;
  align-content: center;
  gap: 7px;
  padding: 20px 22px;
}
.verification-metric span {
  color: #415071;
  font-size: 13px;
  font-weight: 760;
}
.verification-metric strong {
  font-size: 29px;
  line-height: 1;
  font-weight: 860;
}
.verification-metric small {
  font-size: 12px;
}
.verification-head-row {
  font-weight: 820;
}
.verification-doctor strong {
  font-size: 14.5px;
  font-weight: 850;
}
.verification-doctor small {
  font-weight: 650;
}
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 850;
}
.pill.green { background: #dff8ef; color: var(--green); }
.pill.red { background: #ffe3e8; color: var(--red); }
.pill.amber { background: #fff2d8; color: var(--amber); }
.list, .timeline, .bars { display: grid; gap: 10px; }
.list-row, .timeline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
.list-row small, .timeline-row small, td small { color: var(--muted); }
.bar-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) minmax(54px, auto); align-items: center; gap: 10px; color: var(--muted); font-size: 13px; font-weight: 800; }
.bar-track { height: 10px; border-radius: 999px; background: var(--blue-soft); overflow: hidden; }
.bar-fill { height: 100%; border-radius: inherit; background: var(--blue); }
.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.segmented button {
  min-height: 34px;
  border-radius: 6px;
  padding: 0 11px;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
}
.segmented button.active { background: var(--blue); color: white; }
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: 0; }
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  max-width: 360px;
  padding: 13px 15px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: .2s ease;
}
.toast.show { opacity: 1; transform: translateY(0); animation: toastPop .22s ease; }
.empty { padding: 16px; color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; background: var(--surface-2); }

@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes successPulse {
  0% { box-shadow: var(--shadow); }
  45% { box-shadow: 0 0 0 5px rgba(15,159,110,.14), var(--shadow); }
  100% { box-shadow: var(--shadow); }
}
@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
@keyframes toastPop {
  from { transform: translateY(8px) scale(.98); }
  to { transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 1050px) {
  body { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 10; width: 280px; transform: translateX(-100%); transition: .2s ease; }
  body.menu-open .sidebar { transform: translateX(0); }
  .icon-button { display: inline-grid; place-items: center; }
  .metrics-grid, .sync-grid, .doctor-metrics, .patient-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-main-grid, .overview-bottom-grid { grid-template-columns: 1fr; }
  .doctor-directory-layout { grid-template-columns: 1fr; }
  .doctor-detail-card { position: static; }
  .verification-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .verification-workspace { grid-template-columns: 1fr; gap: 14px; }
  .verification-list, .verification-detail { border-radius: 8px; border-left: 1px solid var(--line); }
  .quick-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .split-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .shell { padding: 16px; }
  .topbar, .toolbar, .panel-head { align-items: stretch; flex-direction: column; }
  .top-actions { width: 100%; margin-left: 0; display: grid; grid-template-columns: 1fr 1fr; }
  #globalSearch { grid-column: 1 / -1; width: 100%; }
  .metrics-grid, .sync-grid, .doctor-metrics, .patient-metrics { grid-template-columns: 1fr; }
  .patients-page-head { align-items: stretch; flex-direction: column; }
  .patients-head-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .patient-filter-bar { grid-template-columns: 1fr; }
  .patient-table-card { overflow-x: auto; }
  .appointment-donut { grid-template-columns: 1fr; justify-items: center; }
  .overview-verification-row { grid-template-columns: 1fr; }
  .doctor-page-head, .doctor-tabs-row { align-items: stretch; flex-direction: column; }
  .doctor-table-card { overflow-x: auto; }
  .doctor-table-tools { grid-template-columns: 1fr; }
  .doctor-detail-profile { grid-template-columns: 64px minmax(0, 1fr); }
  .doctor-detail-profile .pill { grid-column: 1 / -1; justify-self: start; }
  .doctor-detail-actions { grid-template-columns: 1fr; }
  .verification-metrics, .verification-filters, .detail-grid, .detail-section.two-col, .document-card-grid, .verification-actions { grid-template-columns: 1fr; }
  .verification-head-row { display: none; }
  .verification-row { grid-template-columns: 1fr; gap: 7px; }
  .quick-actions { grid-template-columns: 1fr 1fr; }
  .segmented { overflow-x: auto; max-width: 100%; }
}
