:root {
  --navy: #0b3b75;
  --navy-2: #082c57;
  --green: #2f7b2b;
  --teal: #099f91;
  --mint: #eaf7f4;
  --sky: #eef7ff;
  --ink: #10263d;
  --muted: #5f7084;
  --border: #d9e8ef;
  --white: #ffffff;
  --soft: #f7fbff;
  --shadow: 0 18px 55px rgba(8, 44, 87, 0.11);
  --radius: 28px;
  --radius-sm: 18px;
  --header-h: 86px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  background: var(--white);
  color: var(--ink);
  direction: rtl;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.admin-body { background: #f4f8fb; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: absolute; opacity: 0; pointer-events: none; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  color: var(--navy);
  white-space: nowrap;
}
.brand img { width: 52px; height: 52px; object-fit: contain; border: 1px solid #e4eff1; border-radius: 50%; padding: 4px; background: #fff; }
.main-nav { display: flex; align-items: center; gap: 20px; color: #50667c; font-weight: 800; }
.main-nav a { padding: 10px 0; position: relative; font-size: 15px; }
.main-nav a:hover, .main-nav a.active { color: var(--navy); }
.main-nav a.active::after, .main-nav a:hover::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--green), var(--navy));
}
.booking-link {
  color: var(--white) !important;
  background: linear-gradient(135deg, var(--navy), var(--teal));
  border-radius: 999px;
  padding: 13px 24px !important;
  box-shadow: 0 12px 28px rgba(11,59,117,.18);
}
.booking-link::after { display: none; }
.nav-toggle { display: none; background: transparent; border: 0; width: 46px; height: 46px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 6px auto; border-radius: 8px; }

