/*
 * ============================================================
 * PetCare+ Clinic Hub - Main Styles
 * Started: Feb 2024  |  Last update: Dec 2024
 * ============================================================
 *
 * TABLE OF CONTENTS (Use Ctrl+F to search these section names)
 * ────────────────────────────────────────────────────────────
 *  1.  VARIABLES & THEME        – Colors, shadows, radius
 *  2.  RESET & BASE             – Box-sizing, html, body, links
 *  3.  LAYOUT & CONTAINER       – .container, .section
 *  4.  BUTTONS                  – .btn variants
 *  5.  NAVBAR                   – Top nav, logo, links, dropdown
 *  6.  NOTIFICATIONS            – Bell, badge, pulse
 *  7.  HERO SECTION             – Homepage hero area
 *  8.  CARDS                    – Base card, feature, clinic, steps
 *  9.  FORMS                    – Inputs, labels, toggles
 * 10.  AUTH PAGES               – Login, register layout
 * 11.  DASHBOARD                – Sidebar, dash-main, stats
 * 12.  TABLES                   – Table styling
 * 13.  BADGES & ALERTS          – Status badges, alert boxes
 * 14.  MODALS                   – Overlay, modal box
 * 15.  MAP & CLINIC LOCATOR     – Google Map, sidebar list
 * 16.  TESTIMONIALS             – Review cards
 * 17.  FOOTER                   – Footer grid, links, legal
 * 18.  PET CARDS                – Pet profile cards
 * 19.  AI SECTION               – AI feature cards
 * 20.  PAGINATION               – Page buttons
 * 21.  LOADING & TOASTS         – Spinner, toast notifications
 * 22.  UTILITY CLASSES          – Margins, text, flex helpers
 * 23.  RESPONSIVE (TABLET)      – ≤1024px breakpoint
 * 24.  RESPONSIVE (MOBILE)      – ≤480px breakpoint
 * 25.  DARK MODE                – Full dark theme overrides
 *
 * ============================================================
 */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

/* ============================================================
   1. VARIABLES & THEME
   Para baguhin ang KULAY ng buong site, dito mo i-edit
   ============================================================ */
:root {
  --primary: #4F46E5;
  --primary-dark: #4338CA;
  --secondary: #0EA5E9;
  --sec-dark: #0284C7;
  --bg: #F8FAFC;
  --white: #FFFFFF;
  --card: #FFFFFF;
  --text: #1E293B;
  --text-muted: #64748B;
  --border: #E2E8F0;
  --danger: #EF4444;
  --warning: #F59E0B;
  --success: #10B981;
  --info: #3B82F6;
  
  /* Modern Soft Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.1), 0 2px 4px -1px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -2px rgba(15, 23, 42, 0.05);
  --shadow-hover: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
  
  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);
  
  --radius: 16px;
  --radius-sm: 8px;
  --radius-lg: 24px;
  --transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   2. RESET & BASE
   Box-sizing, html, body, links, images, buttons
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 15px;
}

/* Paw print and bone pattern background
   This took way longer than it should have to get right
   but the pattern is subtle and looks great */
html::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300' viewBox='0 0 300 300'%3E%3Cg fill='%23b0badb' fill-opacity='0.18'%3E%3Cg transform='translate(55,70)'%3E%3Cellipse cx='0' cy='13' rx='14' ry='11'/%3E%3Ccircle cx='-15' cy='-3' r='7'/%3E%3Ccircle cx='-4' cy='-11' r='7'/%3E%3Ccircle cx='8' cy='-10' r='7'/%3E%3Ccircle cx='17' cy='-1' r='6.5'/%3E%3C/g%3E%3Cg transform='translate(210,55) rotate(35)'%3E%3Crect x='-18' y='-4' width='36' height='8' rx='3'/%3E%3Ccircle cx='-18' cy='-7' r='6'/%3E%3Ccircle cx='-18' cy='7' r='6'/%3E%3Ccircle cx='18' cy='-7' r='6'/%3E%3Ccircle cx='18' cy='7' r='6'/%3E%3C/g%3E%3Cg transform='translate(225,210) rotate(-15)'%3E%3Cellipse cx='0' cy='12' rx='13' ry='10'/%3E%3Ccircle cx='-14' cy='-2' r='6.5'/%3E%3Ccircle cx='-4' cy='-10' r='6.5'/%3E%3Ccircle cx='8' cy='-9' r='6.5'/%3E%3Ccircle cx='16' cy='0' r='6'/%3E%3C/g%3E%3Cg transform='translate(60,225) rotate(-50)'%3E%3Crect x='-16' y='-3.5' width='32' height='7' rx='2.5'/%3E%3Ccircle cx='-16' cy='-6.5' r='5.5'/%3E%3Ccircle cx='-16' cy='6.5' r='5.5'/%3E%3Ccircle cx='16' cy='-6.5' r='5.5'/%3E%3Ccircle cx='16' cy='6.5' r='5.5'/%3E%3C/g%3E%3Cg transform='translate(148,148) rotate(12)'%3E%3Cellipse cx='0' cy='9' rx='10' ry='8'/%3E%3Ccircle cx='-11' cy='-2' r='5'/%3E%3Ccircle cx='-3' cy='-9' r='5'/%3E%3Ccircle cx='7' cy='-8' r='5'/%3E%3Ccircle cx='13' cy='1' r='4.5'/%3E%3C/g%3E%3Cg transform='translate(245,148) rotate(20)'%3E%3Crect x='-15' y='-3' width='30' height='6' rx='2'/%3E%3Ccircle cx='-15' cy='-6' r='5'/%3E%3Ccircle cx='-15' cy='6' r='5'/%3E%3Ccircle cx='15' cy='-6' r='5'/%3E%3Ccircle cx='15' cy='6' r='5'/%3E%3C/g%3E%3Cg transform='translate(18,155) rotate(-70)'%3E%3Crect x='-14' y='-3' width='28' height='6' rx='2'/%3E%3Ccircle cx='-14' cy='-6' r='5'/%3E%3Ccircle cx='-14' cy='6' r='5'/%3E%3Ccircle cx='14' cy='-6' r='5'/%3E%3Ccircle cx='14' cy='6' r='5'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 300px 300px;
}

/* Dark mode: same paw pattern, dark base */
[data-theme="dark"]::before {
  background-color: #0a0a0a;
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --card: #1a1a1a;
  --text: #F8FAFC;
  --text-muted: #94A3B8;
  --border: #2a2a2a;
  --glass-bg: rgba(26, 26, 26, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
}

body {
  font-family: 'Space Grotesk', sans-serif;
  background: transparent;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

/* Better readability for modern sans-serif */
p, li, td, th, span, div {
  line-height: 1.6;
}

/* Adjust button text */
.btn {
  letter-spacing: 0;
  padding: 0.65rem 1.5rem;
  font-weight: 500;
}

/* Form controls */
.form-control, input, textarea, select {
  letter-spacing: 0;
  line-height: 1.5;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
}

input,
select,
textarea {
  font-family: inherit;
}

/* ============================================================
   3. LAYOUT & CONTAINER
   .container (max-width), .section, .section-header, .section-tag
   ============================================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

.section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: .75rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.section-tag {
  display: inline-block;
  background: rgba(30, 64, 255, .1);
  color: var(--primary);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .3rem .9rem;
  border-radius: 50px;
  margin-bottom: .75rem;
}

/* ============================================================
   4. BUTTONS
   .btn, .btn-primary, .btn-outline, .btn-danger, .btn-sm/lg/block
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.75rem;
  border-radius: 50px;
  font-size: .95rem;
  font-weight: 600;
  transition: all var(--transition);
  line-height: 1;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-2px); /* more pronounced lift */
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background: var(--secondary);
  color: #fff;
}

.btn-secondary:hover {
  background: var(--sec-dark);
  color: #fff;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-outline-white {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, .7);
}

.btn-outline-white:hover {
  background: #fff;
  color: var(--primary);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #DC2626;
  color: #fff;
}

.btn-sm {
  padding: .45rem 1.1rem;
  font-size: .85rem;
}

.btn-lg {
  padding: .9rem 2.5rem;
  font-size: 1.05rem;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* ============================================================
   5. NAVBAR
   Top navigation bar, logo, nav links, user menu, dropdown
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
  overflow: visible;
}

.navbar.scrolled {
  box-shadow: var(--shadow);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 70px;
  position: relative;
  overflow: visible;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 0.02em;
}

.logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.nav-logo-img {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  border-radius: 10px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.logo-plus {
  color: var(--secondary);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* Hide nav menu only on dashboard pages when logged in, not on public pages */
@media (min-width: 769px) {
  body.logged-in.is-dashboard .nav-menu {
    display: none !important;
  }
}

.nav-link {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text);
  padding: .4rem 0;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  padding: .3rem;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .3s;
}

/* User menu */
.nav-user-menu {
  display: flex;
  align-items: center;
  gap: .75rem;
  position: relative;  /* anchor for dropdown */
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}

.user-avatar-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
}

.user-avatar-wrap {
  display: flex;
  align-items: center;
  gap: .5rem;
  cursor: default;
  font-size: .9rem;
  font-weight: 500;
}

.user-avatar-wrap span {
  display: inline-block;
  white-space: nowrap;
  color: var(--text);
}

.theme-toggle {
  margin-left: .25rem;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  min-width: 200px;
  padding: 8px 0;
  display: none;
  z-index: 10000;
  overflow: hidden;
}

.user-dropdown.open {
  display: block;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-dropdown a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text);
  transition: background 0.15s ease;
  text-decoration: none;
}

.user-dropdown a:hover {
  background: var(--bg);
}

.user-dropdown a:active {
  background: rgba(0,0,0,0.05);
}

.user-dropdown a i {
  width: 18px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: .35rem 0;
}

.text-danger {
  color: var(--danger) !important;
}

.notif-bell-early {
  position: relative;
  font-size: 1.15rem;
  color: var(--text-muted);
  padding: .3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition);
}

.notif-bell-early:hover {
  color: var(--primary);
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid var(--bg, #0f1927);
}

@keyframes notifPulse {
  0%   { transform: rotate(0deg); }
  20%  { transform: rotate(-15deg); }
  40%  { transform: rotate(15deg); }
  60%  { transform: rotate(-10deg); }
  80%  { transform: rotate(10deg); }
  100% { transform: rotate(0deg); }
}

.notif-pulse {
  animation: notifPulse .5s ease;
  display: inline-block;
}

/* ============================================================
   7. HERO SECTION
   Homepage hero area with gradient, badges, stats, floating card
   ============================================================ */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, #0F1F6E 0%, #1E40FF 50%, #00D4AA 100%);
  display: flex;
  align-items: center;
  padding-top: 70px;
  position: relative;
  overflow: hidden;
  max-width: 100vw;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-container {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255, 255, 255, .15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .25);
  color: #fff;
  font-size: .8rem;
  font-weight: 600;
  padding: .4rem 1rem;
  border-radius: 50px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: 3.25rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.hero h1 span {
  color: var(--secondary);
}

.hero p {
  color: rgba(255, 255, 255, .85);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.hero-stat-card {
  text-align: center;
  color: #fff;
}

.hero-stat-card strong {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--secondary);
}

.hero-stat-card span {
  font-size: .8rem;
  opacity: .8;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-card-float {
  background: rgba(255, 255, 255, .12);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 20px;
  padding: 2rem;
  color: #fff;
  animation: float 4s ease-in-out infinite;
  max-width: 360px;
}

.hero-card-float .card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero-card-float h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: .5rem;
}

.hero-card-float p {
  font-size: .9rem;
  opacity: .85;
}

.floating-badges {
  display: none;
}

.fb {
  background: var(--card);
  border-radius: 50px;
  padding: .5rem 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text);
  box-shadow: var(--shadow);
  animation: float 3s ease-in-out infinite;
}

.fb:nth-child(2) {
  animation-delay: -.8s;
}

.fb:nth-child(3) {
  animation-delay: -1.6s;
}

.fb i {
  font-size: 1rem;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   8. CARDS
   Base .card, feature cards, clinic cards, how-it-works steps
   ============================================================ */
.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.card-body {
  padding: 1.5rem;
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
}

/* Feature Cards */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.feature-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin: 0 auto 1.25rem;
}

.feature-icon.blue {
  background: rgba(30, 64, 255, .1);
  color: var(--primary);
}

.feature-icon.green {
  background: rgba(0, 212, 170, .1);
  color: var(--secondary);
}

.feature-icon.orange {
  background: rgba(245, 158, 11, .1);
  color: var(--warning);
}

.feature-icon.purple {
  background: rgba(139, 92, 246, .1);
  color: #8B5CF6;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: .6rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: .9rem;
}

/* Clinic Card */
.clinics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.clinic-card {
  cursor: pointer;
}

.clinic-card-img {
  height: 180px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  position: relative;
  overflow: hidden;
}

.clinic-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.clinic-card-badge {
  position: absolute;
  top: .75rem;
  right: .75rem;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: .75rem;
  padding: .25rem .6rem;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: .25rem;
}

.clinic-card-body {
  padding: 1.25rem;
}

.clinic-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: .3rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clinic-card-addr {
  color: var(--text-muted);
  font-size: .85rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .75rem;
}

.clinic-tags {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin-bottom: .75rem;
}

.clinic-tag {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: .75rem;
  padding: .2rem .65rem;
  color: var(--text-muted);
}

.clinic-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: .75rem;
  margin-top: .5rem;
}

.stars {
  color: var(--warning);
  font-size: .85rem;
}

.stars i {
  margin-right: 1px;
}

/* How It Works */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.step-item {
  padding: 2rem 1rem;
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-size: 1.3rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: 0 6px 20px rgba(30, 64, 255, .35);
}

.step-item h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: .5rem;
}

.step-item p {
  font-size: .875rem;
  color: var(--text-muted);
}

/* ============================================================
   9. FORMS
   .form-group, .form-label, .form-control, checkboxes, password toggle
   ============================================================ */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .45rem;
}

.form-label .required {
  color: var(--danger);
  margin-left: .2rem;
}

/* Input styling - Dec 15, 2024 fix
   Previous attempts (kept for reference):
   
   Attempt 1 - didn't work:
   background: var(--white);
   color: var(--text);
   
   Attempt 2 - still bad:
   background: transparent;
   border: 2px solid var(--border);
   
   Current working solution: */
.form-control {
  width: 100%;
  padding: .7rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color .25s ease, box-shadow .25s ease;
}

.form-control::placeholder {
  color: var(--text-muted);
}

/* Fix for chrome/safari autofill - dynamic based on theme */
.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--white) inset !important;
  -webkit-text-fill-color: var(--text) !important;
  border: 1.5px solid var(--border) !important;
  caret-color: var(--text) !important;
}

[data-theme="dark"] .form-control:-webkit-autofill,
[data-theme="dark"] .form-control:-webkit-autofill:hover,
[data-theme="dark"] .form-control:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--card) inset !important;
  -webkit-text-fill-color: var(--text) !important;
  border: 1.5px solid var(--border) !important;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(245, 246, 255, 0.12);
  background: var(--white);
}

.form-control.error {
  border-color: var(--danger);
}

.form-hint {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: .3rem;
}

.form-error {
  font-size: .8rem;
  color: var(--danger);
  margin-top: .3rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group .form-control {
  padding-right: 2.8rem;
}

.input-group-icon {
  position: absolute;
  right: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  font-size: .9rem;
}

/* password toggle icon - made it more visible */
.input-group .toggle-pw {
  position: absolute;
  right: .9rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  color: #94a3b8;
  padding: 0;
  font-size: .9rem;
  pointer-events: all;
  cursor: pointer;
  transition: color .2s;
}

.input-group .toggle-pw:hover {
  color: var(--text);
}

[data-theme="dark"] .input-group .toggle-pw:hover {
  color: var(--primary);
}

select.form-control {
  cursor: pointer;
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  cursor: pointer;
  flex-wrap: nowrap;
}

.form-check input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--primary);
}

.form-check span {
  line-height: 1.5;
  word-spacing: normal;
  letter-spacing: normal;
}

/* ============================================================
   10. AUTH PAGES (Login / Register)
   Auth container, visual panel, form wrapper, logo, divider
   ============================================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}

.auth-visual {
  flex: 1;
  background: linear-gradient(135deg, #0F1F6E, var(--primary), var(--secondary));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.auth-visual h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.auth-visual p {
  opacity: .85;
  font-size: 1rem;
  max-width: 320px;
  text-align: center;
}

.auth-form-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-form-inner {
  width: 100%;
  max-width: 460px;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 2rem;
}

.auth-logo .logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.auth-form-inner h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: .4rem;
}

.auth-form-inner>p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.auth-footer-text {
  text-align: center;
  margin-top: 1.5rem;
  font-size: .9rem;
  color: var(--text-muted);
}

.auth-divider {
  text-align: center;
  position: relative;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: .85rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  height: 1px;
  width: 44%;
  background: var(--border);
}

.auth-divider::before {
  left: 0;
}

.auth-divider::after {
  right: 0;
}

/* ============================================================
   11. DASHBOARD
   Sidebar, collapsed mode, dash-main, stat widgets, breadcrumb
   ============================================================ */
.dash-layout {
  display: flex;
  min-height: 100vh;
  padding-top: 70px;
}

/* ============================================================
   11. DASHBOARD - REDESIGNED CLEAN ADMINISTRATIVE INTERFACE
   Sidebar, dash-main, stats, tables, charts - Modern & Professional
   ============================================================ */

/* Dashboard Color Variables */
body.is-dashboard {
  --dash-bg: #F9FAFB;
  --dash-card: #FFFFFF;
  --dash-border: #E5E7EB;
  --dash-text: #111827;
  --dash-text-muted: #6B7280;
  --dash-primary: #4F46E5;
  --dash-primary-light: #EEF2FF;
  --dash-success: #10B981;
  --dash-warning: #F59E0B;
  --dash-danger: #EF4444;
  --dash-info: #3B82F6;
  --dash-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --dash-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --dash-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --dash-radius: 8px;
  --dash-radius-sm: 6px;
  --dash-radius-lg: 12px;
  background: var(--dash-bg) !important;
  color: var(--dash-text) !important;
}

[data-theme="dark"] body.is-dashboard {
  --dash-bg: #0a0a0a;
  --dash-card: #1a1a1a;
  --dash-border: #2a2a2a;
  --dash-text: #F1F5F9;
  --dash-text-muted: #94A3B8;
  --dash-primary: #6366F1;
  --dash-primary-light: rgba(99, 102, 241, 0.15);
  --dash-success: #22C55E;
  background: var(--dash-bg) !important;
}

/* Sidebar - Clean Navigation */
.sidebar {
  width: 260px;
  background: var(--dash-card);
  border-right: 1px solid var(--dash-border);
  position: fixed;
  top: 70px;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: width .3s ease, transform .3s ease;
  box-shadow: none;
}

.sidebar-logo {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--dash-border);
}

.sidebar-logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  transition: opacity 0.2s;
}

.sidebar-logo-link:hover { opacity: 0.8; }

.sidebar-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.sidebar-logo-text {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dash-text);
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 0.01em;
}

.sidebar-header {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--dash-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.sidebar-user .user-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--dash-primary), var(--dash-info));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  flex-shrink: 0;
}

.sidebar-user > div {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dash-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 0.75rem;
  color: var(--dash-text-muted);
  margin-top: 2px;
}

.sidebar-collapse-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--dash-bg);
  border: 1px solid var(--dash-border);
  color: var(--dash-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: .7rem;
  transition: all 0.2s;
  flex-shrink: 0;
}

.sidebar-collapse-btn:hover {
  background: var(--dash-primary);
  color: white;
  border-color: var(--dash-primary);
}

.sidebar-nav {
  padding: 1rem 0.5rem;
  flex: 1;
  overflow-y: auto;
}

.sidebar-section {
  padding: 0.5rem 0.75rem 0.375rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--dash-text-muted);
  margin-top: 0.75rem;
}

.sidebar-section:first-child {
  margin-top: 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  margin: 2px 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--dash-text);
  border-radius: var(--dash-radius-sm);
  transition: all 0.15s ease;
  border-left: none;
  position: relative;
}

.sidebar-link i {
  width: 20px;
  text-align: center;
  color: var(--dash-text-muted);
  font-size: 1rem;
  transition: color 0.15s;
}

.sidebar-link:hover {
  background: var(--dash-bg);
  color: var(--dash-text);
}

.sidebar-link:hover i {
  color: var(--dash-primary);
}

.sidebar-link.active {
  background: var(--dash-primary-light);
  color: var(--dash-primary);
  font-weight: 600;
  border-left: none;
}

.sidebar-link.active i {
  color: var(--dash-primary);
}

.sidebar-badge {
  margin-left: auto;
  background: var(--dash-danger);
  color: white;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  margin-top: auto;
  padding: 0.75rem 0.5rem;
  border-top: 1px solid var(--dash-border);
}

.sidebar-logout {
  color: var(--dash-danger) !important;
}

.sidebar-logout i {
  color: var(--dash-danger) !important;
}

.sidebar-logout:hover {
  background: rgba(239, 68, 68, 0.1) !important;
  border-left-color: transparent !important;
}

/* Sidebar Collapsed State */
.sidebar-collapsed {
  width: 64px;
}

.sidebar-collapsed .sidebar-logo-text,
.sidebar-collapsed .sidebar-user-name,
.sidebar-collapsed .sidebar-user-role,
.sidebar-collapsed .sidebar-section,
.sidebar-collapsed .sidebar-link-text {
  display: none;
}

.sidebar-collapsed .sidebar-logo {
  padding: 1rem 0.5rem;
  display: flex;
  justify-content: center;
}

.sidebar-collapsed .sidebar-logo-link {
  justify-content: center;
}

.sidebar-collapsed .sidebar-header {
  flex-direction: column;
  align-items: center;
  padding: 1rem 0.5rem;
  gap: 0.75rem;
}

.sidebar-collapsed .sidebar-user {
  flex-direction: column;
  align-items: center;
}

.sidebar-collapsed .sidebar-link {
  justify-content: center;
  padding: 0.75rem 0;
}

.sidebar-collapsed .sidebar-link i {
  font-size: 1.125rem;
  margin: 0;
}

.sidebar-collapsed .sidebar-badge {
  position: absolute;
  top: 6px;
  right: 8px;
  min-width: 16px;
  height: 16px;
  padding: 0 0.25rem;
  font-size: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-collapsed .sidebar-collapse-btn {
  margin: 0.5rem auto 0;
}

.sidebar-collapsed .sidebar-collapse-btn i {
  transform: rotate(180deg);
}

/* Main Dashboard Area */
.dash-main {
  flex: 1;
  margin-left: 260px;
  padding: 1.5rem;
  background: var(--dash-bg);
  min-height: calc(100vh - 70px);
  transition: margin-left .3s ease;
  color: var(--dash-text);
}

body:has(.sidebar-collapsed) .dash-main {
  margin-left: 64px;
}

/* Dashboard Header */
.dash-header {
  margin-bottom: 1.5rem;
}

.admin-dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-dash-title {
  flex: 1;
  min-width: 250px;
}

.dash-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 0.25rem 0;
  line-height: 1.2;
}

.dash-header p,
.admin-dash-title p {
  font-size: 0.875rem;
  color: #6B7280;
  margin: 0;
}

[data-theme="dark"] .dash-header h1,
[data-theme="dark"] .admin-dash-title h1 {
  color: #F1F5F9;
}

[data-theme="dark"] .dash-header p,
[data-theme="dark"] .admin-dash-title p {
  color: #94A3B8;
}

