/* ==========================================================================
   Clinic — shared design tokens & public site
   ========================================================================== */
:root {
  --ink: #17324d;
  --ink-2: #2b4a68;
  --teal: #0b7a75;
  --teal-dark: #075954;
  --mint: #e3f1ee;
  --mint-2: #f1f8f6;
  --saffron: #e9a23b;
  --saffron-soft: #fdf3e2;
  --paper: #f7f9f8;
  --line: #d6e2df;
  --muted: #5d7183;
  --danger: #c0392b;

  --font-head: "Lexend", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;

  --radius-lg: 18px;
  --radius: 10px;
  --radius-sm: 6px;

  --bs-primary: var(--teal);
  --bs-primary-rgb: 11, 122, 117;
  --bs-link-color: var(--teal);
  --bs-link-color-rgb: 11, 122, 117;
  --bs-link-hover-color: var(--teal-dark);
  --bs-body-font-family: var(--font-body);
  --bs-body-color: #22313f;
  --bs-border-color: var(--line);
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body { font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6; background: #fff; color: #22313f; }
h1, h2, h3, h4, h5, h6, .font-head { font-family: var(--font-head); color: var(--ink); letter-spacing: -0.01em; }
h1 { font-weight: 600; line-height: 1.12; }
h2 { font-weight: 500; font-size: clamp(1.6rem, 2.6vw, 2.1rem); line-height: 1.2; }
h3 { font-weight: 500; font-size: 1.2rem; }
p { max-width: 68ch; }
.text-muted { color: var(--muted) !important; }
a { text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; }

/* Buttons */
.btn { font-family: var(--font-head); font-weight: 500; border-radius: var(--radius); padding: .6rem 1.15rem; }
.btn-sm { padding: .35rem .75rem; font-size: .85rem; border-radius: var(--radius-sm); }
.btn-lg { padding: .8rem 1.5rem; font-size: 1.05rem; }
.btn-primary { --bs-btn-bg: var(--teal); --bs-btn-border-color: var(--teal); --bs-btn-hover-bg: var(--teal-dark); --bs-btn-hover-border-color: var(--teal-dark); --bs-btn-active-bg: var(--teal-dark); --bs-btn-active-border-color: var(--teal-dark); --bs-btn-disabled-bg: var(--teal); --bs-btn-disabled-border-color: var(--teal); }
.btn-outline-primary { --bs-btn-color: var(--teal); --bs-btn-border-color: var(--teal); --bs-btn-hover-bg: var(--teal); --bs-btn-hover-border-color: var(--teal); --bs-btn-active-bg: var(--teal-dark); }
.btn-ink { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-ink:hover { background: var(--ink-2); color: #fff; }
.form-control, .form-select { border-radius: var(--radius-sm); border-color: var(--line); padding: .55rem .8rem; }
.form-control:focus, .form-select:focus { border-color: var(--teal); box-shadow: 0 0 0 .2rem rgba(11,122,117,.15); }
.form-label { font-weight: 600; font-size: .92rem; color: var(--ink); margin-bottom: .3rem; }
.form-check-input:checked { background-color: var(--teal); border-color: var(--teal); }

/* Utility bar */
.utility-bar { background: var(--ink); color: #cfdae4; font-size: .88rem; }
.utility-bar a { color: #fff; text-decoration: none; }
.utility-bar .hotline { color: var(--saffron); font-weight: 600; }

.emergency-banner { background: var(--saffron-soft); border-bottom: 1px solid #f1d29f; color: #6b4a12; font-size: .95rem; }
.emergency-banner i { color: #b9770e; }

/* Navbar */
.site-nav { background: #fff; border-bottom: 1px solid var(--line); }
.site-nav .navbar-brand { font-family: var(--font-head); font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: .6rem; }
.site-nav .navbar-brand img { max-height: 44px; width: auto; }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; background: var(--teal); color: #fff; display: inline-grid; place-items: center; font-size: 1.05rem; }
.site-nav .nav-link { font-family: var(--font-head); font-weight: 400; color: var(--ink-2); padding: .5rem .85rem !important; }
.site-nav .nav-link.active, .site-nav .nav-link:hover { color: var(--teal); }
.site-nav .nav-link.active { box-shadow: inset 0 -2px 0 var(--teal); }

/* Hero */
.hero { background: linear-gradient(180deg, var(--mint-2) 0%, #fff 100%); padding: 4.5rem 0 4rem; }
.hero-badge { display: inline-flex; align-items: center; gap: .5rem; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .3rem .9rem; font-size: .9rem; color: var(--teal-dark); font-weight: 600; }
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--saffron); box-shadow: 0 0 0 4px rgba(233,162,59,.2); }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); margin: 1.1rem 0 1rem; max-width: 16ch; }
.hero .lead { font-size: 1.2rem; color: var(--muted); max-width: 46ch; }

/* The live "today" board — the signature element */
.today-board { background: var(--ink); color: #e8eef4; border-radius: var(--radius-lg); padding: 1.5rem; position: relative; }
.today-board header { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid rgba(255,255,255,.12); padding-bottom: .9rem; margin-bottom: .4rem; }
.today-board h2 { color: #fff; font-size: 1.15rem; margin: 0; }
.today-board .date { color: #9fb3c6; font-size: .9rem; }
.today-row { display: grid; grid-template-columns: auto 1fr auto; gap: .9rem; align-items: center; padding: .85rem 0; border-bottom: 1px dashed rgba(255,255,255,.1); }
.today-row:last-of-type { border-bottom: 0; }
.today-row .name { font-family: var(--font-head); color: #fff; font-weight: 500; line-height: 1.25; }
.today-row .spec { color: #9fb3c6; font-size: .88rem; }
.today-row .state { text-align: right; font-size: .88rem; white-space: nowrap; }
.today-row .state strong { display: block; font-family: var(--font-head); font-size: 1rem; font-weight: 500; }
.state-open strong { color: var(--saffron); }
.state-closed strong { color: #8aa0b4; }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--saffron); margin-right: .35rem; vertical-align: middle; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(233,162,59,.5); } 50% { box-shadow: 0 0 0 5px rgba(233,162,59,0); } }
.today-board footer { margin-top: 1rem; padding-top: .9rem; border-top: 1px solid rgba(255,255,255,.12); font-size: .9rem; color: #9fb3c6; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.today-board footer a { color: #fff; }

/* Avatars */
.avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-sm { width: 36px; height: 36px; font-size: .8rem; }
.avatar-md { width: 46px; height: 46px; font-size: .95rem; }
.avatar-lg { width: 96px; height: 96px; font-size: 1.6rem; }
.avatar-initials { display: inline-grid; place-items: center; background: var(--mint); color: var(--teal-dark); font-family: var(--font-head); font-weight: 600; }
.today-board .avatar-initials { background: rgba(255,255,255,.1); color: #fff; }

/* Sections */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 2.25rem; max-width: 640px; }
.section-head p { color: var(--muted); margin: .5rem 0 0; }

/* Why choose — a quiet two-column list, not a card grid */
.reason { display: flex; gap: 1rem; padding: 1.25rem 0; border-top: 1px solid var(--line); }
.reason-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--mint); color: var(--teal); display: grid; place-items: center; flex-shrink: 0; font-size: 1.1rem; }
.reason h3 { margin: 0 0 .25rem; font-size: 1.08rem; }
.reason p { margin: 0; color: var(--muted); font-size: 1rem; }

/* Services */
.service-row { display: grid; grid-template-columns: 48px 1fr auto; gap: 1rem; align-items: start; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; height: 100%; }
.service-row .ico { width: 48px; height: 48px; border-radius: 12px; background: var(--mint); color: var(--teal); display: grid; place-items: center; font-size: 1.2rem; }
.service-row h3 { margin: 0 0 .25rem; font-size: 1.08rem; }
.service-row p { margin: 0; color: var(--muted); font-size: .98rem; }
.service-row .fee { text-align: right; font-family: var(--font-head); color: var(--ink); white-space: nowrap; }
.service-row .fee small { display: block; font-family: var(--font-body); color: var(--muted); font-size: .82rem; }

/* Doctor profile */
.doctor-card { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.5rem; background: #fff; height: 100%; display: flex; flex-direction: column; }
.doctor-card .head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.doctor-card h3 { margin: 0; font-size: 1.15rem; }
.doctor-card .spec { color: var(--teal); font-weight: 600; font-size: .95rem; }
.doctor-card .meta { color: var(--muted); font-size: .92rem; }
.doctor-card .bio { color: #3c4c5b; font-size: 1rem; flex-grow: 1; }
.doctor-card .foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1rem; }
.stars { color: var(--saffron); font-size: .85rem; letter-spacing: 1px; }

/* Testimonials */
.quote { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.6rem; height: 100%; }
.quote blockquote { font-size: 1.08rem; color: var(--ink); margin: .75rem 0 1rem; }
.quote figcaption { color: var(--muted); font-size: .92rem; }

/* Gallery */
.gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); }

/* CTA strip */
.cta-strip { background: var(--teal); color: #fff; border-radius: var(--radius-lg); padding: 2.5rem; }
.cta-strip h2 { color: #fff; margin: 0 0 .5rem; }
.cta-strip p { color: #d4ecea; margin: 0; }

/* Page header (inner pages) */
.page-head { background: var(--mint-2); border-bottom: 1px solid var(--line); padding: 3rem 0 2.5rem; }
.page-head h1 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); margin: 0 0 .5rem; }
.page-head p { color: var(--muted); margin: 0; font-size: 1.1rem; }

/* Booking engine */
.booking-panel { border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; padding: 1.75rem; }
.booking-step { display: flex; gap: .75rem; align-items: center; margin-bottom: 1rem; }
.booking-step .num { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-family: var(--font-head); font-size: .85rem; flex-shrink: 0; }
.booking-step h2 { font-size: 1.1rem; margin: 0; }
.doctor-pick { display: block; cursor: pointer; }
.doctor-pick input { position: absolute; opacity: 0; pointer-events: none; }
.doctor-pick .inner { display: flex; gap: .85rem; align-items: center; border: 1.5px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; transition: border-color .15s, background .15s; }
.doctor-pick input:checked + .inner { border-color: var(--teal); background: var(--mint-2); }
.doctor-pick input:focus-visible + .inner { outline: 3px solid var(--saffron); outline-offset: 2px; }
.doctor-pick .fee { margin-left: auto; font-family: var(--font-head); color: var(--ink); font-size: .95rem; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .5rem; }
.slot-btn { border: 1.5px solid var(--line); background: #fff; border-radius: var(--radius-sm); padding: .55rem .25rem; font-family: var(--font-head); font-size: .9rem; color: var(--ink); text-align: center; cursor: pointer; transition: border-color .12s, background .12s; }
.slot-btn:hover:not(:disabled) { border-color: var(--teal); }
.slot-btn.selected { background: var(--teal); border-color: var(--teal); color: #fff; }
.slot-btn:disabled { background: var(--paper); color: #a9b6c1; text-decoration: line-through; cursor: not-allowed; }
.slot-legend { display: flex; gap: 1.25rem; font-size: .85rem; color: var(--muted); flex-wrap: wrap; }
.slot-legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: .4rem; vertical-align: -1px; border: 1.5px solid var(--line); }
.slot-legend .l-sel::before { background: var(--teal); border-color: var(--teal); }
.slot-legend .l-off::before { background: var(--paper); }
.slot-message { background: var(--paper); border: 1px dashed var(--line); border-radius: var(--radius); padding: 1.25rem; color: var(--muted); text-align: center; }
.summary-box { background: var(--paper); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.summary-box dt { font-weight: 400; color: var(--muted); font-size: .9rem; }
.summary-box dd { font-family: var(--font-head); color: var(--ink); margin-bottom: .6rem; }

/* Auth pages */
.auth-wrap { min-height: calc(100vh - 200px); display: grid; place-items: center; padding: 3rem 1rem; background: var(--paper); }
.auth-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 2.25rem; }
.auth-card h1 { font-size: 1.6rem; }
.demo-creds { font-size: .88rem; background: var(--mint-2); border-radius: var(--radius); padding: .9rem 1rem; }
.demo-creds button { font-size: .82rem; }

/* Footer */
.site-footer { background: var(--ink); color: #b8c7d5; padding: 3.5rem 0 1.5rem; font-size: .98rem; }
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.site-footer a { color: #dfe8f0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .hours-list { list-style: none; padding: 0; margin: 0; }
.site-footer .hours-list li { display: flex; justify-content: space-between; padding: .3rem 0; border-bottom: 1px dashed rgba(255,255,255,.1); }
.site-footer .bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.5rem; padding-top: 1.25rem; font-size: .88rem; color: #8ea2b5; }
.site-footer img.logo-dark { max-height: 44px; }

/* Floating action dock */
.float-dock { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 1030; display: flex; flex-direction: column; gap: .6rem; }
.float-dock a { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 1.45rem; box-shadow: 0 6px 18px rgba(23,50,77,.25); text-decoration: none; }
.float-dock .wa { background: #1fa855; }
.float-dock .call { background: var(--ink); font-size: 1.15rem; }

/* Soft badges (shared with dashboards) */
.badge { font-family: var(--font-head); font-weight: 500; letter-spacing: .01em; padding: .38em .7em; border-radius: 999px; }
.badge-soft-warning { background: #fdf0d9; color: #8a5a0a; }
.badge-soft-primary { background: #dcefed; color: var(--teal-dark); }
.badge-soft-success { background: #def3e4; color: #1d6b37; }
.badge-soft-secondary { background: #eceff2; color: #5b6772; }
.badge-soft-danger { background: #fbe3e0; color: #9b2c20; }
.badge-soft-info { background: #e1ecf7; color: #2b5b8a; }
.badge-soft-light { background: #f3f5f7; color: #5b6772; }

.map-embed { border: 0; width: 100%; min-height: 340px; border-radius: var(--radius-lg); }
.contact-line { display: flex; gap: .9rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.contact-line i { color: var(--teal); width: 22px; margin-top: .3rem; }

@media (max-width: 991.98px) {
  .hero { padding: 3rem 0; }
  .site-nav .nav-link.active { box-shadow: none; }
  .service-row { grid-template-columns: 44px 1fr; }
  .service-row .fee { grid-column: 2; text-align: left; }
}
@media print {
  .utility-bar, .site-nav, .site-footer, .float-dock, .emergency-banner { display: none !important; }
}
