/* ==========================================================================
   Sehat Go - Design System & Global Styles
   Pure CSS - Zero JavaScript
   ========================================================================== */

/* --- 1. CSS Custom Properties / Design Tokens --- */
:root {
  --primary: #0d9488; /* Medical Teal */
  --primary-dark: #0f766e; /* Deep Teal */
  --primary-darker: #115e59; /* Slate Teal */
  --primary-light: #ccfbf1; /* Mint tint */
  --primary-subtle: #f0fdfa; /* Ultra light background */

  --secondary: #0284c7; /* Medical Sky Blue */
  --secondary-light: #e0f2fe; /* Sky tint */

  --accent: #f59e0b; /* Rating Gold / Amber */
  --accent-light: #fef3c7;

  --success: #10b981; /* Available green */
  --success-light: #d1fae5;
  --danger: #ef4444; /* Booked / Unavailable red */
  --danger-light: #fee2e2;

  --text-main: #0f172a; /* Deep slate for titles */
  --text-body: #334155; /* Neutral slate for body */
  --text-muted: #64748b; /* Subtle text */
  --text-light: #94a3b8; /* Very light text */

  --bg-main: #f8fafc; /* App background */
  --bg-surface: #ffffff; /* Card & Container surface */
  --bg-subtle: #f1f5f9; /* Input and tag background */

  --border: #e2e8f0; /* Soft border */
  --border-strong: #cbd5e1;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md:
    0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl:
    0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);

  --font-sans:
    "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, sans-serif;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --container-max: 1200px;
}

