:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --panel-soft: #f1f5f9;
  --text: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --brand: #0369a1;
  --brand-dark: #075985;
  --ink: #111827;
  --danger: #e11d48;
  --success: #059669;
  --warning: #d97706;
  --radius: 18px;
  --shadow: 0 16px 40px rgba(15, 23, 42, .08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.container-narrow {
  width: min(900px, calc(100% - 32px));
  margin: 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.bot-trap-link {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .86);
  border-bottom: 1px solid rgba(226, 232, 240, .9);
  backdrop-filter: blur(16px);
}

.nav-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 214px;
}

.brand-logo {
  display: block;
  width: 214px;
  max-width: 52vw;
  height: auto;
}

.footer .brand-logo {
  width: 220px;
  max-width: 100%;
  border-radius: 8px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--brand);
  color: white;
  box-shadow: 0 12px 28px rgba(2, 132, 199, .24);
  font-weight: 900;
}

.brand-name {
  display: block;
  font-size: 1.28rem;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1;
  color: var(--brand-dark);
}

.brand-kicker {
  display: block;
  margin-top: 2px;
  font-size: .58rem;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: .14em;
}

.nav .brand-kicker {
  color: #475569;
}

.footer .brand-kicker {
  color: #cbd5e1;
}

.nav-links,
.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 9px 12px;
  border-radius: 10px;
  color: #475569;
  font-size: .88rem;
  font-weight: 700;
}

.nav-link:hover,
.nav-link.active {
  background: #e0f2fe;
  color: var(--brand-dark);
}

.icon-link {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #475569;
  background: transparent;
}

.icon-link:hover {
  background: #f1f5f9;
  color: var(--brand);
}

.counter {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--danger);
  color: white;
  font-size: .66rem;
  font-weight: 850;
}

.profile-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 0 4px 10px;
  border-left: 1px solid var(--line);
}

.avatar-sm {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e0f2fe;
  color: #075985;
  font-size: .78rem;
  font-weight: 850;
  border: 1px solid #bae6fd;
}

.mobile-toggle {
  display: none;
}

.mobile-menu {
  display: none;
}

main {
  flex: 1;
  padding-bottom: 56px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 70px 0 60px;
  background:
    linear-gradient(135deg, rgba(2,132,199,.12), transparent 36%),
    linear-gradient(145deg, #111827 0%, #172554 58%, #0f172a 100%);
  color: white;
  border-bottom: 1px solid #0f172a;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -12% -42% auto;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(14, 165, 233, .22), transparent 62%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 860px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(14, 165, 233, .12);
  border: 1px solid rgba(125, 211, 252, .28);
  color: #7dd3fc;
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero h1,
.page-title {
  margin: 16px 0 10px;
  font-size: 3.5rem;
  line-height: 1.04;
  letter-spacing: 0;
}

.hero h1 span {
  color: #38bdf8;
}

.lead {
  color: #cbd5e1;
  max-width: 670px;
  margin: 0 auto;
  font-size: 1rem;
}

.search-bar {
  margin: 30px auto 18px;
  max-width: 920px;
  display: grid;
  grid-template-columns: 1.4fr .85fr auto;
  gap: 8px;
  padding: 8px;
  border-radius: 28px;
  background: white;
  color: var(--text);
  box-shadow: 0 26px 70px rgba(0, 0, 0, .26);
}

.search-bar input,
.search-bar select {
  min-height: 48px;
  border: 0;
  border-radius: 20px;
  padding: 0 15px;
  background: #f8fafc;
  color: var(--text);
  outline: none;
}

.search-bar input:focus,
.search-bar select:focus,
.field:focus,
.select:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(2, 132, 199, .16);
  border-color: var(--brand);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  font-size: .78rem;
  color: #cbd5e1;
}

.quick-tag {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .08);
  color: #e2e8f0;
}

.quick-tag.light {
  background: #f8fafc;
  border-color: var(--line);
  color: #475569;
  font-weight: 800;
}

.quick-tag.light.active,
.quick-tag.light:hover {
  background: #e0f2fe;
  border-color: #bae6fd;
  color: var(--brand-dark);
}

.section {
  padding: 42px 0 0;
}

.landing-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  box-shadow: var(--shadow);
}

.lead-dark {
  max-width: 760px;
  margin: 0;
  color: #475569;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}

.city-filter {
  margin: 14px 0 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
}

.city-filter summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 46px;
  padding: 10px 14px;
  cursor: pointer;
  color: #475569;
  font-size: .86rem;
  font-weight: 850;
  list-style: none;
}

.city-filter summary::-webkit-details-marker {
  display: none;
}

.city-filter summary::after {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #e0f2fe;
  color: var(--brand-dark);
  font-size: 1rem;
}

.city-filter[open] summary::after {
  content: "-";
}

.city-filter-label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.city-filter-label strong {
  color: var(--brand-dark);
}

.city-filter summary small {
  margin-left: auto;
  color: var(--muted);
  font-size: .78rem;
  white-space: nowrap;
}

.city-filter-links {
  max-height: 220px;
  margin: 0;
  padding: 0 14px 14px;
  overflow: auto;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 750;
}

