/* =============================================================
   BCC Purno (পূর্ণ) — official Bangla Unicode font from BCC
   npm package: @hixbe/purno-bcc — served via jsDelivr CDN
   ============================================================= */
@font-face {
  font-family: "Purno BCC";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("https://cdn.jsdelivr.net/npm/@hixbe/purno-bcc/files/bcc-purno.woff2") format("woff2"),
    url("https://cdn.jsdelivr.net/npm/@hixbe/purno-bcc/files/bcc-purno.woff") format("woff");
  unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2,
    U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7,
    U+200C-200D, U+20B9, U+25CC, U+A8F1;
}

/* ========= Design tokens (medical palette) ========= */
:root {
  --teal-900: #07473b;
  --teal-800: #0a5c4d;
  --teal-700: #0d6f5b;
  --teal-600: #0f8a72;
  --teal-500: #14a37f;
  --teal-400: #4cbf9a;
  --teal-300: #80d2b3;
  --teal-100: #cfeae0;
  --teal-50: #e7f5f0;
  --teal-25: #f1f9f5;

  --navy-900: #142546;
  --navy-800: #1a2c52;

  /* Ink scale */
  --ink-900: #0e1f2e;
  --ink-800: #15314a;
  --ink-700: #1f3a55;

  --line: #d8e6df;
  --line-strong: #b9d2c5;
  --shadow-sm: 0 1px 2px rgba(20, 37, 70, 0.06);
  --shadow-md: 0 6px 18px rgba(13, 111, 91, 0.08);
  --shadow-lg: 0 18px 48px rgba(13, 111, 91, 0.12);

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
}

/* ========= Base ========= */
html,
body {
  font-family: "Purno BCC", system-ui, -apple-system, "Segoe UI", Roboto,
    sans-serif;
  color: var(--ink-900);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html[lang="en"] body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
body {
  font-size: 1.0625rem; /* +6% — overall larger reading size */
  line-height: 1.7;
}

/* Small text — always near-black AND larger than Bootstrap's default */
small,
.small,
.form-text,
.text-sm {
  color: var(--ink-900) !important;
  font-weight: 500;
  font-size: 0.92rem;
}

/* Light tinted backgrounds force darker text inside */
.bg-tint,
.bg-tint-2,
.bg-tint-3,
.bg-tint-deep,
.bg-tint *,
.bg-tint-2 *,
.bg-tint-3 *,
.bg-tint-deep * {
  color: var(--ink-900);
}
.bg-tint {
  background: #e7f5f0;
}
.bg-tint-2 {
  background: #e6f5ef;
}
.bg-tint-3 {
  background: #f1f9f5;
}
.bg-tint-deep {
  background: #cfeae0; /* darker than the other tints */
}

a {
  color: var(--teal-700);
  text-decoration: none;
}
a:hover {
  color: var(--teal-800);
}
.text-ink {
  color: var(--ink-900) !important;
}

/* ========= Buttons (rounded rectangles, NEVER pills) ========= */
.btn {
  border-radius: 8px;
  padding: 0.6rem 1.1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease, box-shadow 0.2s ease,
    background-color 0.2s ease;
}
.btn-primary-medical {
  background: var(--teal-700);
  color: #fff;
  border: 1px solid var(--teal-700);
}
.btn-primary-medical:hover {
  background: var(--teal-800);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-outline-medical {
  background: #fff;
  color: var(--teal-800);
  border: 1.5px solid var(--teal-600);
}
.btn-outline-medical:hover {
  background: var(--teal-50);
  color: var(--teal-800);
}
.btn-navy {
  background: var(--navy-900);
  color: #fff;
  border: 1px solid var(--navy-900);
}
.btn-navy:hover {
  background: var(--navy-800);
  color: #fff;
}
.btn-on-dark {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.btn-on-dark:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.btn-icon-square {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

/* ========= Navbar ========= */
.navbar-eapp {
  background: #0a1a2e; /* deeper navy to match reference */
  padding: 14px 0;
}
.navbar-eapp .navbar-brand {
  gap: 12px;
  align-items: center;
  padding: 0;
}

/* BD government emblem + transparent eAppointment wordmark */
.navbar-eapp .brand-emblem {
  height: 44px;
  width: 44px;
  flex-shrink: 0;
  display: block;
}
.navbar-eapp .brand-wordmark {
  height: 36px;
  width: auto;
  display: block;
}

.navbar-eapp .nav-link {
  color: #e3eaf3 !important;
  font-weight: 500;
  font-size: 1.02rem;
  padding: 0.5rem 0.95rem !important;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.navbar-eapp .nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff !important;
}
.navbar-eapp .nav-link.active {
  color: #fff !important;
  background: rgba(76, 191, 154, 0.18);
}
.navbar-eapp .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.25);
}
.navbar-eapp .navbar-toggler:focus {
  box-shadow: none;
}

/* Right-side pill action buttons — matches uploaded reference screenshot */
.nav-pill-outline {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  padding: 8px 22px;
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 0.2s ease, border-color 0.2s ease,
    color 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-pill-outline:hover,
.nav-pill-outline[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.75);
  color: #ffffff;
}
.nav-pill-filled {
  background: var(--teal-500);
  color: #ffffff;
  border: 1px solid var(--teal-500);
  padding: 8px 24px;
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: background 0.2s ease, transform 0.15s ease,
    box-shadow 0.2s ease;
  white-space: nowrap;
}
.nav-pill-filled:hover {
  background: var(--teal-600);
  border-color: var(--teal-600);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(20, 163, 127, 0.3);
}

/* ========= Language dropdown menu ========= */
.lang-menu {
  min-width: 9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  padding: 4px;
}
.lang-menu .dropdown-item {
  border-radius: 6px;
  font-weight: 600;
  color: var(--ink-900);
  padding: 8px 10px;
}
.lang-menu .dropdown-item.active,
.lang-menu .dropdown-item:active,
.lang-menu .dropdown-item[aria-current="true"] {
  background: var(--teal-50);
  color: var(--teal-800);
}
.lang-menu .dropdown-item:hover,
.lang-menu .dropdown-item:focus {
  background: var(--teal-25);
  color: var(--teal-800);
}
.lang-menu .dropdown-item .check-mark {
  color: var(--teal-700);
  opacity: 0;
}
.lang-menu .dropdown-item.active .check-mark,
.lang-menu .dropdown-item[aria-current="true"] .check-mark {
  opacity: 1;
}

/* ========= Hero ========= */
.hero {
  position: relative;
  background: linear-gradient(
    135deg,
    rgba(15, 138, 114, 0.97) 0%,
    rgba(13, 111, 91, 0.97) 60%,
    rgba(20, 73, 67, 0.97) 100%
  );
  color: #fff;
  padding: 64px 0 88px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.06) 1px,
    transparent 1px
  );
  background-size: 22px 22px;
  mask-image: linear-gradient(
    180deg,
    transparent,
    #000 30%,
    #000 70%,
    transparent
  );
  pointer-events: none;
}
.hero h1 {
  font-weight: 700;
  font-size: clamp(2rem, 3.4vw, 2.85rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}
html[lang="bn"] .hero h1 {
  line-height: 1.35;
}
.hero .lead-bn {
  font-size: 1.15rem;
  color: #e0f2ea;
  max-width: 580px;
}
.eyebrow-on-dark {  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #c5ecdb;
  margin-bottom: 14px;
  margin-top: 0;
}
.hero-trust {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  margin-top: 28px;
  color: #e0f2ea;
  font-size: 0.95rem;
  font-weight: 600;
}
.hero-trust .item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-trust i {
  color: #6ee2bd;
  font-size: 1.1rem;
}

/* =========================================================
   NEW Hero card — "Login required" / Welcome panel
   (replaces the previous quick-search; no slot search without login)
   ========================================================= */
.login-card {
  background: #fff;
  color: var(--ink-900);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 26px;
  position: relative;
  overflow: hidden;
}
.login-card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg, var(--teal-700), var(--teal-500));
}
.login-card .lock-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.login-card .login-card__lock {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--teal-50);
  color: var(--teal-800);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.login-card #login-card-title,
.login-card h5 {
  font-weight: 700;
  color: var(--ink-900);
  font-size: 1.2rem;
  margin: 0 0 4px;
  line-height: 1.3;
}
.login-card .subtitle {
  color: var(--ink-900);
  font-size: 0.95rem;
  font-weight: 500;
  margin: 0;
}
.login-card ul.benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}
.login-card ul.benefits li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  color: var(--ink-900);
  font-size: 0.98rem;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.login-card ul.benefits li:last-child {
  border-bottom: 0;
}
.login-card ul.benefits li i {
  color: var(--teal-700);
  font-size: 1.05rem;
  margin-top: 1px;
  flex-shrink: 0;
}
.login-card .login-card__helpline {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.login-card .login-card__helpline small {
  color: var(--ink-900) !important;
}
.login-card .login-card__helpline strong {
  color: var(--teal-800);
}

/* ========= Sections ========= */
.section {
  padding: 72px 0;
}
.section-tight {
  padding: 56px 0;
}
.section h2 {
  font-weight: 700;
  color: var(--ink-900);
  font-size: clamp(1.65rem, 2.6vw, 2.2rem);
  margin-bottom: 10px;
  line-height: 1.3;
}
.section .section-sub {
  color: var(--ink-900);
  font-weight: 500;
  font-size: 1.05rem;
  max-width: 660px;
}
.section-eyebrow {  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--teal-800);
  margin-bottom: 12px;
  border-left: 3px solid var(--teal-500);
  padding-left: 10px;
  margin-top: 0;
}
.eyebrow-flat {  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--teal-800);
  margin-bottom: 12px;
  margin-top: 0;
}