/* --- 2. CSS Reset & Base Rules --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  color-scheme: light;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-body);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--primary-dark);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary);
}

ul,
ol {
  list-style: none;
}

input,
button,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* --- 3. Layout Utility Classes --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section {
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
}

.section-subtle {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3rem auto;
}

.section-tag {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-dark);
  background-color: var(--primary-light);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.section-subtitle {
  font-size: 1.0625rem;
  color: var(--text-muted);
}

/* --- 4. Buttons & Badges --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.8125rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.95rem 1.85rem;
  font-size: 1.0625rem;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(13, 148, 136, 0.25);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  box-shadow: 0 4px 10px rgba(13, 148, 136, 0.35);
  transform: translateY(-1px);
}

.btn-outline {
  border: 1px solid var(--border-strong);
  color: var(--text-body) !important;
  background-color: var(--bg-surface);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary) !important;
  background-color: var(--primary-subtle);
}

.btn-ghost {
  color: var(--text-body) !important;
}

.btn-ghost:hover {
  background-color: var(--bg-subtle);
  color: var(--primary-dark) !important;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
}

.badge-primary {
  background-color: var(--primary-light);
  color: var(--primary-darker);
}

.badge-success {
  background-color: var(--success-light);
  color: #065f46;
}

.badge-danger {
  background-color: var(--danger-light);
  color: #991b1b;
}

.badge-warning {
  background-color: var(--accent-light);
  color: #92400e;
}

.badge-neutral {
  background-color: var(--bg-subtle);
  color: var(--text-muted);
}

/* --- 5. Navigation Bar (Pure CSS Responsive) --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
}

.brand-logo svg {
  width: 2.25rem;
  height: 2.25rem;
  color: var(--primary);
}

.brand-logo span.highlight {
  color: var(--primary);
}

.nav-toggle-checkbox {
  display: none;
}

.nav-toggle-label {
  display: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-main);
}

.nav-toggle-label svg {
  width: 1.75rem;
  height: 1.75rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-weight: 500;
  color: var(--text-body);
  padding: 0.25rem 0;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--primary);
  border-radius: var(--radius-full);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.nav-actions-mobile {
  display: none;
}


/* --- 6. Hero & Search Component --- */
.hero-section {
  position: relative;
  background: linear-gradient(180deg, #f0fdfa 0%, var(--bg-main) 100%);
  padding: 4.5rem 0 3.5rem 0;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.hero-content {
  max-width: 820px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #ffffff;
  border: 1px solid var(--primary-light);
  color: var(--primary-dark);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero-title span {
  color: var(--primary);
}

.hero-description {
  font-size: 1.1875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

/* Search Bar Box */
.search-wrapper {
  background-color: #ffffff;
  padding: 0.75rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  max-width: 880px;
  margin: 0 auto 1.5rem auto;
}

.search-form {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 0.75rem;
  align-items: center;
}
/* Search Results Dropdown */
.search-dropdown {
  display: none;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  text-align: left;
  max-height: 320px;
  overflow-y: auto;
}

/* When active/showing */
.search-dropdown.show {
  display: block;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background-color: var(--bg-subtle);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  transition: var(--transition);
}
.search-field.error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

.search-field:focus-within {
  background-color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.search-field svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-field input,
.search-field select {
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  color: var(--text-main);
  font-size: 0.9375rem;
}

.search-field input::placeholder {
  color: var(--text-light);
}

.popular-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.popular-tags span.label {
  font-weight: 500;
}

.tag-pill {
  background-color: #ffffff;
  border: 1px solid var(--border);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  color: var(--text-body);
  font-size: 0.8125rem;
  transition: var(--transition);
}

.tag-pill:hover {
  background-color: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
}

/* --- 7. Doctor Categories Grid --- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.category-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.25rem;
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.category-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background-color: var(--primary-light);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  transition: var(--transition);
}

.category-card:hover .category-icon {
  background-color: var(--primary);
  color: #ffffff;
}

.category-icon svg {
  width: 1.75rem;
  height: 1.75rem;
}

.category-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.category-count {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* --- 8. Doctor Cards & Listings --- */
.doctor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 1.75rem;
}

.doctor-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.doctor-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

.doctor-card-header {
  padding: 1.5rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  border-bottom: 1px solid var(--border);
}

.doctor-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.doctor-avatar {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  object-fit: cover;
  background-color: var(--bg-subtle);
  border: 2px solid #ffffff;
  box-shadow: var(--shadow-sm);
}

.doctor-avatar-placeholder {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), #99f6e4);
  color: var(--primary-darker);
  font-weight: 700;
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: var(--shadow-sm);
}

.verified-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  background-color: var(--primary);
  color: #ffffff;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
}

.verified-badge svg {
  width: 0.75rem;
  height: 0.75rem;
}

.doctor-basic-info {
  flex: 1;
}

.doctor-specialty {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.doctor-name {
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 0.35rem;
}

.doctor-rating {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
}

.doctor-rating svg {
  width: 1rem;
  height: 1rem;
  color: var(--accent);
  fill: currentColor;
}

.rating-count {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.doctor-card-body {
  padding: 1.25rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.doctor-clinic-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.875rem;
  color: var(--text-body);
}

.doctor-clinic-item svg {
  width: 1.125rem;
  height: 1.125rem;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.doctor-bio-snippet {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.doctor-card-footer {
  padding: 1rem 1.5rem;
  background-color: var(--bg-subtle);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.availability-pill {
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-available {
  background-color: var(--success);
}

/* --- 9. Doctor Profile Page Layout --- */
.profile-hero {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0;
}

.profile-header-card {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.profile-avatar-large {
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), #99f6e4);
  color: var(--primary-darker);
  font-size: 2.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid #ffffff;
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}

.profile-meta-header {
  flex: 1;
}

.profile-name {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.profile-qualifications {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.profile-grid-layout {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 2.5rem;
  padding: 3rem 0;
  align-items: flex-start;
}

.profile-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.profile-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.profile-card-title svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--primary);
}

.clinic-info-list {
  display: grid;
  gap: 1.25rem;
}

.clinic-info-row {
  display: flex;
  gap: 1rem;
}

.clinic-info-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-subtle);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.clinic-info-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.clinic-info-detail h4 {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.clinic-info-detail p {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
}

/* Static Schedule Table */
.schedule-table {
  width: 100%;
  border-collapse: collapse;
}

.schedule-table th,
.schedule-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
}

.schedule-table th {
  font-weight: 600;
  color: var(--text-muted);
  background-color: var(--bg-subtle);
}

.schedule-table td:last-child {
  text-align: right;
  font-weight: 600;
}

/* --- 10. Static Appointment & Slot Booking Widget --- */
.booking-widget {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 6rem;
}

.booking-header {
  margin-bottom: 1.25rem;
}

.booking-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.booking-fee {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.fee-amount {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
}

.fee-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Date Selector Mockup */
.date-selector-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.75rem;
  display: block;
}

.date-selector-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.date-card {
  padding: 0.75rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center;
  background-color: var(--bg-subtle);
  cursor: pointer;
  transition: var(--transition);
}

.date-card.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 8px rgba(13, 148, 136, 0.25);
}

.date-card .day-name {
  font-size: 0.75rem;
  font-weight: 500;
  display: block;
  text-transform: uppercase;
}

.date-card .day-num {
  font-size: 1.125rem;
  font-weight: 700;
  display: block;
  margin-top: 0.15rem;
}

.date-card.active .day-name {
  color: rgba(255, 255, 255, 0.85);
}

/* Time Slots Group */
.slot-section-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 1rem 0 0.5rem 0;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.time-slot {
  padding: 0.6rem 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: #ffffff;
  color: var(--text-body);
}

.time-slot.available {
  border-color: var(--primary-light);
  color: var(--primary-dark);
  background-color: var(--primary-subtle);
}

.time-slot.selected {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  font-weight: 700;
}

.time-slot.booked {
  background-color: var(--bg-subtle);
  border-color: var(--border);
  color: var(--text-light);
  text-decoration: line-through;
  opacity: 0.6;
}

.slot-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  margin: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.booking-summary-box {
  background-color: var(--bg-subtle);
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.summary-line:last-child {
  margin-bottom: 0;
  font-weight: 700;
  color: var(--text-main);
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border-strong);
}

/* --- 11. Category Listing & Filter Sidebar --- */
.listing-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  padding: 2.5rem 0;
  align-items: flex-start;
}
#category-title{
  text-transform:  capitalize;
}

.filter-sidebar {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 5.5rem;
}

.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.filter-header h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-main);
}

.filter-group {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.filter-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.filter-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.9375rem;
  color: var(--text-body);
  margin-bottom: 0.5rem;
  cursor: pointer;
}

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
  accent-color: var(--primary);
  width: 1rem;
  height: 1rem;
}

.filter-option span.count {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Breadcrumb navigation */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb-separator {
  color: var(--text-light);
}

/* --- 12. Forms & Auth Pages (Register & Login) --- */
.auth-page-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1.5rem;
  background: radial-gradient(
    circle at top right,
    #e0f2fe 0%,
    var(--bg-main) 70%
  );
}

.auth-card {
  width: 100%;
  max-width: 480px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-xl);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background-color: var(--primary-light);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem auto;
}