.page { min-height: calc(100vh - var(--header-h)); }
.section { padding: 72px 0; }
.section.compact { padding: 52px 0; }
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 22%, rgba(47,123,43,.12), transparent 28%),
    radial-gradient(circle at 8% 20%, rgba(9,159,145,.12), transparent 32%),
    linear-gradient(180deg, #ffffff, #f4fbff);
  padding: 24px 0 58px;
}
.hero::before {
  content: "";
  position: absolute;
  width: 620px;
  height: 620px;
  border: 1px solid rgba(11,59,117,.10);
  border-radius: 50%;
  left: -220px;
  top: -180px;
}
.grid-2 { display: grid; grid-template-columns: 1.02fr .98fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(47,123,43,.22);
  background: rgba(234,247,244,.9);
  color: var(--green);
  font-weight: 900;
  font-size: 14px;
  width: fit-content;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
h1, h2, h3, p { margin-top: 0; }
.hero h1, .page-title h1 {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.2;
  margin: 20px 0 16px;
  letter-spacing: -0.8px;
  color: var(--ink);
}
.hero h1 strong, .page-title h1 strong { color: var(--navy); display: block; margin-bottom: 8px; }
@media (min-width: 701px) {
  .hero h1 strong, .page-title h1 strong {
    white-space: nowrap !important;
  }
}
.lead {
  color: var(--muted);
  font-size: 19px;
  line-height: 2;
  max-width: 720px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; align-items: center; }
.btn {
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 900;
  color: var(--white);
  background: linear-gradient(135deg, var(--navy), var(--teal));
  box-shadow: 0 16px 32px rgba(11, 59, 117, .18);
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 18px 38px rgba(11, 59, 117, .22); filter: saturate(1.06); }
.btn.secondary { background: var(--white); color: var(--navy); border: 1px solid var(--border); box-shadow: none; }
.btn.small { min-height: 40px; padding: 10px 14px; font-size: 14px; }
.btn.danger { background: #fff; color: #a73a3a; border: 1px solid #f1caca; box-shadow: none; }
.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  box-shadow: var(--shadow);
  background: var(--white);
  border: 1px solid var(--border);
  isolation: isolate;
}
.hero-card img { width: 100%; aspect-ratio: 4 / 3.35; object-fit: cover; object-position: 35% center; }
.doctor-caption {
  position: absolute;
  inset-inline: 24px;
  bottom: 24px;
  border-radius: 22px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px);
  padding: 20px 22px;
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 12px 34px rgba(8, 44, 87, .10);
}
.doctor-caption span { color: var(--green); font-weight: 900; font-size: 14px; }
.doctor-caption h2 { margin: 7px 0 5px; color: var(--navy); font-size: 25px; }
.doctor-caption p { color: #526a82; margin: 0; font-weight: 700; }
.floating-stat {
  position: absolute;
  top: 28px;
  left: 26px;
  background: #fff;
  border-radius: 16px;
  padding: 16px 18px;
  min-width: 120px;
  box-shadow: 0 18px 40px rgba(8, 44, 87, .13);
  border: 1px solid var(--border);
  color: var(--navy);
  font-weight: 900;
  text-align: center;
}
.floating-stat strong { font-size: 32px; display: block; }
.quick-info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.info-card, .glass-card {
  background: rgba(255,255,255,.92);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  box-shadow: 0 12px 38px rgba(8, 44, 87, .06);
}
.info-card small { display: block; color: var(--green); font-weight: 900; margin-bottom: 6px; }
.info-card strong { display: block; color: var(--navy); line-height: 1.7; }
.section-head { margin-bottom: 34px; display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.section-head.center { display: block; text-align: center; }
.section-head h2 {
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.18;
  letter-spacing: -1px;
  color: var(--ink);
  margin: 14px 0 10px;
}
.section-head p { color: var(--muted); line-height: 1.9; font-size: 17px; max-width: 760px; margin-bottom: 0; }
.section-head.center p { margin-inline: auto; }
.cards-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cards-grid.three { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 26px;
  box-shadow: 0 16px 42px rgba(8,44,87,.06);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  min-height: 210px;
  text-align: center;
}
.card:hover { transform: translateY(-7px); border-color: rgba(9,159,145,.35); box-shadow: 0 22px 58px rgba(8,44,87,.10); }
.line-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f3faf8, #e5f1ef);
  color: var(--navy);
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
}
.line-icon svg { width: 28px; height: 28px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { color: var(--navy); font-size: 22px; margin-bottom: 12px; }
.card p { color: var(--muted); line-height: 1.9; margin-bottom: 0; }
.card .number { color: var(--green); font-size: 22px; font-weight: 900; display: block; margin-bottom: 12px; }
.panel {
  background: linear-gradient(135deg, var(--navy), #0d4e86);
  color: #fff;
  border-radius: 34px;
  padding: 42px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
}
.panel::after { content: ""; position: absolute; width: 300px; height: 300px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; left: -90px; bottom: -120px; }
.panel h2 { font-size: clamp(30px, 4vw, 48px); margin-bottom: 14px; }
.panel p { color: rgba(255,255,255,.82); line-height: 1.9; max-width: 760px; }
.panel .btn.secondary { background: #fff; color: var(--navy); }
.page-hero {
  background:
    radial-gradient(circle at 85% 15%, rgba(47,123,43,.11), transparent 28%),
    linear-gradient(180deg, #fff, #f4fbff);
  padding: 56px 0 42px;
  border-bottom: 1px solid var(--border);
}
.page-title { max-width: 900px; }
.page-title h1 { margin-bottom: 14px; }
.content-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 42px; align-items: start; }
.about-photo { border-radius: 30px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); position: sticky; top: 110px; }
.about-photo img { width: 100%; aspect-ratio: 4/4.3; object-fit: cover; object-position: center; }
.text-block { background: #fff; border: 1px solid var(--border); border-radius: 26px; padding: 30px; box-shadow: 0 16px 42px rgba(8,44,87,.05); margin-bottom: 20px; }
.text-block h2, .text-block h3 { color: var(--navy); margin-bottom: 12px; }
.text-block p, .text-block li { color: var(--muted); line-height: 2; }
.text-block ul { padding-inline-start: 22px; margin: 0; }
.badge-list { display: flex; flex-wrap: wrap; gap: 10px; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; background: var(--mint); color: var(--green); border: 1px solid rgba(47,123,43,.2); padding: 7px 12px; font-weight: 800; font-size: 13px; }
.procedure-list { display: grid; grid-template-columns: repeat(2,1fr); gap: 18px; }
.procedure-item { display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: start; background: #fff; border: 1px solid var(--border); border-radius: 22px; padding: 20px; box-shadow: 0 14px 34px rgba(8,44,87,.04); }
.procedure-item .step { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; color: #fff; background: linear-gradient(135deg, var(--navy), var(--teal)); font-weight: 900; }
.procedure-item h3 { color: var(--navy); margin-bottom: 8px; }
.procedure-item p { margin: 0; color: var(--muted); line-height: 1.8; }
.article-card { min-height: auto; }
.article-card .category { color: var(--green); font-weight: 900; margin-bottom: 12px; display: block; }
.article-card a { margin-top: 18px; display: inline-block; color: var(--navy); font-weight: 900; }
.form-layout { display: grid; grid-template-columns: 1fr .78fr; gap: 40px; align-items: start; }
.form-card { background: #fff; border: 1px solid var(--border); border-radius: 28px; padding: 30px; box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field.full { grid-column: 1 / -1; }
label { display: block; color: var(--navy); font-weight: 900; margin-bottom: 8px; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  padding: 14px 16px;
  color: var(--ink);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
textarea { min-height: 150px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: rgba(9,159,145,.55); box-shadow: 0 0 0 4px rgba(9,159,145,.10); }
.field-error { display: none; color: #a73737; font-size: 12px; margin-top: 6px; font-weight: 800; }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: #d65b5b; }
.field.invalid .field-error { display: block; }
.contact-stack { display: grid; gap: 15px; }
.contact-box { background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 22px; box-shadow: 0 14px 34px rgba(8,44,87,.04); }
.contact-box small { display: block; color: var(--green); font-weight: 900; margin-bottom: 8px; }
.contact-box strong { color: var(--navy); font-size: 18px; line-height: 1.8; }
.map-box { min-height: 260px; border: 1px solid var(--border); border-radius: 28px; background: linear-gradient(135deg, var(--sky), var(--mint)); display: grid; place-items: center; text-align: center; padding: 28px; color: var(--navy); font-weight: 900; box-shadow: var(--shadow); }
.site-footer { background: var(--navy-2); color: #fff; padding: 52px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 36px; align-items: start; }
.footer-logo { display: flex; align-items: center; gap: 14px; color: #fff; font-weight: 900; margin-bottom: 14px; }
.footer-logo img { width: 64px; height: 64px; object-fit: contain; background: #fff; border-radius: 50%; padding: 5px; }
.site-footer p, .site-footer a { color: rgba(255,255,255,.76); line-height: 1.9; }
.site-footer h3 { color: #fff; margin-bottom: 14px; }
.footer-links { display: grid; gap: 9px; }
.footer-bottom { margin-top: 34px; border-top: 1px solid rgba(255,255,255,.13); padding-top: 22px; display: flex; justify-content: space-between; gap: 18px; color: rgba(255,255,255,.65); }
.toast {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 200;
  background: var(--navy);
  color: #fff;
  padding: 14px 18px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: .25s ease;
  max-width: min(420px, calc(100vw - 42px));
  line-height: 1.7;
  font-weight: 800;
}
.toast.show { opacity: 1; transform: translateY(0); }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Admin */
.admin-shell { display: grid; grid-template-columns: 280px 1fr; min-height: calc(100vh - var(--header-h)); background: #f4f8fb; }
.admin-sidebar { background: #fff; border-left: 1px solid var(--border); padding: 24px 18px; position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); }
.admin-user { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 18px; background: var(--soft); margin-bottom: 20px; }
.admin-user img { width: 42px; height: 42px; flex-shrink: 0; object-fit: contain; background: #fff; border-radius: 50%; border: 1px solid var(--border); padding: 4px; }
.admin-sidebar div.admin-user > div { min-width: 0; flex: 1; }
.admin-user strong { color: var(--navy); display: block; font-size: 13.5px; line-height: 1.4; font-weight: 800; word-break: break-word; }
.admin-user small { color: var(--muted); font-size: 12px; display: block; margin-top: 2px; }
.admin-menu { display: grid; gap: 8px; }
.admin-menu a { padding: 13px 14px; border-radius: 14px; color: #60758a; font-weight: 850; }
.admin-menu a:hover, .admin-menu a.active { background: var(--mint); color: var(--navy); }
.admin-main { padding: 28px; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.admin-topbar h1 { color: var(--navy); margin: 0; font-size: clamp(26px, 3vw, 38px); }
.admin-topbar p { color: var(--muted); margin: 6px 0 0; }
.stats-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: 22px; padding: 22px; box-shadow: 0 12px 32px rgba(8,44,87,.05); }
.stat-card small { color: var(--green); font-weight: 900; }
.stat-card strong { color: var(--navy); font-size: 34px; display: block; margin-top: 8px; }
.admin-panel { background: #fff; border: 1px solid var(--border); border-radius: 24px; padding: 22px; box-shadow: 0 14px 38px rgba(8,44,87,.05); margin-bottom: 22px; }
.admin-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.admin-panel h2 { margin: 0; color: var(--navy); }
.table-wrap { overflow-x: auto; border-radius: 18px; border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; min-width: 760px; background: #fff; }
th, td { padding: 16px; border-bottom: 1px solid var(--border); text-align: right; vertical-align: middle; color: #445b72; }
th { color: var(--navy); background: var(--soft); font-weight: 900; }
tr:last-child td { border-bottom: 0; }
.status { display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 900; }
.status.new { background: #eaf7f4; color: var(--teal); }
.status.contact { background: #eef7ff; color: var(--navy); }
.status.confirmed { background: #edf8ec; color: var(--green); }
.status.cancelled { background: #fff1f1; color: #a83a3a; }
.action-row { display: flex; gap: 8px; flex-wrap: wrap; }
.icon-btn { border: 1px solid var(--border); background: #fff; border-radius: 10px; padding: 8px 10px; color: var(--navy); font-weight: 900; cursor: pointer; }
.admin-form-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.service-admin-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.service-manage-card { background: #fff; border: 1px solid var(--border); border-radius: 22px; padding: 20px; }
.service-manage-card h3 { color: var(--navy); margin-bottom: 10px; }
.service-manage-card p { color: var(--muted); line-height: 1.8; }
.login-page { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: 48px 20px; background: linear-gradient(180deg, #fff, #f2fbff); }
.login-card { width: min(460px, 100%); background: #fff; border: 1px solid var(--border); border-radius: 28px; padding: 34px; box-shadow: var(--shadow); }
.login-card img { width: 94px; height: 94px; object-fit: contain; margin-inline: auto; border-radius: 50%; padding: 6px; border: 1px solid var(--border); }
.login-card h1 { text-align: center; color: var(--navy); font-size: 30px; margin: 16px 0 22px; }
.login-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 14px; margin: 8px 0 20px; }
.checkline { display: inline-flex; align-items: center; gap: 8px; }
.checkline input { width: auto; }
.login-row a { color: var(--navy); font-weight: 900; }

@media (max-width: 1100px) {
  .main-nav { gap: 13px; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .service-admin-grid, .stats-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 900px) {
  :root { --header-h: 74px; }
  .container { width: min(100% - 28px, 1180px); }
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: calc(100% + 1px);
    inset-inline: 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 14px;
    display: none;
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 14px !important; }
  .booking-link { text-align: center; }
  .grid-2, .content-grid, .form-layout { grid-template-columns: 1fr; }
  .quick-info { grid-template-columns: 1fr; }
  .hero { padding: 38px 0; }
  .hero-card { order: -1; }
  .hero-card img { aspect-ratio: 4/3.2; }
  .section { padding: 48px 0; }
  .section-head { display: block; }
  .procedure-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: relative; top: auto; height: auto; border-left: 0; border-bottom: 1px solid var(--border); }
  .admin-menu { grid-template-columns: repeat(2,1fr); }
  .about-photo { position: initial; }
}
@media (max-width: 640px) {
  .hero h1, .page-title h1 { font-size: 38px; }
  .lead { font-size: 16px; }
  .doctor-caption { position: initial; border-radius: 0; border-inline: 0; border-bottom: 0; }
  .floating-stat { top: 14px; left: 14px; min-width: 96px; padding: 12px; }
  .floating-stat strong { font-size: 24px; }
  .cards-grid, .cards-grid.three, .stats-grid, .admin-form-grid, .service-admin-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .panel { padding: 28px 22px; border-radius: 26px; }
  .admin-main { padding: 18px 14px; }
  .admin-menu { grid-template-columns: 1fr; }
}

/* Final presentation refinements */
:root { --header-h: 76px; }
.header-inner { min-height: var(--header-h); }
.site-header { box-shadow: 0 10px 30px rgba(8, 44, 87, .04); }
.brand img { width: 46px; height: 46px; }
.main-nav { gap: 18px; }
.main-nav a { font-size: 15px; }
.booking-link { padding: 12px 22px !important; }
body.admin-body .site-header { display: none; }
body.admin-body .page { min-height: 100vh; }
body.admin-body .login-page { min-height: 100vh; }
body.admin-body .admin-shell { min-height: 100vh; }
body.admin-body .admin-sidebar { top: 0; height: 100vh; }
.hero { padding: 24px 0 48px; }
.hero h1, .page-title h1 { font-size: clamp(30px, 3.8vw, 42px); line-height: 1.14; letter-spacing: -.9px; }
.hero .lead { max-width: 680px; }
.hero-card img { aspect-ratio: 16 / 10.5; object-fit: cover; object-position: left center; }
.floating-stat { left: auto; right: 24px; top: 24px; }
.doctor-caption { inset-inline-start: auto; inset-inline-end: 24px; width: min(64%, 390px); }
.about-photo { align-self: start; position: sticky; top: 96px; }
.about-photo img { width: 100%; aspect-ratio: 4 / 4.4; object-fit: cover; object-position: center top; border-radius: 32px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.page-hero { padding: 46px 0 34px; background: linear-gradient(180deg, #fff, #f7fbff); border-bottom: 1px solid rgba(217,232,239,.65); }
.page-title h1 { margin-top: 14px; }
.admin-dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.admin-lead { color: var(--muted); line-height: 1.9; margin-bottom: 20px; }
.journey-list { display: grid; gap: 12px; }
.journey-mini { border: 1px solid var(--border); background: var(--soft); border-radius: 18px; padding: 16px; }
.journey-mini strong { display: block; color: var(--navy); margin-bottom: 6px; }
.journey-mini span { color: var(--muted); font-size: 14px; }
.mini-steps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mini-steps b { font-size: 12px; color: var(--green); background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 6px 9px; }
.patients-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.patient-card { border: 1px solid var(--border); border-radius: 22px; padding: 20px; background: #fff; box-shadow: 0 12px 32px rgba(8,44,87,.04); }
.patient-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.patient-head h3 { color: var(--navy); margin-bottom: 5px; }
.patient-head p { color: var(--muted); margin-bottom: 0; }
.journey-steps { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 16px; }
.journey-step { border: 1px solid var(--border); color: var(--muted); border-radius: 999px; padding: 8px 10px; font-size: 13px; font-weight: 850; }
.journey-step.done { background: var(--mint); color: var(--green); border-color: rgba(47,123,43,.25); }
.patient-notes { background: var(--soft); border: 1px solid var(--border); border-radius: 16px; padding: 14px; }
.patient-notes strong { color: var(--navy); }
.patient-notes p { margin: 6px 0 0; color: var(--muted); line-height: 1.8; }
.table-note { display: block; color: var(--muted); margin-top: 5px; line-height: 1.6; }
@media (max-width: 1100px) {
  .admin-dashboard-grid { grid-template-columns: 1fr; }
  .patients-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  :root { --header-h: 70px; }
  .hero-card img { aspect-ratio: 16 / 11.4; object-position: left center; }
  .doctor-caption { width: min(70%, 380px); }
  .about-photo { position: initial; }
  body.admin-body .admin-sidebar { height: auto; }
}
@media (max-width: 640px) {
  .hero h1, .page-title h1 { font-size: 34px; }
  .hero-card img { aspect-ratio: 4 / 3.35; }
  .floating-stat { right: 14px; left: auto; top: 14px; }
  .doctor-caption { position: initial; width: auto; border-radius: 0; border-inline: 0; border-bottom: 0; }
  .brand span { display: none; }
}

.login-submit { width: 100%; }
.empty-state { text-align: center; color: var(--muted); padding: 28px !important; }
.empty-card { color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 22px; background: #fff; }

/* V5 full responsive refinements */
body { font-family: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif; }
:root { --header-h: 82px; }
.site-header { background: rgba(255,255,255,.96); }
.header-inner {
  min-height: var(--header-h);
  display: grid;
  grid-template-columns: auto minmax(420px, 1fr) auto;
  align-items: center;
  gap: 22px;
}
.brand { justify-self: start; gap: 14px; font-size: 20px; }
.brand img { width: 62px; height: 62px; padding: 5px; box-shadow: 0 10px 28px rgba(8,44,87,.08); }
.main-nav { justify-self: center; justify-content: center; gap: 24px; }
.main-nav a { font-size: 16px; font-weight: 850; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 12px; }
.booking-link { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; white-space: nowrap; }
.hero { padding: 24px 0 54px; }
.hero-grid { grid-template-columns: .95fr 1.05fr; }
.hero-card { min-height: 480px; }
.hero-card img { height: 100%; min-height: 480px; aspect-ratio: auto; object-position: center center; }
.floating-stat { top: 24px; left: 24px; right: auto; }
.doctor-caption { width: min(60%, 380px); inset-inline-start: 24px; inset-inline-end: auto; }
.about-layout { grid-template-columns: .88fr 1.12fr; }
.about-photo { background: #fff; padding: 0; overflow: hidden; }
.about-photo img { aspect-ratio: 4 / 4.2; object-position: center top; border-radius: 30px 30px 0 0; }
.photo-caption { padding: 18px 22px; background: #fff; border-top: 1px solid var(--border); }
.photo-caption strong { display: block; color: var(--navy); font-size: 22px; }
.photo-caption span { color: var(--green); font-weight: 800; }
.clean-list { margin: 0; padding-inline-start: 22px; color: var(--muted); line-height: 1.95; }
.clean-list li { margin-bottom: 8px; }
.detail-list { display: grid; gap: 12px; }
.detail-list div { border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; background: var(--soft); }
.detail-list strong { display: block; color: var(--navy); margin-bottom: 5px; }
.detail-list span { color: var(--muted); line-height: 1.8; }
.cv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cv-grid.two { grid-template-columns: 1.3fr .7fr; }
.cv-card { background: #fff; border: 1px solid var(--border); border-radius: 24px; padding: 24px; box-shadow: 0 14px 38px rgba(8,44,87,.05); }
.cv-card h3 { color: var(--navy); margin-bottom: 14px; }
.cv-card p { color: var(--muted); line-height: 1.9; }
.minor-title { margin-top: 24px; }
.soft-section { background: linear-gradient(180deg, #f7fbff, #ffffff); }
.article-row, .article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.blog-layout { display: grid; grid-template-columns: 1.25fr .75fr; gap: 24px; margin-bottom: 28px; }
.featured-article, .blog-sidebar, .article-card, .procedure-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 28px;
  box-shadow: 0 16px 42px rgba(8,44,87,.055);
}
.featured-article { background: linear-gradient(135deg, #ffffff, #eef7ff); }
.featured-article h2 { color: var(--navy); font-size: clamp(30px, 3vw, 44px); line-height: 1.25; margin: 12px 0; }
.featured-article p, .blog-sidebar p, .article-card p, .procedure-card p { color: var(--muted); line-height: 1.9; }
.article-card { min-height: 270px; display: flex; flex-direction: column; }
.article-card h2 { color: var(--navy); font-size: 22px; line-height: 1.45; }
.article-card a, .text-link { color: var(--navy); font-weight: 900; margin-top: auto; }
.category, .article-card .category { color: var(--green); font-weight: 900; margin-bottom: 10px; display: block; }
.article-meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; font-weight: 700; margin: 14px 0; }
.article-detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.article-body { background: #fff; border: 1px solid var(--border); border-radius: 28px; padding: 34px; box-shadow: var(--shadow); }
.article-body h2 { color: var(--navy); margin: 26px 0 10px; }
.article-body p { color: var(--muted); line-height: 2; font-size: 17px; }
.article-warning { background: var(--mint); border: 1px solid rgba(47,123,43,.2); color: var(--green); border-radius: 18px; padding: 16px; font-weight: 800; line-height: 1.8; margin: 24px 0; }
.related-posts { background: #fff; border: 1px solid var(--border); border-radius: 24px; padding: 22px; box-shadow: 0 14px 38px rgba(8,44,87,.05); position: sticky; top: 110px; }
.related-posts h3 { color: var(--navy); }
.related-posts a { display: block; padding: 14px 0; border-bottom: 1px solid var(--border); }
.related-posts a:last-child { border-bottom: 0; }
.related-posts span { display: block; color: var(--green); font-size: 13px; font-weight: 800; }
.related-posts strong { color: var(--navy); line-height: 1.6; }
.procedure-card span { color: var(--green); font-weight: 900; }
.procedure-card h2 { color: var(--navy); font-size: 24px; margin: 12px 0; }
.fixed-contact-grid, .contact-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 34px; align-items: stretch; }
.contact-list { display: grid; gap: 16px; align-content: start; }
.contact-card { display: grid; grid-template-columns: 56px 1fr; align-items: center; gap: 14px; min-height: 116px; position: static; }
.contact-card .line-icon { margin: 0; }
.contact-box { position: static; overflow: hidden; }
.contact-box strong { overflow-wrap: anywhere; }
.map-box { min-height: 380px; }
.inline-admin-form { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 12px; align-items: end; background: var(--soft); border: 1px solid var(--border); border-radius: 18px; padding: 16px; margin-bottom: 18px; }
.inline-admin-form .field { margin: 0; }
.inline-admin-form .wide { grid-column: span 2; }
.control-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 20px; }
.control-grid a { background: var(--soft); border: 1px solid var(--border); border-radius: 16px; padding: 16px; color: var(--navy); font-weight: 900; text-align: center; }
.status.pending { background: #f6f8fb; color: var(--muted); }
.card.large h2 { color: var(--navy); font-size: 24px; }

@media (max-width: 1180px) {
  .header-inner { grid-template-columns: auto 1fr auto; gap: 16px; }
  .main-nav { gap: 15px; }
  .main-nav a { font-size: 14px; }
  .booking-link { padding: 12px 18px !important; }
  .cv-grid { grid-template-columns: repeat(2, 1fr); }
  .control-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .header-inner { grid-template-columns: auto auto; }
  .brand { justify-self: start; }
  .header-actions { justify-self: end; }
  .main-nav {
    position: absolute;
    top: calc(100% + 1px);
    inset-inline: 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 14px;
    display: none;
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 14px !important; }
  .hero-grid, .content-grid, .about-layout, .form-layout, .fixed-contact-grid, .contact-grid, .blog-layout, .article-detail { grid-template-columns: 1fr; }
  .hero-card { order: -1; min-height: 400px; }
  .hero-card img { min-height: 400px; object-position: center center; }
  .about-photo, .related-posts { position: initial; }
  .article-row, .article-grid { grid-template-columns: repeat(2, 1fr); }
  .cv-grid, .cv-grid.two { grid-template-columns: 1fr; }
  .inline-admin-form { grid-template-columns: 1fr 1fr; }
  .inline-admin-form .wide { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  :root { --header-h: 72px; }
  .container { width: min(100% - 24px, 1180px); }
  .brand img { width: 52px; height: 52px; }
  .brand span { display: inline; font-size: 16px; }
  .booking-link { min-height: 44px; padding: 10px 14px !important; font-size: 14px; }
  .hero { padding: 32px 0; }
  .hero-card { min-height: auto; }
  .hero-card img { min-height: 0; aspect-ratio: 4 / 3.2; object-position: 38% center; }
  .floating-stat { top: 12px; left: 12px; right: auto; min-width: 90px; padding: 10px; }
  .floating-stat strong { font-size: 22px; }
  .doctor-caption { position: static; width: auto; border-radius: 0; box-shadow: none; }
  .quick-info, .cards-grid, .cards-grid.three, .article-row, .article-grid, .stats-grid, .admin-form-grid, .service-admin-grid, .control-grid, .inline-admin-form { grid-template-columns: 1fr; }
  .page-hero { padding: 34px 0 28px; }
  .section { padding: 42px 0; }
  .section.compact { padding: 34px 0; }
  .hero h1, .page-title h1 { font-size: clamp(32px, 11vw, 42px); letter-spacing: 0; }
  .lead { font-size: 16px; line-height: 1.85; }
  .contact-card { grid-template-columns: 48px 1fr; padding: 18px; }
  .map-box { min-height: 280px; }
  .article-body { padding: 22px; }
  .admin-topbar { align-items: flex-start; flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .brand span { display: none; }
  .header-actions { gap: 8px; }
  .booking-link { padding: 9px 12px !important; }
}

/* polished production layout fixes */
.main-nav a:focus,
.booking-link:focus,
.btn:focus,
.icon-btn:focus,
.control-grid a:focus {
  outline: none;
}
.main-nav a:focus-visible,
.booking-link:focus-visible,
.btn:focus-visible,
.icon-btn:focus-visible,
.control-grid a:focus-visible {
  outline: 3px solid rgba(9, 159, 145, .24);
  outline-offset: 4px;
  border-radius: 14px;
}
.hero-grid {
  grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
  gap: clamp(34px, 5vw, 64px);
}
.hero-card {
  min-height: 0 !important;
  border-radius: 30px;
}
.hero-card img {
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 16 / 9 !important;
  object-fit: cover;
  object-position: center center !important;
}
.floating-stat {
  top: 22px !important;
  right: 22px !important;
  left: auto !important;
  z-index: 3;
}
.doctor-caption {
  right: 22px !important;
  left: auto !important;
  bottom: 22px !important;
  width: min(56%, 370px) !important;
  z-index: 4;
}
.about-photo img {
  aspect-ratio: 4 / 4.05 !important;
  object-position: center center !important;
}
.fixed-contact-grid,
.contact-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.contact-list,
.contact-stack,
.contact-box,
.contact-card,
.map-box {
  min-width: 0;
}
.contact-card,
.contact-box {
  width: 100%;
  position: relative;
  z-index: 1;
}
.contact-box strong,
.contact-card strong {
  display: block;
  word-break: normal;
  overflow-wrap: anywhere;
}
body.admin-body {
  overflow-x: hidden;
  background: #f4f8fb;
}
body.admin-body .admin-shell {
  direction: ltr;
  grid-template-columns: minmax(0, 1fr) 280px;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}
body.admin-body .admin-sidebar {
  grid-column: 2;
  grid-row: 1;
  direction: rtl;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  border-left: 1px solid var(--border);
  z-index: 100;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}
body.admin-body .admin-sidebar::-webkit-scrollbar {
  display: none; /* Chrome, Safari and Opera */
}
body.admin-body .admin-main {
  grid-column: 1;
  grid-row: 1;
  direction: rtl;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  padding: clamp(18px, 2.2vw, 28px);
}
.admin-topbar,
.admin-panel,
.admin-dashboard-grid,
.stats-grid,
.table-wrap,
.service-admin-grid,
.patients-grid,
.control-grid {
  min-width: 0;
  max-width: 100%;
}
.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.admin-dashboard-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.admin-panel {
  overflow: hidden;
}
.table-wrap {
  width: 100%;
  overflow-x: auto;
}
.table-wrap table {
  width: 100%;
  min-width: 680px;
}
.admin-user {
  min-width: 0;
}
.admin-user div {
  min-width: 0;
}
.admin-user strong,
.admin-user small {
  white-space: normal;
}
.admin-menu a {
  line-height: 1.45;
}
@media (min-width: 1280px) {
  .hero-card img {
    aspect-ratio: 16 / 8.9 !important;
  }
}
@media (max-width: 1180px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
  }
  .doctor-caption {
    width: min(62%, 360px) !important;
  }
  .stats-grid,
  .admin-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 980px) {
  .hero-grid,
  .fixed-contact-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .hero-card {
    order: -1;
  }
  .hero-card img {
    aspect-ratio: 16 / 10 !important;
    object-position: center center !important;
  }
  body.admin-body .admin-shell {
    grid-template-columns: 1fr;
    direction: rtl;
  }
  body.admin-body .admin-sidebar,
  body.admin-body .admin-main {
    grid-column: auto;
    grid-row: auto;
  }
  body.admin-body .admin-sidebar {
    position: relative;
    height: auto;
    border-left: 0;
    border-bottom: 1px solid var(--border);
  }
  body.admin-body .admin-menu {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .header-inner {
    grid-template-columns: auto auto;
  }
  .hero-card img {
    aspect-ratio: 4 / 3.2 !important;
  }
  .floating-stat {
    display: none;
  }
  .doctor-caption {
    position: static !important;
    width: auto !important;
    border-radius: 0;
    box-shadow: none;
  }
  .stats-grid,
  .admin-dashboard-grid,
  .patients-grid,
  .control-grid,
  body.admin-body .admin-menu {
    grid-template-columns: 1fr;
  }
  .table-wrap table {
    min-width: 560px;
  }
}

/* Supabase production admin additions */
.loading-block { width: min(680px, calc(100% - 40px)); margin: 80px auto; padding: 36px; border: 1px solid var(--border); border-radius: 24px; background: #fff; text-align: center; box-shadow: var(--shadow); }
.loader { width: 38px; height: 38px; border-radius: 50%; border: 4px solid #e6f0f6; border-top-color: var(--navy); margin: 0 auto 14px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.alert { width: min(1180px, calc(100% - 40px)); margin: 18px auto; padding: 14px 18px; border-radius: 16px; border: 1px solid #f0d48b; background: #fff8e6; color: #785700; font-weight: 800; }
.alert.danger { border-color: #ffc5c5; background: #fff0f0; color: #8b1f1f; }
.toast[data-type="danger"] { background: #8b1f1f; }
.narrow { width: min(860px, calc(100% - 40px)); }
.admin-menu { max-height: calc(100vh - 130px); overflow: auto; padding-inline-end: 4px; }
.admin-menu::-webkit-scrollbar { width: 7px; }
.admin-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,.25); border-radius: 99px; }
.admin-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.profile-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.profile-head h2 { margin-bottom: 8px; }
.profile-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.profile-notes p { background: #f7fbff; border: 1px solid var(--border); border-radius: 16px; padding: 14px; margin: 0; }
.journey-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 6px; }
.journey-bar span { direction: ltr; border: 1px solid var(--border); background: #fff; padding: 8px 10px; border-radius: 999px; font-size: 12px; font-weight: 900; color: var(--muted); }
.journey-bar span.done { background: var(--mint); color: var(--green); border-color: rgba(47,123,43,.25); }
.stack-form { display: grid; gap: 12px; }
.stack-form input, .stack-form textarea, .stack-form select,
.inline-admin-form input, .inline-admin-form textarea, .inline-admin-form select,
.filters input, .filters select { width: 100%; border: 1px solid var(--border); border-radius: 14px; padding: 12px 13px; background: #fff; color: var(--ink); outline: none; }
.inline-admin-form { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; align-items: end; margin: 16px 0; }
.article-admin-form, .inline-admin-form:has(textarea) { grid-template-columns: repeat(3, minmax(160px, 1fr)); }
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; margin: 14px 0; }
.action-row, td .action-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.icon-btn { border: 1px solid var(--border); background: #fff; color: var(--navy); border-radius: 12px; padding: 8px 10px; cursor: pointer; font-weight: 900; }
.icon-btn:hover { background: var(--sky); }
.icon-btn.danger { color: #9b1c1c; border-color: #ffd3d3; }
.status { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; background: #eef3f8; color: #526274; font-weight: 900; font-size: 12px; white-space: nowrap; }
.status.new, .status.unpaid, .status.absent { background: #fff2d7; color: #966000; }
.status.confirmed, .status.paid, .status.present, .status.true, .status.active { background: #e9f8ef; color: #20743a; }
.status.cancelled, .status.no-show, .status.refunded, .status.false, .status.inactive { background: #fff0f0; color: #9b1c1c; }
.status.arrived, .status.in-consultation, .status.completed, .status.checked-out, .status.partially-paid { background: #edf5ff; color: #0b3b75; }
.empty-cell { text-align: center; color: var(--muted); padding: 28px !important; font-weight: 800; }
.empty-card { background: #f7fbff; border: 1px dashed var(--border); padding: 28px; border-radius: 20px; color: var(--muted); text-align: center; }
.admin-lead, .login-note { color: var(--muted); font-weight: 700; line-height: 1.8; }
.service-manage-card { background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 18px; box-shadow: 0 12px 30px rgba(8,44,87,.06); }
.service-manage-card h3 { margin: 10px 0 8px; }
.service-admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.table-wrap table select { min-width: 120px; border: 1px solid var(--border); border-radius: 12px; padding: 8px; }
.table-wrap td, .table-wrap th { vertical-align: middle; }
.checkline { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--muted); }
.checkline input { width: auto !important; }
.map-card iframe { width: 100%; min-height: 360px; border: 0; border-radius: 24px; background: #eef3f8; }
@media (max-width: 1080px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: relative; min-height: auto; border-radius: 0; }
  .admin-menu { display: flex; overflow-x: auto; max-height: none; padding-bottom: 8px; }
  .admin-menu a { white-space: nowrap; }
  .admin-main { padding: 20px; }
  .inline-admin-form, .article-admin-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .filters, .admin-grid-2, .profile-notes, .inline-admin-form, .article-admin-form, .service-admin-grid { grid-template-columns: 1fr; }
  .admin-topbar, .admin-panel-head, .profile-head { align-items: stretch; }
  .admin-topbar { flex-direction: column; }
  .table-wrap table { min-width: 760px; }
  .admin-main { padding: 14px; }
  .login-card { width: min(94vw, 420px); }
}

/* Live website CMS editor */
.admin-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.live-cms-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(320px, .75fr); gap: 22px; align-items: start; }
.live-preview-panel, .live-editor-panel { overflow: hidden; }
.preview-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.iframe-shell { border: 1px solid var(--border); border-radius: 24px; overflow: hidden; background: #fff; min-height: 620px; box-shadow: 0 18px 60px rgba(8,44,87,.08); }
.live-preview-frame { width: 100%; height: 720px; border: 0; display: block; background: #fff; }
.inline-edit-list { display: grid; gap: 12px; margin: 16px 0 22px; }
.inline-edit-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 1px solid var(--border); background: #f8fcff; border-radius: 18px; padding: 12px; }
.inline-edit-row small { display: block; direction: ltr; color: var(--muted); font-weight: 800; }
.inline-edit-row strong { display: block; color: var(--navy); margin: 2px 0; }
.inline-edit-row span { display: block; color: var(--muted); font-size: 13px; max-height: 44px; overflow: hidden; line-height: 1.6; }
.cms-pencil { width: 38px; height: 38px; border-radius: 999px; border: 1px solid rgba(0,154,145,.25); background: linear-gradient(135deg, var(--navy), var(--teal)); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; box-shadow: 0 10px 24px rgba(0,154,145,.18); text-decoration: none; }
.cms-pencil:hover { transform: translateY(-1px); }
.cms-card-list { display: grid; gap: 10px; }
.cms-edit-card { position: relative; border: 1px solid var(--border); border-radius: 18px; padding: 14px 14px 14px 58px; background: #fff; min-height: 92px; }
.cms-edit-card .cms-pencil { position: absolute; left: 12px; top: 12px; }
.cms-edit-card strong { display: block; color: var(--navy); margin-bottom: 6px; }
.cms-edit-card p { margin: 0; color: var(--muted); line-height: 1.7; font-size: 14px; }
.muted-note { color: var(--muted); font-weight: 700; line-height: 1.7; }
.file-field { display: grid; gap: 8px; color: var(--muted); font-weight: 800; }
.file-field input { border-style: dashed !important; }
@media (max-width: 1180px) { .live-cms-layout, .admin-grid-3 { grid-template-columns: 1fr; } .live-preview-frame { height: 640px; } }
@media (max-width: 720px) { .iframe-shell { min-height: 520px; border-radius: 18px; } .live-preview-frame { height: 560px; } .inline-edit-row { grid-template-columns: 1fr; } }

/* Patch: async button safety states */
button[disabled], .btn[disabled], select[disabled] {
  opacity: .68;
  cursor: not-allowed;
  pointer-events: none;
}
button[aria-busy="true"], .btn[aria-busy="true"] {
  white-space: nowrap;
}

/* WhatsApp CTA patch: layout-only cleanup, no public redesign */
.whatsapp-cta-section .container {
  min-width: 0;
}
.whatsapp-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.whatsapp-cta > * {
  position: relative;
  z-index: 1;
  min-width: 0;
}
.whatsapp-cta-copy {
  max-width: 760px;
}
.whatsapp-cta-copy p {
  margin-bottom: 0;
}
.whatsapp-cta-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}
.whatsapp-cta-actions .btn {
  white-space: nowrap;
  min-width: 150px;
}
.panel .whatsapp-action-btn,
.whatsapp-side-card b {
  background: #fff;
  color: var(--navy);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: none;
}
.booking-side {
  display: grid;
  gap: 16px;
  align-content: start;
  min-width: 0;
}
.whatsapp-side-card {
  display: grid;
  gap: 8px;
  border-color: rgba(47,123,43,.26);
  background: linear-gradient(180deg, #ffffff, #f4fbf8);
}
.whatsapp-side-card span,
.whatsapp-contact-card span {
  display: block;
  color: var(--muted);
  line-height: 1.7;
  font-weight: 700;
  font-size: 14px;
  margin-top: 4px;
}
.whatsapp-side-card b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 900;
  margin-top: 4px;
  background: linear-gradient(135deg, var(--green), var(--teal));
  color: #fff;
  border: 0;
}
.whatsapp-contact-card {
  border-color: rgba(47,123,43,.24);
}
.whatsapp-contact-card > div,
.contact-card > div {
  min-width: 0;
}
.whatsapp-contact-card .line-icon {
  background: linear-gradient(180deg, #f4fbf8, #e7f5ef);
  color: var(--green);
}
@media (max-width: 980px) {
  .whatsapp-cta {
    align-items: flex-start;
    flex-direction: column;
  }
  .whatsapp-cta-actions {
    width: 100%;
  }
  .whatsapp-cta-actions .btn {
    flex: 1 1 180px;
  }
}
@media (max-width: 700px) {
  .whatsapp-cta {
    padding: 26px 22px;
    border-radius: 26px;
  }
  .whatsapp-cta-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .whatsapp-cta-actions .btn,
  .whatsapp-side-card b {
    width: 100%;
  }
  .whatsapp-contact-card span,
  .whatsapp-side-card span {
    font-size: 13px;
  }
}

/* Contact page dashboard patch: scoped layout helpers only */
.contact-admin-card { align-items: stretch; gap: 14px; }
.contact-admin-card .row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.contact-admin-card .muted-note { display: block; margin-top: 6px; }
@media (max-width: 760px) {
  .contact-admin-card .row-actions { flex-direction: column; }
  .contact-admin-card .row-actions .icon-btn { width: 100%; justify-content: center; }
}

/* Booking page editable content patch */
.form-intro { margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.form-intro h2 { margin: 0 0 8px; color: var(--navy); font-size: 24px; }
.form-intro p { margin: 0; color: var(--muted); line-height: 1.9; }
.field-help { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.booking-info-card .line-icon { margin-bottom: 10px; }
.booking-note-card span { display: block; margin-top: 10px; color: var(--muted); line-height: 1.8; }

/* About Doctor editable page patch */
.about-admin-preview { margin: 14px 0 18px; display: inline-flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 18px; background: #fff; color: var(--muted); }
.about-admin-preview img { width: 72px; height: 72px; border-radius: 16px; object-fit: cover; background: #f3f4f6; }
.compact-actions { margin-top: 18px; flex-wrap: wrap; }
.detail-list .line-icon { width: 28px; height: 28px; margin-inline-end: 8px; vertical-align: middle; }
.detail-list > div { gap: 8px; }
@media (max-width: 700px) {
  .about-admin-preview { display: flex; width: 100%; }
}

/* Patch 10: Global clinic settings admin preview */
.settings-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0;
}
.settings-preview-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-soft);
}
.settings-preview-card img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--border);
  padding: 6px;
}
.footer-note {
  margin-top: 10px;
  font-size: 13px;
  opacity: .9;
}
@media (max-width: 720px) {
  .settings-preview-grid { grid-template-columns: 1fr; }
}

/* Patch 11: website media library only */
.media-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px}.media-card{border:1px solid var(--border);border-radius:18px;background:#fff;overflow:hidden;box-shadow:var(--shadow-soft)}.media-thumb{height:170px;background:var(--soft);display:flex;align-items:center;justify-content:center;overflow:hidden}.media-thumb img,.media-thumb video{width:100%;height:100%;object-fit:cover;display:block}.media-thumb.is-broken{background:linear-gradient(135deg,#f6f2ec,#fff);color:var(--muted)}.media-card-body{padding:14px;display:grid;gap:8px}.media-card-body strong{font-size:15px}.media-card-body span,.media-card-body small{color:var(--muted)}.media-actions{display:flex;flex-wrap:wrap;gap:8px}.mediaReplaceForm{display:grid;gap:8px;margin-top:8px;padding-top:10px;border-top:1px solid var(--border)}.mediaReplaceForm input{width:100%}.media-help-list{display:grid;gap:8px}.media-help-list span{padding:10px 12px;border:1px solid var(--border);border-radius:12px;background:var(--soft)}


/* PATCH: Patient Education / Blog system */
.nav-dropdown{position:relative;display:flex;align-items:center}.nav-dropdown>a{display:inline-flex}.nav-dropdown-menu{position:absolute;top:calc(100% + 12px);right:0;min-width:260px;background:#fff;border:1px solid rgba(13,78,93,.12);border-radius:18px;box-shadow:0 18px 45px rgba(8,37,54,.14);padding:10px;display:none;z-index:50}.nav-dropdown:hover .nav-dropdown-menu,.nav-dropdown:focus-within .nav-dropdown-menu{display:grid;gap:4px}.nav-dropdown-menu a{padding:10px 12px;border-radius:12px;color:var(--navy);white-space:nowrap}.nav-dropdown-menu a:hover{background:rgba(26,154,139,.08);color:var(--teal)}
.blog-categories{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 28px}.category-chip{display:inline-flex;align-items:center;justify-content:center;border:1px solid rgba(16,97,112,.16);background:#fff;color:var(--navy);border-radius:999px;padding:10px 16px;font-weight:800;box-shadow:0 8px 24px rgba(10,45,60,.06)}.category-chip.active,.category-chip:hover{background:var(--teal);border-color:var(--teal);color:#fff}.premium-featured{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:26px;align-items:center;border:1px solid rgba(16,97,112,.12);box-shadow:0 18px 55px rgba(8,37,54,.08);margin-bottom:28px}.premium-featured img{width:100%;height:280px;object-fit:cover;border-radius:22px}.category-intro{background:linear-gradient(135deg,rgba(26,154,139,.08),rgba(16,97,112,.04));border:1px solid rgba(26,154,139,.12);padding:22px;border-radius:24px;margin-bottom:24px}.premium-grid{align-items:stretch}.blog-card{overflow:hidden}.article-card-img{width:100%;height:190px;object-fit:cover;border-radius:18px;margin-bottom:14px}.article-hero-image{padding:36px 0 0;background:linear-gradient(180deg,#f8fbfb,#fff)}.article-hero-image img{width:100%;max-height:430px;object-fit:cover;border-radius:30px;box-shadow:0 20px 60px rgba(8,37,54,.12)}.article-title-hero{padding-top:42px}.article-meta.center{justify-content:center;gap:14px;flex-wrap:wrap}.article-section{margin-bottom:22px}.article-body h2{color:var(--navy);font-size:1.55rem;margin:34px 0 12px}.article-body p{line-height:2.05;font-size:1.05rem}.article-list{display:grid;gap:10px;padding:0 20px 0 0;line-height:2}.article-list li::marker{color:var(--teal);font-weight:900}.medical-note,.medical-warning,.article-quote,.article-end-cta,.article-faq{border-radius:22px;padding:22px;margin:26px 0}.medical-note{background:rgba(26,154,139,.09);border:1px solid rgba(26,154,139,.20)}.medical-warning{background:#fff7ed;border:1px solid #fed7aa}.article-quote{background:#f8fafc;border-right:5px solid var(--teal)}.article-end-cta{background:linear-gradient(135deg,var(--navy),#0d5965);color:#fff}.article-end-cta h2,.article-end-cta p{color:#fff}.article-faq{background:#fff;border:1px solid rgba(16,97,112,.12);box-shadow:0 12px 35px rgba(8,37,54,.06)}.article-faq details{border-bottom:1px solid rgba(16,97,112,.1);padding:14px 0}.article-faq details:last-child{border-bottom:0}.article-faq summary{cursor:pointer;font-weight:900;color:var(--navy)}.article-media img{width:100%;border-radius:22px;box-shadow:0 12px 35px rgba(8,37,54,.09)}.article-media figcaption,.article-video figcaption{color:var(--muted);font-size:.9rem;margin-top:8px}.article-video iframe{width:100%;aspect-ratio:16/9;border:0;border-radius:22px;box-shadow:0 12px 35px rgba(8,37,54,.09)}.live-preview-card .article-card{margin-bottom:16px}.article-preview-box{max-height:520px;overflow:auto;border:1px solid rgba(16,97,112,.12);border-radius:18px;padding:16px;background:#fff}.check-grid{display:grid;gap:8px;max-height:180px;overflow:auto;border:1px solid rgba(16,97,112,.12);border-radius:14px;padding:10px;background:#fff}.check-grid label{display:flex;gap:8px;align-items:flex-start;font-size:.9rem}
@media (max-width: 900px){.nav-dropdown{display:block;width:100%}.nav-dropdown-menu{position:static;box-shadow:none;border:0;background:rgba(26,154,139,.05);margin:6px 0;display:grid;min-width:0}.premium-featured{grid-template-columns:1fr}.premium-featured img{height:220px}.article-detail{grid-template-columns:1fr}.blog-categories{overflow:auto;flex-wrap:nowrap;padding-bottom:6px}.category-chip{white-space:nowrap}.article-hero-image img{border-radius:22px;max-height:280px}}


/* HOTFIX: header stability + richer page/article preview editing */
.header-inner{grid-template-columns:auto minmax(0,1fr) auto;gap:14px;}
.brand{min-width:0;}
.brand span{display:inline-block;white-space:nowrap;}
.main-nav{gap:14px;min-width:0;flex-wrap:nowrap;}
.main-nav a{font-size:15px;white-space:nowrap;}
.nav-dropdown{min-width:0;}
.nav-dropdown>a{white-space:nowrap;}
.page-editor-toolbar{margin-bottom:22px;}
.block-list-admin{display:grid;gap:14px;}
.block-manage-card{border:1px solid var(--border);border-radius:18px;background:#fff;padding:14px;box-shadow:0 10px 26px rgba(8,44,87,.04);}
.block-manage-head{display:flex;align-items:center;gap:10px;margin-bottom:10px;color:var(--navy);}
.block-manage-head span{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;background:rgba(26,154,139,.12);font-weight:900;}
.block-preview-mini{border:1px dashed rgba(13,78,93,.16);border-radius:14px;background:#f9fcfd;padding:12px;margin-bottom:10px;max-height:360px;overflow:auto;}
.block-edit-details{border-top:1px solid var(--border);padding-top:10px;margin-top:10px;}
.block-edit-details summary{cursor:pointer;font-weight:900;color:var(--teal);margin-bottom:8px;}
.preview-body{background:#fff;border-radius:18px;padding:16px;border:1px solid var(--border);}
.live-page-card .row-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px;}
.page-manager-list{max-height:620px;overflow:auto;padding-inline-end:4px;}
@media (max-width:1100px){.header-inner{grid-template-columns:auto 1fr auto}.main-nav{gap:10px}.main-nav a{font-size:14px}.booking-link{min-height:44px;padding-inline:18px}}
@media (max-width:900px){.header-inner{display:flex;align-items:center}.main-nav{flex-wrap:wrap}.main-nav a{white-space:normal}.live-cms-layout,.admin-grid-2{grid-template-columns:1fr!important}.block-preview-mini{max-height:none}}


/* ===== Surgical site-management/live-preview patch ===== */
.brand span{white-space:nowrap;}
@media (max-width:760px){.brand span{display:inline-block;font-size:14px;white-space:normal;line-height:1.3;}.main-nav.open{max-height:70vh;overflow:auto}}
.site-management-intro .site-tabs{flex-wrap:wrap;justify-content:flex-start;gap:10px}.site-tabs .icon-btn.active{background:#e6f5f3;color:var(--navy);border-color:#cae9e5}.site-tab-panel{display:none}.site-tab-panel.active{display:block}.site-editor-grid{display:grid;grid-template-columns:minmax(320px,460px) 1fr;gap:24px;align-items:start}.site-editor-section .stack-form{position:sticky;top:92px;align-self:start}.site-live-preview{border:1px solid #dcecf0;border-radius:28px;background:#fff;overflow:hidden;box-shadow:0 18px 55px rgba(8,44,87,.06)}.site-preview-surface{direction:rtl;background:#fff;min-height:360px;overflow:hidden}.site-preview-surface .site-header.preview-only{position:static;box-shadow:none;border-bottom:1px solid #e7eff3}.site-preview-surface .hero,.site-preview-surface .section,.site-preview-surface .page-hero{padding-block:44px}.site-preview-surface .container{width:min(100% - 36px,1120px)}.site-preview-surface .hero-copy h1{font-size:clamp(30px,4vw,64px)}.site-preview-surface .hero-card{max-width:480px}.site-preview-surface .hero-card img{height:auto;max-height:360px;object-fit:cover}.site-preview-surface .site-footer{margin-top:0}.site-items-section{margin-top:24px}.site-items-list{display:grid;gap:16px}.site-cms-item{display:grid;grid-template-columns:1fr minmax(260px,360px);gap:18px;padding:18px;border:1px solid #dcecf0;border-radius:24px;background:#fbfdfe;margin:14px 0}.site-cms-item .form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.site-cms-item textarea{grid-column:1/-1}.site-item-preview{align-self:stretch;display:flex;align-items:center;justify-content:center;background:#fff;border-radius:20px;padding:14px;border:1px dashed #d6e7eb}.cms-item-preview-card{width:100%;margin:0}.site-modal-backdrop{position:fixed;inset:0;background:rgba(8,44,87,.28);z-index:2000;display:grid;place-items:center;padding:20px}.site-modal{width:min(960px,96vw);max-height:90vh;overflow:auto}.site-modal .site-cms-item{grid-template-columns:1fr 360px}.doctor-about-image{width:100%;max-height:340px;object-fit:cover;border-radius:24px;margin-bottom:18px}.field.wide{grid-column:1/-1}.file-field{display:block;border:1px dashed #b9d9df;border-radius:18px;padding:12px;background:#f7fbfc;font-weight:800;color:var(--navy);cursor:pointer}.file-field input{display:block;margin-top:8px;width:100%}.site-editor-section .action-row,.site-cms-item .action-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}.site-editor-section input,.site-editor-section textarea,.site-editor-section select,.site-cms-item input,.site-cms-item textarea,.site-cms-item select{width:100%}@media (max-width:1100px){.site-editor-grid,.site-cms-item,.site-modal .site-cms-item{grid-template-columns:1fr}.site-editor-section .stack-form{position:static}.site-live-preview{max-height:none}.site-cms-item .form-grid{grid-template-columns:1fr}}
/* ===== End surgical site-management/live-preview patch ===== */

/* ===== Admin Sidebar Grouping & Sub-menus ===== */
.admin-menu-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
  background: rgba(8, 44, 87, 0.02);
  border-radius: 16px;
  padding: 8px;
  border: 1px solid rgba(8, 44, 87, 0.04);
}
.admin-menu-section-title {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--navy);
  opacity: 0.65;
  padding: 4px 10px 6px;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(8, 44, 87, 0.04);
  margin-bottom: 4px;
}
.admin-menu-section a {
  padding: 10px 12px !important;
  font-size: 14px;
}
@media (max-width: 1080px) {
  .admin-menu-section {
    display: contents;
  }
  .admin-menu-section-title {
    display: none;
  }
  .admin-menu-section a {
    padding: 13px 14px !important;
    font-size: 15px;
  }
}

/* Fix doctor caption wrapping and premium aesthetics */
@media (min-width: 701px) {
  .doctor-caption {
    width: max-content !important;
    max-width: calc(100% - 48px) !important;
  }
  .doctor-caption h2,
  .doctor-caption p {
    white-space: nowrap !important;
  }
}