/* ========= Featured hospitals ========= */
.hospital-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease,
    border-color 0.2s ease;
  height: 100%;
  text-align: center;
}
.hospital-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--teal-400);
}
.hospital-emblem {
  width: 68px;
  height: 68px;
  border-radius: 10px;
  background: var(--teal-50);
  color: var(--teal-800);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  font-family: system-ui, sans-serif;
}
.hospital-card .hospital-name {
  font-weight: 700;
  color: var(--ink-900);
  font-size: 1.05rem;
  line-height: 1.35;
  margin: 0 0 4px;
}
.hospital-card .hospital-loc {
  font-size: 0.9rem;
  color: var(--ink-900);
  font-weight: 600;
  margin: 0;
}

/* ========= Stats ========= */
.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
  height: 100%;
}
.stat-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--teal-400);
  transform: translateY(-2px);
}
.stat-card .stat-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--teal-50);
  color: var(--teal-800);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.stat-card .stat-number {
  font-family: system-ui, sans-serif;
  font-size: 1.95rem;
  font-weight: 700;
  color: var(--ink-900);
  line-height: 1;
  letter-spacing: -0.01em;
  margin: 0;
}
html[lang="bn"] .stat-card .stat-number {
  font-family: "Purno BCC", system-ui, sans-serif;
}
.stat-card .stat-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-900);
  margin: 4px 0 0;
}
.stat-card .stat-delta {
  font-size: 0.8rem;
  color: var(--teal-800);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}

/* ========= Why eApp ========= */
.info-band {
  background: linear-gradient(180deg, #f1f9f5 0%, #e7f5f0 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.info-visual {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px;
  box-shadow: var(--shadow-sm);
}
.info-visual__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.pillar {
  background: var(--teal-25);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
}
.pillar .pillar-icon {
  font-size: 1.4rem;
  color: var(--teal-800);
  margin-bottom: 8px;
}
.pillar h3,
.pillar h6 {
  font-weight: 700;
  color: var(--ink-900);
  margin: 0 0 4px;
  font-size: 1.05rem;
  line-height: 1.3;
}
.pillar p {
  color: var(--ink-900);
  font-size: 0.92rem;
  margin: 0;
  font-weight: 500;
  line-height: 1.55;
}
.meta-flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--teal-800);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-left: 3px solid var(--teal-500);
  padding-left: 10px;
}

/* ========= Footer ========= */
.site-footer {
  background: var(--navy-900);
  color: #c9d3e0;
  padding: 56px 0 0;
}
.site-footer h2,
.site-footer h6 {
  color: #fff;
  font-weight: 700;
  margin: 0 0 14px;
  font-size: 1.05rem;
}
.site-footer address {
  font-style: normal; /* override default italic on <address> */
}
.site-footer ul {
  margin: 0;
  padding: 0;
}
.site-footer a {
  color: #c9d3e0;
  display: inline-block;
  padding: 4px 0;
  font-weight: 500;
  font-size: 0.98rem;
}
.site-footer a:hover {
  color: #fff;
}
.site-footer .brand-wordmark {
  height: 36px;
  margin-bottom: 14px;
  display: block;
}
.site-footer .small,
.site-footer small {
  color: #ffffff !important;
  font-weight: 500;
  font-size: 0.95rem;
}

/* ===== Bottom strip — same navy as the main footer above ===== */
.footer-strip {
  background: var(--navy-900);
  color: #ffffff;
  padding: 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-strip .fb-label {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 4px;
  line-height: 1.4;
  color: #ffffff;
}
.footer-strip .fb-text {
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.5;
  color: #c9d3e0;
}

/* Single shared white container for all partner logos — matches reference site */
.partner-tile {
  background: #ffffff;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.partner-tile img {
  height: 42px;
  width: auto;
  background: transparent;
  padding: 0;
  object-fit: contain;
  display: block;
}

/* ========= Responsive ========= */
@media (max-width: 991.98px) {
  .hero {
    padding: 48px 0 64px;
  }
  .partner-tile {
    margin-top: 16px;
    justify-content: flex-start;
  }
  .info-visual__grid {
    grid-template-columns: 1fr;
  }
}

a:focus-visible,
button:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: reveal 0.7s ease both;
  }
}
@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* =========================================================
   Utility classes (replace inline styles, support a11y)
   ========================================================= */

/* Skip-link for keyboard users — hidden until focused */
.skip-link {
  position: absolute;
  left: 8px;
  top: -40px;
  z-index: 10000;
  background: var(--navy-900);
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus-visible {
  top: 8px;
  color: #fff;
  outline: 2px solid var(--teal-400);
  outline-offset: 2px;
}

/* Staggered reveal for the hero login card */
.reveal-delay {
  animation-delay: 0.1s;
}

/* Accent-colored icons (replaces inline color styles) */
.icon-accent {
  color: var(--teal-700);
}
.icon-accent-soft {
  color: var(--teal-400);
}

/* Footer about paragraph max-width (replaces inline style) */
.site-footer-about {
  max-width: 360px;
}

/* Visually hidden but available to screen readers — Bootstrap also has .visually-hidden,
   we duplicate so the rule wins regardless of cascade order. */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* aria-current="page" navigation styling (instead of .active class) */
.navbar-eapp .nav-link[aria-current="page"] {
  color: #fff;
  background: rgba(76, 191, 154, 0.18);
}

/* =============================================================
   PAGE: Hospital list (hospitals.html)
   New patterns introduced for the public hospital list page.
   Add a brief mention of each class to DESIGN_SYSTEM.md when
   any new page reuses one of these.
   ============================================================= */

/* ========= Page header band (inner pages) =========
   Light tinted band that sits below the navbar on non-home pages.
   Reuses the same gradient as .info-band so the system feels cohesive. */
.page-header-band {
  background: linear-gradient(180deg, #f1f9f5 0%, #e7f5f0 100%);
  border-bottom: 1px solid var(--line);
  padding: 36px 0 36px;
}
.page-header-band h1 {
  font-weight: 700;
  font-size: clamp(1.85rem, 3vw, 2.4rem);
  color: var(--ink-900);
  margin: 0 0 10px;
  line-height: 1.3;
}
.page-header-band .lead-bn {
  color: var(--ink-900);
  max-width: 640px;
  font-size: 1.05rem;
  margin: 0;
}

/* ========= Breadcrumb =========
   Small dot-separated trail above page h1. Always pair with a
   <nav aria-label="ব্রেডক্রাম্ব"> wrapper. */
.breadcrumb-medical {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 0;
  margin: 0 0 14px;
  font-size: 0.9rem;
  font-weight: 500;
}
.breadcrumb-medical li {
  display: inline-flex;
  align-items: center;
  color: var(--ink-900);
}
.breadcrumb-medical li + li::before {
  content: "›";
  margin: 0 10px;
  color: var(--teal-700);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1;
}
.breadcrumb-medical a {
  color: var(--teal-800);
  font-weight: 600;
}
.breadcrumb-medical a:hover {
  color: var(--teal-700);
  text-decoration: underline;
}
.breadcrumb-medical li[aria-current="page"] {
  color: var(--ink-900);
  font-weight: 700;
}

/* ========= Filter panel (sidebar) =========
   Sticky white card with grouped fields. On mobile (< lg)
   it stacks above the grid via Bootstrap's natural column order. */
.filter-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.filter-panel__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink-900);
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-group {
  margin-bottom: 20px;
  border: 0;
  padding: 0;
  min-width: 0; /* allow fieldset to shrink */
}
.filter-group:last-of-type {
  margin-bottom: 22px;
}
.filter-group > label,
.filter-group > legend {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 8px;
  padding: 0;
  width: auto;
  float: none;
}
.filter-check-list {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

@media (min-width: 992px) {
  .filter-panel {
    position: sticky;
    top: 20px;
  }
}
@media (max-width: 991.98px) {
  .filter-panel {
    margin-bottom: 8px;
  }
}

/* ========= Medical-styled form controls =========
   Use these on every form in the system (login, register, booking, filters). */
.form-control-medical {
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.96rem;
  color: var(--ink-900);
  background: #fff;
  font-family: inherit;
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-control-medical::placeholder {
  color: #8aa1a8;
  opacity: 1;
}
.form-control-medical:focus,
.form-control-medical:focus-visible {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(20, 163, 127, 0.18);
  outline: none;
}
select.form-control-medical {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230a5c4d'%3E%3Cpath d='M4 6l4 4 4-4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding-right: 36px;
  cursor: pointer;
}

/* Search input with leading icon */
.search-wrap {
  position: relative;
}
.search-wrap > .bi {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--teal-700);
  pointer-events: none;
  font-size: 1rem;
}
.search-wrap .search-input {
  padding-left: 36px;
}

/* Stylized checkbox rows in filter sidebar */
.form-check-medical {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-900);
  cursor: pointer;
}
.form-check-medical input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--teal-700);
  cursor: pointer;
  flex-shrink: 0;
}