.dash-breadcrumb {
  font-size: 0.813rem;
  color: #6B7280;
  margin-bottom: 0.375rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.dash-breadcrumb a {
  color: #6B7280;
  text-decoration: none;
  transition: color 0.15s;
}

.dash-breadcrumb a:hover {
  color: #4F46E5;
}

.dash-breadcrumb span {
  color: var(--dash-primary);
  font-weight: 500;
}

.dash-breadcrumb-sep {
  margin: 0 0.5rem;
  color: #9CA3AF;
}

.dash-breadcrumb i {
  font-size: 0.75rem;
  margin-right: 0.25rem;
}

[data-theme="dark"] .dash-breadcrumb {
  color: #94A3B8;
}

[data-theme="dark"] .dash-breadcrumb a {
  color: #94A3B8;
}

[data-theme="dark"] .dash-breadcrumb a:hover {
  color: #6366F1;
}

[data-theme="dark"] .dash-breadcrumb-sep {
  color: #64748B;
}

.admin-dash-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-range-select {
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-sm);
  background: var(--dash-card);
  color: var(--dash-text);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.admin-range-select:hover {
  border-color: var(--dash-primary);
}

.admin-range-select:focus {
  outline: none;
  border-color: var(--dash-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Stat Widgets - Compact Clean Cards */
.stats-grid,
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-widget-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  cursor: pointer;
}

.stat-widget-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--dash-shadow-md);
  border-color: var(--dash-primary);
}

.stat-widget-link:hover .stat-widget-icon {
  background: var(--dash-primary) !important;
  color: #fff !important;
}

.stat-widget {
  background: var(--dash-card);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: all 0.2s;
}

.stat-widget:hover {
  box-shadow: var(--dash-shadow-md);
  transform: translateY(-2px);
}

.stat-widget-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--dash-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.sw-blue {
  background: rgba(59, 130, 246, 0.1);
  color: var(--dash-primary);
}

.sw-green {
  background: rgba(16, 185, 129, 0.1);
  color: var(--dash-success);
}

.sw-orange {
  background: rgba(245, 158, 11, 0.1);
  color: var(--dash-warning);
}

.sw-red {
  background: rgba(239, 68, 68, 0.1);
  color: var(--dash-danger);
}

.sw-purple {
  background: rgba(99, 102, 241, 0.1);
  color: var(--dash-info);
}

.stat-widget-info {
  flex: 1;
  min-width: 0;
}

.stat-widget-info strong {
  display: block;
  font-size: 1.875rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.stat-widget-info span {
  display: block;
  font-size: 0.875rem;
  color: #6B7280;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

[data-theme="dark"] .stat-widget-info strong {
  color: #F1F5F9;
}

[data-theme="dark"] .stat-widget-info span {
  color: #94A3B8;
}

.stat-change {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.stat-change.up {
  color: var(--dash-success);
  background: rgba(16, 185, 129, 0.1);
}

.stat-change.down {
  color: var(--dash-danger);
  background: rgba(239, 68, 68, 0.1);
}

.stat-change i {
  font-size: 0.625rem;
}

/* Dashboard specific button styles */
body.is-dashboard .btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--dash-radius-sm);
}

body.is-dashboard .btn-primary {
  background: var(--dash-primary);
  border-color: var(--dash-primary);
}

body.is-dashboard .btn-primary:hover {
  background: #2563EB;
  border-color: #2563EB;
  transform: translateY(-1px);
}

body.is-dashboard .btn-outline {
  background: transparent;
  color: var(--dash-text);
  border-color: var(--dash-border);
}

body.is-dashboard .btn-outline:hover {
  background: var(--dash-bg);
  border-color: var(--dash-primary);
  color: var(--dash-primary);
}

body.is-dashboard .btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

body.is-dashboard .btn-block {
  width: 100%;
  justify-content: center;
}

.btn-label {
  display: inline;
}

/* Two Column Layouts */
.dash-two-col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Chart Components */
.chart-legend {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8125rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--dash-text-muted);
  font-weight: 500;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.donut-chart-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0;
}

.chart-stats {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 0;
  border-top: 1px solid var(--dash-border);
}

.chart-stat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
}

.chart-stat-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--dash-text-muted);
  font-weight: 500;
}

.chart-stat-label i {
  font-size: 0.625rem;
}

.chart-stat-item strong {
  color: var(--dash-text);
  font-weight: 600;
}

.chart-footer {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--dash-border);
  font-size: 0.8125rem;
}

.chart-footer-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--dash-text-muted);
}

/* Table Tabs */
.table-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--dash-border);
  background: var(--dash-bg);
  overflow-x: auto;
}

.table-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--dash-text-muted);
  background: transparent;
  border: none;
  border-radius: var(--dash-radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.table-tab:hover {
  background: var(--dash-card);
  color: var(--dash-text);
}

.table-tab.active {
  background: var(--dash-card);
  color: var(--dash-primary);
  font-weight: 600;
}

.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--dash-primary-light);
  color: var(--dash-primary);
  border-radius: 10px;
}

.table-tab.active .tab-count {
  background: var(--dash-primary);
  color: white;
}

/* Data Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table thead {
  background: var(--dash-bg);
}

.data-table thead th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--dash-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--dash-border);
}

.data-table thead th.text-right {
  text-align: right;
}

.data-table tbody tr {
  border-bottom: 1px solid var(--dash-border);
  transition: background 0.15s;
}

.data-table tbody tr:last-child {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: var(--dash-bg);
}

.data-table tbody td {
  padding: 1rem;
  color: var(--dash-text);
  vertical-align: middle;
}

.data-table tbody td.text-right {
  text-align: right;
}

.table-cell-primary {
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.125rem;
}

.table-cell-secondary {
  font-size: 0.875rem;
  color: #374151;
}

.table-cell-meta {
  font-size: 0.75rem;
  color: #6B7280;
  margin-top: 0.125rem;
}

[data-theme="dark"] .table-cell-primary {
  color: #F1F5F9;
}

[data-theme="dark"] .table-cell-secondary {
  color: #CBD5E1;
}

[data-theme="dark"] .table-cell-meta {
  color: #94A3B8;
}

.card-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Quick Actions */
.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.action-badge {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.25);
  padding: 0.125rem 0.5rem;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ============================================================
   12. TABLES
   Table styling – thead, th, td, row hover, table-actions
   ============================================================ */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}

thead tr {
  background: var(--bg);
}

th {
  padding: .85rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
}

td {
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tbody tr:hover {
  background: #FAFBFF;
}

[data-theme="dark"] tbody tr:hover {
  background: rgba(99, 102, 241, 0.08);
}

tbody tr:last-child td {
  border-bottom: none;
}

.table-actions {
  display: flex;
  gap: .5rem;
}

/* ============================================================
   13. BADGES & ALERTS
   Status badges (primary/success/danger/warning/info) + alert boxes
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: .75rem;
  font-weight: 600;
  padding: .25rem .65rem;
  border-radius: 50px;
}

.badge-primary {
  background: rgba(30, 64, 255, .12);
  color: var(--primary);
}

.badge-success {
  background: rgba(16, 185, 129, .12);
  color: var(--success);
}

.badge-danger {
  background: rgba(239, 68, 68, .12);
  color: var(--danger);
}

.badge-warning {
  background: rgba(245, 158, 11, .12);
  color: var(--warning);
}

.badge-info {
  background: rgba(59, 130, 246, .12);
  color: var(--info);
}

.badge-secondary {
  background: rgba(100, 116, 139, .12);
  color: var(--text-muted);
}

/* ---- Alerts ---- */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: 1rem;
}

.alert i {
  flex-shrink: 0;
  margin-top: .1rem;
}

.alert-success {
  background: rgba(16, 185, 129, .1);
  border: 1px solid rgba(16, 185, 129, .3);
  color: #065F46;
}

.alert-danger {
  background: rgba(239, 68, 68, .1);
  border: 1px solid rgba(239, 68, 68, .3);
  color: #991B1B;
}

.alert-warning {
  background: rgba(245, 158, 11, .1);
  border: 1px solid rgba(245, 158, 11, .3);
  color: #92400E;
}

.alert-info {
  background: rgba(59, 130, 246, .1);
  border: 1px solid rgba(59, 130, 246, .3);
  color: #1E3A5F;
}

/* ============================================================
   14. MODALS
   Modal overlay, modal box, header, body, footer, close button
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(4px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all .25s;
}

[data-theme="dark"] .modal-overlay {
  background: rgba(0, 0, 0, .75);
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(.95);
  transition: transform .25s;
}

.modal-overlay.open .modal {
  transform: scale(1);
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 1rem;
  transition: all .2s;
}

.modal-close:hover {
  background: var(--border);
  color: var(--text);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: .75rem;
  justify-content: flex-end;
}

/* ============================================================
   15. MAP & CLINIC LOCATOR
   Clinic map, search bar, sidebar list, list items
   ============================================================ */
#clinicMap {
  height: 480px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.map-section-inner {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}

.map-search {
  margin-bottom: 1rem;
  position: relative;
}

.map-search .form-control {
  padding-left: 2.5rem;
}

.map-search .search-icon {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.clinic-list-sidebar {
  max-height: 480px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.clinic-list-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  cursor: pointer;
  transition: all var(--transition);
}

.clinic-list-item:hover,
.clinic-list-item.active {
  border-color: var(--primary);
  background: rgba(30, 64, 255, .04);
}

.cli-name {
  font-weight: 600;
  font-size: .95rem;
  margin-bottom: .25rem;
  color: var(--text);
}

.cli-addr {
  font-size: .8rem;
  color: var(--text-muted);
}

/* ============================================================
   16. TESTIMONIALS
   Review/testimonial cards, quotes, author info
   ============================================================ */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.testimonial-card {
  padding: 2rem;
}

.testimonial-text {
  font-size: .95rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1.25rem;
  font-style: italic;
}

.testimonial-text::before {
  content: '\201C';
  font-size: 2rem;
  color: var(--primary);
  line-height: 0;
  vertical-align: -.4em;
  margin-right: .2rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.t-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
}

.t-name {
  font-weight: 600;
  font-size: .9rem;
}

.t-pet {
  font-size: .8rem;
  color: var(--text-muted);
}

/* ============================================================
   17. FOOTER
   Footer grid, brand, quick links, services, contact, social, legal
   ============================================================ */
.footer {
  background: #0F1F6E;
  color: rgba(255, 255, 255, .8);
}

.footer-top {
  padding: 4rem 0 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1rem;
}

.footer-logo span {
  color: var(--secondary);
}

.footer-logo i {
  color: var(--secondary);
}

.footer-brand p {
  font-size: .875rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.social-links {
  display: flex;
  gap: .75rem;
}

.social-links a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .85rem;
  transition: all var(--transition);
}

.social-links a:hover {
  background: var(--secondary);
  color: #fff;
}

.footer-links h4,
.footer-contact h4 {
  font-size: .95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.25rem;
}

.footer-links ul li,
.footer-contact ul li {
  margin-bottom: .65rem;
  font-size: .875rem;
}

.footer-links ul a {
  color: rgba(255, 255, 255, .75);
  transition: color var(--transition);
}

.footer-links ul a:hover {
  color: var(--secondary);
}

.footer-contact ul li {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
}

.footer-contact ul li i {
  color: var(--secondary);
  margin-top: .25rem;
  flex-shrink: 0;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding: 1.25rem 0;
}

.footer-bottom .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  font-size: .85rem;
}

.footer-legal {
  display: flex;
  gap: 1.5rem;
}

.footer-legal a {
  font-size: .85rem;
  color: rgba(255, 255, 255, .7);
}

.footer-legal a:hover {
  color: var(--secondary);
}

/* ============================================================
   18. PET CARDS
   Pet profile grid, pet image, name, breed, tags
   ============================================================ */
.pets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.pet-card {
  text-align: center;
  padding-bottom: 1.25rem;
}

.pet-card-img {
  height: 160px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  position: relative;
  overflow: hidden;
}

.pet-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pet-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: rgba(255, 255, 255, .7);
}

.pet-card-body {
  padding: 1rem;
}

.pet-card-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: .25rem;
}

.pet-card-breed {
  font-size: .8rem;
  color: var(--text-muted);
}

.pet-card-tags {
  display: flex;
  gap: .4rem;
  justify-content: center;
  margin-top: .75rem;
  flex-wrap: wrap;
}

/* ============================================================
   19. AI SECTION
   AI feature cards on homepage
   ============================================================ */
.ai-section {
  background: transparent;
  color: var(--text);
}

.ai-section .section-header h2 {
  color: var(--text);
}

.ai-section .section-header p {
  color: var(--text-muted);
}

.ai-section .section-tag {
  background: rgba(30, 64, 255, 0.1);
  color: var(--primary);
  border: 1px solid rgba(30, 64, 255, 0.2);
}

.ai-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  color: var(--text);
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
}

.ai-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.ai-card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.ai-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .5rem;
  color: var(--text);
}

.ai-card p {
  font-size: .875rem;
  color: var(--text-muted);
}

/* ============================================================
   20. PAGINATION
   Page buttons, active page, disabled state
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  gap: .4rem;
  justify-content: center;
  margin-top: 2rem;
}

.page-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  transition: all .2s;
  cursor: pointer;
}

.page-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.page-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

/* ============================================================
   21. LOADING SPINNER & TOAST NOTIFICATIONS
   Spinner animation, loading overlay, toast slide-in
   ============================================================ */
.spinner {
  display: inline-block;
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, .7);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  z-index: 10;
}

/* ---- Toast Notifications ---- */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.toast {
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: .9rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 280px;
  max-width: 380px;
  border-left: 4px solid var(--primary);
  animation: toastIn .3s ease;
  font-size: .875rem;
}

.toast.success {
  border-left-color: var(--success);
}

.toast.error {
  border-left-color: var(--danger);
}

.toast.warning {
  border-left-color: var(--warning);
}

.toast-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.toast.success .toast-icon {
  color: var(--success);
}

.toast.error .toast-icon {
  color: var(--danger);
}

.toast.warning .toast-icon {
  color: var(--warning);
}

.toast-msg {
  flex: 1;
}

.toast-close {
  color: var(--text-muted);
  background: none;
  font-size: .85rem;
  padding: 0;
}

@keyframes toastIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ============================================================
   22. UTILITY CLASSES
   Text align, margins, flex, font-weight, empty state
   ============================================================ */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-muted {
  color: var(--text-muted);
}

.text-primary {
  color: var(--primary);
}

.text-success {
  color: var(--success);
}

.text-danger {
  color: var(--danger);
}

.mt-1 {
  margin-top: .5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mt-3 {
  margin-top: 1.5rem;
}

.mt-4 {
  margin-top: 2rem;
}

.mb-1 {
  margin-bottom: .5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}

.d-flex {
  display: flex;
}

.align-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-1 {
  gap: .5rem;
}

.gap-2 {
  gap: 1rem;
}

.fw-600 {
  font-weight: 600;
}

.fw-700 {
  font-weight: 700;
}

.rounded {
  border-radius: var(--radius-sm);
}

.w-100 {
  width: 100%;
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 3.5rem;
  color: var(--border);
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: .5rem;
  color: var(--text);
}

/* ============================================================
   23. RESPONSIVE – TABLET (max-width: 1024px)
   Hero, footer, map adjustments for tablet screens
   ============================================================ */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    margin: 0 auto 2rem;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-visual {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
  }

  .map-section-inner {
    grid-template-columns: 1fr;
  }

  .clinic-list-sidebar {
    max-height: 300px;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
  }

  .clinic-list-item {
    min-width: 220px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.75rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .stats-row {
    grid-template-columns: 1fr 1fr !important;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  /* footer-grid handled by dedicated @media block below */
}

/* ============================================================
   DARK MODE  –  [data-theme="dark"] on <html>
   ============================================================ */
[data-theme="dark"] {
  --bg: #0a0a0a;
  --white: #1a1a1a;
  --card: #1a1a1a;
  --text: #ffffff;
  --text-muted: #ffffff;
  --border: #2a2a2a;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .4);
  --shadow: 0 4px 16px rgba(0, 0, 0, .5);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, .6);
  /* softer icon backgrounds in dark */
  --sw-blue-bg: rgba(59, 130, 246, .18);
  --sw-green-bg: rgba(16, 185, 129, .18);
  --sw-orange-bg: rgba(245, 158, 11, .18);
  --sw-red-bg: rgba(239, 68, 68, .18);
  --sw-purple-bg: rgba(139, 92, 246, .18);
}

/* ── Base ─────────────────────────────────────────────────── */
html[data-theme="dark"] body {
  background: #0a0a0a;
  color: var(--text);
}

/* ── Navbar ───────────────────────────────────────────────── */
[data-theme="dark"] .navbar {
  background: rgba(10, 10, 10, .96);
  border-bottom-color: var(--border);
}

/* ── Nav links dark mode ──────────────────────────────────── */
[data-theme="dark"] .nav-link {
  color: var(--text);
}

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.active {
  color: #A5B4FC;
  border-bottom-color: #A5B4FC;
}

[data-theme="dark"] .nav-toggle span {
  background: var(--text);
}

[data-theme="dark"] .nav-menu.open {
  background: #151515;
  border-bottom-color: var(--border);
  box-shadow: var(--shadow);
}

[data-theme="dark"] .nav-actions.open {
  background: #1A1D27;
  border-color: var(--border);
  border-top-color: var(--border);
}

/* ── User dropdown ────────────────────────────────────────── */
[data-theme="dark"] .user-dropdown {
  background: #1E2130;
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

[data-theme="dark"] .user-dropdown a {
  color: var(--text);
}

[data-theme="dark"] .user-dropdown a:hover {
  background: #252838;
}

[data-theme="dark"] .user-dropdown a i {
  color: var(--text-muted);
}

[data-theme="dark"] .dropdown-divider {
  background: var(--border);
}

/* ── Cards ────────────────────────────────────────────────── */
[data-theme="dark"] .card {
  background: var(--card);
  border-color: var(--border);
}

[data-theme="dark"] .card-header {
  border-bottom-color: var(--border);
}

/* ── Forms ────────────────────────────────────────────────── */
[data-theme="dark"] .form-control {
  background: #252838;
  border-color: var(--border);
  color: var(--text);
}

[data-theme="dark"] .form-control:focus {
  border-color: #6366F1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .2);
  background: #252838;
}

[data-theme="dark"] .form-control::placeholder {
  color: var(--text-muted);
}

/* Dark mode autofill fix */
[data-theme="dark"] .form-control:-webkit-autofill,
[data-theme="dark"] .form-control:-webkit-autofill:hover,
[data-theme="dark"] .form-control:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #252838 inset !important;
  -webkit-text-fill-color: var(--text) !important;
  border: 1.5px solid var(--border) !important;
  caret-color: var(--text) !important;
}

[data-theme="dark"] select.form-control {
  background: #252838;
  color: var(--text);
}

[data-theme="dark"] .form-label {
  color: var(--text);
}

/* ── Buttons dark mode ────────────────────────────────────── */
[data-theme="dark"] .btn-primary {
  background: #4F5FD4;
  color: #fff;
  box-shadow: none;
}

[data-theme="dark"] .btn-primary:hover {
  background: #3D4DB8;
  color: #fff;
  box-shadow: 0 4px 14px rgba(79, 95, 212, .35);
}

[data-theme="dark"] .btn-outline {
  color: #A5B4FC;
  border-color: #A5B4FC;
}

[data-theme="dark"] .btn-outline:hover {
  background: rgba(99, 120, 255, .15);
  color: #A5B4FC;
}

[data-theme="dark"] .btn-outline-white {
  color: #fff;
  border-color: rgba(255, 255, 255, .5);
}

/* ── Tables ───────────────────────────────────────────────── */
[data-theme="dark"] thead tr {
  background: #1E2130;
}

[data-theme="dark"] th {
  color: var(--text-muted);
  border-bottom-color: var(--border);
}

[data-theme="dark"] td {
  border-bottom-color: var(--border);
  color: var(--text);
}

/* ── Badges ───────────────────────────────────────────────── */
[data-theme="dark"] .badge-primary {
  background: rgba(99, 120, 255, .2);
  color: #A5B4FC;
}

[data-theme="dark"] .badge-success {
  background: rgba(16, 185, 129, .2);
  color: #6EE7B7;
}

[data-theme="dark"] .badge-danger {
  background: rgba(239, 68, 68, .2);
  color: #FCA5A5;
}

[data-theme="dark"] .badge-warning {
  background: rgba(245, 158, 11, .2);
  color: #FCD34D;
}

[data-theme="dark"] .badge-info {
  background: rgba(99, 120, 255, .2);
  color: #A5B4FC;
}

[data-theme="dark"] .badge-secondary {
  background: rgba(100, 116, 139, .2);
  color: #94A3B8;
}

/* ── General links ────────────────────────────────────────── */
[data-theme="dark"] a {
  color: #A5B4FC;
}

[data-theme="dark"] a:hover {
  color: #C4B5FD;
}

/* keep white text links white */
[data-theme="dark"] .btn-primary a,
[data-theme="dark"] a.btn-primary,
[data-theme="dark"] a.btn-secondary {
  color: #fff;
}

/* ── Alerts ───────────────────────────────────────────────── */
[data-theme="dark"] .alert-success {
  background: rgba(16, 185, 129, .15);
  border-color: rgba(16, 185, 129, .35);
  color: #6EE7B7;
}

[data-theme="dark"] .alert-danger {
  background: rgba(239, 68, 68, .15);
  border-color: rgba(239, 68, 68, .35);
  color: #FCA5A5;
}

[data-theme="dark"] .alert-warning {
  background: rgba(245, 158, 11, .15);
  border-color: rgba(245, 158, 11, .35);
  color: #FDE68A;
}

[data-theme="dark"] .alert-info {
  background: rgba(59, 130, 246, .15);
  border-color: rgba(59, 130, 246, .35);
  color: #BFDBFE;
}

/* ── Modals ───────────────────────────────────────────────── */
[data-theme="dark"] .modal {
  background: #1A1D27;
  border: 1px solid var(--border);
}

[data-theme="dark"] .modal-header {
  border-bottom-color: var(--border);
}

[data-theme="dark"] .modal-footer {
  border-top-color: var(--border);
}

[data-theme="dark"] .modal-close {
  background: #252838;
  color: var(--text-muted);
}

[data-theme="dark"] .modal-close:hover {
  background: #2D3348;
  color: var(--text);
}

/* ── Dashboard sidebar ────────────────────────────────────── */
[data-theme="dark"] .sidebar {
  background: #13151F;
  border-right-color: var(--border);
}

[data-theme="dark"] .sidebar-header {
  border-bottom-color: var(--border);
}

[data-theme="dark"] .sidebar-collapse-btn {
  background: #252838;
  border-color: var(--border);
  color: var(--text-muted);
}

[data-theme="dark"] .sidebar-collapse-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

[data-theme="dark"] .sidebar-link {
  color: var(--text);
}

[data-theme="dark"] .sidebar-link i {
  color: var(--text-muted);
}

[data-theme="dark"] .sidebar-link:hover {
  background: rgba(99, 120, 255, .1);
  color: #A5B4FC;
  border-left-color: #A5B4FC;
}

[data-theme="dark"] .sidebar-link:hover i {
  color: #A5B4FC;
}

[data-theme="dark"] .sidebar-link.active {
  background: rgba(99, 120, 255, .15);
  color: #A5B4FC;
  border-left-color: #A5B4FC;
}

[data-theme="dark"] .sidebar-link.active i {
  color: #A5B4FC;
}

/* Stat widget link dark mode */
[data-theme="dark"] .stat-widget-link {
  color: var(--text);
}

[data-theme="dark"] .stat-widget-link:hover {
  border-color: #6366F1;
}

/* ── Stat widgets ─────────────────────────────────────────── */
[data-theme="dark"] .stat-widget {
  background: var(--card);
  border-color: var(--border);
}

/* ── Clinic cards ─────────────────────────────────────────── */
[data-theme="dark"] .clinic-card-body {
  background: var(--card);
}

[data-theme="dark"] .clinic-tag {
  background: #252838;
  border-color: var(--border);
  color: var(--text-muted);
}

[data-theme="dark"] .clinic-card-footer {
  border-top-color: var(--border);
}

[data-theme="dark"] .clinic-list-item {
  background: #1E2130;
  border-color: var(--border);
}

[data-theme="dark"] .clinic-list-item:hover,
[data-theme="dark"] .clinic-list-item.active {
  border-color: var(--primary);
  background: rgba(30, 64, 255, .1);
}

/* ── Auth pages ───────────────────────────────────────────── */
[data-theme="dark"] .auth-logo {
  color: var(--text);
}

[data-theme="dark"] .auth-form-wrap {
  background: var(--bg);
}

[data-theme="dark"] .auth-divider::before,
[data-theme="dark"] .auth-divider::after {
  background: var(--border);
}

/* ── Pagination / Spinner ─────────────────────────────────── */
[data-theme="dark"] .page-btn {
  background: var(--card);
  border-color: var(--border);
  color: var(--text);
}

[data-theme="dark"] .page-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

[data-theme="dark"] .loading-overlay {
  background: rgba(15, 17, 23, .7);
}

[data-theme="dark"] .spinner {
  border-color: var(--border);
  border-top-color: var(--primary);
}

/* ── Toast ────────────────────────────────────────────────── */
[data-theme="dark"] .toast {
  background: #1E2130;
  border-left-color: var(--primary);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}

/* ── Empty state ──────────────────────────────────────────── */
[data-theme="dark"] .empty-state i {
  color: var(--border);
}

[data-theme="dark"] .empty-state h3 {
  color: var(--text);
}

/* ── Floating badges on hero ──────────────────────────────── */
[data-theme="dark"] .fb {
  background: #1C1F2A;
  color: var(--text);
  box-shadow: var(--shadow);
}

/* ── Section backgrounds ──────────────────────────────────── */
[data-theme="dark"] .section {
  background: transparent;
}

[data-theme="dark"] .section-tag {
  background: rgba(30, 64, 255, .2);
  color: #818CF8;
}

[data-theme="dark"] .section-header h2 {
  color: var(--text);
}

[data-theme="dark"] .section-header p {
  color: var(--text-muted);
}

/* ── Hero ─────────────────────────────────────────────────── */
[data-theme="dark"] .hero {
  background: linear-gradient(135deg, #070B1A 0%, #0F1A3E 50%, #0A2A2A 100%);
}

[data-theme="dark"] .hero h1 {
  color: var(--text);
}

[data-theme="dark"] .hero p {
  color: var(--text-muted);
}

[data-theme="dark"] .hero-badge {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .15);
  color: #CBD5E1;
}

[data-theme="dark"] .hero-card-float {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .12);
}