.breadcrumb a {
  color: var(--brand-dark);
}

.landing-count {
  margin-top: 28px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section h2,
.section h1 {
  margin: 0;
  font-size: 1.8rem;
}

.subtle {
  color: var(--muted);
  font-size: .92rem;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

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

.layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 28px;
  align-items: start;
}

.detail-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 28px;
  align-items: start;
}

.card,
.panel {
  background: var(--panel);
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .04);
}

.card {
  overflow: hidden;
}

.panel {
  padding: 22px;
}

.stat-panel {
  padding: 22px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.stat {
  text-align: center;
  padding: 12px;
  border-left: 1px solid var(--line);
}

.stat:first-child {
  border-left: 0;
}

.stat strong {
  display: block;
  color: var(--brand);
  font-size: 1.72rem;
  line-height: 1;
}

.stat span {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 700;
}

.specialty-grid {
  align-items: start;
}

.specialty-card {
  min-height: 190px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: .18s ease;
}

.specialty-card:hover,
.doctor-card:hover,
.article-card:hover {
  transform: translateY(-3px);
  border-color: rgba(14, 165, 233, .45);
  box-shadow: var(--shadow);
}

.specialty-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.specialty-card-kicker {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  font-size: .68rem;
  font-weight: 850;
  white-space: nowrap;
}

.specialty-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.25;
}

.specialty-card h3 a {
  transition: color .18s ease;
}

.specialty-card h3 a:hover,
.specialty-card h3 a:focus-visible {
  color: var(--brand);
}

.specialty-card h3 a:focus-visible,
.specialty-details summary:focus-visible,
.specialty-card-link:focus-visible {
  outline: 2px solid rgba(14, 165, 233, .55);
  outline-offset: 3px;
  border-radius: 8px;
}

.specialty-summary {
  margin: 0;
  color: var(--muted);
  display: -webkit-box;
  overflow: hidden;
  font-size: .86rem;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.specialty-details {
  border-top: 1px solid #f1f5f9;
  padding-top: 8px;
}

.specialty-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  list-style: none;
  color: var(--brand-dark);
  cursor: pointer;
  font-size: .78rem;
  font-weight: 850;
}

.specialty-details summary::-webkit-details-marker {
  display: none;
}

.specialty-details summary::after {
  content: "+";
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #e0f2fe;
  color: var(--brand-dark);
  font-size: .92rem;
  line-height: 1;
}

.specialty-details[open] summary::after {
  content: "-";
}

.specialty-details p {
  max-height: 158px;
  margin: 9px 0 0;
  padding-right: 4px;
  overflow: auto;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.55;
}

.specialty-card-link {
  width: fit-content;
  margin-top: 2px;
  color: var(--brand-dark);
  font-size: .8rem;
  font-weight: 850;
}

.specialty-card-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.specialties-band,
.specialty-directory {
  margin-top: 30px;
}

.specialty-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.specialty-feature-card {
  min-height: 108px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 16px;
  background: white;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .04);
  transition: .18s ease;
}

.specialty-feature-card:hover {
  transform: translateY(-2px);
  border-color: rgba(14, 165, 233, .45);
  box-shadow: var(--shadow);
}

.specialty-feature-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #e0f2fe;
  color: var(--brand-dark);
  font-weight: 900;
}

.specialty-feature-card strong,
.specialty-row strong {
  display: block;
  color: var(--text);
  line-height: 1.2;
}

.specialty-feature-card small,
.specialty-row small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: .78rem;
}

.specialty-letter-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.specialty-letter-nav a {
  min-width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: #334155;
  font-weight: 850;
}

.specialty-groups {
  display: grid;
  gap: 18px;
}

.specialty-group {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  align-items: start;
}

.specialty-group h3 {
  position: sticky;
  top: 86px;
  margin: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #0f172a;
  color: white;
  font-size: 1rem;
}

.specialty-group-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.specialty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 72px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}

.specialty-row em {
  flex: 0 0 auto;
  color: var(--brand-dark);
  font-size: .78rem;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.specialty-icon,
.round-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #e0f2fe;
  color: var(--brand-dark);
  font-weight: 850;
}

.doctor-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 348px;
  background: rgba(255, 255, 255, .82);
  transition: .18s ease;
}

.doctor-card::before {
  content: "";
  display: block;
  height: 7px;
  background: linear-gradient(90deg, #0ea5e9, #4f46e5);
}

.hospital-grid {
  align-items: start;
}

.hospital-card {
  min-height: 218px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(255, 255, 255, .9);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.hospital-card:hover {
  transform: translateY(-2px);
  border-color: rgba(14, 165, 233, .38);
  box-shadow: var(--shadow);
}

.hospital-card-body {
  padding: 18px 18px 14px;
  display: grid;
  gap: 16px;
}

.hospital-card-head {
  display: grid;
  gap: 9px;
}

.hospital-card-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.08rem, 2vw, 1.34rem);
  line-height: 1.22;
}

.hospital-card-title a {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color .18s ease;
}

.hospital-card-title a:hover,
.hospital-card-title a:focus-visible {
  color: var(--brand);
}

.hospital-info-list {
  display: grid;
  gap: 9px;
}