/* Toggle switch — medical accent */
.form-switch-medical .form-check-input {
  width: 2.4em;
  height: 1.3em;
  background-color: #d4dee5;
  border-color: #d4dee5;
  cursor: pointer;
}
.form-switch-medical .form-check-input:checked {
  background-color: var(--teal-600);
  border-color: var(--teal-600);
}
.form-switch-medical .form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(20, 163, 127, 0.18);
  border-color: var(--teal-500);
}
.form-switch-medical .form-check-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-900);
  cursor: pointer;
  padding-left: 6px;
}

/* ========= Results header =========
   Sits above the card grid; shows count + sort dropdown. */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.results-header .results-count {
  font-size: 1rem;
  color: var(--ink-900);
  font-weight: 500;
}
.results-header .results-count strong {
  color: var(--teal-800);
  font-weight: 700;
}
.results-sort {
  display: flex;
  align-items: center;
  gap: 10px;
}
.results-sort label {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink-900);
  margin: 0;
  white-space: nowrap;
}
.results-sort select {
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 6px 30px 6px 12px;
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  background-color: #fff;
  color: var(--ink-900);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230a5c4d'%3E%3Cpath d='M4 6l4 4 4-4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  cursor: pointer;
}
.results-sort select:focus {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(20, 163, 127, 0.18);
  outline: none;
}

/* ========= Hospital card — full version =========
   Used on the hospital list page. Richer than the homepage
   .hospital-card (which is a compact featured tile). */
.hospital-card--full {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px 20px 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease,
    border-color 0.2s ease;
}
.hospital-card--full:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--teal-400);
}
.hospital-card--full > header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}
.hospital-card--full .hospital-emblem {
  width: 60px;
  height: 60px;
  margin: 0;
  font-size: 0.92rem;
}
.hospital-card--full h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink-900);
  margin: 0 0 4px;
  line-height: 1.4;
}
.hospital-card__sub {
  font-family: system-ui, sans-serif;
  font-size: 0.82rem;
  color: var(--ink-700);
  font-weight: 500;
  margin: 0 0 12px;
  letter-spacing: 0.005em;
}
.hospital-card--full .hospital-loc {
  font-size: 0.92rem;
  color: var(--ink-900);
  font-weight: 600;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.hospital-card--full .hospital-loc i {
  color: var(--teal-700);
}

/* Status badges — top right of card */
.hospital-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--teal-50);
  color: var(--teal-800);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid var(--line);
}
.hospital-card__badge::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--teal-600);
  border-radius: 50%;
  display: inline-block;
}
.hospital-card__badge--limited {
  background: #fff4cf;
  color: #7a5a00;
  border-color: #ffe89a;
}
.hospital-card__badge--limited::before {
  background: #d99a00;
}
.hospital-card__badge--full {
  background: #ffe4e4;
  color: #8a1f1f;
  border-color: #ffc7c7;
}
.hospital-card__badge--full::before {
  background: #c93434;
}

/* Department tag pills */
.dept-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 18px;
  padding: 0;
}
.dept-tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--teal-25);
  color: var(--teal-800);
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--line);
  white-space: nowrap;
}

/* Card footer with two CTAs */
.hospital-card--full > footer {
  margin-top: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 4px;
}
.hospital-card--full > footer .btn-sm {
  flex: 1 1 auto;
  padding: 0.5rem 0.8rem;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ========= Pagination (medical variant) =========
   Use anywhere we need numbered paging. */
.pagination-medical-wrap {
  margin-top: 36px;
  display: flex;
  justify-content: center;
}
.pagination-medical {
  display: flex;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.pagination-medical .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-900);
  font-weight: 700;
  font-size: 0.96rem;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease,
    color 0.15s ease, transform 0.15s ease;
}
.pagination-medical .page-link:hover {
  background: var(--teal-25);
  border-color: var(--teal-400);
  color: var(--teal-800);
  transform: translateY(-1px);
}
.pagination-medical .page-item.active .page-link {
  background: var(--teal-700);
  border-color: var(--teal-700);
  color: #fff;
}
.pagination-medical .page-item.active .page-link:hover {
  background: var(--teal-800);
  border-color: var(--teal-800);
  color: #fff;
}
.pagination-medical .page-item.disabled .page-link {
  color: #95a8b0;
  pointer-events: none;
  background: var(--teal-25);
  opacity: 0.65;
  transform: none;
}

/* =============================================================
   PAGE: Public dashboard (chart.html)
   New patterns introduced for the system stats / dashboard page.
   When any new page reuses one of these, add a brief mention to
   DESIGN_SYSTEM.md so the next builder knows about it.
   ============================================================= */

/* ========= Dashboard stat card =========
   Refined analytics-style stat card with icon, label, big number,
   trend chip (vs previous period), comparison text, and an inline
   sparkline. Three icon-tile color variants (amber, sky, violet)
   to distinguish metric categories without using decorative strips.
   The trend chip uses functional colors (green up, red down),
   independent of the metric variant.
   Markup:
     <article class="dashboard-stat-card dashboard-stat-card--amber">
       <header class="dashboard-stat-card__head">
         <span class="dashboard-stat-card__icon"><i class="bi bi-…"></i></span>
         <p class="dashboard-stat-card__label">…</p>
       </header>
       <div class="dashboard-stat-card__body">
         <p class="dashboard-stat-card__num">…</p>
         <span class="stat-trend stat-trend--up">
           <i class="bi bi-arrow-up-right"></i>৭.৩%
         </span>
       </div>
       <p class="dashboard-stat-card__delta">গত মাসের তুলনায়</p>
       <div class="dashboard-stat-card__spark">
         <canvas data-spark="…"></canvas>
       </div>
     </article>
*/
.dashboard-stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px 22px 18px;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease,
    border-color 0.2s ease;
}
.dashboard-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--teal-400);
}
.dashboard-stat-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}
.dashboard-stat-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  background: var(--teal-50);
  color: var(--teal-800);
  flex-shrink: 0;
}
.dashboard-stat-card__label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-700);
  margin: 0;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.dashboard-stat-card__body {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 6px;
}
.dashboard-stat-card__num {
  font-size: 2.15rem;
  font-weight: 700;
  color: var(--ink-900);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0;
}
html[lang="bn"] .dashboard-stat-card__num {
  font-family: "Purno BCC", system-ui, sans-serif;
}
.dashboard-stat-card__delta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-700);
  margin: 0;
}
.dashboard-stat-card__spark {
  position: relative;
  width: calc(100% + 22px);
  height: 38px;
  margin: 10px -11px -8px;
}

/* Icon-tile color variants (no left strip — kept refined) */
.dashboard-stat-card--amber .dashboard-stat-card__icon {
  background: #fff4cf;
  color: #7a5a00;
}
.dashboard-stat-card--sky .dashboard-stat-card__icon {
  background: #e3f0fb;
  color: #1d4f7d;
}
.dashboard-stat-card--violet .dashboard-stat-card__icon {
  background: #ece9fb;
  color: #3f348a;
}

/* Trend chip — functional color, NOT metric color (green=up / red=down) */
.stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  border: 1px solid transparent;
}
.stat-trend--up {
  background: #e6f7ee;
  color: #0a5c3f;
  border-color: #c5ebd6;
}
.stat-trend--down {
  background: #ffe9e9;
  color: #8a1f1f;
  border-color: #ffc7c7;
}
.stat-trend--flat {
  background: #eef1f5;
  color: var(--ink-700);
  border-color: #dde3ea;
}
.stat-trend .bi {
  font-size: 0.92rem;
}

/* ========= Chart card =========
   White surface that wraps each chart with title + body. */
.chart-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.chart-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.chart-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink-900);
  margin: 0 0 2px;
  line-height: 1.35;
}
.chart-card__sub {
  font-size: 0.88rem;
  color: var(--ink-700);
  font-weight: 500;
  margin: 0;
}
.chart-card__meta {
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--teal-800);
  background: var(--teal-50);
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid var(--line);
}
.chart-card__body {
  position: relative;
  flex: 1;
  min-height: 0;
}

/* Chart canvas wrapper — gives Chart.js a fixed-aspect box so canvas
   doesn't blow up beyond its container on tall content. */
.chart-canvas {
  position: relative;
  width: 100%;
  height: 280px;
}
.chart-canvas--tall {
  height: 380px;
}
.chart-canvas--short {
  height: 240px;
}

/* ========= Filter bar =========
   Three select fields + an action button.
   Markup:
     <form class="filter-bar" role="search">
       <div class="filter-bar__field">
         <label for="…">…</label>
         <select class="form-control-medical" id="…">…</select>
       </div>
       …
       <div class="filter-bar__action">
         <button class="btn btn-primary-medical" type="submit">…</button>
       </div>
     </form>
*/
.filter-bar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 14px 18px;
  align-items: end;
}
.filter-bar__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.filter-bar__field > label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink-900);
  margin: 0;
}
.filter-bar__action {
  align-self: end;
}
.filter-bar__action .btn {
  min-width: 120px;
  white-space: nowrap;
}
@media (max-width: 991.98px) {
  .filter-bar {
    grid-template-columns: 1fr 1fr;
  }
  .filter-bar__action {
    grid-column: 1 / -1;
  }
  .filter-bar__action .btn {
    width: 100%;
  }
}
@media (max-width: 575.98px) {
  .filter-bar {
    grid-template-columns: 1fr;
  }
}