[data-theme="dark"] .stat-item strong {
  color: #34D399;
}

[data-theme="dark"] .stat-item span {
  color: #94A3B8;
}

/* ── Feature cards ────────────────────────────────────────── */
[data-theme="dark"] .feature-card {
  background: var(--card);
  border-color: var(--border);
}

[data-theme="dark"] .feature-card h3 {
  color: var(--text);
}

[data-theme="dark"] .feature-card p {
  color: var(--text-muted);
}

[data-theme="dark"] .feature-icon.blue {
  background: rgba(30, 64, 255, .2);
  color: #818CF8;
}

[data-theme="dark"] .feature-icon.green {
  background: rgba(0, 212, 170, .2);
  color: #34D399;
}

[data-theme="dark"] .feature-icon.orange {
  background: rgba(245, 158, 11, .2);
  color: #FCD34D;
}

[data-theme="dark"] .feature-icon.purple {
  background: rgba(139, 92, 246, .2);
  color: #C4B5FD;
}

/* ── Steps ────────────────────────────────────────────────── */
[data-theme="dark"] .step-item h3 {
  color: var(--text);
}

[data-theme="dark"] .step-item p {
  color: var(--text-muted);
}

/* ── Clinic cards ─────────────────────────────────────────── */
[data-theme="dark"] .clinic-card {
  background: var(--card);
  border-color: var(--border);
}

[data-theme="dark"] .clinic-card-title {
  color: var(--text);
}

[data-theme="dark"] .clinic-card-addr {
  color: var(--text-muted);
}

/* ── Testimonials ─────────────────────────────────────────── */
[data-theme="dark"] .testimonial-card {
  background: var(--card);
  border-color: var(--border);
}

[data-theme="dark"] .testimonial-text {
  color: var(--text-muted);
}

[data-theme="dark"] .t-name {
  color: var(--text);
}

[data-theme="dark"] .t-pet {
  color: var(--text-muted);
}

/* ── Map section ──────────────────────────────────────────── */
[data-theme="dark"] .map-search .form-control {
  background: #252838;
}

[data-theme="dark"] .map-search .search-icon {
  color: var(--text-muted);
}

/* ── Stat widget icons ────────────────────────────────────── */
[data-theme="dark"] .sw-blue {
  background: rgba(59, 130, 246, .18);
  color: #93C5FD;
}

[data-theme="dark"] .sw-green {
  background: rgba(16, 185, 129, .18);
  color: #6EE7B7;
}

[data-theme="dark"] .sw-orange {
  background: rgba(245, 158, 11, .18);
  color: #FCD34D;
}

[data-theme="dark"] .sw-red {
  background: rgba(239, 68, 68, .18);
  color: #FCA5A5;
}

[data-theme="dark"] .sw-purple {
  background: rgba(139, 92, 246, .18);
  color: #C4B5FD;
}

[data-theme="dark"] .stat-widget-info strong {
  color: var(--text);
}

[data-theme="dark"] .stat-widget-info span {
  color: var(--text-muted);
}

[data-theme="dark"] .stat-change.up {
  color: #6EE7B7;
}

[data-theme="dark"] .stat-change.down {
  color: #FCA5A5;
}

/* ── Dashboard main content ───────────────────────────────── */
[data-theme="dark"] .dash-main {
  background: var(--bg);
}

[data-theme="dark"] .dash-header h1 {
  color: var(--text);
}

[data-theme="dark"] .dash-header p {
  color: var(--text-muted);
}

[data-theme="dark"] .dash-breadcrumb {
  color: var(--text-muted);
}

[data-theme="dark"] .dash-breadcrumb a {
  color: var(--text-muted);
}

[data-theme="dark"] .dash-breadcrumb span {
  color: #818CF8;
}

/* ── Footer ───────────────────────────────────────────────── */
[data-theme="dark"] .footer {
  background: #0A0C14;
}

[data-theme="dark"] .footer-top {
  border-color: #1C1F2A;
}

[data-theme="dark"] .footer-logo {
  color: #fff;
}

[data-theme="dark"] .footer-brand p {
  color: #64748B;
}

[data-theme="dark"] .footer-links h4,
[data-theme="dark"] .footer-contact h4 {
  color: #E2E8F0;
}

[data-theme="dark"] .footer-links ul a {
  color: #64748B;
}

[data-theme="dark"] .footer-links ul a:hover {
  color: #34D399;
}

[data-theme="dark"] .footer-contact ul li {
  color: #64748B;
}

[data-theme="dark"] .footer-bottom {
  border-top-color: #1C1F2A;
}

[data-theme="dark"] .footer-bottom p {
  color: #4B5563;
}

[data-theme="dark"] .footer-legal a {
  color: #4B5563;
}

[data-theme="dark"] .social-links a {
  background: rgba(255, 255, 255, .07);
}

/* ── AI section now uses transparent bg, inherits paw pattern ── */
[data-theme="dark"] .ai-section {
  background: transparent;
}

[data-theme="dark"] .ai-card {
  background: var(--card);
  border-color: var(--border);
}

/* ── CTA Section ──────────────────────────────────────────── */
.cta-section {
  background: transparent !important;
  padding: 4rem 1.25rem;
  text-align: center;
  color: var(--text);
  position: relative;
  overflow: visible;
}

.cta-section h2 {
  font-size: 2rem;
  font-weight: 800;
  color: #1a1a2e;
  margin-bottom: .75rem;
  color: var(--text);
}

.cta-section p {
  font-size: 1.05rem;
  margin-bottom: 2rem;
  color: #1a1a2e;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 500;
}

/* ── CTA Banner (Dark Mode) ───────────────────────────────── */
[data-theme="dark"] section[style*="linear-gradient(135deg,#1E40FF"] {
  background: transparent !important;
}

/* Keep CTA text bright in dark mode */
[data-theme="dark"] .cta-section h2,
[data-theme="dark"] .cta-section p {
  color: var(--text) !important;
  text-shadow: none !important;
}

/* CTA buttons in dark mode */
[data-theme="dark"] .btn-white {
  background: #fff !important;
  color: #1E40FF !important;
  border-color: #fff !important;
}

[data-theme="dark"] .btn-outline-white {
  border-color: rgba(255, 255, 255, 0.7) !important;
  color: #fff !important;
}

/* ── Pagination ───────────────────────────────────────────── */
[data-theme="dark"] .page-btn.active {
  background: var(--primary);
  color: #fff;
}

/* ── General text in dark ─────────────────────────────────── */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4 {
  color: var(--text);
}

[data-theme="dark"] p {
  color: var(--text-muted);
}

/* ============================================================
   THEME TOGGLE BUTTON  (floats fixed or in navbar)
   ============================================================ */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  font-size: .95rem;
  transition: all .25s ease;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  background: var(--border);
  color: var(--text);
  transform: rotate(20deg);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  position: absolute;
  transition: opacity .25s ease, transform .3s ease;
}

.theme-toggle .icon-sun {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.theme-toggle .icon-moon {
  opacity: 0;
  transform: scale(.5) rotate(90deg);
}

[data-theme="dark"] .theme-toggle .icon-sun {
  opacity: 0;
  transform: scale(.5) rotate(-90deg);
}

[data-theme="dark"] .theme-toggle .icon-moon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

[data-theme="dark"] .theme-toggle {
  border-color: var(--border);
  color: var(--text-muted);
}

[data-theme="dark"] .theme-toggle:hover {
  background: var(--border);
  color: #FCD34D;
}

/* ── Page-btn active ──────────────────────────────────────── */
[data-theme="dark"] .page-btn.active {
  background: #4F5FD4;
  border-color: #4F5FD4;
  color: #fff;
}

/* Smooth global transition on theme switch */
html.theme-transitioning *,
html.theme-transitioning *::before,
html.theme-transitioning *::after {
  transition:
    background-color .3s ease,
    border-color .3s ease,
    color .3s ease,
    box-shadow .3s ease !important;
}

/* ============================================================
   MOBILE RESPONSIVE — Full Phone Optimization
   ============================================================ */

/* ── About grid & CTA ──────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.cta-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* CTA pulse animation for primary button */
.cta-pulse-wrap {
  position: relative;
  display: inline-block;
}

.cta-pulse-wrap::before {
  content: '';
  position: absolute;
  inset: -4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  animation: ctaPulse 2s ease-in-out infinite;
  z-index: -1;
}

@keyframes ctaPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.08);
    opacity: 0;
  }
}

/* White button hover effect */
.btn-white {
  background: #fff;
  color: #1E40FF;
  border: 2px solid #fff;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.btn-white:hover {
  background: #f0f4ff;
  color: #1530CC;
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* Outline white button hover */
.btn-outline-white {
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fff;
  color: #fff;
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-visual {
    display: none;
  }

  .cta-actions {
    flex-direction: column;
    align-items: center;
  }

  .cta-actions .btn {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }
}

/* ── Mobile menu — Premium glassmorphic dropdown ── */
.mobile-menu {
  display: none;
}

@media (max-width: 768px) {
  .mobile-menu {
    position: fixed !important;
    top: 70px !important;
    right: 1rem !important;
    left: auto !important;
    width: 340px !important;
    max-width: calc(100vw - 2rem) !important;
    z-index: 99999;
    background: rgba(12, 18, 30, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(79, 70, 229, 0.3);
    border-radius: 20px;
    box-shadow: 0 0 40px rgba(6, 182, 212, 0.15),
                0 20px 60px rgba(0, 0, 0, 0.5);
    padding: 0.75rem;
    flex-direction: column;
    gap: 0.5rem;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    transform: none !important;
    margin: 0 !important;
  }

  .mobile-menu.open {
    display: flex;
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px) !important;
    }
    to {
      opacity: 1;
      transform: translateY(0) !important;
    }
  }
}

.mobile-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  min-height: 52px;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  border-radius: 14px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  border: none;
}

.mobile-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.15rem;
}

.mobile-link:hover {
  background: rgba(79, 70, 229, 0.12);
  transform: scale(1.02);
}

.mobile-link.active {
  background: linear-gradient(135deg, #4F46E5, #06B6D4);
  border: none;
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
}

.mobile-link.active .mobile-icon {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Get Started button in mobile menu */
.mobile-link--getstarted {
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  border-radius: 14px;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(30, 64, 255, 0.4);
}

.mobile-link--getstarted:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 24px rgba(30, 64, 255, 0.55);
  background: linear-gradient(135deg, var(--primary-dark), var(--sec-dark)) !important;
}

.mobile-link--getstarted .mobile-icon {
  background: rgba(255, 255, 255, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Auth buttons at the bottom of mobile menu */
.mobile-menu-auth {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.5rem;
  margin-top: 0.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-menu-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  align-items: stretch;
}

.mobile-menu-row .mobile-link {
  padding: 0.75rem 0.6rem;
  gap: 0.5rem;
  justify-content: center;
  font-size: 0.9rem;
  min-height: 52px;
  display: flex;
  align-items: center;
}

.mobile-menu-row .mobile-link .mobile-icon {
  width: 36px;
  height: 36px;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.mobile-menu-auth .btn {
  width: 100%;
  justify-content: center;
  text-align: center;
  padding: 0.75rem 1rem;
  min-height: 52px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 14px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mobile-menu-auth .btn-outline {
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(167, 139, 250, 0.4);
  color: #fff;
  box-shadow: 0 0 20px rgba(167, 139, 250, 0.1);
}

.mobile-menu-auth .btn-outline::before {
  content: '🔒';
  font-size: 1rem;
}

.mobile-menu-auth .btn-outline:hover {
  background: rgba(167, 139, 250, 0.15);
  border-color: rgba(167, 139, 250, 0.6);
  box-shadow: 0 0 30px rgba(167, 139, 250, 0.2);
  transform: translateY(-1px);
}

.mobile-menu-auth .btn-primary {
  background: linear-gradient(135deg, #4F46E5, #06B6D4);
  border: none;
  color: #fff;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.35);
  position: relative;
  overflow: hidden;
}

.mobile-menu-auth .btn-primary::before {
  content: '🐾';
  font-size: 1rem;
}

.mobile-menu-auth .btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.mobile-menu-auth .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(79, 70, 229, 0.45);
}

.mobile-menu-auth .btn-primary:hover::after {
  left: 100%;
}

/* ── Navbar mobile ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-container {
    padding: 0 1rem;
    height: 60px;
  }

  /* Hide desktop nav links */
  .nav-menu {
    display: none;
  }

  /* Keep nav-actions visible (theme toggle, user avatar) but hide auth btns */
  .nav-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-left: auto;  /* push the whole right-side group to the right */
  }

  /* Hide Login / Get Started from navbar on mobile — they're in the mobile menu */
  body:not(.logged-in) .nav-actions > .btn,
  body.logged-in .nav-actions > .btn {
    display: none;
  }

  /* Theme toggle stays inside nav-actions */
  .nav-actions .theme-toggle {
    margin-left: 0;
  }

  /* Hamburger sits right after nav-actions (no extra margin needed) */
  .nav-toggle {
    display: flex !important;
    margin-left: .25rem;
    order: 6;
  }

  /* ── User dropdown on mobile — hidden on all pages ── */
  .nav-user-menu {
    position: relative;
    z-index: 10000;
    display: none !important;
  }
  }

@media (min-width: 769px) {
  /* Restore on dashboard desktop */
  .nav-user-menu--dashboard {
    display: flex !important;
  }
}

  /* Mobile dropdown styling */
  .user-dropdown {
    position: fixed !important;
    top: 60px !important;
    right: 12px !important;
    left: auto !important;
    min-width: 260px !important;
    max-width: calc(100vw - 24px) !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18) !important;
    display: none !important;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transition: none !important;
    z-index: 999999 !important;
  }

  .user-dropdown.open {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
  }

  /* Touch-friendly menu items */
  .user-dropdown a {
    min-height: 44px !important;
    padding: 12px 16px !important;
    font-size: 15px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
  }

  .user-dropdown a i {
    width: 20px !important;
    font-size: 16px !important;
  }

  /* ── Mobile dropdown menu ── */
  .mobile-menu.open,
  #mobileMenu.open {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex-direction: column;
    position: fixed;
    left: 0;
    right: 0;
    top: 60px;
    background: var(--white);
    border-bottom: 2px solid var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
    z-index: 9999;
    padding: .5rem 0;
    transform: translateY(0) !important;
  }

  .mobile-link {
    font-size: .95rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: background .15s, color .15s;
  }

  .mobile-link:last-of-type {
    border-bottom: none;
  }

  .mobile-link:hover {
    background: var(--bg);
    color: var(--primary);
  }

  /* Auth buttons at the bottom of mobile menu */
  .mobile-menu-auth {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: .75rem 1.5rem 1rem;
    border-top: 1px solid var(--border);
    margin-top: .25rem;
  }

  .mobile-menu-auth .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: .65rem 1rem;
    font-size: .95rem;
  }

  /* Navbar height adjustment */
  .dash-layout {
    padding-top: 60px;
  }

  body>div[style*="padding-top:70px"],
  body>section[style*="padding-top:70px"] {
    padding-top: 60px !important;
  }
/* ── Hero mobile ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero {
    min-height: 80vh;
    padding-top: 60px;
    background: linear-gradient(160deg, #0F172A 0%, #1E3A8A 55%, #14B8A6 100%);
  }

  .hero-container {
    grid-template-columns: 1fr;
    padding: 2rem 1.25rem 2rem;
    text-align: center;
    gap: 1.5rem;
  }

  .hero h1 {
    font-size: clamp(1.75rem, 7vw, 2.5rem);
    line-height: 1.15;
    max-width: 90%;
    margin: 0 auto .75rem;
  }

  .hero p {
    font-size: .9rem;
    margin: 0 auto 1.25rem;
    max-width: 85%;
    opacity: .88;
  }

  .hero-badge {
    font-size: .72rem;
    margin-bottom: 1rem;
  }

  .hero-actions {
    flex-direction: column;
    gap: 12px;
    align-items: center;
    margin-bottom: 1.5rem;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 320px;
    height: 52px;
    border-radius: 14px;
    justify-content: center;
    font-size: .95rem;
    padding: 0 1.5rem;
  }

  .hero-visual {
    display: none;
  }

  /* Stats grid — 2x2 glass cards */
  .hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    max-width: 320px;
    margin: 0 auto;
  }

  .hero-stat-card {
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 16px;
    padding: .85rem .75rem;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .2);
  }

  .hero-stat-card strong {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    color: #34D399;
    margin-bottom: .15rem;
  }

  .hero-stat-card span {
    font-size: .72rem;
    color: rgba(255, 255, 255, .75);
    font-weight: 500;
  }
}

/* ── Sections mobile ───────────────────────────────────────── */
@media (max-width: 768px) {
  .section {
    padding: 3rem 0;
  }

  .section-header {
    margin-bottom: 2rem;
  }

  .section-header h2 {
    font-size: 1.8rem;
    line-height: 1.25;
  }

  .section-header p {
    font-size: .9rem;
  }

  .container {
    padding: 0 1rem;
  }
}

/* ── Grids mobile ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .clinics-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .steps-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .stats-row {
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
  }

  .pets-grid {
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (max-width: 480px) {
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .stats-row {
    grid-template-columns: 1fr 1fr;
  }

  .pets-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Cards mobile ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .card {
    border-radius: var(--radius-sm);
  }

  .card-body {
    padding: 1.25rem;
  }

  .card-header {
    padding: 1rem 1.25rem;
  }

  .feature-card {
    padding: 1.75rem 1.25rem;
  }

  .clinic-card-img {
    height: 160px;
  }

  .clinic-card-body {
    padding: 1rem;
  }

  .stat-widget {
    padding: 1rem;
    gap: .85rem;
  }

  .stat-widget-icon {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
  }

  .stat-widget-info strong {
    font-size: 1.4rem;
  }
}

/* ── Map section mobile ────────────────────────────────────── */
@media (max-width: 768px) {
  .map-section-inner {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  #clinicMap {
    height: 300px;
  }

  .clinic-list-sidebar {
    max-height: 220px;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
  }

  .clinic-list-item {
    min-width: 200px;
  }
}