.hospital-info-list p {
  margin: 0;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.hospital-info-list span {
  color: #64748b;
  font-size: .74rem;
  font-weight: 850;
}

.hospital-info-list strong {
  color: #334155;
  font-size: .88rem;
  font-weight: 650;
  line-height: 1.45;
}

.hospital-card-actions {
  display: flex;
  gap: 9px;
  padding: 14px 18px;
  border-top: 1px solid #eaf0f6;
  background: #f8fafc;
}

.doctor-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.doctor-top {
  display: flex;
  gap: 14px;
  min-width: 0;
}

.doctor-photo-link {
  display: inline-flex;
  flex: 0 0 auto;
  border-radius: 16px;
}

.doctor-photo {
  width: 62px;
  height: 62px;
  object-fit: cover;
  border-radius: 16px;
  background: #e2e8f0;
  border: 1px solid var(--line);
  flex: 0 0 auto;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.doctor-photo-link:hover .doctor-photo,
.doctor-photo-link:focus-visible .doctor-photo {
  border-color: rgba(14, 165, 233, .65);
  box-shadow: 0 8px 22px rgba(14, 165, 233, .18);
}

.doctor-name {
  margin: 6px 0 3px;
  font-size: 1.05rem;
  line-height: 1.15;
}

.doctor-name-link {
  transition: color .18s ease;
}

.doctor-name-link:hover,
.doctor-name-link:focus-visible {
  color: var(--brand);
}

.doctor-photo-link:focus-visible,
.doctor-name-link:focus-visible {
  outline: 2px solid rgba(14, 165, 233, .65);
  outline-offset: 3px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .02em;
}

.pill.brand {
  color: #075985;
  background: #e0f2fe;
  min-width: 0;
}

.pill.success {
  color: #047857;
  background: #d1fae5;
}

.pill.danger {
  color: #be123c;
  background: #ffe4e6;
}

.pill.warning {
  color: #92400e;
  background: #fef3c7;
}

.pill.muted {
  color: #475569;
  background: #f1f5f9;
}

.pill.compact {
  display: inline-flex;
  width: fit-content;
  margin-top: 6px;
  padding: 4px 8px;
  font-size: .7rem;
}

.verified-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: 6px;
  border-radius: 999px;
  background: #d1fae5;
  color: #047857;
  font-size: .78rem;
  font-weight: 900;
  line-height: 1;
  vertical-align: middle;
}

.verified-check-lg {
  width: 24px;
  height: 24px;
  font-size: .9rem;
}

.bookmark-form {
  position: absolute;
  top: 14px;
  right: 14px;
}

.heart-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--line);
  color: #94a3b8;
  cursor: pointer;
}

.heart-btn.active {
  color: var(--danger);
  background: #fff1f2;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 12px;
  margin: 18px 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}

.metric-grid.single-metric {
  grid-template-columns: 1fr;
}

.metric small,
.field-label {
  display: block;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 750;
}

.metric strong {
  display: block;
  margin-top: 3px;
  font-size: .82rem;
}

.muted-row {
  display: flex;
  gap: 7px;
  align-items: center;
  min-width: 0;
  color: var(--muted);
  font-size: .78rem;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid #f1f5f9;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 13px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid transparent;
  font-size: .85rem;
  font-weight: 850;
  cursor: pointer;
  transition: .16s ease;
  text-align: center;
}

.btn:hover {
  filter: brightness(.98);
}

.btn-primary {
  background: var(--brand);
  color: white;
  box-shadow: 0 12px 24px rgba(2, 132, 199, .16);
}

.btn-dark {
  background: #0f172a;
  color: white;
}

.btn-danger {
  background: #fff1f2;
  color: var(--danger);
  border-color: #ffe4e6;
}

.btn-ghost {
  background: white;
  border-color: var(--line);
}

.btn-like {
  min-width: 116px;
  justify-content: space-between;
  background: white;
  border-color: var(--line);
}

.btn-like.active {
  background: #e0f2fe;
  color: var(--brand-dark);
  border-color: #7dd3fc;
}

.review-like-count {
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: .78rem;
  line-height: 1;
}

.btn-like.active .review-like-count {
  background: white;
  color: var(--brand-dark);
}

.btn-full {
  width: 100%;
}

.banner {
  padding: 26px;
  border-radius: 24px;
  background: linear-gradient(135deg, #172554, #0f172a);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.feature-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 22px;
}

.testimonial-card {
  background: #0f172a;
  color: white;
}

.quote {
  border-left: 3px solid #0ea5e9;
  padding-left: 12px;
  color: #e2e8f0;
  font-size: .85rem;
}

.sidebar {
  position: sticky;
  top: 88px;
}

.form-stack {
  display: grid;
  gap: 16px;
}

.field,
.select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  color: var(--text);
  outline: none;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.rich-editor-wrapper {
  display: none;
}

.rich-editor-wrapper.is-ready {
  display: block;
}

.rich-editor-wrapper.has-error .ck.ck-editor__main > .ck-editor__editable {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .14);
}

.ck.ck-editor {
  width: 100%;
}

.ck.ck-editor__main > .ck-editor__editable {
  min-height: 300px;
  color: var(--text);
  line-height: 1.7;
}

