/* =========================================================
   MR Appointment Booking — styles on top of Bootstrap 5.3
   Brand colours are set per hospital in Admin › Settings › Appearance (these are fallbacks).
   ========================================================= */
:root {
  --brand: #1d4e89;
  --brand-rgb: 29, 78, 137;
  --brand-dark: #133763;
  --accent: #e8a33d;

  --ink: #14212e;
  --muted: #5d6b78;
  --soft: #f3f6fa;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(20, 33, 46, .08);
  --font-head: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --bs-primary: var(--brand);
  --bs-primary-rgb: var(--brand-rgb);
  --bs-link-color: var(--brand);
  --bs-link-color-rgb: var(--brand-rgb);
  --bs-link-hover-color: var(--brand-dark);
  --bs-body-font-family: var(--font-body);
  --bs-body-color: var(--ink);
  --bs-border-radius: .6rem;
  --bs-border-radius-lg: .8rem;
}
.btn-primary {
  --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand-dark); --bs-btn-hover-border-color: var(--brand-dark);
  --bs-btn-active-bg: var(--brand-dark); --bs-btn-active-border-color: var(--brand-dark);
  --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand);
}
.btn-outline-primary {
  --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand);
  --bs-btn-active-bg: var(--brand); --bs-btn-active-border-color: var(--brand);
}
.nav-pills { --bs-nav-pills-link-active-bg: var(--brand); }
.pagination { --bs-pagination-active-bg: var(--brand); --bs-pagination-active-border-color: var(--brand); --bs-pagination-color: var(--brand); }
.form-control:focus, .form-select:focus { border-color: rgba(var(--brand-rgb), .55); box-shadow: 0 0 0 .2rem rgba(var(--brand-rgb), .15); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.text-primary { color: var(--brand) !important; }

body { font-family: var(--font-body); color: var(--ink); }
h1, h2, h3, h4, .h1, .h2, .h3, .h4, .h5, .h6, .navbar-brand { font-family: var(--font-head); }
.brand-logo { height: 46px; width: auto; display: block; }
.brand-text { font-family: var(--font-head); font-weight: 800; letter-spacing: .12em; font-size: 1.35rem; color: var(--brand); }

/* ---------- Public navigation ---------- */
.site-nav { transition: background-color .25s, box-shadow .25s, padding .25s; padding: 1rem 0; }
.site-nav .nav-link { font-weight: 500; color: #fff; opacity: .92; }
.site-nav .nav-link:hover { opacity: 1; }
.site-nav .btn-outline-primary { --bs-btn-color: #fff; --bs-btn-border-color: rgba(255, 255, 255, .7); }
.site-nav .navbar-toggler { border-color: rgba(255, 255, 255, .5); }
.site-nav .navbar-toggler-icon { filter: invert(1); }
.site-nav .brand-logo { filter: brightness(0) invert(1); transition: filter .25s; }
.site-nav .brand-text { color: #fff; }
.site-nav.is-solid, .site-nav.menu-open { background: #fff; box-shadow: 0 4px 20px rgba(20, 33, 46, .08); padding: .55rem 0; }
.site-nav.is-solid .nav-link, .site-nav.menu-open .nav-link { color: var(--ink); }
.site-nav.is-solid .brand-logo, .site-nav.menu-open .brand-logo { filter: none; }
.site-nav.is-solid .brand-text, .site-nav.menu-open .brand-text { color: var(--brand); }
.site-nav.is-solid .btn-outline-primary, .site-nav.menu-open .btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand); }
.site-nav.is-solid .navbar-toggler-icon, .site-nav.menu-open .navbar-toggler-icon { filter: none; }
.site-nav.is-solid .navbar-toggler, .site-nav.menu-open .navbar-toggler { border-color: rgba(0, 0, 0, .15); }
@media (max-width: 991.98px) { .site-nav .navbar-collapse { padding: .75rem 0; } }

/* ---------- Hero with layered parallax ---------- */
.hero { position: relative; min-height: 92vh; display: flex; align-items: center; overflow: hidden; color: #fff; isolation: isolate; }
.hero-bg, .band-bg, .auth-bg, .page-hero .hero-bg {
  position: absolute; inset: -18% 0; z-index: -2; will-change: transform;
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 55%, #2f78b8 100%);
  background-size: cover; background-position: center;
}
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(10, 25, 45, .82) 0%, rgba(10, 25, 45, .55) 55%, rgba(10, 25, 45, .25) 100%); }
.hero-shape { position: absolute; border-radius: 50%; z-index: -1; will-change: transform; pointer-events: none; }
.shape-1 { width: 520px; height: 520px; right: -140px; top: -120px; background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 70%); }
.shape-2 { width: 300px; height: 300px; right: 18%; bottom: -90px; border: 2px solid rgba(255, 255, 255, .18); }
.shape-3 { width: 140px; height: 140px; left: 6%; bottom: 14%; background: rgba(232, 163, 61, .35); filter: blur(2px); }
.hero-content { padding: 8rem 0 6rem; }
.hero-eyebrow { display: inline-flex; align-items: center; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); backdrop-filter: blur(6px); padding: .4rem .9rem; border-radius: 999px; font-size: .9rem; font-weight: 500; margin-bottom: 1.2rem; }
.hero-title { font-weight: 800; font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1.08; letter-spacing: -.02em; margin-bottom: 1rem; }
.hero-sub { font-size: clamp(1rem, 1.6vw, 1.2rem); max-width: 40rem; opacity: .92; margin-bottom: 2rem; }
.hero-scroll { position: absolute; left: 50%; bottom: 1.6rem; transform: translateX(-50%); color: #fff; font-size: 1.6rem; opacity: .75; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(-50%, 6px); } }
.page-hero { position: relative; overflow: hidden; color: #fff; padding: 9rem 0 4rem; isolation: isolate; }
.page-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(10, 25, 45, .35); }

/* ---------- Status card overlapping the hero ---------- */
.status-wrap { position: relative; margin-top: -3.2rem; z-index: 2; }
.status-card { display: flex; gap: 1.1rem; align-items: center; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.3rem 1.5rem; border-left: 6px solid var(--muted); }
.status-card.status-open { border-left-color: #198754; }
.status-card.status-soon { border-left-color: var(--accent); }
.status-icon { flex: none; width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; font-size: 1.5rem; background: var(--soft); color: var(--brand); }
.status-open .status-icon { background: #e6f4ec; color: #198754; }
.status-soon .status-icon { background: #fdf3e3; color: #b26b00; }
.status-label { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; }

/* ---------- Sections ---------- */
.section { padding: 5rem 0; }
.section-soft { background: var(--soft); }
.section-head { text-align: center; max-width: 44rem; margin: 0 auto 2.8rem; }
.section-kicker { display: inline-block; color: var(--brand); font-weight: 600; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .5rem; }
.section-title { font-weight: 800; letter-spacing: -.01em; }
.section-lead { color: var(--muted); margin: 0; }

.doctor-card { background: #fff; border: 1px solid #e6ebf1; border-radius: var(--radius); padding: 1.4rem; transition: transform .2s, box-shadow .2s; }
.doctor-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.doctor-name { font-size: 1.15rem; font-weight: 700; margin: 0; }
.doctor-spec { color: var(--muted); margin: 0; font-size: .92rem; }
.window-list { display: grid; grid-template-columns: auto 1fr; gap: .45rem 1rem; margin: 0; font-size: .93rem; }
.window-list dt { color: var(--muted); font-weight: 500; }
.window-list dd { margin: 0; font-weight: 600; text-align: right; }
.window-list dd span { color: var(--muted); font-weight: 500; }

.band { position: relative; overflow: hidden; padding: 5.5rem 0; color: #fff; isolation: isolate; }
.band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(13, 35, 63, .82); }
.band-title { text-align: center; font-weight: 800; margin-bottom: 2.5rem; }
.step-tile { position: relative; height: 100%; padding: 1.8rem 1.4rem 1.4rem; border-radius: var(--radius); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(4px); }
.step-tile i { font-size: 2rem; color: var(--accent); }
.step-tile h3 { font-size: 1.1rem; font-weight: 700; margin: .9rem 0 .4rem; }
.step-tile p { margin: 0; opacity: .85; font-size: .93rem; }
.step-num { position: absolute; top: 1rem; right: 1.2rem; font-family: var(--font-head); font-weight: 800; font-size: 2.2rem; opacity: .18; }

.circular-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 2rem; border-top: 5px solid var(--accent); }
.rich-text ul, .rich-text ol { padding-left: 1.2rem; }
.rich-text li { margin-bottom: .45rem; }
.rich-text strong { color: var(--brand-dark); }
.intro-text { max-width: 52rem; margin: 0 auto; font-size: 1.05rem; }

/* ---------- Booking flow ---------- */
.step-card { border: 1px solid #e6ebf1; border-radius: var(--radius); margin-bottom: 1rem; transition: opacity .2s; }
.step-card .card-body { padding: 1.4rem 1.5rem; }
.step-title { display: flex; align-items: center; gap: .7rem; font-size: 1.12rem; font-weight: 700; margin: 0 0 1rem; }
.step-badge { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--brand); color: var(--brand); font-size: .85rem; font-weight: 700; }
.step-card.is-done .step-badge { background: var(--brand); color: #fff; }
.step-card.is-locked { opacity: .5; }
.step-card.is-locked .step-body { display: none; }
.step-card.is-locked .step-title { margin-bottom: 0; }
.otp-input { letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; }
.verified-line { color: #198754; font-weight: 600; margin: .75rem 0 0; }
.who-list { display: grid; grid-template-columns: 120px 1fr; gap: .55rem 1rem; align-items: center; margin-bottom: 1rem; }
.who-list dt { color: var(--muted); font-weight: 500; }
.who-list dd { margin: 0; font-weight: 600; }
.date-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: .55rem; }
.date-btn { display: flex; flex-direction: column; align-items: center; padding: .6rem .3rem .5rem; border: 1px solid #dbe2ea; border-radius: .7rem; background: #fff; color: var(--ink); line-height: 1.15; transition: border-color .15s, transform .15s; }
.date-btn:hover:not([aria-disabled="true"]):not(:disabled) { border-color: var(--brand); transform: translateY(-1px); }
.date-btn .dow, .date-btn .mon { font-size: .75rem; color: var(--muted); }
.date-btn .dom { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; margin: .1rem 0; }
.date-btn .free { font-size: .72rem; margin-top: .35rem; color: var(--brand); font-weight: 600; }
.date-btn[aria-checked="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.date-btn[aria-checked="true"] .dow, .date-btn[aria-checked="true"] .mon, .date-btn[aria-checked="true"] .free { color: #fff; }
.date-btn[aria-disabled="true"], .date-btn:disabled { background: var(--soft); color: var(--muted); }
.date-btn[aria-disabled="true"] .dom, .date-btn:disabled .dom { font-weight: 500; }
.date-btn[aria-disabled="true"] .free, .date-btn:disabled .free { color: var(--muted); }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: .55rem; }
.slot-btn { padding: .7rem .5rem; border: 1px solid #dbe2ea; border-radius: .7rem; background: #fff; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.slot-btn:hover:not(:disabled) { border-color: var(--brand); }
.slot-btn[aria-checked="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.slot-btn:disabled { background: var(--soft); color: #9aa6b2; text-decoration: line-through; font-weight: 400; }
.summary-card { position: sticky; top: 90px; background: #fff; border: 1px solid #e6ebf1; border-top: 5px solid var(--brand); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); }
.summary-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 1rem; }
.summary-card dl, .confirmed-list { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1rem; margin: 0; }
.summary-card dt, .confirmed-list dt { color: var(--muted); font-weight: 500; font-size: .9rem; }
.summary-card dd, .confirmed-list dd { margin: 0; font-weight: 600; text-align: right; }
.confirmed-card { max-width: 560px; margin: 0 auto; text-align: center; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 2.4rem 2rem; }
.confirmed-check { width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%; background: #198754; color: #fff; display: grid; place-items: center; font-size: 2rem; }
.confirmed-code { font-family: var(--font-head); font-size: 2rem; font-weight: 800; color: var(--brand); letter-spacing: .04em; }
.confirmed-list { text-align: left; margin: 1.4rem 0; padding: 1rem 0; border-top: 1px solid #e6ebf1; border-bottom: 1px solid #e6ebf1; }

/* ---------- Footer ---------- */
.site-footer { background: #0e1b2b; color: rgba(255, 255, 255, .78); padding: 4rem 0 1.5rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .brand-logo { filter: brightness(0) invert(1); }
.site-footer .brand-text { color: #fff; }
.footer-title { color: #fff; font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.footer-copy { border-top: 1px solid rgba(255, 255, 255, .12); margin: 2.5rem 0 0; padding-top: 1.2rem; font-size: .85rem; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-scroll { animation: none; }
  [data-parallax] { transform: none !important; }
}

/* ---------- Sign in ---------- */
.auth-page { min-height: 100vh; position: relative; overflow-x: hidden; isolation: isolate; display: flex; align-items: center; }
.auth-page::after { content: ""; position: fixed; inset: 0; z-index: -1; background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .12), transparent 45%), rgba(10, 25, 45, .35); }
.auth-bg { position: fixed; }
.auth-wrap { width: 100%; max-width: 440px; margin: 2rem auto; padding: 0 1rem; }
.auth-card { background: #fff; border-radius: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); padding: 2.4rem 2rem; }
.auth-card .brand-logo { height: 60px; margin: 0 auto; }
.auth-back { color: #fff; text-decoration: none; opacity: .9; }

/* ---------- Staff / admin ---------- */
.staff-body { background: var(--soft); }
.staff-top { background: var(--brand-dark); padding: .55rem 0; }
.staff-top .brand-logo { height: 34px; filter: brightness(0) invert(1); }
.staff-top .brand-text { color: #fff; font-size: 1.1rem; }
.staff-top .navbar-brand { display: flex; align-items: center; gap: .7rem; }
.staff-tag { color: rgba(255, 255, 255, .75); font-size: .85rem; font-weight: 500; border-left: 1px solid rgba(255, 255, 255, .3); padding-left: .7rem; }
.staff-shell { display: flex; min-height: calc(100vh - 58px); }
.staff-side { width: 250px; flex: none; background: #fff; border-right: 1px solid #e6ebf1; }
@media (min-width: 992px) { .staff-side { position: sticky; top: 58px; height: calc(100vh - 58px); overflow-y: auto; } .staff-side .offcanvas-body { padding: 1rem .75rem; } }
.staff-side .nav-link { display: flex; align-items: center; gap: .7rem; color: var(--ink); border-radius: .6rem; padding: .55rem .8rem; font-weight: 500; }
.staff-side .nav-link i { color: var(--muted); font-size: 1.05rem; }
.staff-side .nav-link:hover { background: var(--soft); }
.staff-side .nav-link.active { background: rgba(var(--brand-rgb), .1); color: var(--brand); }
.staff-side .nav-link.active i { color: var(--brand); }
.staff-main { flex: 1; min-width: 0; padding: 1.8rem 2rem 3rem; }
@media (max-width: 767.98px) { .staff-main { padding: 1.2rem .9rem 2rem; } .staff-tag { display: none; } }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }
.page-head h1 { font-size: 1.6rem; font-weight: 800; margin-bottom: .2rem; }
.page-head p { color: var(--muted); margin: 0; max-width: 52rem; }
.staff-main .card { border-color: #e6ebf1; border-radius: var(--radius); }
.staff-main .table > :not(caption) > * > * { padding: .7rem .85rem; }
.staff-main thead th { font-size: .8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; background: #fafbfd; white-space: nowrap; }
.stat-card { background: #fff; border: 1px solid #e6ebf1; border-radius: var(--radius); padding: 1.1rem 1.2rem; height: 100%; }
.stat-card i { font-size: 1.4rem; color: var(--brand); }
.stat-card strong { display: block; font-family: var(--font-head); font-size: 2rem; font-weight: 800; line-height: 1.1; margin-top: .3rem; }
.stat-card span { color: var(--muted); font-size: .9rem; }
.slot-chip { font-size: .75rem; padding: .15rem .5rem; border-radius: .4rem; border: 1px solid #dbe2ea; background: #fff; font-variant-numeric: tabular-nums; }
.slot-chip.is-booked { background: var(--brand); border-color: var(--brand); color: #fff; }
.date-chip { display: inline-flex; align-items: center; gap: .3rem; background: rgba(var(--brand-rgb), .08); color: var(--brand); border-radius: 999px; padding: .2rem .3rem .2rem .7rem; font-size: .85rem; font-weight: 500; }
.date-chip button { border: 0; background: none; color: inherit; line-height: 1; padding: 0 .3rem; }
.logo-preview { min-height: 60px; display: flex; align-items: center; justify-content: center; background: var(--soft); border-radius: .6rem; padding: .8rem; }
.logo-preview img { max-height: 60px; max-width: 100%; }
.rich-editor { min-height: 160px; background: #fff; }
.ql-toolbar.ql-snow { border-radius: .6rem .6rem 0 0; }
.ql-container.ql-snow { border-radius: 0 0 .6rem .6rem; font-family: var(--font-body); font-size: .95rem; }

@media (max-width: 575.98px) {
  .hero { min-height: 88vh; }
  .hero-content { padding: 7rem 0 5rem; }
  .section { padding: 3.5rem 0; }
  .status-card { flex-direction: column; align-items: flex-start; }
  .who-list { grid-template-columns: 1fr; gap: .1rem; }
  .who-list dd { margin-bottom: .5rem; }
}