/* ── Dashboard mobile ──────────────────────────────────────── */
@media (max-width: 768px) {
  /* ── Sidebar ─────────────────────────────────────────────── */
  .sidebar {
    position: fixed !important;
    top: 0;
    left: -280px;
    width: 280px !important;
    height: 100vh;
    z-index: 9999;
    transition: left 0.3s ease-in-out;
    display: block !important;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { left: 0 !important; }

  /* Show all sidebar text on mobile regardless of collapsed state */
  .sidebar-collapsed .sidebar-user-name,
  .sidebar-collapsed .sidebar-user-role,
  .sidebar-collapsed .sidebar-section,
  .sidebar-collapsed .sidebar-link-text { display: block !important; }
  .sidebar-collapsed .sidebar-link {
    justify-content: flex-start !important;
    padding: .7rem 1.25rem !important;
    gap: .75rem !important;
  }
  .sidebar-collapsed .sidebar-link i { font-size: .95rem !important; width: 18px !important; }
  .sidebar-collapsed .sidebar-collapse-btn { margin-left: auto !important; }
  .sidebar-collapse-btn { display: none !important; }

  /* ── Sidebar toggle button ───────────────────────────────── */
  #sidebarToggle {
    display: flex !important;
    position: fixed;
    top: 70px;
    left: .75rem;
    z-index: 400;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    border: none;
    font-size: .9rem;
    padding: 0;
  }

  /* ── Sidebar overlay ─────────────────────────────────────── */
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 499;
    display: none;
  }
  .sidebar-overlay.open { display: block; }

  /* ── Main content area — single authoritative declaration ── */
  .dash-main {
    margin-left: 0 !important;
    padding: .85rem !important;
    /* No padding-top offset — sticky navbar pushes content in normal flow */
  }
  .dash-header { margin-bottom: 1rem; }
  .dash-header h1 { font-size: 1.2rem; }
  .dash-header p { font-size: .82rem; }
  .dash-breadcrumb { font-size: .78rem; }

  /* ── Stat widgets — always 2×2 grid on mobile ────────────── */
  .stats-row,
  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: .6rem;
    margin-bottom: 1rem;
  }
  .stat-widget {
    padding: .9rem 1rem;
    gap: .75rem;
    border-radius: var(--radius-sm);
  }
  .stat-widget-icon {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
    border-radius: 10px;
    flex-shrink: 0;
  }
  .stat-widget-info strong { font-size: 1.4rem; }
  .stat-widget-info span  { font-size: .72rem; }
  .stat-change            { font-size: .68rem; }

  /* ── ALL inline grids → single column on mobile ──────────── */
  /* catches: 2fr 1fr, 1fr 1fr, 1fr 2fr, repeat(...), etc. */
  .dash-main > div[style*="grid-template-columns"],
  .dash-main > div[style*="display:grid"],
  .dash-main > div[style*="display: grid"] {
    display: block !important;
  }
  /* Also catch nested grids one level deep (charts row, etc.) */
  .dash-main .card + div[style*="grid-template-columns"],
  .dash-main div[style*="grid-template-columns:2fr"],
  .dash-main div[style*="grid-template-columns: 2fr"],
  .dash-main div[style*="grid-template-columns:1fr 2fr"],
  .dash-main div[style*="grid-template-columns: 1fr 2fr"] {
    display: block !important;
  }
  /* Children of collapsed grids get full width */
  .dash-main > div[style*="grid-template-columns"] > *,
  .dash-main > div[style*="display:grid"] > *,
  .dash-main > div[style*="display: grid"] > * {
    width: 100% !important;
    min-width: 0 !important;
  }

  /* ── Cards on mobile ─────────────────────────────────────── */
  .card {
    border-radius: var(--radius-sm);
    margin-bottom: .85rem;
  }
  .card-header {
    padding: .9rem 1rem;
    flex-wrap: wrap;
    gap: .5rem;
  }
  .card-header h3 { font-size: .9rem; }
  .card-body { padding: 1rem; }

  /* ── Tables — horizontal scroll ─────────────────────────── */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
  }
  .table-wrap table { min-width: 520px; }
  th { padding: .55rem .65rem; font-size: .72rem; }
  td { padding: .6rem .65rem; font-size: .8rem; }

  /* ── Form rows — stack vertically ───────────────────────── */
  .form-row { grid-template-columns: 1fr !important; gap: 0; }

  /* ── Buttons — full width in action columns ──────────────── */
  .dash-main .btn-block { font-size: .85rem; padding: .65rem 1rem; }

  /* ── Booking steps — compact ─────────────────────────────── */
  .booking-steps { gap: 0; }
  .booking-step-label { display: none; }
  .booking-step-num { width: 26px; height: 26px; font-size: .7rem; }
  .booking-step-line { margin: 0 .25rem; }

  /* ── Pet select cards — 2 per row ────────────────────────── */
  div:has(.pet-select-card) {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: .6rem;
  }
  .pet-select-card { min-width: 0; padding: .75rem .5rem; }

  /* ── Quick actions col — add margin when stacked ─────────── */
  .dash-main div[style*="flex-direction:column"],
  .dash-main div[style*="flex-direction: column"] {
    gap: .75rem !important;
  }

  /* ── Operating hours grid — 4 cols → scrollable ─────────── */
  #operatingHoursInfo > div > div:last-child {
    grid-template-columns: repeat(7, minmax(38px, 1fr)) !important;
    gap: .15rem;
    overflow-x: auto;
  }

  /* ── Services grid on groomer page ──────────────────────── */
  .services-grid { grid-template-columns: 1fr !important; }

  /* ── Profile grid ────────────────────────────────────────── */
  .profile-grid { grid-template-columns: 1fr !important; }

  /* ── Chart containers cap height ────────────────────────── */
  canvas { max-height: 200px !important; }
  #appointmentChart,
  #statusChart,
  #serviceChart { max-height: 200px !important; }
}

/* ── Footer mobile ─────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Compact top padding */
  .footer-top {
    padding: 1.75rem 0 1.25rem;
  }

  /* 2-column grid */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.1rem 1.25rem;
  }

  /* Brand spans full width at top */
  .footer-brand {
    grid-column: 1 / -1;
    border-bottom: 1px solid rgba(255,255,255,.08);
    padding-bottom: 1rem;
    margin-bottom: .25rem;
  }

  /* Contact spans full width at bottom */
  .footer-contact {
    grid-column: 1 / -1;
    border-top: 1px solid rgba(255,255,255,.08);
    padding-top: 1rem;
    margin-top: .1rem;
  }

  /* Contact items in 2-col row on mobile */
  .footer-contact ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .35rem .75rem;
  }

  /* Tighter brand text */
  .footer-brand p {
    font-size: .78rem;
    line-height: 1.55;
    margin-bottom: .65rem;
  }

  /* Smaller social icons */
  .social-links { gap: .5rem; }
  .social-links a {
    width: 30px;
    height: 30px;
    font-size: .75rem;
  }

  /* Section headings */
  .footer-links h4,
  .footer-contact h4 {
    font-size: .82rem;
    font-weight: 700;
    margin-bottom: .55rem;
    color: #fff;
  }

  /* List items tighter */
  .footer-links ul li,
  .footer-contact ul li {
    font-size: .76rem;
    margin-bottom: .35rem;
  }

  /* Contact icons */
  .footer-contact ul li i {
    font-size: .72rem;
    margin-right: .3rem;
    margin-top: .15rem;
    flex-shrink: 0;
  }

  /* Footer logo smaller */
  .footer-logo {
    font-size: 1.1rem;
    margin-bottom: .5rem;
    display: inline-flex;
  }

  /* Bottom bar */
  .footer-bottom { padding: .75rem 0; }
  .footer-bottom .container {
    flex-direction: column;
    text-align: center;
    gap: .35rem;
  }
  .footer-bottom p { font-size: .72rem; }
  .footer-legal {
    justify-content: center;
    gap: .85rem;
  }
  .footer-legal a { font-size: .72rem; }

  /* ── Footer padding handled above ─────────────────────── */
}

/* ── Forms mobile ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .form-control {
    font-size: 16px;
  }

  /* prevent iOS zoom */
  .btn-lg {
    padding: .8rem 1.75rem;
    font-size: .95rem;
  }

  .modal {
    border-radius: var(--radius) var(--radius) 0 0;
    max-height: 92vh;
  }

  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
}

/* ── OTP Page & Inputs ─────────────────────────────────────── */
.otp-page-wrap {
  min-height: 100vh;
  padding-top: 70px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.5rem 3rem;
  overflow-x: hidden;
}

.otp-card-wrap {
  width: 100%;
  max-width: 460px;
}

.otp-card-body {
  padding: 2.25rem;
}

.otp-inputs {
  display: flex;
  gap: 5px;
  justify-content: center;
  margin-bottom: 1.25rem;
  flex-wrap: nowrap;
  max-width: 100%;
}

/* .otp-digit base + old fixed-px media-query overrides removed.
   Replaced with clamp()-based responsive rules at end of file.  */

/* ── Modals mobile ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal {
    border-radius: 20px 20px 0 0;
    max-height: 90vh;
    width: 100%;
    max-width: 100%;
  }
}

/* ── About section 2-col grid ──────────────────────────────── */
@media (max-width: 768px) {

  div[style*="grid-template-columns:1fr 1fr"],
  div[style*="grid-template-columns: 1fr 1fr"],
  div[style*="grid-template-columns:2fr 1fr"],
  div[style*="grid-template-columns: 2fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

/* ── Clinic detail page ────────────────────────────────────── */
@media (max-width: 768px) {
  div[style*="grid-template-columns:2fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  div[style*="grid-template-columns:1fr 1fr;gap"] {
    grid-template-columns: 1fr !important;
  }
}

/* ── Toast mobile ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .toast-container {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }

  .toast {
    min-width: unset;
    width: 100%;
  }
}

/* ── Tables on tiny screens ────────────────────────────────── */
@media (max-width: 480px) {
  .table-wrap table {
    font-size: .75rem;
  }

  th,
  td {
    padding: .45rem .5rem;
  }
}

/* ── Pagination mobile ─────────────────────────────────────── */
@media (max-width: 480px) {
  .pagination {
    gap: .25rem;
  }

  .page-btn {
    width: 32px;
    height: 32px;
    font-size: .8rem;
  }
}

/* ── Dark mode mobile nav ──────────────────────────────────── */
@media (max-width: 768px) {
  [data-theme="dark"] .mobile-menu {
    background: rgba(12, 18, 30, 0.98);
    border-color: rgba(79, 70, 229, 0.4);
  }

  [data-theme="dark"] .mobile-link {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.06);
  }

  [data-theme="dark"] .mobile-link:hover {
    background: rgba(79, 70, 229, 0.15);
  }

  [data-theme="dark"] .mobile-menu-auth {
    border-top-color: rgba(255, 255, 255, 0.08);
  }
}


/* ============================================================
   MOBILE FIX – No horizontal scroll / overflow
   ============================================================ */

html,
body {
  overflow-x: clip;  /* clip instead of hidden — doesn't break position:fixed */
  max-width: 100%;
}

/* Prevent ANY element from causing horizontal overflow */
*,
*::before,
*::after {
  max-width: 100%;
}

/* ── Global mobile tightening ──────────────────────────────── */
@media (max-width: 768px) {

  /* Kill horizontal scroll everywhere */
  body,
  .hero,
  .section,
  .container,
  .navbar,
  .footer,
  .auth-page,
  .dash-layout,
  .dash-main {
    overflow-x: hidden;
    max-width: 100vw;
  }

  /* Container padding */
  .container {
    padding: 0 1rem;
  }

  /* ---- Navbar ---- */
  .navbar {
    position: sticky;
    top: 0;
    width: 100%;
  }

  .nav-logo .logo-text {
    font-size: 1.2rem;
  }

  /* ---- Hero ---- */
  .hero-container {
    padding: 2rem 1rem;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* ---- Sections ---- */
  .section {
    padding: 2.5rem 0;
    overflow-x: hidden;
  }

  .section-header h2 {
    font-size: 1.6rem;
    word-break: break-word;
  }

  /* ---- Grids → single column ---- */
  .features-grid,
  .clinics-grid,
  .steps-grid,
  .testimonials-grid,
  .pets-grid {
    grid-template-columns: 1fr;
  }

  /* Stats always 2-column on mobile */
  .stats-row {
    grid-template-columns: 1fr 1fr !important;
  }

  /* ---- Footer — handled by dedicated footer @media block ---- */

  /* ---- Auth page ---- */
  .auth-page {
    flex-direction: column;
  }

  .auth-visual {
    display: none;
  }

  .auth-form-wrap {
    padding: 1.5rem 1rem;
    width: 100%;
  }

  .auth-form-inner {
    max-width: 100%;
    width: 100%;
  }

  /* ---- Dashboard ---- */
  .dash-main {
    margin-left: 0;
    /* padding handled by the @max-width:768px block above */
    width: 100%;
  }

  .stats-row {
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
  }

  .stat-widget {
    padding: 1rem;
  }

  .stat-widget-info strong {
    font-size: 1.3rem;
  }

  /* ---- Forms ---- */
  .form-row {
    grid-template-columns: 1fr;
  }

  .form-control {
    font-size: 16px; /* Prevents zoom on iOS */
  }

  /* ---- Tables ---- */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* ---- Modals ---- */
  .modal {
    max-width: 100%;
    width: 100%;
    margin: 0;
    border-radius: var(--radius) var(--radius) 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 85vh;
  }

  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  /* ---- Buttons ---- */
  .btn-lg {
    padding: .8rem 1.5rem;
    font-size: .95rem;
  }

  /* ---- Cards ---- */
  .card {
    border-radius: var(--radius-sm);
  }

  /* ---- Map ---- */
  .map-section-inner {
    grid-template-columns: 1fr;
  }

  #clinicMap {
    height: 300px;
  }

  /* ---- About grid ---- */
  .about-grid,
  div[style*="grid-template-columns: 1fr 1fr"],
  div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* ---- Images ---- */
  img {
    max-width: 100%;
    height: auto;
  }

  /* ---- Clinic detail ---- */
  div[style*="grid-template-columns:2fr 1fr"],
  div[style*="grid-template-columns: 2fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* ---- Book page time/date grid ---- */
  div[style*="grid-template-columns: repeat(3"],
  div[style*="grid-template-columns:repeat(3"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* ---- Sidebar ---- */
  .sidebar {
    position: fixed !important;
    top: 0;
    left: -280px;
    width: 280px !important;
    height: 100vh;
    z-index: 9999 !important;
    transition: left 0.3s ease-in-out;
    display: block !important;
    box-shadow: var(--shadow-lg);
  }

  .sidebar.open {
    left: 0 !important;
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 9998;
    top: 0;
  }

  .sidebar-overlay.open {
    display: block;
  }

  /* ---- Mobile sidebar toggle button ---- */
  .mobile-sidebar-btn {
    display: inline-flex !important;
    z-index: 10000 !important;
    position: relative;
    cursor: pointer;
  }

}

/* ── Extra small screens (phones ≤ 480px) ──────────────────── */
@media (max-width: 480px) {

  .container {
    padding: 0 .875rem;
  }

  .hero h1 {
    font-size: 1.65rem;
  }

  .hero-stats {
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
  }

  .stats-row {
    grid-template-columns: 1fr 1fr;
  }

  .section-header h2 {
    font-size: 1.6rem;
    line-height: 1.3;
  }

  .btn {
    font-size: .875rem;
    padding: .65rem 1.25rem;
  }

  .auth-form-wrap {
    padding: 1.25rem .875rem;
  }

  .dash-main {
    padding: .875rem;
    /* no extra padding-top — sticky navbar pushes content naturally */
  }

  .modal {
    max-height: 92vh;
  }

  table {
    font-size: .8rem;
  }

  th, td {
    padding: .5rem .6rem;
  }

  /* footer-legal handled by dedicated footer @media block */
}

/* ── Dashboard sidebar toggle button (mobile only) ─────────── */
.mobile-sidebar-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 1rem;
  cursor: pointer;
  margin-right: .5rem;
}


/* ── Nav sidebar toggle (for dashboard pages, inside navbar) ── */
.nav-sidebar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  padding: .5rem;
  border: none;
  cursor: pointer;
}

.nav-sidebar-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .3s;
}

.nav-sidebar-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-sidebar-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-sidebar-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  /* Show dashboard sidebar toggle on mobile so users can open the sidebar */
  body.is-dashboard .nav-sidebar-toggle {
    display: flex !important;
  }

  /* Hide the navbar burger/× when sidebar is open — the sidebar's own close button handles it */
  body.is-dashboard .nav-sidebar-toggle.active {
    display: none !important;
  }

  /* Hide regular hamburger on dashboard pages */
  body.is-dashboard .nav-toggle {
    display: none !important;
  }

  /* Hide regular nav menu on dashboard pages (sidebar replaces it) */
  body.is-dashboard .nav-menu {
    display: none !important;
  }

  /* On dashboard pages: sidebar toggle left, nav-actions right */
  body.is-dashboard .nav-container {
    position: relative;
  }

  body.is-dashboard .nav-sidebar-toggle {
    order: 6;           /* place it to the right, next to nav-actions */
    margin-left: .25rem;
    margin-right: 0;
    flex-shrink: 0;
    position: relative;
    z-index: 10001;
    pointer-events: auto !important;
  }

  body.is-dashboard .nav-actions {
    margin-left: auto;
    order: 5;
    flex-shrink: 0;
  }

  /* Remove old fixed-position toggle */
  #sidebarToggle {
    display: none !important;
  }

  /* Dashboard mobile: hide avatar/name — only [🌙] [☰] on right */
  body.is-dashboard .nav-user-menu,
  body.is-dashboard .nav-actions .nav-user-menu {
    display: none !important;
  }
}

/* ============================================================
   User Dropdown Panel  –  desktop small popup / mobile bottom sheet
   ============================================================ */

/* ── Trigger button ── */
.user-avatar-wrap {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .25rem .5rem;
  border-radius: 8px;
  position: relative;
}
.user-avatar-name    { font-size: .9rem; font-weight: 500; }
/* Show chevron on desktop, hide on mobile */
.user-avatar-chevron { font-size: 10px; transition: transform .2s; }
/* Remove old nuclear hide rules that blocked desktop chevron */
.user-avatar-wrap:has(+ #userDropdown.open) .user-avatar-chevron {
  transform: rotate(180deg);
}

/* ── Desktop: hidden by default, shown as popup ── */
.user-dropdown-panel {
  background: var(--card-bg, #1E2130);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  min-width: 240px;
  padding: 6px 0;
  z-index: 999999;
  overflow: visible;
  /* hidden by default on desktop */
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
}
.user-dropdown-panel.open { display: block; }

/* The account menu uses a dark surface in both themes, so keep its toggle label legible. */
.user-dropdown-panel .udp-darkmode-row,
.user-dropdown-panel .udp-darkmode-row span,
.user-dropdown-panel .udp-darkmode-row .udp-icon {
  color: #F8FAFC;
}

@media (min-width: 769px) {
  .udp-header       { display: none; }
  .udp-backdrop     { display: none !important; }
  .user-avatar-name { display: inline; }
}

/* ── Mobile: bottom sheet that slides up from the bottom ── */
@media (max-width: 768px) {
  .user-avatar-name    { display: inline; }
  .user-avatar-chevron { display: none !important; }

  .user-dropdown-panel {
    /* Always visible in DOM — parked below viewport */
    display: block !important;
    position: fixed !important;
    top: auto !important;
    right: 0 !important;
    bottom: -100vh !important;   /* parked off-screen below */
    left: 0 !important;
    width: 100% !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
    border-radius: 20px 20px 0 0 !important;
    min-width: unset !important;
    padding: 0 0 env(safe-area-inset-bottom, 16px) !important;
    transform: none !important;
    transition: bottom .3s cubic-bezier(.4,0,.2,1) !important;
    pointer-events: none;
    visibility: hidden;
  }

  /* Slide UP — snap to bottom of viewport */
  .user-dropdown-panel.open {
    bottom: 0 !important;        /* slides into view */
    pointer-events: auto;
    visibility: visible;
  }

  .udp-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .udp-close-chevron {
    margin-left: auto;
    font-size: 14px;
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
    padding: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    transition: background .15s, color .15s;
  }
  .udp-close-chevron:hover {
    background: rgba(239,68,68,0.15);
    color: #EF4444;
  }
}

/* ── Backdrop (mobile only) ── */
.udp-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999998;
}
.udp-backdrop.open { display: block; }

/* ── Avatar inside panel header ── */
.udp-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.udp-avatar-placeholder {
  background: linear-gradient(135deg, var(--primary, #6c63ff), var(--secondary, #48cae4));
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.udp-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text, #fff);
}

/* ── Menu items ── */
.udp-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  color: var(--text, #fff);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
  transition: background .15s;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.udp-item:hover { background: rgba(255,255,255,0.05); }

.udp-icon {
  width: 20px;
  text-align: center;
  color: var(--text-muted, #94a3b8);
  font-size: 1rem;
  flex-shrink: 0;
}

.udp-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 4px 0;
}

/* Logout in red */
.udp-logout           { color: #ef4444; }
.udp-logout .udp-icon { color: #ef4444; }

/* ── Dark mode toggle row ── */
.udp-darkmode-row      { justify-content: flex-start; }
.udp-darkmode-row span { flex: 1; }

.udp-toggle-switch {
  width: 46px;
  height: 26px;
  border-radius: 13px;
  background: rgba(255,255,255,0.15);
  position: relative;
  flex-shrink: 0;
  transition: background .2s;
  margin-left: auto;
}
.udp-toggle-switch.on { background: var(--primary, #6c63ff); }

.udp-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.udp-toggle-switch.on .udp-toggle-thumb { transform: translateX(20px); }


/* ============================================================
   PREMIUM HERO SECTION  –  PetCare+ Redesign
   ============================================================ */

/* ---------- Navbar override for hero page: glassmorphism ---------- */
.navbar--hero {
  background: rgba(8, 18, 33, 0.55) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10) !important;
  border-radius: 0 !important;
}

.navbar--hero .nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
  position: relative;
}

.navbar--hero .nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: #00D4AA;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.navbar--hero .nav-link:hover::after,
.navbar--hero .nav-link.active::after {
  width: 100%;
}

.navbar--hero .nav-link:hover,
.navbar--hero .nav-link.active {
  color: #fff !important;
  border-bottom-color: transparent !important;
}

.navbar--hero .nav-logo {
  color: #fff !important;
}

.navbar--hero .logo-plus {
  color: #00D4AA !important;
}

.navbar--hero .btn-outline {
  border-color: rgba(255, 255, 255, 0.6) !important;
  color: #fff !important;
}

.navbar--hero .btn-outline:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #fff !important;
}

.navbar--hero .btn-primary {
  background: #00D4AA !important;
  color: #081221 !important;
  font-weight: 700;
}

.navbar--hero .btn-primary:hover {
  background: #00b894 !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 212, 170, 0.4) !important;
}

.navbar--hero .nav-toggle span {
  background: #fff !important;
}

.navbar--hero .user-avatar-wrap span {
  color: #fff !important;
}

.navbar--hero .notif-bell {
  background: rgba(255,255,255,0.12) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}
.navbar--hero .notif-bell:hover {
  background: rgba(255,255,255,0.22) !important;
  color: #fff !important;
}
.navbar--hero .notif-bell:hover {
  color: #fff !important;
}

/* ---------- Hero section shell ---------- */
.hero-premium {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: visible;
  background: #081221;
  padding-top: 0; /* image bleeds behind transparent navbar */
}

/* ---------- Background image layer ---------- */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
  transform-origin: center;
  /* Combined animations: zoom in on load + continuous floating */
  animation: heroBgZoom 14s ease-out forwards, heroBgFloat 8s ease-in-out infinite;
  /* Smooth transition when image changes on theme toggle */
  transition: opacity 0.3s ease-in-out, filter 0.3s ease-in-out;
  /* Reduce brightness in light mode */
  filter: brightness(0.85);
}

/* Dark mode: reduce brightness for landing page images */
[data-theme="dark"] .hero-bg-img {
  filter: brightness(0.7);
}

/* ============================================================
   26. LIGHT MODE EXPLICIT OVERRIDES
   Ensure proper contrast and readability in light mode
   ============================================================ */

/* Light mode text colors */
[data-theme="light"],
:root:not([data-theme="dark"]) {
  --text: #1E293B;
  --text-muted: #64748B;
}

/* Ensure body text is dark in light mode */
[data-theme="light"] body,
:root:not([data-theme="dark"]) body {
  color: #1E293B;
}

/* Card text should be dark in light mode */
[data-theme="light"] .card,
:root:not([data-theme="dark"]) .card {
  color: #1E293B;
}

/* Table text should be dark in light mode */
[data-theme="light"] table,
[data-theme="light"] th,
[data-theme="light"] td,
:root:not([data-theme="dark"]) table,
:root:not([data-theme="dark"]) th,
:root:not([data-theme="dark"]) td {
  color: #1E293B;
}

/* Form labels and inputs should be dark in light mode */
[data-theme="light"] .form-label,
[data-theme="light"] .form-control,
:root:not([data-theme="dark"]) .form-label,
:root:not([data-theme="dark"]) .form-control {
  color: #1E293B;
}

/* Navigation text should be dark in light mode */
[data-theme="light"] .nav-link,
:root:not([data-theme="dark"]) .nav-link {
  color: #334155;
}

[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.active,
:root:not([data-theme="dark"]) .nav-link:hover,
:root:not([data-theme="dark"]) .nav-link.active {
  color: #4F46E5;
}

/* Ensure headings are dark in light mode */
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6,
:root:not([data-theme="dark"]) h1,
:root:not([data-theme="dark"]) h2,
:root:not([data-theme="dark"]) h3,
:root:not([data-theme="dark"]) h4,
:root:not([data-theme="dark"]) h5,
:root:not([data-theme="dark"]) h6 {
  color: #0F172A;
}

/* Links should be visible in light mode */
[data-theme="light"] a,
:root:not([data-theme="dark"]) a {
  color: #4F46E5;
}

[data-theme="light"] a:hover,
:root:not([data-theme="dark"]) a:hover {
  color: #4338CA;
}

/* Zoom in animation on page load */
@keyframes heroBgZoom {
  from { transform: scale(1.08); opacity: 0.7; }
  to   { transform: scale(1.00); opacity: 1; }
}

/* Continuous subtle floating animation */
@keyframes heroBgFloat {
  0%, 100% { 
    transform: scale(1.00) translateY(0px); 
  }
  50% { 
    transform: scale(1.02) translateY(-10px); 
  }
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  /* Light left-side shadow for text readability, image fully visible on right */
  background: linear-gradient(
    105deg,
    rgba(8, 18, 33, 0.72) 0%,
    rgba(8, 18, 33, 0.45) 35%,
    rgba(8, 18, 33, 0.10) 60%,
    rgba(8, 18, 33, 0.00) 100%
  );
}

/* Decorative gradient orbs */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  opacity: 0.35;
}

.hero-orb-1 {
  width: 540px;
  height: 540px;
  background: radial-gradient(circle, #1E40FF 0%, transparent 70%);
  top: -160px;
  left: -120px;
}

.hero-orb-2 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, #00D4AA 0%, transparent 70%);
  bottom: -100px;
  right: -80px;
}

/* ---------- Hero inner layout ---------- */
.hero-premium-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: calc(70px + 4rem) 1.5rem 4rem 1.5rem; /* 70px navbar + spacing */
  flex: 1;
}

/* ---------- RIGHT panel — hidden, image is full background ---------- */
.hero-right {
  display: none !important;
}

/* ---------- LEFT content ---------- */
.hero-left {
  opacity: 0;
  transform: translateY(28px);
  animation: heroFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
  max-width: 580px;
  width: 100%;
}

@keyframes heroFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* Badge */
.hero-premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 212, 170, 0.35);
  color: #00D4AA;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  margin-bottom: 1.75rem;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00D4AA;
  box-shadow: 0 0 8px rgba(0, 212, 170, 0.8);
  animation: badgePulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes badgePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(0.8); }
}