.ck.ck-editor__main > .ck-editor__editable:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, .16);
}

.filter-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.legal-links {
  margin-bottom: 18px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f1f5f9;
}

.profile-hero,
.doctor-hero {
  padding: 26px;
  border-radius: 24px;
  background: linear-gradient(135deg, #172554, #0f172a);
  color: white;
}

.doctor-hero {
  background:
    linear-gradient(135deg, rgba(14,165,233,.18), transparent 34%),
    linear-gradient(145deg, #ffffff, #f8fafc);
  color: var(--text);
  border: 1px solid var(--line);
}

.doctor-hero-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
}

.doctor-hero-main {
  display: flex;
  align-items: flex-end;
  gap: 18px;
}

.doctor-photo-lg {
  width: 118px;
  height: 118px;
  border-radius: 24px;
  border: 4px solid white;
  object-fit: cover;
  box-shadow: 0 12px 32px rgba(15,23,42,.12);
}

.fact-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.fact-list div {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.fact-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.fact-list dt {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
}

.fact-list dd {
  margin: 0;
  color: var(--text);
  font-size: .9rem;
  font-weight: 750;
}

.faq-panel {
  display: grid;
  gap: 12px;
}

.faq-item {
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
}

.faq-item summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 850;
}

.faq-item p {
  margin: 10px 0 0;
}

.list-clean {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.list-clean li {
  display: flex;
  gap: 10px;
  color: #475569;
  font-size: .9rem;
}

.chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid var(--line);
  font-size: .78rem;
  font-weight: 750;
}

.chip.active {
  color: var(--brand-dark);
  background: #e0f2fe;
  border-color: #7dd3fc;
}

.review {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: white;
}

.review-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.review-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.review-like-form {
  margin: 0;
}

.progress-line {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.progress-line span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.article-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: #e2e8f0;
}

.article-body {
  padding: 18px;
  display: grid;
  gap: 12px;
}

.home-article-card .article-body {
  align-content: start;
}

.home-article-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.12rem;
  line-height: 1.25;
}

.home-article-card h3 a {
  transition: color .18s ease;
}

.home-article-card h3 a:hover,
.home-article-card h3 a:focus-visible {
  color: var(--brand);
}

.home-article-card p {
  margin: 0;
}

.home-article-card .btn {
  width: fit-content;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.article-date {
  color: #64748b;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.35;
}

.article-content {
  display: grid;
  gap: 14px;
  line-height: 1.75;
  color: var(--text);
}

.article-content h2,
.article-content h3,
.article-content h4 {
  margin: 12px 0 0;
  line-height: 1.25;
}

.article-content h2 {
  font-size: 1.45rem;
}

.article-content h3 {
  font-size: 1.22rem;
}

.article-content h4 {
  font-size: 1.05rem;
}

.article-content p,
.article-content ul,
.article-content ol,
.article-content blockquote {
  margin: 0;
}

.article-content ul,
.article-content ol {
  padding-left: 22px;
}

.article-content blockquote {
  border-left: 4px solid var(--brand);
  padding: 10px 0 10px 16px;
  color: var(--muted);
  background: #f8fafc;
}

.article-content a {
  color: var(--brand-dark);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.tab {
  padding: 0 0 12px;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 850;
  border-bottom: 2px solid transparent;
}

.tab.active {
  color: var(--brand-dark);
  border-bottom-color: var(--brand);
}

.profile-page .tabs {
  margin-top: 22px;
}

.profile-hero-dashboard {
  display: grid;
  gap: 22px;
  padding: 26px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(20, 184, 166, .24), transparent 42%),
    linear-gradient(145deg, #0f172a 0%, #134e4a 100%);
}

.profile-hero-content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 20px;
  background: white;
  color: #0f766e;
  border: 1px solid rgba(255, 255, 255, .72);
  box-shadow: 0 18px 36px rgba(15, 23, 42, .18);
  font-size: 1.45rem;
  font-weight: 900;
}

.profile-kicker {
  display: block;
  margin-bottom: 4px;
  color: #a7f3d0;
  font-size: .8rem;
  font-weight: 850;
}

.profile-hero-dashboard h1 {
  margin: 0;
  color: white;
  font-size: 2rem;
  line-height: 1.1;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.profile-meta span {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: #e0f2fe;
  border: 1px solid rgba(255, 255, 255, .18);
  font-size: .82rem;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.profile-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.btn-on-dark {
  background: rgba(255, 255, 255, .12);
  color: white;
  border-color: rgba(255, 255, 255, .22);
}

.btn-on-dark-primary {
  background: white;
  color: #0f766e;
  border-color: white;
  box-shadow: 0 14px 28px rgba(15, 23, 42, .18);
}

.profile-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr);
  gap: 18px;
  align-items: start;
}

.profile-main-column,
.profile-side-column,
.profile-doctor-list,
.quick-action-list {
  display: grid;
  gap: 14px;
}

.profile-panel {
  display: grid;
  gap: 16px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel-head h2 {
  font-size: 1.12rem;
  line-height: 1.2;
}

.panel-head .subtle {
  margin: 6px 0 0;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  color: var(--brand-dark);
  font-size: .84rem;
  font-weight: 850;
  white-space: nowrap;
}

.text-link:hover {
  color: var(--brand);
}

.profile-empty-compact {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid var(--line);
}

.profile-empty-compact p {
  margin: 0;
}

.profile-doctor-row {
  justify-content: space-between;
  gap: 16px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.profile-doctor-row:hover,
.profile-doctor-row:focus-visible {
  border-color: rgba(14, 165, 233, .55);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .07);
  transform: translateY(-1px);
}

.profile-doctor-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.profile-doctor-info > span {
  min-width: 0;
}

.profile-doctor-info strong,
.profile-doctor-info small {
  display: block;
}

.profile-doctor-photo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}

.profile-row-action {
  color: var(--brand-dark);
  font-size: .8rem;
  font-weight: 850;
  white-space: nowrap;
}

.quick-action {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  transition: border-color .18s ease, background .18s ease;
}

.quick-action:hover,
.quick-action:focus-visible {
  background: #ecfeff;
  border-color: #67e8f9;
}

.quick-action span {
  color: var(--text);
  font-size: .9rem;
  font-weight: 850;
}

.quick-action strong {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 750;
}

.profile-action-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profile-action-panel .btn {
  justify-content: center;
  min-height: 48px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, .52);
  backdrop-filter: blur(10px);
}