/* ========= Medical data table =========
   Used on the dashboard department breakdown and anywhere a tabular
   data view is needed. Wrap in <div class="table-wrap"> for the
   header/title bar treatment. */
.table-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.table-wrap__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.table-wrap__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink-900);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.table-wrap__title .bi {
  color: var(--teal-700);
  font-size: 1.15rem;
}
.table-wrap__meta {
  font-size: 0.88rem;
  color: var(--ink-700);
  font-weight: 600;
}
.table-scroll {
  overflow-x: auto;
}
.table-medical {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  font-size: 0.96rem;
  margin: 0;
}
.table-medical thead th {
  text-align: left;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--teal-800);
  background: var(--teal-25);
  padding: 12px 20px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table-medical tbody td {
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-900);
  vertical-align: middle;
}
.table-medical tbody tr:last-child td {
  border-bottom: 0;
}
.table-medical tbody tr:hover td {
  background: var(--teal-25);
}
.table-medical .col-num {
  font-weight: 700;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
}
.table-medical .col-num--muted {
  color: var(--ink-700);
  font-weight: 500;
}
.table-medical .col-right {
  text-align: right;
}
.table-medical tfoot td {
  padding: 12px 20px;
  background: var(--teal-25);
  font-weight: 700;
  color: var(--teal-800);
  border-top: 2px solid var(--line);
}

/* ========= Chart legend (custom HTML legend) =========
   For pie/doughnut charts where the built-in Chart.js legend is
   too plain. Use as a sibling of the canvas inside chart-card__body. */
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 0;
  margin: 14px 0 0;
  list-style: none;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-900);
  justify-content: center;
}
.chart-legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chart-legend .swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
  display: inline-block;
}

/* Inline summary row below a chart — quick at-a-glance numbers */
.chart-summary {
  display: flex;
  justify-content: space-around;
  gap: 8px;
  padding: 14px 0 0;
  margin: 0;
  list-style: none;
  border-top: 1px dashed var(--line);
  margin-top: 14px;
}
.chart-summary li {
  text-align: center;
  flex: 1;
}
.chart-summary .num {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink-900);
  line-height: 1.1;
}
.chart-summary .lbl {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-700);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 3px;
}

/* ========= Page-header band: action row =========
   Two-column layout inside the page header (title block on the
   left, action cluster + update stamp on the right). Stacks on
   mobile.
   Markup:
     <header class="page-header-band">
       <div class="container">
         <nav>…breadcrumb…</nav>
         <div class="page-header-band__row">
           <div class="page-header-band__title">
             <h1>…</h1>
             <p class="lead-bn">…</p>
           </div>
           <div class="page-actions">
             <span class="update-stamp">…</span>
             <button class="btn …">…</button>
           </div>
         </div>
       </div>
     </header> */
.page-header-band__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 22px;
  flex-wrap: wrap;
}
.page-header-band__title {
  flex: 1 1 360px;
  min-width: 0;
}
.page-header-band__title h1 {
  margin-bottom: 8px;
}
.page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.page-actions .btn {
  padding: 0.5rem 0.95rem;
  font-size: 0.92rem;
}

/* Update timestamp chip with a pulsing live dot */
.update-stamp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-700);
  background: rgba(255, 255, 255, 0.7);
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  white-space: nowrap;
}
.update-stamp__dot {
  width: 8px;
  height: 8px;
  background: var(--teal-500);
  border-radius: 50%;
  display: inline-block;
  position: relative;
  flex-shrink: 0;
}
.update-stamp__dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--teal-500);
  opacity: 0.45;
}
@media (prefers-reduced-motion: no-preference) {
  .update-stamp__dot::after {
    animation: pulse 1.9s ease-out infinite;
  }
}
@keyframes pulse {
  0% {
    transform: scale(0.9);
    opacity: 0.55;
  }
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}
.update-stamp strong {
  color: var(--ink-900);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ========= Inline bar-percentage cell =========
   For table cells where a numeric value benefits from a visual
   bar showing its share of total. Used in the hospital
   department breakdown.
   Markup:
     <td>
       <div class="bar-pct">
         <span class="bar-pct__track"><span class="bar-pct__fill" style="width:21%"></span></span>
         <span class="bar-pct__val">২১.১%</span>
       </div>
     </td> */
.bar-pct {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 140px;
}
.bar-pct__track {
  flex: 1;
  height: 6px;
  background: var(--teal-25);
  border-radius: 999px;
  overflow: hidden;
  min-width: 60px;
  display: block;
}
.bar-pct__fill {
  display: block;
  height: 100%;
  background: var(--teal-500);
  border-radius: 999px;
  transition: width 0.6s ease;
}
.bar-pct__fill--zero {
  background: var(--line-strong);
}
.bar-pct__val {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  min-width: 44px;
  text-align: right;
  color: var(--ink-900);
  font-size: 0.92rem;
}
.bar-pct__val--zero {
  color: var(--ink-700);
  font-weight: 500;
}

/* ========= Demographics block =========
   Used inside a single chart-card to host multiple distribution
   visuals (e.g. sex stacked-bar + age horizontal rows). */
.demo-block {
  margin-bottom: 24px;
}
.demo-block:last-child {
  margin-bottom: 0;
}
.demo-block__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}
.demo-block__title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--teal-800);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
}
.demo-block__meta {
  font-size: 0.85rem;
  color: var(--ink-700);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Horizontal stacked bar (used for binary distributions like sex) */
.hbar-stack {
  display: flex;
  height: 14px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--teal-25);
  margin-bottom: 12px;
}
.hbar-stack__seg {
  height: 100%;
  transition: filter 0.15s ease;
}
.hbar-stack__seg:hover {
  filter: brightness(1.08);
}
.hbar-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
}
.hbar-legend li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-900);
}
.hbar-legend .swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
  flex-shrink: 0;
}
.hbar-legend .pct {
  color: var(--ink-700);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-left: 6px;
}