.auth-icon svg {
  width: 1.75rem;
  height: 1.75rem;
}

.auth-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* Tab selector for auth */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background-color: var(--bg-subtle);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.75rem;
}

.auth-tab {
  padding: 0.6rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.auth-tab.active {
  background-color: #ffffff;
  color: var(--primary-dark);
  box-shadow: var(--shadow-sm);
}

/* Form Styles */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.form-label .required {
  color: var(--danger);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background-color: #ffffff;
  color: var(--text-main);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.form-control::placeholder {
  color: var(--text-light);
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

.form-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.875rem;
  color: var(--text-body);
  cursor: pointer;
}

.form-checkbox-label input[type="checkbox"] {
  accent-color: var(--primary);
  width: 1rem;
  height: 1rem;
  margin-top: 0.2rem;
}

/* Registration Form Expanded Container */
.register-container {
  max-width: 820px;
  margin: 3.5rem auto;
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-lg);
}

.form-section-title {
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 2rem 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-section-title:first-of-type {
  margin-top: 0;
}

.form-section-title svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--primary);
}

.upload-box {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  background-color: var(--bg-subtle);
  cursor: pointer;
  transition: var(--transition);
}

.upload-box:hover {
  border-color: var(--primary);
  background-color: var(--primary-subtle);
}

.upload-icon {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--primary);
  margin: 0 auto 0.75rem auto;
}

.day-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.5rem;
}

.day-pill-checkbox {
  position: relative;
}

.day-pill-checkbox input {
  display: none;
}

.day-pill-checkbox label {
  display: block;
  padding: 0.65rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-body);
  background-color: var(--bg-subtle);
  cursor: pointer;
  transition: var(--transition);
}