.modal-backdrop.is-hidden {
  display: none;
}

body.modal-open {
  overflow: hidden;
}

.modal {
  width: min(620px, 100%);
  max-height: 92vh;
  overflow: auto;
  border-radius: 24px;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0,0,0,.28);
}

.modal-wide {
  width: min(760px, 100%);
}

.modal-head,
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.modal-foot {
  border-bottom: 0;
  border-top: 1px solid var(--line);
}

.modal-body {
  padding: 22px;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.slot-grid input,
.rating-grid input,
.tag-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.slot-grid span,
.rating-grid span,
.tag-choice span {
  display: block;
  cursor: pointer;
  text-align: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: white;
  color: #475569;
  padding: 9px 10px;
  font-size: .82rem;
  font-weight: 800;
}

.slot-grid input:checked + span,
.rating-grid input:checked + span,
.tag-choice input:checked + span {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
}

.rating-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.match-doctor {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: white;
}

.flash {
  width: min(1180px, calc(100% - 32px));
  margin: 18px auto 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #ecfeff;
  color: #0e7490;
  border: 1px solid #a5f3fc;
  font-size: .88rem;
  font-weight: 750;
}

.flash.error {
  background: #fff1f2;
  color: #be123c;
  border-color: #fecdd3;
}

.empty-state {
  text-align: center;
  padding: 48px;
}

.auth-shell {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 22px;
  align-items: start;
}

.auth-help {
  background: #f8fafc;
}

.auth-shell-centered {
  grid-template-columns: minmax(0, 520px);
  justify-content: center;
}

.login-shell {
  min-height: calc(100vh - 220px);
  align-items: center;
}

.contact-shell {
  grid-template-columns: minmax(0, 720px);
  justify-content: center;
}

.auth-form-links {
  margin-top: -8px;
  text-align: right;
  font-size: .86rem;
  font-weight: 850;
}

.auth-legal {
  margin: 0;
  line-height: 1.55;
}

.auth-form-links a,
.auth-legal a {
  color: var(--brand-dark);
  font-weight: 850;
}

.dev-reset-link {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px dashed #7dd3fc;
  border-radius: 12px;
  background: #f0f9ff;
  overflow-wrap: anywhere;
}

.dev-reset-link strong {
  color: var(--brand-dark);
}

.admin-layout {
  grid-template-columns: 320px 1fr;
}

.admin-doctor-list {
  display: grid;
  gap: 10px;
}

.admin-doctor-row {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}

.admin-doctor-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.admin-doctor-link span {
  min-width: 0;
}

.admin-status-form {
  justify-content: flex-end;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}

.admin-doctor-list-wide {
  gap: 12px;
}

.admin-doctor-row-wide {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.admin-doctor-row-wide .actions {
  justify-content: flex-end;
  margin: 0;
}

.admin-doctor-row-wide .admin-status-form {
  padding-top: 0;
  border-top: 0;
}

.compact-admin-head {
  margin-bottom: 12px;
}

.compact-admin-head h1 {
  margin: 0;
  font-size: 2rem;
}

.upload-dropzone {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1.5px dashed #94a3b8;
  border-radius: 14px;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.upload-dropzone:hover,
.upload-dropzone.is-dragover {
  border-color: var(--brand);
  background: #eff6ff;
}

.upload-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-dropzone-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: white;
  color: var(--brand);
  font-size: 1.3rem;
  font-weight: 900;
  border: 1px solid var(--line);
}

.upload-dropzone strong,
.upload-dropzone small {
  display: block;
}

.upload-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.upload-preview img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.table th,
.table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: .86rem;
}

.table th {
  color: #475569;
  background: #f8fafc;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.compact-field {
  min-height: 36px;
  padding: 7px 9px;
  font-size: .82rem;
}

.check-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #475569;
  font-size: .84rem;
  font-weight: 750;
}

