/* =====================================================
   IHC RS PELNI — Cari Dokter
   Siloam-inspired design system
   ===================================================== */

/* ── RESET & TOKENS ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand:        #0056B3;
  --brand-dark:   #003A7A;
  --brand-deeper: #00275C;
  --brand-light:  #E8F0FB;
  --brand-50:     #F0F6FF;
  --accent:       #00A651;
  --accent-light: #E6F7EE;
  --merial:       #7B2FBE;
  --merial-light: #F3E8FF;
  --orange:       #F57C00;
  --orange-light: #FFF3E0;
  --red:          #D32F2F;
  --text-1:       #1A1A2E;
  --text-2:       #444460;
  --text-3:       #6B6B8A;
  --text-4:       #9999B3;
  --border:       #E8E8F0;
  --border-2:     #D0D0E0;
  --bg:           #F7F8FC;
  --white:        #FFFFFF;
  --shadow-card:  0 2px 8px rgba(0,60,160,.08), 0 0 1px rgba(0,0,0,.06);
  --shadow-hover: 0 8px 24px rgba(0,60,160,.14), 0 2px 6px rgba(0,0,0,.06);
  --shadow-drop:  0 4px 16px rgba(0,40,120,.12);
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px;
  --r-xl: 20px; --r-full: 9999px;
  --ease: cubic-bezier(.16,1,.3,1);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-1);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ── NAVBAR ── */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 300;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.navbar-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
}
.navbar-brand img { height: 38px; object-fit: contain; }
.brand-icon-fb { width: 38px; height: 38px; }
.brand-icon-fb svg { width: 38px; height: 38px; border-radius: 8px; }
.brand-texts { display: flex; flex-direction: column; line-height: 1.2; }
.brand-main { font-size: 15px; font-weight: 800; color: var(--brand); }
.brand-sub  { font-size: 11px; color: var(--text-3); }

.navbar-links { display: flex; align-items: center; gap: 2px; flex: 1; }
.nav-link {
  padding: 6px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  border-radius: var(--r-md);
  transition: color .15s, background .15s;
}
.nav-link:hover { color: var(--brand); background: var(--brand-50); }
.nav-link.active { color: var(--brand); font-weight: 700; background: var(--brand-light); }

.navbar-burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
  margin-left: auto;
}
.navbar-burger span { display: block; width: 22px; height: 2px; background: var(--text-2); border-radius: 2px; transition: .2s; }

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, var(--brand-deeper) 0%, var(--brand-dark) 50%, var(--brand) 100%);
  padding: 20px 24px 24px;
  max-height: 30vh;
  min-height: 140px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-inner {
  max-width: 1280px; width: 100%;
  margin: 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-titles { display: flex; flex-direction: column; gap: 3px; }

.hero-eyebrow {
  font-size: 10px; font-weight: 600;
  color: rgba(255,255,255,.7);
  letter-spacing: .1em; text-transform: uppercase;
}
.hero-title {
  font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -.02em;
  line-height: 1.2;
}

/* Hero search */
.hero-search {
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
  display: flex; align-items: center;
  overflow: hidden;
  max-width: 760px;
  padding: 5px 5px 5px 14px;
}
.hs-icon { flex-shrink: 0; color: var(--text-4); }
.hs-icon svg { width: 18px; height: 18px; display: block; }
.hero-search input {
  flex: 1; border: none; outline: none;
  font-family: inherit; font-size: 14px; color: var(--text-1);
  padding: 7px 8px;
  background: transparent;
}
.hero-search input::placeholder { color: var(--text-4); }
.hs-clear {
  width: 24px; height: 24px; border: none; background: var(--border);
  border-radius: 50%; cursor: pointer; color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
  margin-right: 5px; flex-shrink: 0; transition: background .12s;
}
.hs-clear:hover { background: var(--border-2); }
.hs-clear svg { width: 11px; height: 11px; }
.hs-btn {
  background: var(--brand); color: var(--white);
  border: none; border-radius: 13px;
  padding: 8px 20px; font-size: 13.5px; font-weight: 700;
  font-family: inherit; cursor: pointer; flex-shrink: 0;
  transition: background .15s; white-space: nowrap;
}
.hs-btn:hover { background: var(--brand-dark); }

/* Hero stats */
.hero-stats {
  display: flex; align-items: center; gap: 20px; flex-shrink: 0;
}
.hstat { text-align: center; }
.hstat strong { display: block; font-size: 18px; font-weight: 800; color: var(--white); line-height: 1; }
.hstat span   { font-size: 11px; color: rgba(255,255,255,.65); }
.hstat-sep    { width: 1px; height: 24px; background: rgba(255,255,255,.25); }

/* ── FILTER BAR ── */
.filterbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 64px; z-index: 200;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.filterbar-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 12px 24px 0;
}