/* Vertical stack of labeled horizontal bars (used for age groups) */
.age-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.age-rows__row {
  display: grid;
  grid-template-columns: 96px 1fr 56px;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
}
.age-rows__lbl {
  font-weight: 600;
  color: var(--ink-900);
}
.age-rows__bar {
  height: 8px;
  background: var(--teal-25);
  border-radius: 999px;
  overflow: hidden;
  display: block;
}
.age-rows__bar > span {
  display: block;
  height: 100%;
  background: var(--teal-500);
  border-radius: 999px;
  transition: width 0.6s ease;
}
.age-rows__row:nth-child(1) .age-rows__bar > span { background: var(--teal-300); }
.age-rows__row:nth-child(2) .age-rows__bar > span { background: var(--teal-500); }
.age-rows__row:nth-child(3) .age-rows__bar > span { background: var(--teal-700); }
.age-rows__row:nth-child(4) .age-rows__bar > span { background: #c93434; }
.age-rows__val {
  text-align: right;
  font-weight: 700;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
}

/* ========= Data source footnote =========
   Subtle attribution line for the data on a report-style page. */
.data-footnote {
  padding: 20px 0 8px;
  font-size: 0.85rem;
  color: var(--ink-700);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-top: 1px dashed var(--line);
  margin-top: 28px;
}
.data-footnote .bi {
  color: var(--teal-700);
  font-size: 1.05rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.data-footnote strong {
  color: var(--ink-900);
  font-weight: 700;
}

/* ========= Chart canvas — extra height variants for hero charts ========= */
.chart-canvas--hero { height: 320px; }
.chart-canvas--bars { height: 380px; }

/* ========= Filter bar — secondary (Reset) button ========= */
.filter-bar__action {
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-bar__action .btn {
  white-space: nowrap;
}
@media (max-width: 991.98px) {
  .filter-bar__action .btn {
    flex: 1;
  }
}

/* =============================================================
   PAGE: Admin Login (admin-login.html)
   New patterns introduced for the authentication pages. Reusable
   across patient login, registration, password-reset, OTP entry.
   Add a brief mention of each class to DESIGN_SYSTEM.md when
   any new page reuses one of these.
   ============================================================= */

/* ========= Auth card refinement =========
   Slight padding bump over the default .login-card so longer
   forms breathe inside the white surface. */
.auth-card {
  padding: 30px 28px 26px;
}
@media (max-width: 575.98px) {
  .auth-card {
    padding: 22px 18px 20px;
  }
}

/* ========= Form group =========
   Vertical rhythm wrapper for label + control pairs. Pair every
   <label> with a matching `for` attribute on the control. */
.form-group {
  margin-bottom: 18px;
}
.form-group > label {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 7px;
  line-height: 1.35;
}
.form-hint {
  font-size: 0.82rem;
  color: var(--ink-700);
  font-weight: 500;
  margin-top: 6px;
  line-height: 1.5;
}

/* ========= Input with leading icon =========
   For email, phone, NID and other identifier inputs. The icon is
   purely decorative; the <label> still does the labeling.
   Markup:
     <div class="input-icon-wrap">
       <i class="bi bi-envelope-fill"></i>
       <input class="form-control-medical with-icon" …>
     </div>
*/
.input-icon-wrap {
  position: relative;
}
.input-icon-wrap > .bi {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--teal-700);
  font-size: 1rem;
  pointer-events: none;
  z-index: 1;
}
.form-control-medical.with-icon {
  padding-left: 38px;
}

/* ========= Password input + show/hide toggle =========
   Reserve space on the right of the input so the eye button
   never overlaps long passwords. */
.password-wrap {
  position: relative;
}
.password-wrap .form-control-medical {
  padding-right: 44px;
}
.password-toggle {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  background: transparent;
  border: 0;
  color: var(--ink-700);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.password-toggle:hover {
  background: var(--teal-25);
  color: var(--teal-800);
}
.password-toggle:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 1px;
}

/* ========= Captcha component =========
   CSS-only distorted-text rendering. The .captcha-image element
   holds the challenge string; ::before and ::after lines simulate
   the scribble strikethroughs from the legacy implementation. */
.captcha-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}
.captcha-image {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background:
    repeating-linear-gradient(
      45deg,
      transparent 0 9px,
      rgba(20, 163, 127, 0.06) 9px 10px
    ),
    linear-gradient(135deg, #eef5f2 0%, #dceee5 100%);
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  height: 52px;
  font-family: "Courier New", Courier, monospace;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  color: var(--ink-900);
  user-select: none;
  font-style: italic;
  position: relative;
  overflow: hidden;
  padding-left: 0.32em; /* offset the letter-spacing trailing gap */
  text-transform: none;
}
.captcha-image::before,
.captcha-image::after {
  content: "";
  position: absolute;
  height: 1.5px;
  background: rgba(201, 52, 52, 0.55);
  width: 84%;
  left: 8%;
}
.captcha-image::before {
  top: 38%;
  transform: rotate(-9deg);
}
.captcha-image::after {
  top: 62%;
  transform: rotate(6deg);
}
.captcha-refresh {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  background: #fff;
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  color: var(--teal-800);
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease,
    color 0.15s ease;
}
.captcha-refresh:hover {
  background: var(--teal-25);
  border-color: var(--teal-400);
  color: var(--teal-700);
}
.captcha-refresh:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 2px;
}
.captcha-refresh .bi {
  transition: transform 0.4s ease;
}
.captcha-refresh:hover .bi,
.captcha-refresh:active .bi {
  transform: rotate(180deg);
}

/* ========= Alert (info / success / error) =========
   Inline notice block. Use --info for security reminders,
   --success after successful actions, --error for form errors.
   Markup:
     <aside class="alert-medical alert-medical--info" role="note">
       <i class="bi bi-shield-fill-check"></i>
       <p>…</p>
     </aside>
*/
.alert-medical {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 14px;
  border-radius: 10px;
  margin: 0 0 20px;
  font-size: 0.92rem;
  font-weight: 500;
  border: 1px solid;
  line-height: 1.5;
}
.alert-medical p {
  margin: 0;
}
.alert-medical .bi {
  font-size: 1.1rem;
  margin-top: 1px;
  flex-shrink: 0;
}
.alert-medical--info {
  background: var(--teal-50);
  border-color: var(--teal-100);
  color: var(--teal-800);
}
.alert-medical--info .bi {
  color: var(--teal-700);
}
.alert-medical--success {
  background: #e6f7ee;
  border-color: #c5ebd6;
  color: #0a5c3f;
}
.alert-medical--success .bi {
  color: #0a5c3f;
}
.alert-medical--error {
  background: #ffe9e9;
  border-color: #ffc7c7;
  color: #8a1f1f;
}
.alert-medical--error .bi {
  color: #8a1f1f;
}
.alert-medical--warning {
  background: #fff4cf;
  border-color: #ffe89a;
  color: #7a5a00;
}
.alert-medical--warning .bi {
  color: #7a5a00;
}

/* ========= Auth meta row =========
   The "Remember me" + "Forgot password" inline row under the
   form fields, before the submit button. */
.auth-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 6px 0 22px;
}
.auth-meta a {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--teal-700);
}
.auth-meta a:hover {
  color: var(--teal-800);
  text-decoration: underline;
}

/* ========= Auth submit button — taller touch target ========= */
.btn-lg-auth {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ========= Auth switch link =========
   Subdued line outside the card linking to the other auth flow
   (e.g. patient login from admin login, or vice versa). */
.auth-switch {
  font-size: 0.95rem;
  color: var(--ink-700);
  font-weight: 500;
}
.auth-switch a {
  font-weight: 700;
  color: var(--teal-700);
}
.auth-switch a:hover {
  color: var(--teal-800);
  text-decoration: underline;
}

/* =============================================================
   PAGE: Admin — Department add & list
   (admin-department-add.html, admin-department-list.html)

   New patterns introduced. Reusable on any other admin CRUD pages
   (User add/list, Hospital add/list, etc.). Add a brief mention of
   each class to DESIGN_SYSTEM.md when reused on another page.
   ============================================================= */


/* ========= Form card header =========
   Branded header at the top of an .auth-card / .login-card that holds
   a form (Add Department, Add User, etc.). The icon tile uses the
   primary teal tone with a soft tinted background. */
.form-card__head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.form-card__icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--teal-50);
  color: var(--teal-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  border: 1px solid var(--teal-100);
}
.form-card__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--teal-800);
  margin: 0 0 4px;
  line-height: 1.3;
}
.form-card__sub {
  font-size: 0.92rem;
  color: var(--ink-700);
  line-height: 1.55;
}

/* ========= Required / optional indicators =========
   Inline asterisk (red) for required fields, light "(ঐচ্ছিক)" tag
   for optional ones — appended to .form-group > label. */
.form-required {
  color: #c93434;
  font-weight: 700;
  margin-left: 2px;
}
.form-optional {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-700);
  margin-left: 4px;
}
.form-label-optional {
  /* no visual change today — exists so the markup can distinguish
     optional labels semantically if styling diverges later. */
}

/* ========= Toggle row =========
   Tighter top margin so the switch sits closer to the preceding field. */
.form-group--toggle {
  margin-top: 4px;
}
.form-group--toggle .form-check {
  padding-left: 3em;
  min-height: auto;
}
.form-group--toggle .form-check-label {
  font-weight: 700;
  color: var(--ink-900);
  cursor: pointer;
}

/* ========= Form divider =========
   Soft separator between form fields and the actions row. */
.form-divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 22px 0 18px;
  opacity: 1;
}

/* ========= Form actions row =========
   Buttons aligned right on desktop, full-width stacked on mobile.
   Primary action is rightmost (modern convention). */
.form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.form-actions .btn {
  min-width: 130px;
}
@media (max-width: 575.98px) {
  .form-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .form-actions .btn {
    width: 100%;
    min-width: 0;
  }
}

/* ========= Form footnote =========
   Subtle info block under a form card with a leading icon. */
.form-footnote {
  display: flex;
  gap: 10px;
  margin: 20px 2px 0;
  padding: 12px 14px;
  background: var(--teal-25);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink-700);
  font-size: 0.88rem;
  line-height: 1.55;
}
.form-footnote .bi {
  color: var(--teal-700);
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.form-footnote strong {
  color: var(--ink-900);
}


/* ========= Table column helpers ========= */
.table-medical .col-sl {
  width: 64px;
}
.table-medical .dept-name {
  font-weight: 600;
  color: var(--ink-900);
}


/* ========= Status pill =========
   Compact status indicator for tabular rows. Two variants today —
   active (teal) and inactive (muted grey). Reuse for any boolean
   row status (yes/no, on/off, published/draft). */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.status-pill .bi {
  font-size: 0.85rem;
}
.status-pill--active {
  background: var(--teal-50);
  color: var(--teal-800);
  border-color: var(--teal-100);
}
.status-pill--inactive {
  background: #eef2f6;
  color: #5b6b7a;
  border-color: #dde4eb;
}


/* ========= Row actions =========
   Edit + Delete (and any future per-row action) live inside .row-actions.
   .btn-row is the base; modifier picks the color. On narrow screens the
   text label hides and the icon-only button remains. */
.row-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.btn-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
  white-space: nowrap;
  line-height: 1.2;
}
.btn-row .bi {
  font-size: 0.9rem;
}
.btn-row:active {
  transform: translateY(1px);
}
.btn-row--edit {
  background: var(--teal-50);
  color: var(--teal-800);
  border-color: var(--teal-100);
}
.btn-row--edit:hover,
.btn-row--edit:focus-visible {
  background: var(--teal-100);
  color: var(--teal-900);
  border-color: var(--teal-400);
  outline: none;
}
.btn-row--delete {
  background: #fff;
  color: #8a1f1f;
  border-color: #ffc7c7;
}
.btn-row--delete:hover,
.btn-row--delete:focus-visible {
  background: #ffe4e4;
  color: #6b1414;
  border-color: #ff9b9b;
  outline: none;
}
@media (max-width: 575.98px) {
  .btn-row span {
    display: none;
  }
  .btn-row {
    padding: 8px 10px;
  }
}


/* ========= Table pagination footer =========
   Sits inside .table-wrap below the table. Holds row-count summary +
   pagination on opposite ends. */