.compact-metrics {
  min-width: 250px;
  margin: 0;
}

.article-detail {
  display: grid;
  gap: 20px;
}

.article-detail img {
  width: 100%;
  height: min(360px, 45vw);
  min-height: 220px;
  object-fit: cover;
  border-radius: 18px;
  background: #e2e8f0;
}

.legal-content {
  display: grid;
  gap: 24px;
}

.legal-header {
  display: grid;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.legal-header h1 {
  font-size: 2rem;
}

.legal-section {
  display: grid;
  gap: 10px;
}

.legal-section + .legal-section {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.legal-section h2 {
  margin: 0;
  font-size: 1.12rem;
}

.legal-section p,
.legal-section li {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}

.legal-section ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.legal-table-wrap {
  margin-top: 4px;
}

.legal-table {
  min-width: 640px;
}

.footer {
  padding: 38px 0;
  background: #0f172a;
  color: white;
  border-top: 1px solid #1e293b;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.2fr;
  gap: 30px;
}

.footer-bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, .22);
  text-align: center;
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 18px;
  margin-bottom: 14px;
}

.footer-legal-links a {
  color: #cbd5e1;
  font-size: .82rem;
  font-weight: 700;
  white-space: nowrap;
}

.footer-legal-links a:hover,
.footer-legal-links a:focus-visible {
  color: white;
}

.footer-bottom p {
  margin: 0;
  font-size: .86rem;
}

.footer a,
.footer p {
  color: #94a3b8;
}

@media (max-width: 980px) {
  .nav-links,
  .nav-actions {
    display: none;
  }

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #334155;
  }

  .mobile-menu.open {
    display: grid;
    gap: 6px;
    padding: 12px 16px 16px;
    border-top: 1px solid var(--line);
    background: white;
  }

  .brand {
    min-width: 0;
  }

  .search-bar,
  .layout,
  .detail-layout,
  .feature-grid,
  .profile-action-panel,
  .footer-grid,
  .auth-shell,
  .profile-dashboard,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .profile-hero-content {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-hero-actions {
    justify-content: flex-start;
  }

  .sidebar {
    position: static;
  }

  .grid-4,
  .grid-3,
  .specialty-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .doctor-hero-top,
  .doctor-hero-main,
  .banner,
  .landing-hero {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .container,
  .container-narrow {
    width: min(100% - 24px, 1180px);
  }

  .hero {
    padding: 42px 0;
  }

  .hero h1,
  .page-title {
    font-size: 2.1rem;
  }

  .search-bar {
    border-radius: 22px;
  }

  .nav .brand-logo {
    width: 176px;
  }

  .grid-4,
  .grid-3,
  .grid-2,
  .specialty-feature-grid,
  .specialty-group-list,
  .stat-panel,
  .fact-list div,
  .metric-grid,
  .slot-grid,
  .rating-grid {
    grid-template-columns: 1fr;
  }

  .specialty-group {
    grid-template-columns: 1fr;
  }

  .specialty-group h3 {
    position: static;
  }

  .specialty-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .stat {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .stat:first-child {
    border-top: 0;
  }

  .actions {
    flex-direction: column;
  }

  .toolbar,
  .section-head,
  .panel-head,
  .review-head {
    align-items: stretch;
    flex-direction: column;
  }

  .city-filter summary {
    align-items: flex-start;
  }

  .city-filter-label {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .profile-hero-dashboard {
    padding: 20px;
  }

  .profile-identity,
  .profile-doctor-info {
    align-items: flex-start;
  }

  .profile-avatar {
    width: 62px;
    height: 62px;
    border-radius: 18px;
  }

  .profile-hero-dashboard h1 {
    font-size: 1.65rem;
  }

  .profile-hero-actions,
  .profile-hero-actions .btn,
  .profile-doctor-row {
    width: 100%;
  }

  .profile-doctor-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-doctor-row-wide {
    grid-template-columns: 1fr;
  }

  .admin-doctor-row-wide .actions,
  .admin-doctor-row-wide .actions .btn,
  .admin-doctor-row-wide .admin-status-form {
    width: 100%;
  }
}

.warning-panel {
  border-color: #fde68a;
  background: #fffbeb;
}

.warning-panel strong {
  color: #92400e;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  transition: width .25s ease;
}

.admin-inline-detail {
  max-width: 420px;
}

.admin-inline-detail summary {
  list-style: none;
  cursor: pointer;
}

.admin-inline-detail summary::-webkit-details-marker {
  display: none;
}

.admin-inline-detail p {
  margin: 8px 0 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
}

.table-wrap {
  overflow-x: auto;
}

.table {
  border-collapse: collapse;
  min-width: 860px;
  width: 100%;
}

.table th,
.table td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

.text-link {
  color: var(--brand);
  font-weight: 700;
}

body.admin-body {
  --admin-bg: #f4f6f8;
  --admin-surface: #ffffff;
  --admin-surface-soft: #f8faf9;
  --admin-border: #dde5e1;
  --admin-text: #111827;
  --admin-muted: #647067;
  --admin-accent: #0f766e;
  --admin-accent-dark: #115e59;
  --admin-sidebar: #18181b;
  --admin-sidebar-soft: #27272a;
  --admin-danger: #be123c;
  --admin-warning: #b45309;
  background: var(--admin-bg);
  color: var(--admin-text);
}

.admin-shell-v2 {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  background: var(--admin-bg);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 14px;
  overflow-y: auto;
  background: var(--admin-sidebar);
  color: #f4f4f5;
  border-right: 1px solid #27272a;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 8px 8px 16px;
  border-bottom: 1px solid rgba(244, 244, 245, .10);
}

.admin-brand-logo {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid rgba(244, 244, 245, .16);
}

.admin-brand-logo img {
  width: 34px;
  max-width: 100%;
  height: auto;
}

.admin-brand strong,
.admin-brand small {
  display: block;
}

.admin-brand strong {
  font-size: 1rem;
  line-height: 1.1;
}

.admin-brand small {
  margin-top: 4px;
  color: #a1a1aa;
  font-size: .76rem;
  font-weight: 750;
}

.admin-side-nav {
  display: grid;
  gap: 4px;
  margin-top: 16px;
}

.admin-side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #d4d4d8;
  font-size: .88rem;
  font-weight: 800;
  transition: background .16s ease, color .16s ease;
}

.admin-side-link:hover,
.admin-side-link.active {
  background: var(--admin-sidebar-soft);
  color: #ffffff;
}

.admin-side-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #3f3f46;
  color: #ccfbf1;
  font-size: .68rem;
  font-weight: 900;
}

.admin-side-link.active .admin-side-icon {
  background: var(--admin-accent);
  color: #ffffff;
}

.admin-sidebar-footer {
  display: grid;
  gap: 10px;
  padding: 12px 8px 4px;
  border-top: 1px solid rgba(244, 244, 245, .10);
  color: #a1a1aa;
  font-size: .78rem;
  font-weight: 750;
}

.admin-secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #ffffff;
  color: #18181b;
  font-weight: 850;
}