.day-pill-checkbox input:checked + label {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* --- 13. How It Works & Trust Features --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.feature-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.feature-number {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  background-color: var(--primary-light);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.feature-box h3 {
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.feature-box p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #0f3d3e 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  box-shadow: var(--shadow-xl);
}

.cta-content h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.cta-content p {
  font-size: 1.0625rem;
  color: #ccfbf1;
  max-width: 600px;
}

/* --- 14. Footer --- */
.site-footer {
  background-color: #0b1329;
  color: #94a3b8;
  padding-top: 4.5rem;
  padding-bottom: 2rem;
  border-top: 1px solid #1e293b;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-brand h3 {
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.footer-brand h3 svg {
  width: 2rem;
  height: 2rem;
  color: var(--primary);
}

.footer-brand p {
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.footer-heading {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.9375rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: #ffffff;
  padding-left: 0.25rem;
}

.district-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.district-tag {
  background-color: #1e293b;
  color: #cbd5e1;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  transition: var(--transition);
}

.district-tag:hover {
  background-color: var(--primary);
  color: #ffffff;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* --- 15. Responsive Media Queries --- */
@media (max-width: 992px) {
  .hero-title {
    font-size: 2.35rem;
  }

  .profile-grid-layout {
    grid-template-columns: 1fr;
  }

  .listing-layout {
    grid-template-columns: 1fr;
  }

  .filter-sidebar {
    position: static;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }

  .cta-banner {
    flex-direction: column;
    text-align: center;
    padding: 2.5rem;
  }
}

@media (max-width: 768px) {
  .nav-toggle-label {
    display: block;
  }
    .nav-menu.show {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 4.5rem;
    left: 0;
    right: 0;
    background-color: #ffffff;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
    gap: 1.25rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    display: none;
  }

  /* Pure CSS Hamburger Toggle */
  .nav-toggle-checkbox:checked ~ .nav-menu {
    display: flex;
  }

  .nav-actions {
    display: none;
  }

  .nav-menu .nav-actions-mobile {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
  }

  .nav-menu .nav-actions-mobile .btn {
    width: 100%;
  }

  .search-form {
    grid-template-columns: 1fr;
  }

  .profile-header-card {
    flex-direction: column;
    text-align: center;
  }

  .profile-badges {
    justify-content: center;
  }

  .form-row,
  .form-row-3 {
    grid-template-columns: 1fr;
  }

  .register-container {
    padding: 1.75rem;
    margin: 1.5rem auto;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ==========================================================================
   Dashboard Styles
   ========================================================================== */
.dashboard-header-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.dashboard-user-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.dashboard-avatar {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
  flex-shrink: 0;
}
 #dashboard-user-name {
  text-transform: capitalize;
 }

.role-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.role-badge.doctor {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.role-badge.patient {
  background: var(--secondary-light);
  color: var(--secondary);
}

.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
}

.stat-card .stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.2;
}

.stat-card .stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.appointments-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 3rem;
}

.appointment-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  transition: var(--transition);
}

.appointment-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.appointment-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.status-pill.confirmed {
  background: var(--success-light);
  color: var(--success);
}

.status-pill.completed {
  background: #e0f2fe;
  color: #0284c7;
}

.status-pill.canceled,
.status-pill.cancelled {
  background: var(--danger-light);
  color: var(--danger);
}

.dashboard-notice {
  background: var(--primary-subtle);
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  color: var(--primary-darker);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.dashboard-notice svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.clinic-detail-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-subtle);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  color: var(--text-body);
  font-weight: 500;
}

.empty-dashboard-card {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--bg-surface);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}

/* --- 16. Booking Confirmation Modal & Printable Appointment Pass --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 9999;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: modalFadeIn 0.25s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-container {
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPopIn {
  from {
    transform: scale(0.92) translateY(12px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.appointment-pass-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.modal-close-icon {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.modal-close-icon:hover {
  color: var(--text-main);
  background-color: var(--bg-subtle);
}

.pass-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed var(--border);
}

.pass-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--primary);
  font-size: 1.1rem;
}

.pass-brand-icon {
  width: 22px;
  height: 22px;
}

.pass-status-badge {
  background-color: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pass-hero {
  text-align: center;
  margin-bottom: 1.5rem;
}

.pass-success-icon {
  width: 52px;
  height: 52px;
  background-color: #10b981;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.85rem auto;
  box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.35);
}

.pass-success-icon svg {
  width: 28px;
  height: 28px;
}

.pass-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.pass-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.pass-token-banner {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.pass-token-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pass-token-value {
  font-family: monospace;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  background-color: #f0fdfa;
  border: 1px solid #ccfbf1;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
}

.pass-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
  background-color: #ffffff;
}

.pass-detail-item {
  display: flex;
  flex-direction: column;
  padding: 0.75rem;
  background-color: var(--bg-subtle);
  border-radius: 8px;
}

.pass-detail-full {
  grid-column: 1 / -1;
}

.detail-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.detail-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.detail-subvalue {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.fee-display-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.detail-fee {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.fee-note {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.pass-advisory {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background-color: #fffbeb;
  border: 1px solid #fef3c7;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.8rem;
  color: #92400e;
  margin-bottom: 1.5rem;
}

.advisory-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #d97706;
}

.pass-actions {
  display: flex;
  gap: 0.85rem;
}

.pass-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
}

/* --- Print Styles (@media print) --- */
@media print {
  /* 1. Hide the entire underlying webpage and unneeded elements */
  header,
  main,
  footer,
  .modal-close-icon,
  .pass-actions,
  #booking-msg {
    display: none !important;
  }

  /* 2. Reset the modal overlay from fixed/blurred to a normal printable block */
  body {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .modal-overlay {
    position: static !important;
    inset: auto !important;
    background: transparent !important;
    display: block !important;
    padding: 0 !important;
    animation: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .modal-container {
    max-width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    animation: none !important;
    margin: 0 auto !important;
  }

  /* 3. Format the appointment pass cleanly for paper output */
  #printable-appointment-pass {
    border: 2px solid #0f172a !important;
    box-shadow: none !important;
    border-radius: 8px !important;
    width: 100% !important;
    max-width: 650px !important;
    margin: 20px auto !important;
    padding: 2.5rem !important;
    background: #ffffff !important;
    page-break-inside: avoid !important;
  }

  .pass-token-banner {
    background-color: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
  }

  .pass-detail-item {
    background-color: #f8fafc !important;
  }

  /* Force browsers to print exact colors and backgrounds */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}