/* Date strip */
.date-strip-wrap { overflow-x: auto; scrollbar-width: none; margin-bottom: 10px; }
.date-strip-wrap::-webkit-scrollbar { display: none; }
.date-strip {
  display: flex; gap: 6px;
  padding-bottom: 4px;
  min-width: max-content;
}

.date-pill {
  display: flex; flex-direction: column; align-items: center;
  padding: 6px 14px 8px; min-width: 62px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  cursor: pointer; user-select: none;
  transition: all .15s var(--ease);
  background: var(--white);
  position: relative;
}
.date-pill:hover { border-color: var(--brand); background: var(--brand-50); }
.date-pill.active {
  background: var(--brand); border-color: var(--brand);
}
.date-pill.today-pill { border-color: var(--orange); }
.date-pill.today-pill.active { background: var(--orange); border-color: var(--orange); }

.dp-hari { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); line-height: 1; }
.dp-date { font-size: 18px; font-weight: 800; color: var(--text-1); line-height: 1.2; }
.dp-mon  { font-size: 10px; color: var(--text-4); }
.date-pill.active .dp-hari,
.date-pill.active .dp-date,
.date-pill.active .dp-mon { color: var(--white); }
.date-pill.today-pill .dp-hari { color: var(--orange); }
.date-pill.today-pill.active .dp-hari { color: rgba(255,255,255,.85); }

.dp-today-dot {
  position: absolute; top: 5px; right: 7px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--orange);
}
.date-pill.active .dp-today-dot { background: rgba(255,255,255,.9); }

/* Filter row */
.filter-row {
  display: flex; gap: 8px; align-items: center;
  flex-wrap: wrap; padding-bottom: 12px;
}

.fsel-wrap {
  position: relative; display: flex; align-items: center;
  flex: 1; min-width: 140px;
}
.fsel-wide { flex: 2; min-width: 200px; }

.fsel-icon {
  position: absolute; left: 10px; width: 15px; height: 15px;
  color: var(--text-4); pointer-events: none; flex-shrink: 0;
}
.fsel-caret {
  position: absolute; right: 9px; width: 12px; height: 12px;
  color: var(--text-4); pointer-events: none;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.fsel-wrap select {
  width: 100%; height: 40px;
  padding: 0 30px 0 32px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
  font-family: inherit; font-size: 13.5px; color: var(--text-1);
  appearance: none; cursor: pointer; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.fsel-wrap select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0,86,179,.1);
  background: var(--white);
}

.btn-reset-filter {
  height: 40px; padding: 0 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  background: var(--white); color: var(--text-3);
  font-family: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer; display: flex; align-items: center; gap: 6px;
  transition: all .15s; flex-shrink: 0; white-space: nowrap;
}
.btn-reset-filter svg { width: 14px; height: 14px; }
.btn-reset-filter:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-50); }

/* Active tags */
.active-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding-bottom: 10px;
}
.at-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px;
  background: var(--brand-light); color: var(--brand);
  border: 1px solid #C5D9F5;
  border-radius: var(--r-full); font-size: 12px; font-weight: 500;
}
.at-chip button {
  background: none; border: none; color: var(--brand);
  font-size: 14px; cursor: pointer; line-height: 1;
  display: flex; align-items: center;
}

/* ── MAIN ── */
.main {
  max-width: 1280px; margin: 0 auto;
  padding: 28px 24px 64px;
}

/* Results bar */
.results-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; gap: 12px; flex-wrap: wrap;
}
.results-count { font-size: 14px; color: var(--text-2); }
.results-count strong { color: var(--text-1); font-weight: 700; font-size: 16px; }
.rc-loading { color: var(--text-4); }

.results-sort { display: flex; align-items: center; gap: 8px; }
.sort-label { font-size: 13px; color: var(--text-3); }
.results-sort select {
  height: 36px; padding: 0 28px 0 10px;
  border: 1.5px solid var(--border); border-radius: var(--r-md);
  background: var(--white); font-family: inherit; font-size: 13px;
  color: var(--text-1); appearance: none; cursor: pointer; outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B6B8A' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
}
.results-sort select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,86,179,.1); }