/* Headline */
.hero-premium-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 400;
  line-height: 1.35;
  margin-bottom: 1.5rem;
  color: #ffffff !important;
  letter-spacing: 0.02em;
  /* Better text rendering for cursive fonts */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.hero-heading-line {
  display: block;
  color: #ffffff !important;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  letter-spacing: 0.01em;
  text-shadow: 0 2px 24px rgba(0,0,0,0.45), 0 4px 8px rgba(0,0,0,0.2);
  /* Consistent line height */
  line-height: 1.35;
}

.hero-heading-accent {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  background: linear-gradient(90deg, #00D4AA 0%, #3B82F6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Description */
.hero-premium-desc {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.95) !important;
  line-height: 1.7;
  max-width: 500px;
  margin-bottom: 2.5rem;
  font-weight: 400;
}
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7);
}

/* CTA Buttons */
.hero-premium-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  background: #00D4AA;
  color: #081221 !important;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0, 212, 170, 0.35);
}

.btn-hero-primary:hover {
  background: #00b894;
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(0, 212, 170, 0.5);
  color: #081221 !important;
}

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  color: #ffffff !important;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 50px;
  border: 1.5px solid rgba(255, 255, 255, 0.30);
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.60);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.1);
  color: #ffffff !important;
}

/* ---------- Right panel elements — hidden (full-bg layout) ---------- */
.hero-right,
.hero-right-inner,
.hero-right-img,
.hero-float-badge,
.hero-float-rating {
  display: none !important;
}

@keyframes heroFadeRight {
  to { opacity: 1; transform: translateX(0); }
}

@keyframes floatY {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}

/* ---------- Bottom floating cards ---------- */
.hero-bottom-cards {
  position: relative;
  z-index: 2;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.hbc-card {
  background: rgba(8, 18, 33, 0.60);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #fff;
  transition: background 0.25s ease;
  opacity: 0;
  animation: heroFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hbc-card:last-child { border-right: none; }
.hbc-card:nth-child(1) { animation-delay: 0.75s; }
.hbc-card:nth-child(2) { animation-delay: 0.95s; }
.hbc-card:nth-child(3) { animation-delay: 1.15s; }

.hbc-card:hover { background: rgba(0, 212, 170, 0.10); }

.hbc-card--center {
  background: rgba(0, 212, 170, 0.10);
  border-top-color: rgba(0, 212, 170, 0.35);
}
.hbc-card--center:hover { background: rgba(0, 212, 170, 0.18); }

.hbc-icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00D4AA;
}

.hbc-card--center .hbc-icon {
  color: #ff6b8a;
  background: rgba(255, 107, 138, 0.12);
}

.hbc-text { display: flex; flex-direction: column; gap: 0.25rem; }

.hbc-text strong {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.hbc-text span {
  font-size: 0.77rem;
  color: rgba(255, 255, 255, 0.60);
  line-height: 1.45;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-premium-inner {
    padding-bottom: 3rem;
  }
  .hero-bottom-cards {
    grid-template-columns: repeat(3, 1fr);
  }
  .hbc-card { padding: 1.2rem 1.4rem; }
}

/* ---- Tablet (768px) ---- */
@media (max-width: 768px) {
  .hero-premium {
    min-height: 100svh;
    max-height: 100svh;
    overflow: hidden;
  }

  .hero-bg {
    background: #081221;
  }

  /* Mobile image positioning */
  .hero-bg-img {
    object-fit: cover;
    object-position: center 20%;
    width: 100%;
    height: 100%;
  }

  .hero-bg-overlay {
    background: linear-gradient(
      to bottom,
      rgba(8, 18, 33, 0.10) 0%,
      rgba(8, 18, 33, 0.20) 35%,
      rgba(8, 18, 33, 0.70) 58%,
      rgba(8, 18, 33, 0.92) 80%,
      rgba(8, 18, 33, 0.97) 100%
    ) !important;
  }

  .hero-premium-inner {
    padding: 1.5rem 1.25rem 1.5rem 1.25rem;
    align-items: flex-start;
    justify-content: flex-end;
    min-height: calc(100svh - 70px);
    max-height: calc(100svh - 70px);
  }

  .hero-left {
    max-width: 100%;
    width: 100%;
  }

  .hero-premium-badge {
    font-size: 0.68rem;
    padding: 0.35rem 0.8rem;
    margin-bottom: 0.75rem;
    white-space: normal;
    line-height: 1.4;
  }

  .hero-premium-heading {
    margin-bottom: 0.75rem;
  }

  .hero-heading-line,
  .hero-heading-accent {
    font-size: clamp(1.9rem, 8vw, 2.8rem);
  }

  .hero-premium-desc {
    font-size: 0.85rem;
    line-height: 1.65;
    margin-bottom: 1.25rem;
    max-width: 100%;
  }

  .hero-premium-actions {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 0;
  }

  .hero-bottom-cards {
    grid-template-columns: 1fr;
    border-top: 1px solid rgba(255,255,255,0.10);
    display: none; /* hide on mobile to keep hero clean */
  }
}

/* ---- Mobile (480px) ---- */
@media (max-width: 480px) {
  .hero-bg-img {
    object-fit: cover;
    object-position: center 15%;
  }

  .hero-bg-overlay {
    background: linear-gradient(
      to bottom,
      rgba(8, 18, 33, 0.08) 0%,
      rgba(8, 18, 33, 0.18) 32%,
      rgba(8, 18, 33, 0.72) 56%,
      rgba(8, 18, 33, 0.95) 80%,
      rgba(8, 18, 33, 0.98) 100%
    ) !important;
  }

  .hero-premium-inner {
    padding: 1.5rem 1rem 1.5rem 1rem;
  }

  .hero-premium-heading {
    margin-bottom: 1rem;
  }

  .hero-heading-line,
  .hero-heading-accent {
    font-size: clamp(2rem, 10.5vw, 2.8rem);
  }

  .hero-premium-desc {
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
  }

  .hero-premium-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .btn-hero-primary,
  .btn-hero-secondary {
    width: 100%;
    justify-content: center;
    padding: 0.85rem 1.5rem;
    font-size: 0.9rem;
  }

  .hbc-icon { font-size: 1.1rem; width: 36px; height: 36px; }

  .hbc-text strong { font-size: 0.82rem; }
  .hbc-text span   { font-size: 0.72rem; }
}

/* ---------- Dark mode compatibility ---------- */
[data-theme="dark"] .hero-premium {
  background: #04090F;
}

/* Prevent dark mode global link color from overriding hero buttons */
[data-theme="dark"] .btn-hero-primary,
[data-theme="dark"] .btn-hero-primary:hover,
[data-theme="dark"] .btn-hero-primary:visited {
  color: #081221 !important;
}

[data-theme="dark"] .btn-hero-secondary,
[data-theme="dark"] .btn-hero-secondary:hover,
[data-theme="dark"] .btn-hero-secondary:visited {
  color: #ffffff !important;
}

[data-theme="dark"] .hero-bg-overlay {
  background: linear-gradient(
    105deg,
    rgba(4, 9, 15, 0.78) 0%,
    rgba(4, 9, 15, 0.50) 35%,
    rgba(4, 9, 15, 0.15) 60%,
    rgba(4, 9, 15, 0.00) 100%
  );
}

[data-theme="dark"] .hbc-card {
  background: rgba(4, 9, 15, 0.68);
  border-top-color: rgba(255, 255, 255, 0.09);
  border-right-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .hbc-card--center {
  background: rgba(0, 212, 170, 0.08);
  border-top-color: rgba(0, 212, 170, 0.22);
}

/* ---------- Navbar glass when hero is present ---------- */
/* Applied via JS scroll listener (see below) */
.navbar.on-hero-top {
  background: rgba(8, 18, 33, 0.45) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
}

.navbar.on-hero-top .nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
}

.navbar.on-hero-top .nav-link:hover,
.navbar.on-hero-top .nav-link.active {
  color: #fff !important;
  border-bottom-color: #00D4AA !important;
}

.navbar.on-hero-top .nav-logo {
  color: #fff !important;
}

.navbar.on-hero-top .logo-plus {
  color: #00D4AA !important;
}

.navbar.on-hero-top .btn-outline {
  border-color: rgba(255, 255, 255, 0.55) !important;
  color: #fff !important;
}

.navbar.on-hero-top .btn-outline:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #fff !important;
}

.navbar.on-hero-top .btn-primary {
  background: #00D4AA !important;
  color: #081221 !important;
}

.navbar.on-hero-top .btn-primary:hover {
  background: #00b894 !important;
}

.navbar.on-hero-top .nav-toggle span {
  background: #fff !important;
}

.navbar.on-hero-top .user-avatar-wrap span {
  color: #fff !important;
}

.navbar.on-hero-top .notif-bell {
  background: rgba(255,255,255,0.12) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

.navbar.on-hero-top .notif-bell:hover {
  background: rgba(255,255,255,0.22) !important;
  color: #fff !important;
}

/* ---- Hero navbar extra overrides (theme toggle, logo text, chevron) ---- */
.navbar.on-hero-top {
  background: rgba(8, 18, 33, 0.52) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
}

.navbar.on-hero-top .nav-link {
  color: rgba(255, 255, 255, 0.82) !important;
  border-bottom-color: transparent !important;
}

.navbar.on-hero-top .nav-link:hover,
.navbar.on-hero-top .nav-link.active {
  color: #fff !important;
  border-bottom-color: #00D4AA !important;
}

.navbar.on-hero-top .logo-text,
.navbar.on-hero-top .nav-logo {
  color: #fff !important;
}

.navbar.on-hero-top:not(.scrolled) .nav-logo-img {
  filter: drop-shadow(0 0 3px rgba(255,255,255,0.8));
}

.navbar.on-hero-top .logo-plus {
  color: #00D4AA !important;
}

.navbar.on-hero-top .btn-outline {
  border-color: rgba(255, 255, 255, 0.55) !important;
  color: #fff !important;
  background: transparent !important;
}

.navbar.on-hero-top .btn-outline:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
}

.navbar.on-hero-top .btn-primary {
  background: #00D4AA !important;
  color: #081221 !important;
}

.navbar.on-hero-top .btn-primary:hover {
  background: #00be9a !important;
  color: #081221 !important;
}

.navbar.on-hero-top .nav-toggle span {
  background: #fff !important;
}

/* Moon/sun theme toggle */
.navbar.on-hero-top .theme-toggle {
  color: rgba(255, 255, 255, 0.85) !important;
}

.navbar.on-hero-top .theme-toggle:hover {
  color: #fff !important;
}

.navbar.on-hero-top .theme-toggle i,
.navbar.on-hero-top .theme-toggle .icon-sun,
.navbar.on-hero-top .theme-toggle .icon-moon {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* User name & chevron */
.navbar.on-hero-top .user-avatar-wrap span,
.navbar.on-hero-top .user-avatar-name {
  color: #fff !important;
}

.navbar.on-hero-top .user-avatar-chevron {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Notification bell */
.navbar.on-hero-top .notif-bell {
  background: rgba(255,255,255,0.12) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}
.navbar.on-hero-top .notif-bell:hover {
  background: rgba(255,255,255,0.22) !important;
  color: #fff !important;
}

/* ---- Hero page: navbar sits on top of image (no background) ---- */
body.hero-page .navbar {
  background: transparent !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

/* When scrolled past hero, restore normal navbar */
body.hero-page .navbar.scrolled {
  background: rgba(8, 18, 33, 0.92) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
}

/* ============================================================
   HERO PAGE — FULLY TRANSPARENT NAVBAR (highest specificity)
   ============================================================ */
html body.hero-page #mainNav,
html body.hero-page #mainNav.navbar,
html body.hero-page .navbar.on-hero-top {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

/* Restore solid navbar once scrolled past hero */
html body.hero-page #mainNav.scrolled {
  background: rgba(8, 18, 33, 0.92) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3) !important;
}

/* Hero page body offset for fixed navbar */
body.hero-page {
  padding-top: 0 !important;
}

/* ---- Hero page: override base scrolled shadow so only our rule applies ---- */
html body.hero-page #mainNav.on-hero-top.scrolled,
html body.hero-page #mainNav.on-hero-top {
  box-shadow: none !important;
  background: transparent !important;
  border-bottom: none !important;
}

/* ---- Hero inline accent word ---- */
.hero-heading-accent-inline {
  font-family: 'Space Grotesk', sans-serif;
  background: linear-gradient(135deg, #00D4AA 0%, #00E5CC 50%, #3B82F6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 500;
  letter-spacing: -0.01em;
  display: inline-block;
  position: relative;
  /* Subtle glow effect for the gradient text */
  filter: drop-shadow(0 0 8px rgba(0, 212, 170, 0.3));
}

/* ---- Additional cursive typography refinements ---- */
.hero-heading-line {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.4;
  /* Ensure consistent spacing */
  margin: 0.2rem 0;
}

/* Keep all text using Satisfy cursive font */
body, p, .hero-premium-desc, .section-header p, 
.btn, .nav-links a, .form-control, label, 
.sidebar-link-text, .card-body p {
  font-family: 'Space Grotesk', sans-serif;
}

/* ---- Hero heading always white in all modes ---- */
.hero-premium .hero-premium-heading,
.hero-premium .hero-heading-line,
[data-theme="dark"] .hero-premium .hero-premium-heading,
[data-theme="dark"] .hero-premium .hero-heading-line {
  color: #ffffff !important;
}

/* ---- Sections: transparent so body paw pattern shows through ---- */
.about-section,
#how-it-works,
#map-section,
#testimonials {
  background: transparent;
}

[data-theme="dark"] .about-section,
[data-theme="dark"] #how-it-works,
[data-theme="dark"] #map-section,
[data-theme="dark"] #testimonials {
  background: transparent;
}

/* About section text colors in dark mode */
[data-theme="dark"] .about-section h2,
[data-theme="dark"] .about-section p,
[data-theme="dark"] .about-section span {
  color: var(--text);
}

/* Testimonial cards in dark mode */
[data-theme="dark"] .testimonial-card {
  background: var(--card);
  border-color: var(--border);
}

/* How it works steps in dark mode */
[data-theme="dark"] .step-item h3,
[data-theme="dark"] .step-item p {
  color: var(--text);
}

/* ============================================================
   HERO PAGE NAVBAR — FINAL FIX
   Transparent over hero, normal base style when scrolled past
   ============================================================ */

/* Over the hero: fully transparent */
html body.hero-page #mainNav,
html body.hero-page #mainNav.on-hero-top {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

/* Scrolled past hero: restore to default navbar (light/dark aware) */
html body.hero-page #mainNav.scrolled {
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border-bottom: 1px solid var(--border) !important;
  box-shadow: var(--shadow) !important;
}

/* Scrolled past hero in dark mode */
[data-theme="dark"] html body.hero-page #mainNav.scrolled,
html body.hero-page [data-theme="dark"] #mainNav.scrolled {
  background: rgba(15, 17, 23, 0.96) !important;
  border-bottom-color: var(--border) !important;
}

/* Scrolled past hero: restore nav link colors to normal */
html body.hero-page #mainNav.scrolled .nav-link {
  color: var(--text) !important;
}

html body.hero-page #mainNav.scrolled .nav-logo,
html body.hero-page #mainNav.scrolled .logo-text {
  color: var(--text) !important;
}

html body.hero-page #mainNav.scrolled .nav-logo-img {
  filter: none !important;
}

html body.hero-page #mainNav.scrolled .logo-plus {
  color: var(--secondary) !important;
}

html body.hero-page #mainNav.scrolled .theme-toggle i {
  color: var(--text-muted) !important;
}

html body.hero-page #mainNav.scrolled .btn-outline {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}

html body.hero-page #mainNav.scrolled .btn-primary {
  background: var(--primary) !important;
  color: #fff !important;
}

html body.hero-page #mainNav.scrolled .notif-bell {
  background: rgba(var(--primary-rgb, 108,99,255), 0.18) !important;
  color: var(--primary, #6c63ff) !important;
}

html body.hero-page #mainNav.scrolled .nav-toggle span {
  background: var(--text) !important;
}

/* ---- Hero description always bright white with shadow for contrast ---- */
.hero-premium .hero-premium-desc,
[data-theme="dark"] .hero-premium .hero-premium-desc {
  color: rgba(255, 255, 255, 0.95) !important;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7) !important;
}

/* ---- Theme toggle: white style when over hero ---- */
.navbar.on-hero-top .theme-toggle,
html body.hero-page #mainNav.on-hero-top .theme-toggle {
  border-color: rgba(255, 255, 255, 0.45) !important;
  color: rgba(255, 255, 255, 0.90) !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

.navbar.on-hero-top .theme-toggle:hover,
html body.hero-page #mainNav.on-hero-top .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: rgba(255, 255, 255, 0.70) !important;
  color: #ffffff !important;
}

.navbar.on-hero-top .theme-toggle .icon-sun,
.navbar.on-hero-top .theme-toggle .icon-moon,
html body.hero-page #mainNav.on-hero-top .theme-toggle .icon-sun,
html body.hero-page #mainNav.on-hero-top .theme-toggle .icon-moon {
  color: rgba(255, 255, 255, 0.90) !important;
}

/* ============================================================
   FINAL DEFINITIVE NAVBAR SCROLLED FIX — overrides all above
   ============================================================ */

/* Light mode: white navbar when scrolled past hero */
html body.hero-page #mainNav.scrolled {
  background: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid #E2E8F0 !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08) !important;
}

/* Dark mode: dark navbar when scrolled past hero */
[data-theme="dark"] body.hero-page #mainNav.scrolled {
  background: rgba(13, 17, 23, 0.97) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4) !important;
}

/* Dark mode scrolled: fix text/icon colors */
[data-theme="dark"] body.hero-page #mainNav.scrolled .nav-link {
  color: #E2E8F0 !important;
}

[data-theme="dark"] body.hero-page #mainNav.scrolled .nav-logo,
[data-theme="dark"] body.hero-page #mainNav.scrolled .logo-text {
  color: #E2E8F0 !important;
}

[data-theme="dark"] body.hero-page #mainNav.scrolled .theme-toggle {
  border-color: rgba(255,255,255,0.20) !important;
  color: #94A3B8 !important;
  background: transparent !important;
}

[data-theme="dark"] body.hero-page #mainNav.scrolled .theme-toggle .icon-moon {
  color: #94A3B8 !important;
}

[data-theme="dark"] body.hero-page #mainNav.scrolled .nav-toggle span {
  background: #E2E8F0 !important;
}

[data-theme="dark"] body.hero-page #mainNav.scrolled .btn-outline {
  border-color: rgba(255,255,255,0.35) !important;
  color: #fff !important;
}

/* ============================================================
   GLOBAL ANIMATION & UI IMPROVEMENTS — August 2026
   ============================================================ */

/* ── Smooth page load fade-in ──────────────────────────────── */
body {
  animation: pageFadeIn .4s ease both;
}
@keyframes pageFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Card entrance animation (dashboard) ──────────────────── */
.card {
  animation: cardSlideUp .35s cubic-bezier(.22,1,.36,1) both;
}
@keyframes cardSlideUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* Stagger children cards */
.stats-grid .stat-widget:nth-child(1) { animation-delay: .05s; }
.stats-grid .stat-widget:nth-child(2) { animation-delay: .10s; }
.stats-grid .stat-widget:nth-child(3) { animation-delay: .15s; }
.stats-grid .stat-widget:nth-child(4) { animation-delay: .20s; }

/* ── Stat widget — counter glow on hover ──────────────────── */
.stat-widget {
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s ease, border-color .25s ease;
}
.stat-widget:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 12px 32px rgba(0,0,0,.12);
  border-color: var(--primary);
}
.stat-widget:hover .stat-widget-icon {
  transform: scale(1.12) rotate(-4deg);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.stat-widget-icon {
  transition: transform .25s ease;
}

/* ── Sidebar link — smoother transition ───────────────────── */
.sidebar-link {
  transition: background .2s ease, color .2s ease,
              border-left-color .2s ease, padding-left .2s ease;
}
.sidebar-link:hover {
  padding-left: 1.5rem;
}
.sidebar-link.active {
  padding-left: 1.5rem;
}

/* ── Form control — smoother focus ───────────────────────── */
.form-control {
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

/* ── Button ripple effect ─────────────────────────────────── */
.btn {
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.0);
  transition: background .15s ease;
}
.btn:active::after {
  background: rgba(255,255,255,.15);
}

/* ── Clinic card — richer hover ───────────────────────────── */
.clinic-card {
  transition: transform .3s cubic-bezier(.34,1.56,.64,1),
              box-shadow .3s ease;
}
.clinic-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 16px 40px rgba(0,0,0,.12);
}

/* ── Badge pop-in ─────────────────────────────────────────── */
.badge {
  transition: transform .2s cubic-bezier(.34,1.56,.64,1);
}
.badge:hover {
  transform: scale(1.08);
}