.admin-workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 35;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 28px;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--admin-border);
  backdrop-filter: blur(14px);
}

.admin-topbar-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.admin-topbar-title span {
  color: var(--admin-muted);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.admin-topbar-title strong {
  overflow: hidden;
  color: var(--admin-text);
  font-size: .98rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.admin-user-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: #ffffff;
}

.admin-user-pill strong,
.admin-user-pill small {
  display: block;
  line-height: 1.15;
}

.admin-user-pill strong {
  max-width: 160px;
  overflow: hidden;
  color: var(--admin-text);
  font-size: .82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-pill small {
  margin-top: 3px;
  color: var(--admin-muted);
  font-size: .7rem;
  font-weight: 800;
}

.admin-main {
  flex: 1;
  padding: 28px;
}

.admin-flash {
  width: auto;
  margin: 18px 28px 0;
  border-radius: 8px;
}

.admin-body main {
  padding-bottom: 0;
}

.admin-body .section {
  padding: 0;
}

.admin-body .container,
.admin-body .container-narrow {
  width: 100%;
  max-width: none;
  margin: 0;
}

.admin-body .section > .container > h1 {
  margin: 0;
  color: var(--admin-text);
  font-size: 1.55rem;
  line-height: 1.2;
}

.admin-body .section > .container > h1 + .subtle {
  max-width: 820px;
  margin: 6px 0 20px;
}

.admin-body .subtle {
  color: var(--admin-muted);
}

.admin-page-tabs {
  display: none;
}

.admin-body .panel {
  border-color: var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface);
  box-shadow: 0 10px 28px rgba(24, 24, 27, .06);
}

.admin-body .panel h2,
.admin-body .section h2 {
  margin: 0;
  color: var(--admin-text);
  font-size: 1.03rem;
  line-height: 1.25;
}

.admin-body .grid {
  gap: 14px;
}

.admin-body .grid-4 {
  grid-template-columns: repeat(4, minmax(170px, 1fr));
}

.admin-body .layout {
  gap: 18px;
}

.admin-body .admin-layout {
  grid-template-columns: minmax(270px, 320px) minmax(0, 1fr);
}

.admin-body .panel.stat {
  min-height: 116px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  text-align: left;
  border-left: 1px solid var(--admin-border);
}

.admin-body .stat {
  border-left: 0;
}

.admin-body .stat strong {
  color: var(--admin-text);
  font-size: 1.9rem;
  line-height: 1;
}

.admin-body .stat span {
  color: var(--admin-muted);
  font-size: .75rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.admin-body .panel:not(.stat) > .grid .stat {
  min-height: 84px;
  padding: 14px;
  text-align: left;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface-soft);
}

.admin-body .section-head {
  align-items: center;
  margin-bottom: 18px;
}

.admin-body .field,
.admin-body .select,
.admin-body textarea {
  min-height: 40px;
  border-color: var(--admin-border);
  border-radius: 8px;
  background: #ffffff;
}

.admin-body textarea {
  min-height: 104px;
}

.admin-body .field-label {
  margin-bottom: 6px;
  color: #4b5f56;
  font-size: .74rem;
  font-weight: 850;
}

.admin-body .btn {
  min-height: 38px;
  border-radius: 8px;
  font-size: .82rem;
}

.admin-body .btn-primary {
  background: var(--admin-accent);
  box-shadow: 0 10px 20px rgba(15, 118, 110, .16);
}

.admin-body .btn-primary:hover {
  background: var(--admin-accent-dark);
}

.admin-body .btn-dark {
  background: #18181b;
}

.admin-body .btn-ghost {
  background: #ffffff;
  border-color: var(--admin-border);
}

.admin-body .btn-danger {
  background: #fff1f2;
  color: var(--admin-danger);
  border-color: #fecdd3;
}

.admin-body .quick-tag.light {
  border-color: var(--admin-border);
  border-radius: 8px;
  background: #ffffff;
}

.admin-body .quick-tag.light.active,
.admin-body .quick-tag.light:hover {
  border-color: #99f6e4;
  background: #ccfbf1;
  color: var(--admin-accent-dark);
}

.admin-body .table-wrap {
  border-radius: 8px;
}

.admin-body .table {
  min-width: 860px;
  border-collapse: separate;
  border-spacing: 0;
}

.admin-body .table th,
.admin-body .table td {
  border-bottom: 1px solid var(--admin-border);
  padding: 12px;
  font-size: .84rem;
}

.admin-body .table th {
  background: #f6f8f7;
  color: #5f6f67;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: 0;
}

.admin-body .table tbody tr:hover td {
  background: #fbfcfb;
}

.admin-body .inline-form {
  gap: 7px;
}

.admin-body .compact-field {
  min-height: 34px;
  padding: 7px 9px;
}

.admin-body .check-row {
  color: var(--admin-muted);
}

.admin-body .pill.compact {
  border-radius: 8px;
  letter-spacing: 0;
}

.admin-body .pill.success {
  background: #dcfce7;
  color: #166534;
}

.admin-body .pill.warning {
  background: #fef3c7;
  color: var(--admin-warning);
}

.admin-body .pill.danger {
  background: #ffe4e6;
  color: var(--admin-danger);
}

.admin-body .pill.muted {
  background: #f1f5f9;
  color: #475569;
}

.admin-body .admin-doctor-row {
  border-color: var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface-soft);
}