.table-wrap__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.table-wrap__count {
  font-size: 0.88rem;
  color: var(--ink-700);
  font-weight: 500;
}
.pagination-medical {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
}
.page-link-medical {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--teal-800);
  background: #fff;
  border: 1px solid var(--line);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.page-link-medical:hover,
.page-link-medical:focus-visible {
  background: var(--teal-25);
  border-color: var(--teal-400);
  outline: none;
}
.page-link-medical--active,
.page-link-medical--active:hover {
  background: var(--teal-700);
  color: #fff;
  border-color: var(--teal-700);
}
.page-link-medical--disabled,
.page-link-medical--disabled:hover {
  background: #f5f7f9;
  color: #a3afba;
  border-color: var(--line);
  cursor: not-allowed;
}


/* ========= Medical modal =========
   Lightly themed Bootstrap modal — used for delete confirmation.
   Reusable for any other confirmation prompt. */
.modal-medical .modal-content {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}
.modal-medical .modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.modal-medical .modal-title {
  color: var(--ink-900);
  font-weight: 700;
  margin: 0;
}
.modal-medical .modal-body {
  padding: 20px 22px;
  color: var(--ink-900);
  font-size: 0.98rem;
  line-height: 1.6;
}
.modal-medical .modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  gap: 8px;
}

/* Danger variant of the primary-medical button — used inside
   destructive confirmations. Keeps button shape, swaps the fill. */
.btn-primary-medical--danger {
  background: #c93434;
  border-color: #c93434;
  color: #fff;
}
.btn-primary-medical--danger:hover,
.btn-primary-medical--danger:focus-visible {
  background: #a52828;
  border-color: #a52828;
  color: #fff;
}


/* =============================================================
   Admin pages — Facility (Health Center) form + list
   ============================================================= */


/* ========= Horizontal form row =========
   Two-column label+control layout for admin/data-entry forms.
   On <md screens it collapses to stacked. Use inside an .auth-card
   that hosts a .form-card__head. Right column carries the input. */
.form-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px 22px;
  align-items: start;
  margin-bottom: 20px;
}
.form-row > label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink-900);
  margin: 0;
  padding-top: 11px;
  line-height: 1.35;
}
.form-row__field {
  min-width: 0;
}
.form-row__field .form-hint {
  margin-top: 6px;
}
@media (max-width: 767.98px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 6px;
    margin-bottom: 18px;
  }
  .form-row > label {
    padding-top: 0;
  }
}


/* ========= Token (tag) input =========
   Multi-select chips inside a bordered field. Mimics Select2-style
   tag inputs used in legacy admin forms. The visible <input> sits
   inline after the chips. JS is responsible for adding/removing
   chips on enter / X-click — the CSS only defines the look. */
.token-input {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 46px;
  padding: 7px 10px;
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  cursor: text;
}
.token-input:focus-within {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(20, 163, 127, 0.18);
}
.token-input__field {
  flex: 1 1 120px;
  min-width: 120px;
  border: 0;
  outline: none;
  padding: 4px 2px;
  font-size: 0.95rem;
  color: var(--ink-900);
  background: transparent;
}
.token-input__field::placeholder {
  color: #8aa1a8;
}
.token-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 10px;
  background: var(--teal-50);
  color: var(--teal-800);
  border: 1px solid var(--teal-100);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}
.token-chip__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 0;
  background: transparent;
  color: var(--teal-700);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0;
  transition: background 0.15s ease, color 0.15s ease;
}
.token-chip__remove:hover,
.token-chip__remove:focus-visible {
  background: var(--teal-100);
  color: var(--teal-900);
  outline: none;
}


/* ========= Admin filter bar =========
   Compact horizontal filter strip above a list table. Sits flush
   below a "Create new" action row. Wraps gracefully on small screens.
   Use Bootstrap g-3 on the inner .row. */
.admin-filter-bar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}
.admin-filter-bar label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 6px;
}
.admin-filter-bar .form-control-medical,
.admin-filter-bar select.form-control-medical {
  padding: 9px 12px;
  font-size: 0.93rem;
}
.admin-filter-bar__actions {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 100%;
}


/* ========= Dark department tag (list table) =========
   Darker, denser variant of .dept-tag for use inside data-table cells.
   Higher contrast keeps the tags legible when many appear in one cell. */
.dept-tag--dark {
  background: #3a4a5c;
  color: #fff;
  border-color: #2e3b49;
}


/* ========= Cell tag list =========
   Flex-wrapping cluster of dept-tags inside a single table cell. */
.cell-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 460px;
}
.cell-tag-list li {
  display: inline-flex;
}


/* ========= Datestamp inside a table cell =========
   Two-line "07 May, 2026 / 06:00 PM" pattern from the legacy list. */
.cell-datestamp {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.88rem;
  line-height: 1.3;
  color: var(--ink-900);
}
.cell-datestamp > time {
  font-weight: 600;
}
.cell-datestamp > small {
  color: var(--ink-700);
  font-size: 0.8rem;
  font-weight: 500;
}


/* ========= Plain table cell name (left-aligned, wrap) =========
   Hospital/facility names can be long — keep them legible by wrapping
   to 2-3 lines instead of forcing horizontal scroll. */
.table-medical .cell-name {
  font-weight: 600;
  color: var(--ink-900);
  max-width: 220px;
  white-space: normal;
  line-height: 1.35;
}
.table-medical .cell-coord {
  font-variant-numeric: tabular-nums;
  font-size: 0.86rem;
  color: var(--ink-700);
  white-space: nowrap;
}


/* ========= Create-bar (above the filter strip) =========
   Holds the single primary CTA ("Create new Health Center") on
   admin list pages. Separates it visually from the filter strip. */
.admin-create-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.admin-create-bar .results-count {
  font-size: 0.95rem;
  color: var(--ink-700);
  margin: 0;
}
.admin-create-bar .results-count strong {
  color: var(--ink-900);
  font-weight: 700;
}


/* =============================================================
   PATIENT DASHBOARD
   Personalized post-login landing for a patient.
   ============================================================= */

/* ========= Welcome band =========
   Extension of .page-header-band that hosts the patient's name,
   a circular initial-avatar, and quick primary actions on the right.
   Use INSIDE a .page-header-band wrapper. */
.welcome-band__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 4px;
}
.welcome-band__who {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.welcome-band__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--teal-500);
  color: #fff;
  font-weight: 700;
  font-size: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(20, 163, 127, 0.25);
  letter-spacing: -0.01em;
}
.welcome-band__hello {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal-800);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 2px;
}
.welcome-band__name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink-900);
  margin: 0 0 2px;
  line-height: 1.25;
}
.welcome-band__meta {
  font-size: 0.9rem;
  color: var(--ink-700);
  margin: 0;
}
.welcome-band__meta .meta-sep {
  margin: 0 8px;
  color: var(--line-strong);
}
.welcome-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
@media (max-width: 575.98px) {
  .welcome-band__row { align-items: flex-start; }
  .welcome-band__actions { width: 100%; }
  .welcome-band__actions .btn { flex: 1 1 calc(50% - 5px); }
}

/* ========= Action tile =========
   Big white tile with centered icon + label. Mirrors the reference
   patient dashboard's two primary actions (New / List). Pair two
   tiles inside a row.g-3.g-lg-4 with .col-md-6 children. */
.action-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 36px 24px;
  text-decoration: none;
  color: var(--ink-900);
  height: 100%;
  min-height: 200px;
  transition: transform 0.2s ease, box-shadow 0.2s ease,
    border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}
.action-tile::after {
  content: "";
  position: absolute;
  inset: auto -40px -40px auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--teal-25);
  opacity: 0.7;
  z-index: 0;
  transition: transform 0.3s ease;
}
.action-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--teal-400);
  color: var(--ink-900);
}
.action-tile:hover::after {
  transform: scale(1.15);
}
.action-tile__icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--teal-50);
  color: var(--teal-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
  transition: background 0.2s ease, color 0.2s ease;
}
.action-tile:hover .action-tile__icon {
  background: var(--teal-500);
  color: #fff;
}
.action-tile__label {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--teal-800);
  margin: 0 0 4px;
  position: relative;
  z-index: 1;
}
.action-tile__sub {
  font-size: 0.92rem;
  color: var(--ink-700);
  margin: 0;
  max-width: 28ch;
  position: relative;
  z-index: 1;
}
.action-tile__arrow {
  margin-top: 14px;
  font-size: 1.1rem;
  color: var(--teal-500);
  position: relative;
  z-index: 1;
  transition: transform 0.2s ease;
}
.action-tile:hover .action-tile__arrow {
  transform: translateX(4px);
}

/* ========= Section title row =========
   Title (h2) on the left, "view all" link on the right.
   Use above a list of cards or a table inside .py-5 sections. */
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}
.section-title-row h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ink-900);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.section-title-row h2 i {
  color: var(--teal-700);
  font-size: 1.3rem;
}
.section-title-row__link {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--teal-700);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.section-title-row__link:hover {
  color: var(--teal-600);
  text-decoration: underline;
}

/* ========= Appointment card =========
   Compact horizontal card for an upcoming appointment.
   Left: date block. Middle: hospital/dept/doctor.
   Right: status pill + actions. */