/* ── Alert slide-in ───────────────────────────────────────── */
.alert {
  animation: alertSlide .35s cubic-bezier(.22,1,.36,1) both;
}
@keyframes alertSlide {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Modal — spring animation ─────────────────────────────── */
.modal-overlay.open .modal {
  transform: scale(1);
  animation: modalSpring .35s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes modalSpring {
  from { opacity: 0; transform: scale(.9) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Table row hover — subtle left accent ─────────────────── */
tbody tr {
  transition: background .15s ease;
}
tbody tr > td:first-child {
  transition: box-shadow .2s ease;
}
tbody tr:hover > td:first-child {
  box-shadow: inset 3px 0 0 var(--primary);
}

/* ── Notif bell pulse animation ───────────────────────────── */
.notif-bell .fa-bell {
  transition: transform .2s ease;
}
.notif-bell:hover .fa-bell {
  animation: bellRing .4s ease;
}
@keyframes bellRing {
  0%,100% { transform: rotate(0); }
  20%     { transform: rotate(-18deg); }
  40%     { transform: rotate(18deg); }
  60%     { transform: rotate(-10deg); }
  80%     { transform: rotate(10deg); }
}

/* ── Notification Bell Button ─────────────────────────────── */
.notif-bell-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.notif-bell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(var(--primary-rgb, 108,99,255), 0.18);
  border: none;
  cursor: pointer;
  outline: none;
  color: var(--primary, #6c63ff);
  font-size: 1rem;
  transition: background .18s, transform .15s;
  position: relative;
}
.notif-bell:hover {
  background: rgba(var(--primary-rgb, 108,99,255), 0.30);
  transform: scale(1.06);
}
.notif-bell.active,
.notif-bell[aria-expanded="true"] {
  background: var(--primary, #6c63ff);
  color: #fff;
}

/* Notification dropdown */
.notif-dropdown {
  --notif-muted:#64748b;
  --notif-accent:#4f46e5;
  display:none; position:fixed; width:360px; max-width:calc(100vw - 24px);
  background:var(--card); color:var(--text); border:1px solid var(--border);
  border-radius:18px; box-shadow:0 16px 56px #00000026; z-index:99999;
  overflow:hidden; animation:notifDropIn .18s ease;
}
[data-theme="dark"] .notif-dropdown { --notif-muted:#9da9bd; --notif-accent:#aaa5ff; box-shadow:0 16px 56px #00000066; }
.notif-dropdown.open { display:flex; flex-direction:column; }
@keyframes notifDropIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
.notif-dp-header { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; padding:14px 16px 12px; border-bottom:1px solid var(--border); flex-shrink:0; }
.notif-dp-title { display:flex; align-items:center; gap:9px; color:var(--text); font-size:.94rem; font-weight:600; }
.notif-dp-title .fa-bell { color:var(--notif-accent); font-size:.9rem; }
.notif-dp-markall { background:transparent; border:0; color:var(--notif-accent); font-size:.7rem; font-weight:500; cursor:pointer; border-radius:6px; padding:7px 0; }
.notif-dp-markall:hover { text-decoration:underline; }
.notif-dp-list { max-height:360px; min-height:0; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:var(--border) transparent; padding:6px; }
.notif-dp-loading,.notif-dp-empty { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; padding:42px 20px; text-align:center; font-size:.82rem; color:var(--notif-muted); }
.notif-dp-empty>i,.notif-dp-loading>i { font-size:1.5rem; color:var(--notif-accent); }
.notif-dp-item-wrapper { position:relative; display:flex; align-items:center; border-radius:12px; margin:3px 0; border-bottom:1px solid var(--border); overflow:hidden; }
.notif-dp-item-wrapper:last-child { border-bottom:0; }
.notif-dp-item-wrapper:has(.unread) { background:rgba(99,102,241,.08); }
.notif-dp-item-wrapper:hover { background:rgba(99,102,241,.06); }
.notif-dp-item { display:flex; align-items:flex-start; gap:11px; flex:1; min-width:0; padding:11px 0 11px 10px; color:var(--text); text-decoration:none; cursor:pointer; background:transparent; }
.notif-dp-icon { display:flex; align-items:center; justify-content:center; width:32px; height:32px; flex-shrink:0; border-radius:11px; color:var(--notif-accent); background:rgba(99,102,241,.12); font-size:.85rem; }
.notif-dp-body { flex:1; min-width:0; }
.notif-dp-msg { font-size:.79rem; font-weight:400; line-height:1.6; color:var(--text); overflow-wrap:anywhere; }
.notif-dp-item.unread .notif-dp-msg { font-weight:500; }
.notif-dp-time { color:var(--notif-muted); font-size:.67rem; margin-top:6px; }
.notif-dp-unread-dot { width:6px; height:6px; flex-shrink:0; background:var(--notif-accent); border-radius:50%; margin:7px 0 0; }
.notif-dp-delete { position:static; display:flex; align-items:center; justify-content:center; flex-shrink:0; width:36px; height:44px; margin:0 4px; border:0; border-radius:9px; background:transparent; color:var(--notif-muted); cursor:pointer; font-size:.78rem; transition:background .15s,color .15s; }
.notif-dp-delete:hover,.notif-dp-delete:focus-visible { background:rgba(239,68,68,.12); color:#ef4444; }
.notif-dp-delete:disabled { opacity:.45; cursor:wait; }
.notif-dp-item:focus-visible { outline:2px solid var(--notif-accent); outline-offset:-3px; border-radius:10px; }
.notif-dp-footer { text-align:center; padding:12px 16px; border-top:1px solid var(--border); flex-shrink:0; }
.notif-dp-footer a { display:block; color:var(--notif-accent); font-size:.78rem; font-weight:600; text-decoration:none; }
.notif-dp-footer a:hover { text-decoration:underline; }
@media(prefers-reduced-motion:reduce) { .notif-dropdown { animation:none; } }

/* ── Hero float badge entrance ────────────────────────────── */
.fb {
  animation: fbEntrance .5s cubic-bezier(.34,1.56,.64,1) both;
}
.fb:nth-child(1) { animation-delay: .2s; }
.fb:nth-child(2) { animation-delay: .35s; }
.fb:nth-child(3) { animation-delay: .5s; }
@keyframes fbEntrance {
  from { opacity: 0; transform: scale(.7) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Empty state fade-in ──────────────────────────────────── */
.empty-state {
  animation: cardSlideUp .4s ease both;
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}
.empty-state i {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
  color: var(--border);
}
.empty-state h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: .5rem;
}

/* ── Scrollbar — thin and styled ─────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 50px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Focus-visible outline (accessibility) ────────────────── */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Dark mode improvements ───────────────────────────────── */
[data-theme="dark"] .stat-widget:hover {
  box-shadow: 0 12px 32px rgba(0,0,0,.4);
}
[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #2a2d3d;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: #3d4160;
}
[data-theme="dark"] .sidebar-link:hover,
[data-theme="dark"] .sidebar-link.active {
  padding-left: 1.5rem;
}

/* ── Stats row (groomer/vet dashboard) ────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

/* ============================================================
   DASHBOARD MOBILE — dash-two-col responsive class
   Replaces brittle inline grid overrides with a named class
   ============================================================ */

/* Desktop: keep inline grid styles working */
.dash-two-col {
  display: grid;
}

/* ── Mobile: stack everything ──────────────────────────────── */
@media (max-width: 768px) {

  /* Core class that collapses all dashboard multi-col grids */
  .dash-two-col {
    display: block !important;
  }
  .dash-two-col > * {
    width: 100% !important;
    min-width: 0 !important;
    margin-bottom: .85rem;
  }
  .dash-two-col > *:last-child { margin-bottom: 0; }

  /* ── AI insight type picker — 3 col → 1 col ─────────────── */
  div[style*="grid-template-columns:1fr 1fr 1fr"],
  div[style*="grid-template-columns: 1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: .5rem !important;
  }

  /* ── Users modal info grids — stack on small screens ──────── */
  .modal div[style*="grid-template-columns:1fr 1fr"],
  .modal div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: .5rem !important;
  }

  /* ── Appointment table on dashboards — card layout ────────── */
  .dash-main .table-wrap {
    border-radius: var(--radius-sm);
  }

  /* ── Stat widgets stagger animation delay reset ───────────── */
  .stats-row .stat-widget:nth-child(n) { animation-delay: 0s; }
  .stats-row .stat-widget:nth-child(1) { animation-delay: .04s; }
  .stats-row .stat-widget:nth-child(2) { animation-delay: .08s; }
  .stats-row .stat-widget:nth-child(3) { animation-delay: .12s; }
  .stats-row .stat-widget:nth-child(4) { animation-delay: .16s; }

  /* ── Vet Admin pages: services, clinics, vets, groomers ───────── */
  .dash-main .card-header {
    flex-wrap: wrap;
    gap: .5rem;
  }
  .dash-main .card-header > * { flex-shrink: 0; }

  /* ── Appointments filter pills ───────────────────────────── */
  .dash-main > div[style*="display:flex"][style*="gap"] {
    flex-wrap: wrap;
    gap: .4rem !important;
  }

  /* ── Booking step label — show abbreviated on mobile ──────── */
  .booking-step-label {
    display: none;
  }
  .booking-step-num {
    width: 28px;
    height: 28px;
    font-size: .72rem;
  }

  /* ── Pet card grid on pets page ──────────────────────────── */
  .pets-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: .65rem;
  }

  /* ── Favorites grid ──────────────────────────────────────── */
  .clinics-grid {
    grid-template-columns: 1fr !important;
  }

  /* ── Book page: pet radio cards 2-up ─────────────────────── */
  .booking-pet-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .6rem;
  }

  /* ── Sidebar nav links — tighter on mobile ───────────────── */
  .sidebar-link {
    padding: .65rem 1.1rem !important;
    font-size: .875rem !important;
  }
  .sidebar-badge {
    font-size: .65rem;
    padding: .1rem .4rem;
  }

  /* ── Dashboard header quick action row ───────────────────── */
  .dash-header .btn {
    font-size: .82rem;
    padding: .5rem .9rem;
  }

  /* ── Record cards on vet records page ────────────────────── */
  .dash-two-col .card {
    margin-bottom: .85rem;
  }

  /* ── Reports / charts page ───────────────────────────────── */
  canvas {
    max-height: 180px !important;
  }

  /* ── Groomer services grid ───────────────────────────────── */
  .services-grid {
    grid-template-columns: 1fr !important;
  }

  /* ── Dark mode: stat widget borders more visible ──────────── */
  [data-theme="dark"] .stat-widget {
    border-color: rgba(255,255,255,.08);
  }
}

/* ── Very small screens (≤ 390px) ─────────────────────────── */
@media (max-width: 390px) {
  .stats-row,
  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: .5rem;
  }
  .stat-widget {
    padding: .75rem .75rem;
    gap: .6rem;
  }
  .stat-widget-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  .stat-widget-info strong { font-size: 1.25rem; }
  /* dash-main padding handled above */
  .card-body { padding: .85rem; }
  .card-header { padding: .75rem .85rem; }
  th, td { padding: .45rem .5rem; font-size: .75rem; }
}

/* ============================================================
   DASHBOARD MOBILE — named utility classes
   ============================================================ */

/* ── modal-info-grid: stacks to 1 col on small screens ──────── */
@media (max-width: 560px) {
  .modal-info-grid {
    grid-template-columns: 1fr !important;
    gap: .5rem !important;
  }
}

/* ── insight-type-grid: 3→1 col on mobile ───────────────────── */
@media (max-width: 768px) {
  .insight-type-grid {
    grid-template-columns: 1fr !important;
    gap: .5rem !important;
  }
}

/* ============================================================
   MOBILE BOTTOM NAVIGATION BAR
   Visible only on mobile for dashboard pages (is-dashboard)
   ============================================================ */

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  /* Push dash-main content above bottom nav */
  body.is-dashboard .dash-main {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px) + 1rem) !important;
  }

  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 800;
    background: var(--card);
    border-top: 1px solid var(--border);
    padding: .4rem 0 calc(.4rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 20px rgba(0,0,0,.08);
  }

  .mbn-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .2rem;
    padding: .35rem .25rem;
    color: var(--text-muted);
    font-size: .62rem;
    font-weight: 600;
    text-decoration: none;
    transition: color .2s ease;
    position: relative;
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
  }

  .mbn-item i {
    font-size: 1.15rem;
    transition: transform .2s cubic-bezier(.34,1.56,.64,1);
  }

  .mbn-item.active {
    color: var(--primary);
  }

  .mbn-item.active i {
    transform: scale(1.15) translateY(-2px);
  }

  .mbn-item:hover { color: var(--primary); }
  .mbn-item:active i { transform: scale(.92); }

  /* Active indicator dot */
  .mbn-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--primary);
    border-radius: 0 0 4px 4px;
  }

  /* Badge on bottom nav */
  .mbn-badge {
    position: absolute;
    top: .2rem;
    right: calc(50% - 14px);
    background: var(--danger);
    color: #fff;
    font-size: .58rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border: 2px solid var(--card);
  }

  /* Dark mode bottom nav */
  [data-theme="dark"] .mobile-bottom-nav {
    background: #13151F;
    border-top-color: var(--border);
    box-shadow: 0 -4px 20px rgba(0,0,0,.3);
  }
  [data-theme="dark"] .mbn-badge {
    border-color: #13151F;
  }
}

/* ============================================================
   MOBILE TABLE → CARD LAYOUT
   For appointment lists on mobile (owner, vet, groomer)
   ============================================================ */

@media (max-width: 768px) {
  /* Appt table cards — hide table, show card layout */
  .appt-table-wrap table { display: none; }
  .appt-card-list { display: flex; flex-direction: column; gap: .65rem; padding: .75rem; }

  /* Default table-wrap still scrollable for data tables */
  .table-wrap:not(.appt-table-wrap) table { min-width: 480px; }
}

/* Hide card list on desktop — tables only */
.appt-card-list { display: none; }

/* ============================================================
   APPOINTMENT CARD (mobile-only card layout for appt lists)
   ============================================================ */

.appt-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.appt-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.appt-card-pet {
  font-weight: 700;
  font-size: .9rem;
}
.appt-card-date {
  font-size: .78rem;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}
.appt-card-clinic {
  font-size: .78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: .3rem;
}
.appt-card-service {
  font-size: .8rem;
  font-weight: 500;
}
.appt-card-actions {
  display: flex;
  gap: .4rem;
  margin-top: .25rem;
  flex-wrap: wrap;
}
[data-theme="dark"] .appt-card {
  background: rgba(255,255,255,.03);
  border-color: var(--border);
}

/* ============================================================
   MOBILE BOTTOM NAV — center action button (Book)
   ============================================================ */

@media (max-width: 768px) {
  .mbn-center {
    position: relative;
    margin-top: -18px; /* lift above nav bar */
  }

  .mbn-center-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #3B6FFF);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 16px rgba(30, 64, 255, .45);
    transition: transform .2s cubic-bezier(.34,1.56,.64,1),
                box-shadow .2s ease;
    flex-shrink: 0;
  }

  .mbn-center:active .mbn-center-btn {
    transform: scale(.92);
    box-shadow: 0 2px 8px rgba(30, 64, 255, .3);
  }

  .mbn-center.active .mbn-center-btn {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    box-shadow: 0 4px 20px rgba(30, 64, 255, .55);
    transform: scale(1.05);
  }

  /* Dark mode center button */
  [data-theme="dark"] .mbn-center-btn {
    background: linear-gradient(135deg, #4F5FD4, #6366F1);
    box-shadow: 0 4px 16px rgba(99, 102, 241, .4);
  }

  /* PWA install banner — push above bottom nav on dashboard */
  body.is-dashboard #pwaInstallBanner {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px) + .75rem);
  }

  /* Sidebar toggle button — float above bottom nav */
  #sidebarToggle {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px) + .5rem) !important;
    top: auto !important;
  }
}

/* ============================================================
   SIDEBAR TOGGLE BUTTON — show on mobile dashboard pages
   ============================================================ */

#sidebarToggle {
  display: none; /* hidden by default; shown via media query */
}

/* ============================================================
   ADMIN DASHBOARD HEADER — responsive
   ============================================================ */

.admin-dash-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: .75rem;
}

.admin-dash-title h1 { margin-bottom: .1rem; }
.admin-dash-title p  { color: var(--text-muted); font-size: .875rem; }

.admin-dash-actions {
  display: flex;
  gap: .6rem;
  align-items: center;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.admin-range-select {
  width: auto !important;
  height: 38px !important;
  padding: .35rem .75rem !important;
  font-size: .85rem !important;
}

@media (max-width: 768px) {
  .admin-dash-header {
    flex-direction: column;
    align-items: stretch;
    gap: .75rem;
  }

  .admin-dash-actions {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: .5rem;
    width: 100%;
  }

  .admin-range-select {
    width: 100% !important;
    height: 38px !important;
  }

  /* Hide text labels — icon only on mobile */
  .admin-dash-actions .btn-label {
    display: none;
  }

  .admin-dash-actions .btn {
    padding: .45rem .75rem !important;
    font-size: .82rem !important;
    white-space: nowrap;
  }

  /* ── Stats row always 2 columns ─────────────────────────── */
  .stats-row {
    grid-template-columns: 1fr 1fr !important;
  }

  /* ── Fix 5-stat orphan: last item stays half-width ─────── */
  .stats-row.stats-odd .stat-widget:last-child {
    /* No grid-column span — stays in normal flow as a half-width cell */
    grid-column: auto;
  }

  /* :has() for browsers that support it — auto-detect without class */
  .stats-row:has(.stat-widget:nth-child(5):last-child) .stat-widget:last-child {
    grid-column: auto;
  }
}

/* ============================================================
   FOOTER — dark mode mobile refinements
   ============================================================ */

[data-theme="dark"] .footer-brand {
  border-bottom-color: rgba(255,255,255,.06);
}
[data-theme="dark"] .footer-contact {
  border-top-color: rgba(255,255,255,.06);
}



/* ============================================================
   FLOATING AI CHAT BUTTON — all dashboard pages
   ============================================================ */

.ai-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 700;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #6366F1);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(30, 64, 255, .45);
  transition: transform .25s cubic-bezier(.34,1.56,.64,1),
              box-shadow .25s ease;
  animation: fabEntrance .5s cubic-bezier(.34,1.56,.64,1) both;
  animation-delay: .3s;
}

.ai-fab i {
  font-size: 1.2rem;
  line-height: 1;
}

.ai-fab-label {
  font-size: .52rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1;
  font-family: 'Space Grotesk', sans-serif;
}

.ai-fab:hover {
  transform: scale(1.12) translateY(-3px);
  box-shadow: 0 8px 28px rgba(30, 64, 255, .55);
  color: #fff;
}

.ai-fab:active {
  transform: scale(.95);
  box-shadow: 0 2px 10px rgba(30, 64, 255, .3);
}

/* Pulse ring animation */
.ai-fab::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(30, 64, 255, .4);
  animation: fabPulse 2.5s ease infinite;
}

@keyframes fabEntrance {
  from { opacity: 0; transform: scale(0) rotate(-180deg); }
  to   { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes fabPulse {
  0%, 100% { opacity: .5; transform: scale(1); }
  50%       { opacity: 0; transform: scale(1.4); }
}

/* Dark mode */
[data-theme="dark"] .ai-fab {
  background: linear-gradient(135deg, #4F5FD4, #6366F1);
  box-shadow: 0 4px 20px rgba(99, 102, 241, .5);
}

/* On mobile: position above the bottom nav */
@media (max-width: 768px) {
  .ai-fab {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px) + .75rem);
    right: 1rem;
    width: 46px;
    height: 46px;
  }
  .ai-fab i { font-size: 1.05rem; }

  /* Hide on the AI page itself */
  body[data-page="ai"] .ai-fab {
    display: none;
  }
}

/* Hide on AI pages (no need for button when already on AI page) */
.ai-fab-hidden { display: none !important; }

/* ============================================================
   BOOKING PAGE — step headings (replace inline styles)
   ============================================================ */

.booking-step-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  white-space: nowrap; /* prevent wrapping on mobile */
}

.booking-step-badge {
  width: 26px;
  height: 26px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Booking pet row — 2-col grid on mobile ─────────────────── */
.booking-pet-row {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .booking-pet-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: .6rem;
  }

  .booking-step-heading {
    font-size: .9rem;
    white-space: normal; /* allow wrapping only on very small screens */
  }

  /* Step labels — show abbreviated on mobile */
  .booking-step-label {
    display: block !important;
    font-size: .65rem;
  }
}

/* ============================================================
   DASH PAGE HEADER — title + action button row
   Fixes "Add Pet" button getting cut off
   ============================================================ */

.dash-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: nowrap;
}

.dash-page-header h1 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: .2rem;
}

.dash-page-header p {
  color: var(--text-muted);
  font-size: .875rem;
}

.btn-add-pet {
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .dash-page-header {
    flex-wrap: wrap;
  }

  .dash-page-header > div {
    flex: 1;
  }

  .btn-add-pet {
    font-size: .82rem;
    padding: .5rem .9rem;
  }
}

/* ============================================================
   NOTIFICATIONS PAGE — remove extra top space on mobile
   ============================================================ */

/* Non-dashboard pages use sticky navbar — no offset needed */
.notif-page-wrap {
  background: var(--bg);
  min-height: 100vh;
}

@media (max-width: 768px) {
  /* Prevent any inherited padding-top from bloating public pages */
  body:not(.is-dashboard) > div[style*="background:var(--bg)"],
  body:not(.is-dashboard) > div[style*="background: var(--bg)"] {
    padding-top: 0 !important;
  }
}

/* ============================================================
   PETS GRID — responsive fix
   ============================================================ */

.pets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .pets-grid {
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
  }
}

@media (max-width: 390px) {
  .pets-grid {
    grid-template-columns: 1fr 1fr;
    gap: .6rem;
  }
}

/* ============================================================
   ADMIN PAGES — dash-header action rows
   Fixes overflow on: clinics, vets, groomers, services, users
   ============================================================ */

@media (max-width: 768px) {
  /* Any dash-header with justify-content:space-between */
  .dash-header > div[style*="justify-content:space-between"],
  .dash-header > div[style*="justify-content: space-between"] {
    flex-wrap: wrap !important;
    gap: .6rem !important;
  }

  /* Action buttons inside dash-header */
  .dash-header .btn:not(.btn-sm) {
    font-size: .82rem;
    padding: .5rem .9rem;
  }
}

/* ============================================================
   FLOATING CHAT WIDGET — hide old AI FAB when widget is present
   ============================================================ */

/* Hide the standalone ai-fab now that the full widget exists */
.ai-fab { display: none !important; }

/* Widget toggle z-index — above bottom nav but below modals */
.pcai-toggle { z-index: 9999 !important; }
.pcai-widget { z-index: 9998 !important; }

/* On mobile: clear bottom nav + safe area */
@media (max-width: 768px) {
  /* Widget toggle sits above the mobile bottom nav bar */
  .pcai-toggle {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px) + .85rem) !important;
    right: 1rem !important;
    width: 46px !important;
    height: 46px !important;
    font-size: 1.05rem !important;
  }

  /* Widget panel — above the toggle button */
  .pcai-widget {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px) + 4.25rem) !important;
    right: .75rem !important;
    width: calc(100vw - 1.5rem) !important;
    max-height: 68vh !important;
    border-radius: 16px !important;
  }
}

/* PWA install banner — push above widget toggle on mobile */
@media (max-width: 768px) {
  #pwaInstallBanner {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px) + 4.75rem) !important;
  }
}

/* ============================================================
   MOBILE SIDEBAR — close button + widget conflict fix
   ============================================================ */

@media (max-width: 768px) {
  /* Show mobile close button on the sidebar header */
  .sidebar-header {
    position: relative;
  }

  /* Replace collapse btn with X on mobile */
  .sidebar-collapse-btn {
    display: flex !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    background: rgba(239,68,68,.1) !important;
    border: 1px solid rgba(239,68,68,.2) !important;
    color: var(--danger) !important;
    font-size: .8rem !important;
    flex-shrink: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
  }
  .sidebar-collapse-btn:hover {
    background: var(--danger) !important;
    color: #fff !important;
  }
  /* Show X icon, hide chevron on mobile */
  .sidebar-collapse-btn .fa-chevron-left::before {
    content: "\f00d" !important; /* fa-times */
  }

  /* Sidebar overlay — higher z-index to block content */
  .sidebar-overlay {
    z-index: 9998 !important;
  }

  /* Hide chat widget toggle when sidebar is open */
  body.sidebar-open .pcai-toggle,
  body.sidebar-open .pcai-widget {
    visibility: hidden !important;
    pointer-events: none !important;
  }

  /* Hide chat widget toggle when user dropdown is open (mobile) */
  body.udp-open .pcai-toggle,
  body.udp-open .pcai-widget {
    visibility: hidden !important;
    pointer-events: none !important;
  }

  /* Ensure sidebar is above everything on mobile */
  .sidebar {
    z-index: 9999 !important;
  }

  /* Prevent sidebar from taking full screen width */
  .sidebar {
    width: 280px !important;
    max-width: 85vw !important;
  }
}