/* ── SKELETON ── */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.skeleton-card {
  background: var(--white); border-radius: var(--r-xl);
  padding: 28px 20px 20px;
  border: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.sk-circle {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(90deg, #f0f0f8 25%, #e4e4f0 50%, #f0f0f8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.sk-line {
  height: 12px; border-radius: 6px; width: 100%;
  background: linear-gradient(90deg, #f0f0f8 25%, #e4e4f0 50%, #f0f0f8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.sk-name { width: 80%; height: 14px; }
.sk-spec { width: 60%; }
.sk-days { width: 100%; height: 10px; }
@keyframes shimmer { 0% { background-position: 200% 0 } 100% { background-position: -200% 0 } }

/* ── CARDS GRID ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

/* ── DOCTOR CARD ── */
.doctor-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 24px 20px 20px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .15s;
  cursor: default;
  position: relative;
  overflow: hidden;
}
.doctor-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: #C5D9F5;
}

/* top accent */
.dc-accent {
  position: absolute; top: 0; left: 0; right: 0;
  height: 4px;
}
.dc-accent.merial  { background: linear-gradient(90deg, #7B2FBE, #A855F7); }
.dc-accent.reguler { background: linear-gradient(90deg, #003A7A, #0056B3, #2196F3); }

/* photo */
.dc-photo-wrap {
  position: relative; margin-bottom: 14px;
  width: 96px; height: 96px;
}
.dc-photo {
  width: 96px; height: 96px;
  border-radius: 50%;
  object-fit: cover; object-position: top center;
  border: 3px solid var(--border);
  background: var(--brand-50);
  display: block;
}
.dc-photo-fb {
  width: 96px; height: 96px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-light), var(--brand-50));
  border: 3px solid var(--border);
  display: none; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 800; color: var(--brand);
}
.dc-photo-fb.merial-fb {
  background: linear-gradient(135deg, var(--merial-light), #FAF0FF);
  color: var(--merial);
}
.dc-gedung-dot {
  position: absolute; bottom: 2px; right: 2px;
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
}
.dc-gedung-dot.merial  { background: var(--merial); }
.dc-gedung-dot.reguler { background: var(--brand); }

/* info */
.dc-name {
  font-size: 14.5px; font-weight: 700; color: var(--text-1);
  line-height: 1.35; margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 38px;
}

.dc-gedung-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 11px; font-weight: 600;
  margin-bottom: 6px;
}
.dc-gedung-badge.merial  { background: var(--merial-light); color: var(--merial); }
.dc-gedung-badge.reguler { background: var(--brand-light);  color: var(--brand); }

.dc-klinik {
  font-size: 12px; color: var(--text-3);
  line-height: 1.35; margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 32px;
}

/* schedule days */
.dc-schedule {
  width: 100%; margin-bottom: 16px;
  display: flex; flex-direction: column; gap: 5px;
}

.sched-row {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 10px; border-radius: var(--r-md);
  background: var(--bg); border: 1px solid var(--border);
  text-align: left; transition: background .12s;
}
.sched-row:hover { background: var(--brand-50); }
.sched-row.today-row  { background: #FFF8E1; border-color: #FFE082; }
.sched-row.active-row { background: var(--brand-50); border-color: #C5D9F5; }

.sched-day {
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
  padding: 2px 8px; border-radius: var(--r-full);
  color: var(--white); min-width: 44px; text-align: center;
  flex-shrink: 0;
}
.sched-day.senin   { background: #3B82F6; }
.sched-day.selasa  { background: #8B5CF6; }
.sched-day.rabu    { background: #10B981; }
.sched-day.kamis   { background: #F59E0B; color: #1C1917; }
.sched-day.jumat   { background: #EF4444; }
.sched-day.sabtu   { background: #0891B2; }
.sched-day.minggu  { background: #EC4899; }

.sched-time { font-size: 12px; font-weight: 600; color: var(--text-2); flex: 1; }
.sched-kuota {
  font-size: 10px; font-weight: 600;
  background: var(--accent-light); color: var(--accent);
  padding: 2px 6px; border-radius: 4px; flex-shrink: 0;
}
.sched-more {
  font-size: 11px; color: var(--text-4); text-align: right; padding: 2px 0;
}

/* CTA button */
.dc-btn {
  width: 100%; padding: 10px;
  background: var(--white); color: var(--brand);
  border: 1.5px solid var(--brand);
  border-radius: var(--r-lg); font-family: inherit;
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: background .15s, color .15s;
  margin-top: auto;
}
.dc-btn:hover { background: var(--brand); color: var(--white); }
.dc-btn.merial-btn { border-color: var(--merial); color: var(--merial); }
.dc-btn.merial-btn:hover { background: var(--merial); color: var(--white); }

/* ── EMPTY STATE ── */
.empty-state {
  grid-column: 1 / -1;
  text-align: center; padding: 80px 24px;
}
.empty-icon { font-size: 56px; display: block; margin-bottom: 14px; }
.empty-state h3 { font-size: 20px; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.empty-state p  { font-size: 14px; color: var(--text-3); }

/* ── PAGINATION ── */
.pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 4px; margin-top: 40px; flex-wrap: wrap;
}
.pg-btn {
  min-width: 40px; height: 40px; padding: 0 10px;
  border: 1.5px solid var(--border); border-radius: var(--r-md);
  background: var(--white); color: var(--text-2);
  font-size: 14px; font-weight: 500; font-family: inherit;
  cursor: pointer; transition: all .12s;
  display: flex; align-items: center; justify-content: center;
}
.pg-btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); background: var(--brand-50); }
.pg-btn.active { background: var(--brand); border-color: var(--brand); color: var(--white); font-weight: 700; }
.pg-btn:disabled { opacity: .35; cursor: not-allowed; }
.pg-sep { padding: 0 4px; color: var(--text-4); }

/* ── FOOTER ── */
.footer { background: var(--brand-deeper); color: rgba(255,255,255,.65); padding: 48px 24px 0; }
.footer-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; padding-bottom: 40px;
}
.footer-brand-col .footer-logo { height: 38px; opacity: .9; margin-bottom: 12px; }
.footer-tagline { font-size: 13px; line-height: 1.6; max-width: 280px; }

.footer-col h4 { font-size: 13px; font-weight: 700; color: var(--white); margin-bottom: 14px; text-transform: uppercase; letter-spacing: .06em; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col ul li { font-size: 13px; }
.footer-col ul a { color: rgba(255,255,255,.6); text-decoration: none; transition: color .12s; }
.footer-col ul a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 16px 0; text-align: center;
  max-width: 1280px; margin: 0 auto;
  font-size: 12px;
}

/* ── HIGHLIGHT ── */
mark { background: #FEF08A; color: inherit; border-radius: 2px; padding: 0 1px; }

/* ── CARD ANIMATION ── */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.doctor-card { animation: cardIn .3s cubic-bezier(.16,1,.3,1) both; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 768px) {
  .navbar-links { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--white); flex-direction: column; padding: 12px 16px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-drop); z-index: 299; }
  .navbar-links.open { display: flex; }
  .navbar-burger { display: flex; }
  .hero { padding: 16px; max-height: none; }
  .hero-top-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .hero-stats { align-self: stretch; justify-content: space-around; }
  .filterbar-inner { padding: 12px 16px 0; }
  .filter-row { gap: 6px; }
  .fsel-wrap, .fsel-wide { flex: none; width: 100%; }
  .main { padding: 20px 16px 48px; }
  .cards-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .modal { width: calc(100vw - 24px); max-height: 92vh; }
  .modal-header { flex-direction: column; align-items: center; text-align: center; }
  .mh-photo { width: 80px; height: 80px; }
  .mh-photo-fb { width: 80px; height: 80px; font-size: 26px; }
}
@media (max-width: 480px) {
  .hero-search { padding: 4px 4px 4px 12px; }
  .hs-btn { padding: 8px 14px; font-size: 13px; }
  .cards-grid { grid-template-columns: 1fr; }
  .modal-table th, .modal-table td { padding: 8px 10px; font-size: 12px; }
}

/* =====================================================
   MODAL
   ===================================================== */
.modal-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(10, 20, 50, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 900;
  animation: backdropIn .2s ease both;
}
.modal-backdrop.open { display: block; }

@keyframes backdropIn { from { opacity: 0 } to { opacity: 1 } }

.modal {
  display: none;
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(.96);
  z-index: 901;
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0,30,100,.18), 0 4px 16px rgba(0,0,0,.08);
  width: min(600px, calc(100vw - 32px));
  max-height: 88vh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  animation: modalIn .25s cubic-bezier(.16,1,.3,1) both;
}
.modal.open { display: block; }

@keyframes modalIn {
  from { opacity: 0; transform: translate(-50%, -48%) scale(.94); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* close btn */
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 50%;
  border: none; background: var(--bg); color: var(--text-3);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  z-index: 10; transition: background .12s, color .12s;
}
.modal-close:hover { background: var(--border-2); color: var(--text-1); }
.modal-close svg { width: 16px; height: 16px; }

/* modal header */
.modal-header {
  display: flex; align-items: flex-start; gap: 20px;
  padding: 28px 28px 20px;
  border-bottom: 1px solid var(--border);
}

.mh-photo-wrap { flex-shrink: 0; position: relative; }
.mh-photo {
  width: 96px; height: 96px; border-radius: 16px;
  object-fit: cover; object-position: top center;
  border: 2px solid var(--border); background: var(--brand-50);
  display: block;
}
.mh-photo-fb {
  width: 96px; height: 96px; border-radius: 16px;
  background: linear-gradient(135deg, var(--brand-light), var(--brand-50));
  border: 2px solid var(--border);
  display: none; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 800; color: var(--brand);
}
.mh-photo-fb.merial-fb {
  background: linear-gradient(135deg, var(--merial-light), #FAF0FF);
  color: var(--merial);
}

.mh-info { flex: 1; min-width: 0; }

.mh-badge-row {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px;
}
.mh-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--r-full);
  font-size: 11px; font-weight: 600;
}
.mh-badge.merial  { background: var(--merial-light); color: var(--merial); }
.mh-badge.reguler { background: var(--brand-light);  color: var(--brand); }
.mh-badge.rajal   { background: #E8F5E9; color: #2E7D32; }
.mh-badge.ranap   { background: #FFF3E0; color: #E65100; }

.mh-name {
  font-size: 18px; font-weight: 800; color: var(--text-1);
  line-height: 1.3; margin-bottom: 5px;
}
.mh-klinik {
  font-size: 13px; color: var(--text-3); line-height: 1.4; margin-bottom: 10px;
}
.mh-flags { display: flex; gap: 6px; flex-wrap: wrap; }

/* modal body */
.modal-body { padding: 20px 28px 28px; }

.modal-section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: var(--text-2);
  text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 14px;
}
.modal-section-title svg { width: 16px; height: 16px; flex-shrink: 0; }

/* schedule table */
.modal-table {
  width: 100%; border-collapse: collapse;
  font-size: 13.5px;
}
.modal-table thead th {
  padding: 9px 14px;
  text-align: left;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-4);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.modal-table thead th:first-child { border-radius: 8px 0 0 0; }
.modal-table thead th:last-child  { border-radius: 0 8px 0 0; }
.modal-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.modal-table tbody tr:last-child { border-bottom: none; }
.modal-table tbody tr:hover { background: var(--bg); }
.modal-table tbody tr.row-today  { background: #FFFDE7; }
.modal-table tbody tr.row-active { background: var(--brand-50); }
.modal-table tbody td {
  padding: 10px 14px; color: var(--text-2); vertical-align: middle;
}

.mt-day-badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: var(--r-full);
  font-size: 11px; font-weight: 700; color: var(--white);
  white-space: nowrap;
}
.mt-day-badge.senin  { background: #3B82F6; }
.mt-day-badge.selasa { background: #8B5CF6; }
.mt-day-badge.rabu   { background: #10B981; }
.mt-day-badge.kamis  { background: #F59E0B; color: #1C1917; }
.mt-day-badge.jumat  { background: #EF4444; }
.mt-day-badge.sabtu  { background: #0891B2; }
.mt-day-badge.minggu { background: #EC4899; }

.mt-time { font-weight: 600; color: var(--text-1); white-space: nowrap; }
.mt-date { color: var(--text-3); font-size: 12.5px; }
.mt-kuota {
  display: inline-block;
  padding: 2px 8px; border-radius: 4px;
  font-size: 12px; font-weight: 600;
  background: #E8F5E9; color: #2E7D32;
}
.mt-kuota-empty { color: var(--text-4); font-size: 12px; }

/* klinik group heading inside table */
.modal-klinik-group {
  padding: 20px 0 10px;
}
.modal-klinik-group:first-child { padding-top: 0; }
.mkgroup-title {
  font-size: 12.5px; font-weight: 700; color: var(--text-2);
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.mkgroup-title::before {
  content: '';
  width: 3px; height: 14px;
  background: var(--brand);
  border-radius: 2px;
  flex-shrink: 0;
}
.mkgroup-title.merial-group::before { background: var(--merial); }