.appointment-card {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 20px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease,
    border-color 0.2s ease;
}
.appointment-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: var(--teal-400);
}
.appointment-card__date {
  background: var(--teal-50);
  border: 1px solid var(--teal-100);
  border-radius: var(--r-md);
  text-align: center;
  padding: 10px 6px 12px;
}
.appointment-card__day {
  display: block;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--teal-800);
  line-height: 1;
  letter-spacing: -0.02em;
}
html[lang="bn"] .appointment-card__day {
  font-family: "Purno BCC", system-ui, sans-serif;
}
.appointment-card__month {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--teal-700);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}
.appointment-card__title {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink-900);
  margin: 0 0 4px;
}
.appointment-card__meta {
  font-size: 0.88rem;
  color: var(--ink-700);
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}
.appointment-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.appointment-card__meta i {
  color: var(--teal-700);
  font-size: 0.95rem;
}
.appointment-card__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.appointment-card__serial {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-700);
}
.appointment-card__serial strong {
  color: var(--teal-800);
  font-weight: 700;
}
@media (max-width: 575.98px) {
  .appointment-card {
    grid-template-columns: 72px 1fr;
    gap: 14px;
    padding: 14px 16px;
  }
  .appointment-card__right {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    padding-top: 10px;
    margin-top: 4px;
  }
}

/* ========= Empty state =========
   Centered icon + message + CTA shown when a list has no items.
   Use inside .auth-card or any white container. */
.empty-state {
  text-align: center;
  padding: 36px 20px;
}
.empty-state__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--teal-50);
  color: var(--teal-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin: 0 auto 14px;
}
.empty-state__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink-900);
  margin: 0 0 4px;
}
.empty-state__sub {
  font-size: 0.95rem;
  color: var(--ink-700);
  max-width: 38ch;
  margin: 0 auto 16px;
}

/* ========= Appointment-method tabs =========
   Three-way segmented tab control used on the create-appointment page
   ("By hospital / By department / By symptom"). Sits inside an .auth-card,
   above the corresponding form. Wrapped in a tinted bar so the active
   pill reads clearly. Wrap each pane in <div class="tab-pane fade" role="tabpanel">. */
.appointment-tabs {
  background: var(--teal-25);
  border: 1px solid var(--teal-100);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
}
.appointment-tabs .nav-link {
  flex: 1 1 auto;
  text-align: center;
  border: 1.5px solid transparent;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--teal-800);
  background: #fff;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease,
    box-shadow 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1.25;
}
.appointment-tabs .nav-link .bi {
  font-size: 1.05rem;
  color: var(--teal-700);
}
.appointment-tabs .nav-link:hover {
  background: var(--teal-50);
  border-color: var(--teal-100);
}
.appointment-tabs .nav-link.active {
  background: var(--teal-500);
  color: #fff;
  border-color: var(--teal-600);
  box-shadow: 0 4px 12px rgba(20, 163, 127, 0.25);
}
.appointment-tabs .nav-link.active .bi {
  color: #fff;
}
.appointment-tabs .nav-link:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 2px;
}
@media (max-width: 575.98px) {
  .appointment-tabs {
    flex-direction: column;
    gap: 6px;
  }
  .appointment-tabs .nav-link {
    flex: 1 1 100%;
  }
}

/* ========= Symptom suggestions =========
   "সাধারণ লক্ষণ সমূহ" pill group — a horizontal flex-wrap cluster of
   pre-defined common symptoms the patient can click to add to the
   token-input above. Each pill is a borderless filled button.
   The wrapping <div class="symptom-suggestions"> hosts a small
   eyebrow label at the top-right, then the buttons below. */
.symptom-suggestions {
  background: var(--teal-25);
  border: 1px solid var(--teal-100);
  border-radius: 12px;
  padding: 16px 18px;
  margin-top: 18px;
}
.symptom-suggestions__head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: none;
  color: var(--teal-800);
  margin: 0 0 12px;
  letter-spacing: 0.01em;
}
.symptom-suggestions__head .bi {
  color: var(--teal-700);
  font-size: 1rem;
}
.symptom-suggestions__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.symptom-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: #fff;
  color: var(--teal-800);
  border: 1.5px solid var(--teal-100);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease,
    color 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}
.symptom-pill .bi {
  color: var(--teal-700);
  font-size: 0.9rem;
}
.symptom-pill:hover {
  background: var(--teal-500);
  color: #fff;
  border-color: var(--teal-600);
  transform: translateY(-1px);
}
.symptom-pill:hover .bi {
  color: #fff;
}
.symptom-pill:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 2px;
}
.symptom-pill.is-selected {
  background: var(--teal-500);
  color: #fff;
  border-color: var(--teal-600);
}
.symptom-pill.is-selected .bi {
  color: #fff;
}

/* ========= Booking step navigation =========
   Bottom strip of the symptom-checker pane: "Back" on the left,
   "Continue" on the right. Reuses .btn variants but layout differs
   from .form-actions (justify-between rather than flex-end). */
.booking-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.booking-nav .btn {
  min-width: 140px;
}
@media (max-width: 575.98px) {
  .booking-nav {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .booking-nav .btn {
    width: 100%;
    min-width: 0;
  }
}

/* ========= Yes/No radio group =========
   Larger touch-friendly radio rows used by the symptom-checker
   ("শ্বাসকষ্ট আছে কি? — হ্যাঁ / না"). */
.radio-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 0;
}
.radio-stack .form-check {
  padding: 12px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  margin: 0;
  transition: border-color 0.15s ease, background 0.15s ease;
  min-height: auto;
}
.radio-stack .form-check:hover {
  border-color: var(--teal-100);
  background: var(--teal-25);
}
.radio-stack .form-check-input {
  margin-top: 0.2em;
  width: 1.15em;
  height: 1.15em;
  cursor: pointer;
}
.radio-stack .form-check-input:checked {
  background-color: var(--teal-500);
  border-color: var(--teal-500);
}
.radio-stack .form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(20, 163, 127, 0.18);
  border-color: var(--teal-500);
}
.radio-stack .form-check-label {
  font-weight: 600;
  color: var(--ink-900);
  cursor: pointer;
  padding-left: 6px;
}

/* ========= Page action button (header band) =========
   Right-aligned cluster of CTAs inside .page-header-band, mirrors
   the .page-actions admin pattern but allows multiple buttons. */
.page-header-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
@media (min-width: 768px) {
  .page-header-band--has-actions .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
  }
  .page-header-band--has-actions nav[aria-label="ব্রেডক্রাম্ব"] {
    flex: 1 1 100%;
  }
  .page-header-band--has-actions .page-header-band__title {
    flex: 1 1 auto;
  }
  .page-header-band--has-actions .page-header-band__actions {
    margin-top: 0;
  }
}

/* ========= Time-slot picker =========
   Selectable grid of appointment time slots used inside booking forms
   instead of a <select>. Each slot is a hidden radio + a styled <label>
   acting as the visual card. Native :checked drives the selected state —
   no JS needed for selection. JS only needed to fetch/disable slots
   from the server (set `disabled` on the input + add `.is-disabled` to
   the label, or just rely on the disabled-input selector below).

   Optional grouping: wrap a section of slots in <fieldset class="slot-group">
   with a <legend class="slot-group__legend"> (e.g. "সকাল", "দুপুর", "বিকাল"). */
.slot-picker {
  margin: 4px 0 0;
}
.slot-group {
  border: 0;
  padding: 0;
  margin: 0 0 18px;
  min-width: 0;
}
.slot-group:last-child {
  margin-bottom: 0;
}
.slot-group__legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--teal-800);
  text-transform: none;
  letter-spacing: 0.01em;
  margin: 0 0 10px;
  padding: 0;
  width: auto;
  float: none;
}
.slot-group__legend .bi {
  color: var(--teal-700);
  font-size: 0.95rem;
}
.slot-group__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.slot-option {
  /* The <input type="radio"> is visually hidden but stays focusable
     so keyboard users can Tab into each option and arrow-key between
     them (native radiogroup behaviour). */
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}
.slot-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
  padding: 14px 12px;
  background: #fff;
  color: var(--ink-900);
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, background 0.15s ease,
    color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  min-height: 62px;
  position: relative;
  font-family: inherit;
}
.slot-card__time {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--teal-800);
  line-height: 1.25;
}
.slot-card__sub {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-700);
  line-height: 1.25;
}