/* Dark mode sidebar close button */
[data-theme="dark"] .sidebar-collapse-btn {
  background: rgba(239,68,68,.12) !important;
  border-color: rgba(239,68,68,.25) !important;
}

/* ============================================================
   PETCAREAI WIDGET — dark mode text visibility override
   Must come after all other rules to win specificity
   ============================================================ */

[data-theme="dark"] .pcai-input,
[data-theme="dark"] .pcai-widget input[type="text"] {
  background-color: #252838 !important;
  color: #E2E8F0 !important;
  -webkit-text-fill-color: #E2E8F0 !important; /* Safari/Chrome autofill fix */
  caret-color: #E2E8F0 !important;
}

[data-theme="dark"] .pcai-input::placeholder {
  color: #64748B !important;
  -webkit-text-fill-color: #64748B !important;
  opacity: 1 !important;
}

/* Light mode — ensure input text is always dark */
.pcai-input {
  color: #1E293B !important;
  caret-color: #5B5BD6;
}

.pcai-input::placeholder {
  color: #94A3B8 !important;
  opacity: 1;
}


/* ============================================================
   AUTH PAGES - Modern Design
   ============================================================ */

.auth-container {
  min-height: 100vh;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  position: relative;
  overflow: hidden;
}

/* Animated background pattern */
/* Animated background pattern — removed, using global paw pattern */
.auth-container::before { display: none; }

/* Floating orbs — removed */
.auth-container::after { display: none; }

.auth-card-wrapper {
  width: 100%;
  max-width: 460px;
  position: relative;
  z-index: 1;
  animation: authFadeIn 0.6s ease-out;
}

@keyframes authFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  animation: authLogoFloat 3s ease-in-out infinite;
}

@keyframes authLogoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.auth-logo-img {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.auth-logo-img:hover {
  transform: scale(1.05) rotate(-5deg);
}

.auth-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.auth-card-body {
  padding: 2.5rem;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
}

.auth-back-link {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-size: 1rem;
  transition: all 0.25s ease;
  text-decoration: none;
}

.auth-back-link:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateX(-3px);
}

.auth-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.auth-form {
  margin-bottom: 1.5rem;
}

.auth-form .form-group {
  margin-bottom: 1.4rem;
}

.auth-form .form-control {
  padding: 0.8rem 1rem;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.auth-form .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(30, 64, 255, 0.1);
  transform: translateY(-2px);
}

.auth-form .input-group .form-control {
  padding-right: 3rem;
}

.auth-link-right {
  text-align: right;
  margin-top: 0.6rem;
}

.auth-link-small {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--primary);
  transition: color 0.2s ease;
}

.auth-link-small:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.auth-submit-btn {
  margin-top: 0.5rem;
  padding: 0.95rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(30, 64, 255, 0.3);
  transition: all 0.3s ease;
}

.auth-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(30, 64, 255, 0.4);
}

.auth-submit-btn:active {
  transform: translateY(0);
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auth-link-bold {
  font-weight: 600;
  color: var(--primary);
  transition: color 0.2s ease;
}

.auth-link-bold:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Auth Page - Toggle Password Button */
.auth-form .toggle-pw {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 1rem;
  transition: color 0.2s ease;
  padding: 0.5rem;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  min-height: 2rem;
}

[data-theme="dark"] .auth-form .toggle-pw {
  color: #94a3b8;
}

.auth-form .toggle-pw:hover {
  color: var(--primary);
}

.auth-form .toggle-pw:active {
  transform: translateY(-50%) scale(0.95);
}

.auth-form .toggle-pw i {
  pointer-events: none;
}

/* Auth Page - Input Icons */
.auth-form .input-group-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  font-size: 0.95rem;
  z-index: 2;
}

[data-theme="dark"] .auth-form .input-group-icon {
  color: #94a3b8;
}

/* Auth Page - Alert Styling */
.auth-card .alert {
  border-radius: 12px;
  animation: authAlertSlide 0.4s ease-out;
}

@keyframes authAlertSlide {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .auth-container {
    padding: 2rem 1rem;
  }
  
  .auth-card-body {
    padding: 2rem 1.5rem;
  }
  
  .auth-title {
    font-size: 1.5rem;
  }
  
  .auth-subtitle {
    font-size: 0.875rem;
  }
  
  .auth-logo-img {
    width: 64px;
    height: 64px;
    border-radius: 16px;
  }
}

@media (max-width: 480px) {
  .auth-card-body {
    padding: 1.75rem 1.25rem;
  }
  
  .auth-title {
    font-size: 1.35rem;
  }
}


/* ============================================================
   AUTH PAGES — NEW COMPONENT CLASSES
   Covers: wider register card, forgot-link, nav links,
   ID upload grid + drop zones, register form fields,
   plus footer auth gap fix
   ============================================================ */

/* ── Wider card for register page ──────────────────────────── */
.auth-container--wide {
  align-items: flex-start; /* lets the taller card scroll naturally */
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.auth-card-wrapper--wide {
  max-width: 540px;
}

/* ── Register form select / input height ────────────────────── */
.reg-select,
.reg-input {
  height: 46px;
  border-radius: 10px;
}

/* ── ID Verification section ────────────────────────────────── */
.reg-id-section {
  border-top: 1px solid var(--border);
  margin: 1.25rem 0;
  padding-top: 1.25rem;
}

.reg-id-heading {
  font-size: .82rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: .9rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}

.reg-id-desc {
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* ── ID upload grid — 2 col on ≥ 400 px, stacks below ─────── */
.id-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}

@media (max-width: 420px) {
  .id-upload-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Individual upload slot ─────────────────────────────────── */
.id-upload-slot {
  display: flex;
  flex-direction: column;
}

.id-slot-label {
  font-size: .8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .4rem;
  display: flex;
  align-items: center;
  gap: .35rem;
}

/* ── Drop-zone box ──────────────────────────────────────────── */
.id-dropzone {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: 10px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
  overflow: hidden;
  flex: 1;
}

.id-dropzone:hover,
.id-dropzone:focus-within {
  border-color: var(--primary);
  background: rgba(30, 64, 255, .03);
}

/* Invisible full-cover file input */
.id-dropzone-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  font-size: 0; /* prevent iOS zoom */
}

/* Content shown before upload */
.id-dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  pointer-events: none;
  padding: .75rem;
  text-align: center;
}

.id-dropzone-content .fa-cloud-upload-alt {
  font-size: 1.6rem;
  opacity: .75;
  margin-bottom: .1rem;
}

.id-dropzone-cta {
  margin: 0;
  font-weight: 600;
  font-size: .8rem;
  color: var(--text);
}

.id-dropzone-hint {
  margin: 0;
  font-size: .72rem;
  color: var(--text-muted);
}

/* Preview image — hidden until file chosen */
.id-dropzone-preview {
  display: none;
  max-height: 110px;
  border-radius: 6px;
  object-fit: contain;
  padding: .35rem;
  width: 100%;
}

/* Upload note below the grid */
.id-upload-note {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: .5rem;
  line-height: 1.5;
}

/* ── Forgot-password link (login page) ──────────────────────── */
.auth-forgot-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 20px;
  padding: .28rem .75rem;
  background: rgba(255, 255, 255, .05);
  transition: color .2s ease, border-color .2s ease, background .2s ease;
  -webkit-tap-highlight-color: transparent;
}

.auth-forgot-link:hover,
.auth-forgot-link:focus-visible {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(99, 102, 241, .08);
}

/* ── Bottom nav links (login page — register + home) ─────────── */
.auth-nav-links {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.auth-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 20px;
  padding: .55rem 1.1rem;       /* taller = easier to tap on mobile */
  background: rgba(255, 255, 255, .04);
  transition: color .2s ease, border-color .2s ease, background .2s ease;
  width: 100%;
  min-height: 44px;             /* WCAG touch target */
  -webkit-tap-highlight-color: transparent;
}

.auth-nav-link:hover,
.auth-nav-link:focus-visible {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(99, 102, 241, .08);
}

.auth-nav-link strong {
  color: var(--primary);
  font-weight: 700;
  margin-left: .15rem;
}

/* ── Tighten card padding on small phones ───────────────────── */
@media (max-width: 480px) {
  .auth-container--wide {
    padding: 1.5rem .75rem;
  }

  .auth-card-wrapper--wide {
    max-width: 100%;
  }

  /* Reduce inner padding so content doesn't feel squished */
  .auth-card-body {
    padding: 1.5rem 1.1rem;
  }

  /* Stack the name row on very small phones */
  .auth-card-body .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* Make drop zones a bit taller when stacked */
  .id-upload-grid {
    grid-template-columns: 1fr;
  }

  .id-dropzone {
    min-height: 100px;
  }
}

/* ── Dark mode adjustments ──────────────────────────────────── */
[data-theme="dark"] .reg-id-section {
  border-top-color: var(--border);
}

[data-theme="dark"] .id-dropzone {
  border-color: var(--border);
  background: transparent;
}

[data-theme="dark"] .id-dropzone:hover,
[data-theme="dark"] .id-dropzone:focus-within {
  border-color: #818CF8;
  background: rgba(99, 102, 241, .06);
}

[data-theme="dark"] .id-dropzone-cta {
  color: var(--text);
}

[data-theme="dark"] .auth-forgot-link {
  border-color: rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .04);
}

[data-theme="dark"] .auth-forgot-link:hover {
  color: #A5B4FC;
  border-color: #818CF8;
  background: rgba(99, 102, 241, .1);
}

[data-theme="dark"] .auth-nav-link {
  border-color: rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .04);
}

[data-theme="dark"] .auth-nav-link:hover {
  color: #A5B4FC;
  border-color: #818CF8;
  background: rgba(99, 102, 241, .1);
}

[data-theme="dark"] .auth-nav-link strong {
  color: #A5B4FC;
}

/* ============================================================
   FOOTER — auth page layout gap fix
   On mobile the 5rem gap in the auth-only footer row
   collapses to a sensible value.
   ============================================================ */

/* The footer auth row uses an inline gap:5rem which overflows
   on phones. Override it at the container level on mobile.     */
@media (max-width: 768px) {
  .footer-top .container > div[style*="gap:5rem"],
  .footer-top .container > div[style*="gap: 5rem"] {
    gap: 1.5rem !important;
    justify-content: flex-start !important;
    flex-direction: column !important;
    align-items: flex-start !important;
  }
}

@media (max-width: 480px) {
  .footer-top .container > div[style*="gap:5rem"],
  .footer-top .container > div[style*="gap: 5rem"] {
    gap: 1.25rem !important;
  }
}

/* ── Footer auth-page row ────────────────────────────────────
   Replaces the inline gap:5rem flex row in footer.php
   ─────────────────────────────────────────────────────────── */
.footer-auth-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 4rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .footer-auth-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .footer-auth-row {
    gap: 1.25rem;
  }
}


/* ============================================================
   OTP UI — MOBILE-RESPONSIVE COMPONENT
   ============================================================ */

/* ── Label ───────────────────────────────────────────────── */
.otp-label {
  display: block;
  text-align: center;
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: .95rem;
}

/* ── 6-digit grid ────────────────────────────────────────── */
.otp-grid {
  display: flex;
  gap: .5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

/* ── Individual digit box ─────────────────────────────────
   Uses clamp() so each box stays proportional:
   - Minimum: 36px (very small phones like 320px)
   - Preferred: 11.5vw  (scales with viewport)
   - Maximum: 52px  (desktops / large screens)
   ──────────────────────────────────────────────────────── */
.otp-digit {
  /* sizing */
  width:  clamp(36px, 11.5vw, 52px);
  height: clamp(42px, 13.5vw, 58px);
  flex-shrink: 0;

  /* appearance */
  text-align: center;
  font-size: clamp(1.1rem, 4vw, 1.5rem);
  font-weight: 700;
  padding: 0;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--bg-card, var(--bg));
  color: var(--text);
  caret-color: var(--primary);
  transition: border-color .2s ease, box-shadow .2s ease, transform .15s ease;

  /* prevent browser auto-styling on mobile */
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}

.otp-digit:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 64, 255, .18);
  transform: translateY(-1px);
}

.otp-digit:not(:placeholder-shown) {
  border-color: var(--primary);
  background: rgba(30, 64, 255, .06);
}

/* ── Submit button ───────────────────────────────────────── */
.otp-submit {
  height: 50px;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* ── Resend row ──────────────────────────────────────────── */
.otp-resend-row {
  text-align: center;
  font-size: .875rem;
  color: var(--text-muted);
  margin-bottom: .5rem;
}

.otp-resend-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  font-size: .875rem;
  padding: 0;
  text-decoration: underline;
  -webkit-tap-highlight-color: transparent;
}

.otp-resend-btn:hover {
  color: var(--primary-dark, var(--primary));
}

/* ── Timer row ───────────────────────────────────────────── */
.otp-timer-row {
  text-align: center;
  color: var(--text-muted);
  font-size: .8rem;
  margin-top: .5rem;
}

.otp-timer-val {
  font-weight: 700;
  color: var(--warning);
}

.otp-timer-val.otp-timer-urgent,
.otp-timer-val.otp-timer-expired {
  color: var(--danger);
}

/* ── Back link ───────────────────────────────────────────── */
.otp-back-row {
  text-align: center;
  margin-top: .75rem;
}

.otp-back-link {
  font-size: .85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .2s ease;
  -webkit-tap-highlight-color: transparent;
  min-height: 44px; /* touch target */
  display: inline-flex;
  align-items: center;
}

.otp-back-link:hover {
  color: var(--primary);
}

/* ── Tight phones (≤ 360px) ──────────────────────────────── */
@media (max-width: 360px) {
  .otp-grid {
    gap: .35rem;
  }

  .otp-digit {
    border-radius: 8px;
  }

  .otp-label {
    font-size: .875rem;
  }
}

/* ── Dark mode ───────────────────────────────────────────── */
[data-theme="dark"] .otp-digit {
  background: rgba(255, 255, 255, .04);
  border-color: rgba(255, 255, 255, .15);
}

[data-theme="dark"] .otp-digit:focus {
  border-color: #818CF8;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, .2);
}

[data-theme="dark"] .otp-digit:not(:placeholder-shown) {
  border-color: #818CF8;
  background: rgba(99, 102, 241, .1);
}
[data-theme="dark"] .otp-digit:focus {
  border-color: #818CF8;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, .2);
}

[data-theme="dark"] .otp-digit:not(:placeholder-shown) {
  border-color: #818CF8;
  background: rgba(99, 102, 241, .1);
}


/* ============================================================
   PETLINK-STYLE ANIMATIONS
   Scroll-reveal · Marquee ticker · Paw particles · Staggered
   cards · Hover lifts · Section heading slide-in
   ============================================================ */

/* ── 1. Scroll-reveal base states ───────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.reveal--left  { transform: translateX(-50px); }
.reveal.reveal--right { transform: translateX(50px); }
.reveal.reveal--scale { transform: scale(0.88); }
.reveal.reveal--done  {
  opacity: 1 !important;
  transform: none !important;
}

/* Stagger delays for grids */
.reveal-stagger > *        { opacity: 0; transform: translateY(36px);
                              transition: opacity 0.6s cubic-bezier(0.22,1,0.36,1),
                                          transform 0.6s cubic-bezier(0.22,1,0.36,1); }
.reveal-stagger.reveal--done > *:nth-child(1) { opacity:1;transform:none;transition-delay:0.05s }
.reveal-stagger.reveal--done > *:nth-child(2) { opacity:1;transform:none;transition-delay:0.15s }
.reveal-stagger.reveal--done > *:nth-child(3) { opacity:1;transform:none;transition-delay:0.25s }
.reveal-stagger.reveal--done > *:nth-child(4) { opacity:1;transform:none;transition-delay:0.35s }
.reveal-stagger.reveal--done > *:nth-child(5) { opacity:1;transform:none;transition-delay:0.45s }
.reveal-stagger.reveal--done > *:nth-child(6) { opacity:1;transform:none;transition-delay:0.55s }

/* Section tag + heading combo slide-in */
.section-header .section-tag { opacity:0; transform:translateY(16px);
  transition:opacity .5s ease,transform .5s ease; }
.section-header h2            { opacity:0; transform:translateY(20px);
  transition:opacity .6s .1s ease,transform .6s .1s ease; }
.section-header p             { opacity:0; transform:translateY(20px);
  transition:opacity .6s .2s ease,transform .6s .2s ease; }
.section-header.reveal--done .section-tag,
.section-header.reveal--done h2,
.section-header.reveal--done p { opacity:1; transform:none; }

/* ── 2. Marquee / ticker strip ──────────────────────────── */
.marquee-strip {
  position: relative;
  z-index: 5;
  background: linear-gradient(90deg, var(--primary) 0%, #00D4AA 100%);
  overflow: hidden;
  padding: 0.6rem 0;
  white-space: nowrap;
}
.marquee-strip::before,
.marquee-strip::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.marquee-strip::before {
  left: 0;
  background: linear-gradient(90deg, var(--primary), transparent);
}
.marquee-strip::after {
  right: 0;
  background: linear-gradient(270deg, #00D4AA, transparent);
}

.marquee-track {
  display: inline-flex;
  animation: marqueeScroll 30s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0 2rem;
}
.marquee-item i {
  font-size: 0.9rem;
  opacity: 0.85;
}
.marquee-dot {
  display: inline-block;
  width: 5px; height: 5px;
  background: rgba(255,255,255,0.5);
  border-radius: 50%;
  margin: 0 0.25rem;
}

@keyframes marqueeScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── 3. Paw particles ───────────────────────────────────── */
.paw-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.paw-particle {
  position: absolute;
  font-size: 1.4rem;
  opacity: 0;
  animation: pawFloat var(--dur, 8s) var(--delay, 0s) ease-in-out infinite;
  color: rgba(255, 255, 255, 0.18);
  user-select: none;
}

@keyframes pawFloat {
  0%   { opacity: 0;    transform: translateY(20px) rotate(0deg)   scale(0.6); }
  15%  { opacity: 1; }
  85%  { opacity: 0.6; }
  100% { opacity: 0;    transform: translateY(-120px) rotate(25deg) scale(1.1); }
}

/* ── 4. Hover lifts & glows on cards ───────────────────── */
.feature-card {
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1),
              box-shadow 0.35s cubic-bezier(0.22,1,0.36,1);
  cursor: default;
}
.feature-card:hover {
  transform: translateY(-8px) scale(1.015);
  box-shadow: 0 20px 48px rgba(30, 64, 255, 0.13),
              0 4px 12px rgba(0,0,0,0.08);
}

.clinic-card {
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1),
              box-shadow 0.35s cubic-bezier(0.22,1,0.36,1) !important;
}
.clinic-card:hover {
  transform: translateY(-10px) scale(1.02) !important;
  box-shadow: 0 24px 56px rgba(30, 64, 255, 0.15),
              0 6px 16px rgba(0,0,0,0.09) !important;
}

.testimonial-card {
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1),
              box-shadow 0.35s ease,
              border-color 0.35s ease;
}
.testimonial-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 212, 170, 0.14);
  border-color: var(--secondary);
}

.ai-card {
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1),
              box-shadow 0.35s ease,
              background 0.35s ease;
}
.ai-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 48px rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.14);
}

/* ── 5. Step number bounce on hover ─────────────────────── */
.step-item {
  transition: transform 0.3s ease;
}
.step-item:hover { transform: translateY(-6px); }
.step-item:hover .step-number {
  animation: stepBounce 0.5s cubic-bezier(0.22,1,0.36,1);
}
@keyframes stepBounce {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.22); }
  70%  { transform: scale(0.92); }
  100% { transform: scale(1); }
}

/* ── 6. Navbar link underline sweep ─────────────────────── */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 2px;
  background: var(--secondary);
  border-radius: 2px;
  transition: width 0.3s cubic-bezier(0.22,1,0.36,1);
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

/* ── 7. CTA section pulse ring ──────────────────────────── */
.cta-pulse-wrap {
  position: relative;
  display: inline-block;
}
.cta-pulse-wrap::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  border: 2px solid rgba(255,255,255,0.4);
  animation: ctaPulseRing 2.4s ease-out infinite;
  pointer-events: none;
}
@keyframes ctaPulseRing {
  0%   { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0;   transform: scale(1.25); }
}