.admin-body .admin-doctor-row:hover {
  background: #ffffff;
}

.admin-body .admin-status-form {
  border-top-color: var(--admin-border);
}

.admin-body .empty-state {
  padding: 22px;
  border: 1px dashed var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface-soft);
}

.admin-dashboard-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.admin-dashboard-head h1 {
  margin: 6px 0 6px;
  color: var(--admin-text);
  font-size: 1.65rem;
  line-height: 1.18;
}

.admin-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #ccfbf1;
  color: var(--admin-accent-dark);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.admin-dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-ops-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 14px;
  margin-top: 14px;
}

.admin-task-list,
.admin-shortcut-list {
  display: grid;
  gap: 8px;
}

.admin-task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface-soft);
}

.admin-task-row span {
  color: var(--admin-text);
  font-size: .86rem;
  font-weight: 800;
}

.admin-task-row strong {
  flex: 0 0 auto;
  color: var(--admin-accent-dark);
  font-size: .94rem;
}

.admin-shortcut-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-shortcut-list a {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface-soft);
  color: var(--admin-text);
  font-size: .82rem;
  font-weight: 850;
}

.admin-task-row:hover,
.admin-shortcut-list a:hover {
  border-color: #99f6e4;
  background: #f0fdfa;
}

.admin-quality-panel {
  margin-top: 14px;
}

.admin-body .ck.ck-editor__main > .ck-editor__editable {
  border-radius: 0 0 8px 8px;
}

@media (max-width: 1180px) {
  .admin-shell-v2 {
    grid-template-columns: 238px minmax(0, 1fr);
  }

  .admin-body .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .admin-shell-v2 {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    display: none;
  }

  .admin-main {
    padding: 20px;
  }

  .admin-flash {
    margin: 14px 20px 0;
  }

  .admin-page-tabs {
    display: flex;
    gap: 8px;
    margin: 0 0 18px;
    padding: 8px;
    overflow-x: auto;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: #ffffff;
  }

  .admin-page-tabs .tab {
    flex: 0 0 auto;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 8px;
    color: var(--admin-muted);
    font-size: .82rem;
    font-weight: 850;
  }

  .admin-page-tabs .tab.active,
  .admin-page-tabs .tab:hover {
    background: #ccfbf1;
    color: var(--admin-accent-dark);
  }

  .admin-body .admin-layout,
  .admin-body .layout,
  .admin-ops-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .admin-topbar {
    position: static;
    align-items: stretch;
    flex-direction: column;
    padding: 14px 16px;
  }

  .admin-topbar-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .admin-user-pill {
    max-width: 100%;
  }

  .admin-main {
    padding: 16px;
  }

  .admin-body .grid-4,
  .admin-body .grid-3,
  .admin-body .grid-2 {
    grid-template-columns: 1fr;
  }

  .admin-body .section > .container > h1 {
    font-size: 1.32rem;
  }

  .admin-dashboard-head {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-dashboard-actions {
    justify-content: flex-start;
  }

  .admin-shortcut-list {
    grid-template-columns: 1fr;
  }
}