/* Hover (only for enabled, unchecked slots) */
.slot-option:not(:disabled) + .slot-card:hover {
  border-color: var(--teal-500);
  background: var(--teal-25);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Selected — :checked drives this via the adjacent-sibling combinator */
.slot-option:checked + .slot-card {
  background: var(--teal-500);
  color: #fff;
  border-color: var(--teal-600);
  box-shadow: 0 4px 12px rgba(20, 163, 127, 0.25);
}
.slot-option:checked + .slot-card .slot-card__time,
.slot-option:checked + .slot-card .slot-card__sub {
  color: #fff;
}

/* Keyboard focus — outline jumps to the visible card */
.slot-option:focus-visible + .slot-card {
  outline: 2px solid var(--teal-500);
  outline-offset: 2px;
}

/* Disabled / booked — input has [disabled] attribute */
.slot-option:disabled + .slot-card,
.slot-card.is-disabled {
  background: #f4f6f8;
  border-color: var(--line);
  color: #8aa1a8;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.slot-option:disabled + .slot-card .slot-card__time,
.slot-card.is-disabled .slot-card__time {
  color: #8aa1a8;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  text-decoration-color: rgba(138, 161, 168, 0.6);
}
.slot-option:disabled + .slot-card .slot-card__sub,
.slot-card.is-disabled .slot-card__sub {
  color: #a4b3b9;
}

/* Slot-picker legend strip — small inline color legend above the grid */
.slot-picker-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 0 12px;
  font-size: 0.82rem;
  color: var(--ink-700);
}
.slot-picker-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.slot-picker-legend__swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1.5px solid var(--line-strong);
  background: #fff;
}
.slot-picker-legend__swatch--selected {
  background: var(--teal-500);
  border-color: var(--teal-600);
}
.slot-picker-legend__swatch--disabled {
  background: #f4f6f8;
  border-color: var(--line);
}

@media (max-width: 575.98px) {
  .slot-group__grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
  }
  .slot-card {
    padding: 12px 8px;
    min-height: 56px;
  }
}

/* =============================================================
   4d. PATIENT APPOINTMENT — DETAIL · LIST · PAYMENT SUCCESS
   Introduced by: appointment-detail.html, appointment-list.html,
                  appointment-payment-success.html

   These three pages share a 12-col layout with a `.detail-grid`
   wrapper on detail/success and an `.auth-card` host on list.
   All new component classes below are scoped with prefixes —
   .detail-*, .info-row-*, .ticket-actions, .route-list,
   .filter-tabs, .status-pill--*, .visit-meta.
   ============================================================= */

/* ----- Detail page layout ----- */
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: start;
}
@media (max-width: 991.98px) {
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

/* ----- Detail card (host for the main appointment block) ----- */
.detail-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px 28px;
  box-shadow: var(--shadow-sm);
}
@media (max-width: 575.98px) {
  .detail-card {
    padding: 20px 18px;
  }
}

/* ----- Detail header info row (hospital + ticket actions) ----- */
.detail-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  background: var(--teal-25);
  border: 1px solid var(--teal-100);
  border-radius: var(--r-md);
  padding: 18px 20px;
  align-items: start;
}
.detail-summary__hospital {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink-900);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.detail-summary__hospital .bi {
  color: var(--teal-700);
  font-size: 1.1rem;
}
.detail-summary__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-size: 0.92rem;
  color: var(--ink-700);
  margin: 0;
}
.detail-summary__meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.detail-summary__meta i {
  color: var(--teal-700);
  font-size: 0.95rem;
}
.detail-summary__dept {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal-800);
  background: #fff;
  border: 1px solid var(--teal-100);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

/* ----- Ticket-action button cluster (print + download) ----- */
.ticket-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.ticket-actions a,
.ticket-actions button {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--teal-700);
  text-decoration: none;
  background: transparent;
  border: 0;
  padding: 4px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s ease;
}
.ticket-actions a:hover,
.ticket-actions button:hover {
  color: var(--teal-600);
  text-decoration: underline;
}
.ticket-actions .bi {
  font-size: 1rem;
}
@media (max-width: 575.98px) {
  .detail-summary {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .ticket-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding-top: 6px;
    border-top: 1px solid var(--teal-100);
  }
}

/* ----- Serial block (big centered "My Serial") ----- */
.serial-block {
  text-align: center;
  margin: 32px 0 28px;
}
.serial-block__label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--teal-700);
  margin: 0 0 12px;
}
.serial-block__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  min-height: 82px;
  padding: 10px 28px;
  background: linear-gradient(180deg, var(--teal-500), var(--teal-600));
  color: #fff;
  border-radius: 14px;
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: 0 8px 22px rgba(14, 163, 127, 0.22);
}
html[lang="bn"] .serial-block__number {
  font-family: "Purno BCC", system-ui, sans-serif;
}
@media (max-width: 575.98px) {
  .serial-block__number {
    min-width: 180px;
    min-height: 70px;
    font-size: 2.2rem;
  }
}

/* ----- Route block (header + two stacked info rows) ----- */
.route-block__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink-900);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.route-block__title .bi {
  color: var(--teal-700);
  font-size: 1rem;
}
.route-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--teal-100);
  border-radius: var(--r-md);
  overflow: hidden;
}
.route-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--teal-25);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink-900);
}
.route-list li + li {
  border-top: 1px solid var(--teal-100);
}
.route-list .bi {
  color: var(--teal-700);
  font-size: 1.05rem;
}

/* ----- Map placeholder (fallback when JS Maps fails to load) ----- */
.map-placeholder {
  margin-top: 18px;
  background: var(--teal-25);
  border: 1px dashed var(--teal-100);
  border-radius: var(--r-md);
  text-align: center;
  padding: 60px 24px;
  color: var(--ink-700);
}
.map-placeholder__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--teal-100);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--teal-700);
  margin-bottom: 14px;
}
.map-placeholder__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-900);
  margin: 0 0 4px;
}
.map-placeholder__sub {
  font-size: 0.88rem;
  margin: 0;
}

/* ----- Side panel (right column on detail/success pages) ----- */
.side-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.side-panel__action {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  text-decoration: none;
  color: var(--ink-900);
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: var(--shadow-sm);
}
.side-panel__action:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: var(--teal-400);
  color: var(--teal-800);
}
.side-panel__action-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--teal-50);
  color: var(--teal-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.side-panel__action-label {
  display: block;
  font-size: 1rem;
  line-height: 1.3;
}
.side-panel__action-sub {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-700);
  margin-top: 2px;
}

/* ----- Side info card (status + meta key/value list) ----- */
.side-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px 18px 14px;
  box-shadow: var(--shadow-sm);
}
.side-card__title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-700);
  margin: 0 0 12px;
}
.side-card__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.side-card__list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  font-size: 0.9rem;
  border-top: 1px dashed var(--line);
}
.side-card__list li:first-child {
  border-top: 0;
  padding-top: 4px;
}
.side-card__list .k {
  color: var(--ink-700);
}
.side-card__list .v {
  font-weight: 700;
  color: var(--ink-900);
  text-align: right;
}

/* ----- Filter tabs (Active / History on the list page) ----- */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--teal-25);
  border: 1px solid var(--teal-100);
  border-radius: 999px;
  padding: 5px;
  margin: 0 0 18px;
}
.filter-tabs .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--teal-800);
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.filter-tabs .nav-link:hover {
  background: #fff;
}
.filter-tabs .nav-link.active {
  background: var(--teal-500);
  color: #fff;
  box-shadow: 0 2px 6px rgba(14, 163, 127, 0.25);
}
.filter-tabs .nav-link .count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #fff;
  color: var(--teal-800);
  font-size: 0.78rem;
  font-weight: 700;
}
.filter-tabs .nav-link.active .count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

/* ----- List rows on appointment-list (richer than .appointment-card) -----
   Uses .appointment-card as a base; this is a hospital+department+date row
   variant used inside the "এপয়েন্টমেন্ট সমূহ" list. */
.appointment-card__dept {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--teal-800);
  background: var(--teal-50);
  border: 1px solid var(--teal-100);
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.appointment-card__actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 8px;
}
.appointment-card__actions a {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--teal-700);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.appointment-card__actions a:hover {
  color: var(--teal-600);
  text-decoration: underline;
}
.appointment-card__actions .bi {
  font-size: 0.95rem;
}

/* ----- Visit meta (history rows: date + status pill stacked) ----- */
.visit-meta {
  font-size: 0.82rem;
  color: var(--ink-700);
  margin: 4px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.visit-meta strong {
  color: var(--ink-900);
}

/* ----- Status pill: visited / completed variant ----- */
.status-pill--visited {
  background: #eef4ff;
  color: #1f3a8a;
  border-color: #cfdcff;
}
.status-pill--cancelled {
  background: #ffe9e9;
  color: #8a1f1f;
  border-color: #ffc7c7;
}
.status-pill--pending {
  background: #fff4cf;
  color: #7a5a00;
  border-color: #ffe89a;
}

/* ----- Dismissible alert-medical close button -----
   Native Bootstrap .btn-close uses a dark SVG which clashes with our
   light tinted alert backgrounds. Re-style it to inherit the alert's
   color for visual consistency. */
.alert-medical .btn-close {
  align-self: center;
  margin-left: auto;
  padding: 6px;
  background: none;
  border: 0;
  font-size: 1rem;
  line-height: 1;
  color: inherit;
  opacity: 0.7;
  flex-shrink: 0;
}
.alert-medical .btn-close:hover {
  opacity: 1;
}
.alert-medical--dismissible {
  padding-right: 12px;
}

/* ----- Side-card body text helpers ----- */
.side-card__body {
  font-size: 0.92rem;
  color: var(--ink-700);
  line-height: 1.55;
  margin: 0 0 8px;
}
.side-card__phone {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--teal-800);
  margin: 0;
}

/* ----- Appointment-card title link styling (list page) ----- */
.appointment-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}
.appointment-card__title a:hover,
.appointment-card__title a:focus-visible {
  color: var(--teal-700);
  text-decoration: underline;
}