/* ── 8. About section stat counter pop ──────────────────── */
.stat-pop {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1),
              color 0.3s ease;
}
.stat-pop.counting { animation: statCount 0.4s cubic-bezier(0.22,1,0.36,1); }
@keyframes statCount {
  0%   { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* ── 9. Feature icon spin-in on hover ───────────────────── */
.feature-icon {
  transition: transform 0.5s cubic-bezier(0.22,1,0.36,1),
              box-shadow 0.3s ease;
}
.feature-card:hover .feature-icon {
  transform: rotate(10deg) scale(1.15);
  box-shadow: 0 8px 24px rgba(30,64,255,0.2);
}

/* ── 10. Reduce motion override ─────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > *,
  .section-header .section-tag,
  .section-header h2, .section-header p {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .marquee-track  { animation: none; }
  .paw-particle   { animation: none; opacity: 0; }
  .step-item:hover .step-number { animation: none; }
  .cta-pulse-wrap::before       { animation: none; }
}


/* ============================================================
   GLOBAL PAW + BONE BACKGROUND PATTERN
   Matches reference image: white base, large widely-spaced
   paw prints & diagonal bones in pale lavender-blue (#c8cfe8)
   at very low opacity — covers entire page via body
   ============================================================ */

/*
  SVG tile: 280×280px — large tile = widely spaced icons.
  Contains 2 paw prints (different sizes/rotations) and
  2 bones (different rotations) for the scattered random feel.
  Color: #b8c2de  (pale lavender-blue, matches reference)
  fill-opacity: 0.35 — very subtle, non-distracting
*/

/* duplicate removed — pattern lives on body at line ~48 */

/* Hero section has its own bg image — no override needed, keep existing background */
/* .hero-premium isolation ensures stacking context is clean */
.hero-premium {
  isolation: isolate;
}

/* paw-bg-wrap: no longer needed, kept as neutral passthrough */
.paw-bg-wrap { background: transparent; position: relative; }
.paw-bg-wrap::before { display: none; }
.paw-bg-wrap > * { position: relative; z-index: 1; }

/* Dark mode — keep same light paw pattern, just darken the base color */
[data-theme="dark"] body {
  background-color: #0d1424;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300' viewBox='0 0 300 300'%3E%3Cg fill='%23b8c2de' fill-opacity='0.38'%3E%3Cg transform='translate(55,70)'%3E%3Cellipse cx='0' cy='13' rx='14' ry='11'/%3E%3Ccircle cx='-15' cy='-3' r='7'/%3E%3Ccircle cx='-4' cy='-11' r='7'/%3E%3Ccircle cx='8' cy='-10' r='7'/%3E%3Ccircle cx='17' cy='-1' r='6.5'/%3E%3C/g%3E%3Cg transform='translate(210,55) rotate(35)'%3E%3Crect x='-18' y='-4' width='36' height='8' rx='3'/%3E%3Ccircle cx='-18' cy='-7' r='6'/%3E%3Ccircle cx='-18' cy='7' r='6'/%3E%3Ccircle cx='18' cy='-7' r='6'/%3E%3Ccircle cx='18' cy='7' r='6'/%3E%3C/g%3E%3Cg transform='translate(225,210) rotate(-15)'%3E%3Cellipse cx='0' cy='12' rx='13' ry='10'/%3E%3Ccircle cx='-14' cy='-2' r='6.5'/%3E%3Ccircle cx='-4' cy='-10' r='6.5'/%3E%3Ccircle cx='8' cy='-9' r='6.5'/%3E%3Ccircle cx='16' cy='0' r='6'/%3E%3C/g%3E%3Cg transform='translate(60,225) rotate(-50)'%3E%3Crect x='-16' y='-3.5' width='32' height='7' rx='2.5'/%3E%3Ccircle cx='-16' cy='-6.5' r='5.5'/%3E%3Ccircle cx='-16' cy='6.5' r='5.5'/%3E%3Ccircle cx='16' cy='-6.5' r='5.5'/%3E%3Ccircle cx='16' cy='6.5' r='5.5'/%3E%3C/g%3E%3Cg transform='translate(148,148) rotate(12)'%3E%3Cellipse cx='0' cy='9' rx='10' ry='8'/%3E%3Ccircle cx='-11' cy='-2' r='5'/%3E%3Ccircle cx='-3' cy='-9' r='5'/%3E%3Ccircle cx='7' cy='-8' r='5'/%3E%3Ccircle cx='13' cy='1' r='4.5'/%3E%3C/g%3E%3Cg transform='translate(245,148) rotate(20)'%3E%3Crect x='-15' y='-3' width='30' height='6' rx='2'/%3E%3Ccircle cx='-15' cy='-6' r='5'/%3E%3Ccircle cx='-15' cy='6' r='5'/%3E%3Ccircle cx='15' cy='-6' r='5'/%3E%3Ccircle cx='15' cy='6' r='5'/%3E%3C/g%3E%3Cg transform='translate(18,155) rotate(-70)'%3E%3Crect x='-14' y='-3' width='28' height='6' rx='2'/%3E%3Ccircle cx='-14' cy='-6' r='5'/%3E%3Ccircle cx='-14' cy='6' r='5'/%3E%3Ccircle cx='14' cy='-6' r='5'/%3E%3Ccircle cx='14' cy='6' r='5'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 300px 300px;
  background-attachment: fixed;
}

/* Responsive: slightly smaller tile on mobile so spacing stays proportional */
@media (max-width: 768px) {
  body {
    background-size: 200px 200px;
  }
  [data-theme="dark"] body {
    background-size: 200px 200px;
  }
}


/* ============================================================
   FORCE TEXT COLORS — light = pure black, dark = pure white
   ============================================================ */

/* Light mode text colors */
body {
  color: var(--text);
}

/* Dark mode text colors */
[data-theme="dark"] body {
  color: var(--text);
}

/* Ensure all headings and paragraphs use proper color variables */
h1, h2, h3, h4, h5, h6 {
  color: var(--text);
}

/* ============================================================
   CURSIVE TYPOGRAPHY ENHANCEMENTS
   Elegant handwritten style for main headings
   ============================================================ */

/* Main hero and section headings use cursive font */
.hero-premium-heading,
.hero-heading-line,
.hero-heading-accent-inline,
.section-header h2,
.nav-logo {
  font-family: 'Space Grotesk', sans-serif !important;
  font-weight: 500;
  letter-spacing: -0.01em;
  /* Improved rendering for cursive fonts */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
}

/* Keep UI elements, cards, and body text clean and readable */
body, p, span, a, button,
.feature-card h3,
.card-header h3,
.clinic-card-title,
.dash-header h1,
.sidebar-link-text,
.btn, .nav-links,
.form-control, label,
.table, .modal,
.section-tag,
.hero-premium-desc,
.section-header p {
  font-family: 'Space Grotesk', sans-serif !important;
}

/* Subtle text shadow for cursive headings to add depth */
.hero-premium-heading,
.section-header h2 {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .section-header h2 {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

p {
  color: var(--text-muted);
}

/* End of main.css */

/* Light theme: keep labels readable on filled action buttons. */
[data-theme="light"] a.btn-primary,
[data-theme="light"] button.btn-primary,
[data-theme="light"] .btn-primary,
:root:not([data-theme="dark"]) a.btn-primary,
:root:not([data-theme="dark"]) button.btn-primary,
:root:not([data-theme="dark"]) .btn-primary,
[data-theme="light"] a.btn-secondary,
[data-theme="light"] button.btn-secondary,
[data-theme="light"] .btn-secondary,
:root:not([data-theme="dark"]) a.btn-secondary,
:root:not([data-theme="dark"]) button.btn-secondary,
:root:not([data-theme="dark"]) .btn-secondary,
[data-theme="light"] a.btn-danger,
[data-theme="light"] button.btn-danger,
[data-theme="light"] .btn-danger,
:root:not([data-theme="dark"]) a.btn-danger,
:root:not([data-theme="dark"]) button.btn-danger,
:root:not([data-theme="dark"]) .btn-danger,
[data-theme="light"] a.btn-success,
[data-theme="light"] button.btn-success,
[data-theme="light"] .btn-success,
:root:not([data-theme="dark"]) a.btn-success,
:root:not([data-theme="dark"]) button.btn-success,
:root:not([data-theme="dark"]) .btn-success,
[data-theme="light"] a.btn-info,
[data-theme="light"] button.btn-info,
[data-theme="light"] .btn-info,
:root:not([data-theme="dark"]) a.btn-info,
:root:not([data-theme="dark"]) button.btn-info,
:root:not([data-theme="dark"]) .btn-info {
  color: #fff !important;
}

[data-theme="light"] a.btn-outline,
[data-theme="light"] button.btn-outline,
:root:not([data-theme="dark"]) a.btn-outline,
:root:not([data-theme="dark"]) button.btn-outline {
  color: #4F46E5;
}

@media (max-width: 768px) {
  .pcai-widget {
    height: min(70vh, 620px) !important;
    bottom: calc(64px + env(safe-area-inset-bottom, 0px) + .75rem) !important;
  }
}

/* Clinic directory filters: preserve comfortable inputs on tablet and mobile. */
@media (max-width: 900px) {
  .clinic-filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 520px) {
  .clinic-filter-form { grid-template-columns: 1fr !important; }
  .clinic-filter-form > button { width: 100%; justify-content: center; }
}


/* ============================================================
   AUTH PAGE ANIMATIONS
   ============================================================ */

/* 1. Card slides up + fades in on load */
@keyframes authCardEntrance {
  from {
    opacity: 0;
    transform: translateY(32px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 2. Logo bounce on load */
@keyframes authLogoBounce {
  0%   { transform: translateY(-20px) scale(0.85); opacity: 0; }
  55%  { transform: translateY(5px) scale(1.05); opacity: 1; }
  75%  { transform: translateY(-4px) scale(0.98); }
  90%  { transform: translateY(2px) scale(1.01); }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* 3. Field stagger slide-in */
@keyframes authFieldIn {
  from {
    opacity: 0;
    transform: translateX(-14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 4. Shake on error */
@keyframes authCardShake {
  0%, 100% { transform: translateX(0); }
  15%       { transform: translateX(-8px); }
  30%       { transform: translateX(8px); }
  45%       { transform: translateX(-6px); }
  60%       { transform: translateX(6px); }
  75%       { transform: translateX(-3px); }
  90%       { transform: translateX(3px); }
}

/* 5. Button ripple press */
@keyframes authBtnPulse {
  0%   { box-shadow: 0 0 0 0 rgba(30, 64, 255, 0.45); }
  70%  { box-shadow: 0 0 0 12px rgba(30, 64, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(30, 64, 255, 0); }
}

/* Apply animations */
.auth-logo {
  animation: authLogoBounce 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-card {
  animation: authCardEntrance 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.auth-card.auth-card--shake {
  animation: authCardShake 0.5s ease;
}

/* Stagger each form-group inside the card */
.auth-card .form-group:nth-child(1) { animation: authFieldIn 0.4s ease 0.25s both; }
.auth-card .form-group:nth-child(2) { animation: authFieldIn 0.4s ease 0.35s both; }
.auth-card .form-group:nth-child(3) { animation: authFieldIn 0.4s ease 0.45s both; }
.auth-card .form-group:nth-child(4) { animation: authFieldIn 0.4s ease 0.55s both; }
.auth-card .form-group:nth-child(5) { animation: authFieldIn 0.4s ease 0.65s both; }
.auth-card .form-group:nth-child(6) { animation: authFieldIn 0.4s ease 0.75s both; }

/* Input focus glow */
.auth-card .form-control:focus {
  box-shadow: 0 0 0 3px rgba(30, 64, 255, 0.18), 0 1px 4px rgba(30, 64, 255, 0.12);
  border-color: var(--primary);
}

/* Submit button pulse on click */
.auth-submit-btn {
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

.auth-submit-btn:active {
  transform: scale(0.97);
  animation: authBtnPulse 0.5s ease;
}

/* Auth container center layout (used by login/register) */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-container--wide {
  align-items: flex-start;
  padding-top: 2.5rem;
}

.auth-card-wrapper {
  width: 100%;
  max-width: 480px;
}

.auth-card-wrapper--wide {
  max-width: 640px;
}

.auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.auth-logo-img {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 8px 32px rgba(30, 64, 255, 0.2);
}

.auth-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
  color: var(--text);
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.auth-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-link-bold {
  font-weight: 700;
  color: var(--primary);
}

.auth-nav-link {
  font-size: .85rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  transition: color .2s;
}
.auth-nav-link:hover { color: var(--primary); }


/* ============================================================
   PREMIUM OTP VERIFICATION COMPONENT
   PetCare+ — Animated OTP UI
   ============================================================ */

/* ── Wrap ──────────────────────────────────────────────────── */
.otp-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 2rem 1.5rem 1.75rem;
  animation: authCardEntrance 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

/* ── Header ────────────────────────────────────────────────── */
.otp-header {
  text-align: center;
  margin-bottom: 2rem;
  animation: authFieldIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

.otp-icon-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
}

.otp-icon-inner {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(30,64,255,0.15), rgba(0,212,170,0.15));
  border: 1px solid rgba(30,64,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--primary);
  position: relative;
  z-index: 1;
  animation: authLogoBounce 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

.otp-icon-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 26px;
  border: 1.5px solid rgba(30,64,255,0.25);
  animation: otpIconPulse 2.4s ease-in-out infinite;
}

@keyframes otpIconPulse {
  0%, 100% { transform: scale(1);    opacity: 0.6; }
  50%       { transform: scale(1.1); opacity: 0;   }
}

.otp-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(30,64,255,0.08);
  border: 1px solid rgba(30,64,255,0.18);
  border-radius: 50px;
  padding: 0.2rem 0.75rem;
  display: inline-block;
  margin-bottom: 0.65rem;
}

.otp-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.45rem;
  line-height: 1.25;
}

.otp-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.otp-email-highlight {
  color: var(--primary);
  font-weight: 600;
}

/* ── Orbit ring ────────────────────────────────────────────── */
.otp-boxes-outer {
  position: relative;
  padding: 18px;
  margin-bottom: 1.5rem;
}

/* ── OTP Boxes ─────────────────────────────────────────────── */
.otp-boxes {
  display: flex;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.otp-box {
  position: relative;
  width: 52px;
  height: 60px;
  flex-shrink: 0;
  animation: otpBoxEntrance 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.otp-box:nth-child(1) { animation-delay: 0.10s; }
.otp-box:nth-child(2) { animation-delay: 0.16s; }
.otp-box:nth-child(3) { animation-delay: 0.22s; }
.otp-box:nth-child(4) { animation-delay: 0.28s; }
.otp-box:nth-child(5) { animation-delay: 0.34s; }
.otp-box:nth-child(6) { animation-delay: 0.40s; }

@keyframes otpBoxEntrance {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.88);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.otp-digit {
  width: 100%;
  height: 100%;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  caret-color: var(--primary);
  outline: none;
  transition:
    border-color 0.2s ease,
    background   0.2s ease,
    box-shadow   0.2s ease,
    transform    0.15s ease;
  position: relative;
  z-index: 2;
  -moz-appearance: textfield;
  appearance: textfield;
}

.otp-digit::-webkit-outer-spin-button,
.otp-digit::-webkit-inner-spin-button { 
  -webkit-appearance: none;
  appearance: none;
}

/* Underline accent */
.otp-box-underline {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 3;
  pointer-events: none;
}

/* Glow layer */
.otp-box-glow {
  position: absolute;
  inset: -1px;
  border-radius: 15px;
  opacity: 0;
  transition: opacity 0.25s ease;
  box-shadow: 0 0 0 3px rgba(30,64,255,0.18), 0 4px 20px rgba(30,64,255,0.12);
  pointer-events: none;
  z-index: 1;
}

/* Focus state */
.otp-box--focus .otp-digit {
  border-color: var(--primary);
  background: rgba(30,64,255,0.04);
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 4px 20px rgba(30,64,255,0.15);
}

.otp-box--focus .otp-box-underline {
  transform: translateX(-50%) scaleX(1);
}

.otp-box--focus .otp-box-glow {
  opacity: 1;
}

/* Filled state */
.otp-box--filled .otp-digit {
  border-color: rgba(30,64,255,0.4);
  background: rgba(30,64,255,0.06);
  color: var(--text);
}

.otp-box--filled .otp-box-underline {
  transform: translateX(-50%) scaleX(1);
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

/* Complete (all filled) wave */
.otp-box--complete .otp-digit {
  border-color: var(--secondary);
  background: rgba(0,212,170,0.08);
  box-shadow: 0 4px 20px rgba(0,212,170,0.18);
}

.otp-box--complete .otp-box-underline {
  background: var(--secondary);
  transform: translateX(-50%) scaleX(1);
}

/* Digit pop-in animation */
.otp-digit-pop .otp-digit,
.otp-box.otp-digit-pop .otp-digit {
  animation: otpDigitPop 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes otpDigitPop {
  0%   { transform: scale(0.65) translateY(4px); opacity: 0; filter: blur(3px); }
  60%  { transform: scale(1.08) translateY(-1px); opacity: 1; filter: blur(0); }
  80%  { transform: scale(0.97) translateY(0); }
  100% { transform: scale(1)    translateY(0); opacity: 1; filter: blur(0); }
}

/* Shake on wrong OTP */
.otp-boxes--shake {
  animation: otpShake 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes otpShake {
  0%, 100% { transform: translateX(0); }
  15%       { transform: translateX(-7px); }
  30%       { transform: translateX(7px); }
  45%       { transform: translateX(-5px); }
  60%       { transform: translateX(5px); }
  75%       { transform: translateX(-2px); }
  90%       { transform: translateX(2px); }
}

/* ── Submit Button ─────────────────────────────────────────── */
.otp-btn {
  width: 100%;
  padding: 0.95rem 1.5rem;
  border-radius: 50px;
  border: none;
  background: linear-gradient(135deg, #1E40FF, #3b5bff);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  position: relative;
  overflow: hidden;
  transition:
    opacity     0.3s ease,
    transform   0.2s ease,
    box-shadow  0.3s ease,
    background  0.3s ease;
  opacity: 0.45;
  pointer-events: none;
  animation: authFieldIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.55s both;
}

.otp-btn--ready {
  opacity: 1;
  pointer-events: all;
  box-shadow: 0 8px 28px rgba(30,64,255,0.35);
  animation: otpBtnReady 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes otpBtnReady {
  0%   { transform: scale(0.97); }
  60%  { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.otp-btn--ready:hover {
  background: linear-gradient(135deg, #1530CC, #2a4bff);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(30,64,255,0.42);
}

.otp-btn--ready:active {
  transform: scale(0.97) translateY(0);
}

/* Shimmer sweep */
.otp-btn-shimmer {
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.18) 50%,
    transparent 100%
  );
  transform: skewX(-20deg);
  transition: none;
}

.otp-btn--ready:hover .otp-btn-shimmer {
  animation: otpShimmer 0.65s ease forwards;
}

@keyframes otpShimmer {
  from { left: -75%; }
  to   { left: 130%;  }
}

/* ── Footer rows ───────────────────────────────────────────── */
.otp-footer-row {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 1.1rem;
  animation: authFieldIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.65s both;
}

.otp-resend-text {
  margin-right: 0.3rem;
}

.otp-resend-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  opacity: 0.35;
  pointer-events: none;
  transition: opacity 0.2s ease, color 0.2s ease;
  padding: 0;
}

.otp-resend-btn--active {
  opacity: 1;
  pointer-events: all;
}

.otp-resend-btn--active:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.otp-timer-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
  animation: authFieldIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.72s both;
}

.otp-timer-icon { font-size: 0.75rem; }

.otp-timer-val {
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  transition: color 0.3s ease;
}

.otp-timer-val.otp-timer-urgent  { color: var(--warning); }
.otp-timer-val.otp-timer-expired { color: var(--danger);  }

.otp-back-row {
  text-align: center;
  margin-top: 0.85rem;
}

.otp-back-link {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.2s;
}
.otp-back-link:hover { color: var(--primary); }

/* ── Success overlay ───────────────────────────────────────── */
.otp-success-overlay {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: var(--card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.otp-success-overlay--visible {
  opacity: 1;
  pointer-events: all;
}

.otp-success-ring {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 2px solid rgba(0,212,170,0.3);
  position: absolute;
  animation: otpSuccessRingPop 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes otpSuccessRingPop {
  0%   { transform: scale(0.5); opacity: 0; }
  60%  { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.otp-success-check {
  width: 72px;
  height: 72px;
  color: var(--secondary);
  position: relative;
  z-index: 1;
  animation: otpSuccessCheckPop 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

@keyframes otpSuccessCheckPop {
  0%   { transform: scale(0.6) rotate(-15deg); opacity: 0; }
  70%  { transform: scale(1.05) rotate(2deg);  opacity: 1; }
  100% { transform: scale(1)    rotate(0deg);  opacity: 1; }
}

.otp-check-circle {
  stroke-dasharray: 157;
  stroke-dashoffset: 157;
  animation: otpDrawCircle 0.55s ease 0.15s forwards;
}

@keyframes otpDrawCircle {
  to { stroke-dashoffset: 0; }
}

.otp-check-path {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: otpDrawCheck 0.35s ease 0.55s forwards;
}

@keyframes otpDrawCheck {
  to { stroke-dashoffset: 0; }
}

.otp-success-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 1.5rem;
  animation: authFieldIn 0.4s ease 0.6s both;
}

/* ── Dark mode overrides ───────────────────────────────────── */
[data-theme="dark"] .otp-digit {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.10);
  color: #fff;
}

[data-theme="dark"] .otp-box--focus .otp-digit {
  background: rgba(30,64,255,0.10);
  border-color: rgba(99,102,241,0.7);
  box-shadow: 0 4px 20px rgba(30,64,255,0.25);
}

[data-theme="dark"] .otp-box--filled .otp-digit {
  background: rgba(30,64,255,0.10);
  border-color: rgba(99,102,241,0.45);
}

[data-theme="dark"] .otp-box--complete .otp-digit {
  background: rgba(0,212,170,0.10);
  border-color: rgba(0,212,170,0.5);
}

[data-theme="dark"] .otp-sms-card {
  background: #1C1F2A;
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

[data-theme="dark"] .otp-success-overlay {
  background: #1C1F2A;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 480px) {
  .otp-box  { width: 44px; height: 54px; }
  .otp-digit { font-size: 1.3rem; border-radius: 12px; }
  .otp-boxes { gap: 7px; }
  .otp-boxes-outer { padding: 14px; }
  .otp-btn  { font-size: 0.95rem; padding: 0.85rem 1.25rem; }
}

@media (max-width: 360px) {
  .otp-box  { width: 38px; height: 48px; }
  .otp-digit { font-size: 1.15rem; border-radius: 10px; }
  .otp-boxes { gap: 5px; }
}

/* --- Modern Premium Enhancements --- */
.card { transition: all var(--transition); border: 1px solid rgba(0,0,0,0.05); }
[data-theme='dark'] .card { border-color: rgba(255,255,255,0.05); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.glass { background: var(--glass-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--glass-border); box-shadow: var(--shadow); }




/* ============================================================
   DISABLE HOVER EFFECT ON LOGIN BUTTON
   ============================================================ */
.nav-actions > a.btn-outline:hover,
.mobile-menu-auth a.btn-outline:hover {
  background: transparent !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
  transform: none !important;
}

/* Dark mode */
[data-theme="dark"] .nav-actions > a.btn-outline:hover,
[data-theme="dark"] .mobile-menu-auth a.btn-outline:hover {
  background: transparent !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

/* Hero page (navbar on hero) */
.navbar.on-hero-top .nav-actions > a.btn-outline:hover {
  background: transparent !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.7) !important;
  transform: none !important;
}


/* Public site footer */
html body .site-footer { background:#101522; color:#eef2f8; border-top:1px solid #ffffff12; }
html[data-theme="dark"] body .site-footer { background:#0c101a; }
.site-footer .site-footer-inner { max-width:1200px; }
.site-footer-main { display:grid; grid-template-columns:minmax(0,1.7fr) minmax(0,1fr) minmax(0,1.1fr); gap:56px; padding:44px 0 36px; }
.site-footer-brand { min-width:0; }
html body .site-footer-logo { display:inline-flex; align-items:center; gap:10px; color:#f8fafc; font-size:1.45rem; font-weight:700; text-decoration:none; letter-spacing:-.04em; }
.site-footer-mark { width:38px; height:38px; display:flex; align-items:center; justify-content:center; border-radius:12px; background:#22b8e51a; color:#38bdf8; font-size:1.1rem; }
.site-footer-plus { color:#38bdf8; margin-left:2px; }
.site-footer-brand>p { color:#a4afc1; font-size:.8rem; line-height:1.8; max-width:365px; margin:16px 0 14px; }
.site-footer-location { display:inline-flex; align-items:center; gap:7px; color:#8796ad; font-size:.7rem; }
.site-footer-location i { color:#7c8da8; }
.site-footer-nav { display:flex; flex-direction:column; align-items:flex-start; gap:11px; padding-top:6px; min-width:0; }
html body .site-footer-nav h2 { color:#f1f5f9; font-size:.8rem; font-weight:600; margin:0 0 6px; }
html body .site-footer-nav a { color:#aeb9cb; font-size:.77rem; text-decoration:none; line-height:1.6; }
.site-footer-nav a i { font-size:.6rem; margin-left:5px; }
.site-footer-nav p { color:#8796ad; font-size:.73rem; line-height:1.75; margin:0; }
.site-footer-bottom { display:flex; align-items:center; justify-content:space-between; gap:16px; border-top:1px solid #ffffff12; padding:20px 0 24px; }
.site-footer-bottom p { font-size:.68rem; color:#92a0b5; margin:0; }
.site-footer-bottom nav { display:flex; flex-wrap:wrap; gap:24px; }
html body .site-footer-bottom a { color:#a4afc1; font-size:.68rem; text-decoration:none; }
html body .site-footer a:hover { color:#fff; }
.site-footer a:focus-visible { outline:2px solid #7dd3fc; outline-offset:5px; border-radius:3px; }
@media(max-width:768px) { .site-footer-main { grid-template-columns:1fr 1fr; gap:28px; padding:32px 0; } .site-footer-brand { grid-column:1/-1; } .site-footer-brand>p { max-width:440px; } .site-footer-bottom { align-items:flex-start; flex-direction:column; gap:12px; padding-bottom:28px; } }
@media(max-width:380px) { .site-footer-main { grid-template-columns:1fr; gap:24px; } .site-footer-brand { grid-column:auto; } }
