/* ==========================================================================
   MEDICONNECT MODERN DESIGN SYSTEM & GLOBAL STYLING
   Aesthetic: High-End Indian Startup (Practo + CRED + Apollo 24/7)
   Theme: Vibrant Teal, Trust Blue, Soft Gradients, Premium Typography
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. VARIABLES & SYSTEM TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Brand Palette */
  --teal-50: #f0fdfa;
  --teal-100: #ccfbf1;
  --teal-200: #99f6e4;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  --teal-700: #0f766e;
  
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-900: #1e3a8a;
  
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-900: #0f172a;
  
  /* Status Colors */
  --emerald-50: #ecfdf5;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --amber-500: #f59e0b;
  --rose-500: #f43f5e;
  
  /* Background / Surface */
  --bg-app: #f5f8fa;
  --surface-card: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.75);
  --border-glass: rgba(255, 255, 255, 0.4);
  
  /* Typography */
  --font-header: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  /* Shadows & Elevations (Premium CRED/Practo style) */
  --shadow-sm: 0 2px 8px rgba(13, 148, 136, 0.04);
  --shadow-md: 0 10px 30px -10px rgba(15, 23, 42, 0.05), 0 4px 12px -2px rgba(13, 148, 136, 0.03);
  --shadow-lg: 0 20px 40px -15px rgba(15, 23, 42, 0.08), 0 8px 16px -4px rgba(13, 148, 136, 0.04);
  --shadow-card-glow: 0 20px 35px -10px rgba(13, 148, 136, 0.25);
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  
  /* Max width constraints for app */
  --app-max-width: 1200px;
}

/* --------------------------------------------------------------------------
   2. GLOBAL RESETS & SCROLLBARS
   -------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-app);
  color: var(--slate-700);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  font-size: 15px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-header);
  color: var(--slate-900);
  font-weight: 700;
}

a {
  text-decoration: none;
  color: inherit;
}

button, input, select {
  font-family: inherit;
  border: none;
  outline: none;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--slate-50);
}
::-webkit-scrollbar-thumb {
  background: var(--slate-300);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--teal-500);
}

/* --------------------------------------------------------------------------
   3. LAYOUT WRAPPERS & STICKY CONTAINERS
   -------------------------------------------------------------------------- */
.app-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Responsive constraints for desktop visual appeal */
.navbar-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  transition: all 0.3s ease;
}

.navbar-container {
  max-width: var(--app-max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--teal-500), var(--blue-600));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 10px rgba(13, 148, 136, 0.2);
}
.logo-text {
  font-size: 22px;
  font-family: var(--font-header);
  font-weight: 800;
  background: linear-gradient(135deg, var(--teal-600), var(--blue-900));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav-link {
  font-weight: 600;
  color: var(--slate-600);
  transition: color 0.2s ease;
  cursor: pointer;
  font-size: 14px;
}
.nav-link:hover, .nav-link.active {
  color: var(--teal-600);
}

.nav-cta {
  background: linear-gradient(135deg, var(--teal-600), var(--blue-600));
  color: white;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  font-size: 14px;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(13, 148, 136, 0.15);
}

.app-content {
  flex: 1;
  width: 100%;
  max-width: var(--app-max-width);
  margin: 0 auto;
  padding: 24px 24px 80px 24px;
}

/* --------------------------------------------------------------------------
   4. COMPONENT: BUTTONS & ACCENTS
   -------------------------------------------------------------------------- */
.btn-primary {
  background: linear-gradient(135deg, var(--teal-600), var(--blue-600));
  color: white;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 15px;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-glow);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--surface-card);
  border: 2px solid var(--teal-100);
  color: var(--teal-700);
  font-weight: 700;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  font-size: 15px;
}
.btn-secondary:hover {
  background: var(--teal-50);
  border-color: var(--teal-500);
  color: var(--teal-600);
  transform: translateY(-1px);
}

/* Badge accents */
.badge-discount {
  background: var(--teal-50);
  color: var(--teal-600);
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--teal-100);
}

/* --------------------------------------------------------------------------
   5. SCREEN: LANDING PAGE & PRICING
   -------------------------------------------------------------------------- */
.landing-hero {
  text-align: center;
  padding: 60px 20px 80px 20px;
  background: radial-gradient(100% 100% at 50% 0%, var(--teal-50) 0%, rgba(255, 255, 255, 0) 100%);
  position: relative;
}
.landing-hero::before {
  content: '';
  position: absolute;
  top: -10%;
  left: 20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}
.hero-tag {
  background: var(--blue-50);
  color: var(--blue-600);
  font-weight: 700;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.landing-hero h1 {
  font-size: 54px;
  line-height: 1.15;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--slate-900) 40%, var(--blue-900) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1px;
}
.landing-hero p {
  font-size: 18px;
  color: var(--slate-600);
  max-width: 650px;
  margin: 0 auto 36px auto;
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Membership Stepper */
.section-title {
  text-align: center;
  margin-bottom: 40px;
}
.section-title h2 {
  font-size: 32px;
  margin-bottom: 12px;
}
.section-title p {
  color: var(--slate-600);
  font-size: 16px;
}

.stepper-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 60px 0 100px 0;
}
.step-card {
  background: var(--surface-card);
  padding: 30px 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--slate-100);
  position: relative;
  transition: all 0.3s ease;
}
.step-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--teal-100);
}
.step-number {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--teal-50);
  color: var(--teal-600);
  font-family: var(--font-header);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 20px;
}
.step-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}
.step-card p {
  font-size: 14px;
  color: var(--slate-600);
  line-height: 1.5;
}

/* Pricing Grid */
.pricing-section {
  padding: 40px 0 80px 0;
}
.pricing-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: 800px;
  margin: 0 auto;
}
.pricing-card {
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--slate-100);
  position: relative;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.pricing-card.premium-glow {
  border-color: var(--teal-500);
  box-shadow: var(--shadow-lg);
}
.pricing-card.premium-glow::before {
  content: 'BEST VALUE';
  position: absolute;
  top: -14px;
  right: 28px;
  background: linear-gradient(135deg, var(--teal-600), var(--blue-600));
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.8px;
}
.pricing-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.pricing-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 12px;
}
.pricing-price {
  font-size: 42px;
  font-family: var(--font-header);
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 24px;
  display: flex;
  align-items: baseline;
}
.pricing-price span {
  font-size: 15px;
  color: var(--slate-600);
  font-weight: 500;
  margin-left: 4px;
}
.pricing-features {
  list-style: none;
  margin-bottom: 36px;
  flex: 1;
}
.pricing-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 14.5px;
  color: var(--slate-700);
}
.pricing-feature i {
  color: var(--teal-600);
  flex-shrink: 0;
}
.pricing-card button {
  width: 100%;
}

/* --------------------------------------------------------------------------
   6. SCREEN: NEARBY DOCTORS & MAP
   -------------------------------------------------------------------------- */
.doctors-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 24px;
  height: calc(100vh - 180px);
  min-height: 550px;
}

.search-sidebar {
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--slate-200);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--slate-100);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sidebar-header h2 {
  font-size: 20px;
}
.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.search-input-wrapper i {
  position: absolute;
  left: 12px;
  color: var(--slate-600);
}
.search-input-wrapper input {
  width: 100%;
  padding: 12px 12px 12px 38px;
  background: var(--slate-50);
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: all 0.2s ease;
}
.search-input-wrapper input:focus {
  border-color: var(--teal-500);
  background: white;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

.filters-row {
  display: flex;
  gap: 8px;
}
.filter-select {
  flex: 1;
  padding: 10px;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-sm);
  background: var(--slate-50);
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-700);
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-select:focus {
  border-color: var(--teal-500);
  background: white;
}

.doctors-list {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Doctor card inside list */
.doctor-card {
  background: var(--surface-card);
  border: 1.5px solid var(--slate-100);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}
.doctor-card:hover, .doctor-card.active {
  border-color: var(--teal-500);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.doctor-card.active {
  background: var(--teal-50) / 10%;
  border-width: 2px;
}
.doc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}
.doc-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--slate-900);
}
.doc-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--amber-500);
}
.doc-specialty {
  font-size: 13px;
  color: var(--teal-600);
  font-weight: 600;
  margin-bottom: 8px;
}
.doc-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--slate-600);
  margin-bottom: 12px;
}
.doc-detail-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.doc-detail-item i {
  font-size: 14px;
  color: var(--slate-400);
}
.doc-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.btn-directions {
  background: var(--slate-100);
  color: var(--slate-700);
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}
.btn-directions:hover {
  background: var(--blue-50);
  color: var(--blue-600);
}

/* Map canvas container */
.map-canvas-container {
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--slate-200);
  overflow: hidden;
  position: relative;
}
.map-canvas {
  width: 100%;
  height: 100%;
  background: #e5e9f0;
  position: relative;
}
.map-placeholder-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

/* Custom interactive elements on map */
.map-pin {
  position: absolute;
  width: 32px;
  height: 32px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 10;
  border: 2px solid var(--teal-600);
  transform: translate(-50%, -50%);
}
.map-pin:hover, .map-pin.active {
  transform: translate(-50%, -50%) scale(1.2);
  z-index: 20;
  background: var(--teal-600);
  color: white;
}
.map-pin i {
  font-size: 14px;
}
.map-pin.active {
  background: var(--teal-600);
  color: white;
  box-shadow: 0 0 0 6px rgba(13, 148, 136, 0.2);
}
.map-pin-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--teal-500);
  opacity: 0.4;
  animation: pulse-ring 2s infinite;
  pointer-events: none;
}

.map-card-popup {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-card);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--slate-200);
  display: flex;
  gap: 16px;
  z-index: 30;
  max-width: 350px;
  width: calc(100% - 48px);
  animation: slide-up-fade 0.3s ease;
}

.map-control-btn {
  position: absolute;
  right: 16px;
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--slate-700);
  z-index: 10;
  border: 1px solid var(--slate-200);
  transition: all 0.2s ease;
}
.map-control-btn:hover {
  color: var(--teal-600);
}
.map-control-btn.zoom-in { top: 16px; }
.map-control-btn.zoom-out { top: 64px; }
.map-control-btn.recenter { top: 112px; }

/* Desktop instructions overlay */
.map-overlay-instructions {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(15, 23, 42, 0.85);
  color: white;
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  z-index: 10;
  backdrop-filter: blur(4px);
}

/* Mobile-only toggler tabs for Doctor view */
.mobile-view-tabs {
  display: none;
  background: var(--surface-card);
  border: 1px solid var(--slate-200);
  border-radius: 30px;
  padding: 4px;
  margin-bottom: 16px;
}
.mobile-tab-btn {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 700;
  color: var(--slate-600);
  cursor: pointer;
  transition: all 0.2s ease;
}
.mobile-tab-btn.active {
  background: linear-gradient(135deg, var(--teal-600), var(--blue-600));
  color: white;
}

/* --------------------------------------------------------------------------
   7. SCREEN: MEMBER DASHBOARD (CRED & Practo aesthetic)
   -------------------------------------------------------------------------- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 32px;
  align-items: start;
}

/* PERSPECTIVE FOR ROTATING DIGITAL CARD */
/* PERSPECTIVE FOR ROTATING DIGITAL CARD */
.card-perspective {
  perspective: 2000px; /* Increased to 2000px to prevent extreme 3D corner-bowing/downward-dipping visual bugs */
  width: 100%;
  height: 250px;
  cursor: pointer;
  margin-bottom: 24px;
}
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: left;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); /* Ultra-smooth modern ease-out curves */
  transform-style: preserve-3d;
  transform-origin: center center; /* Enforce absolute vertical-axis centering to guarantee 100% stable side-to-side flip */
}
.card-perspective:hover .flip-card-inner, .card-perspective.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: var(--radius-lg);
  padding: 24px;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

/* High fidelity dynamic gradients for Front and Back */
.flip-card-front {
  background: linear-gradient(135deg, var(--blue-900) 0%, #1e1b4b 50%, var(--teal-700) 100%);
  position: relative;
}
.flip-card-front::after {
  content: '';
  position: absolute;
  bottom: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.15) 0%, rgba(255,255,255,0) 80%);
  pointer-events: none;
}
.flip-card-back {
  background: linear-gradient(135deg, var(--teal-700) 0%, #115e59 50%, var(--blue-900) 100%);
  transform: rotateY(180deg);
  align-items: center;
  justify-content: center;
  gap: 16px;
}

/* Front card layout elements */
.card-brand {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-header);
  font-weight: 800;
  font-size: 18px;
  color: white;
}
.card-logo-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--teal-500);
}
.card-type {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  background: rgba(255, 255, 255, 0.15);
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}
.card-chip {
  width: 40px;
  height: 30px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.2);
}
.card-number {
  font-family: var(--font-header);
  font-size: 20px;
  letter-spacing: 2px;
  font-weight: 600;
}
.card-holder {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.card-meta-label {
  font-size: 8px;
  text-transform: uppercase;
  color: var(--slate-300);
  letter-spacing: 1px;
  margin-bottom: 2px;
}
.card-meta-val {
  font-size: 13px;
  font-weight: 700;
}

/* Back card Layout QR rendering */
.card-qr-box {
  background: white;
  padding: 10px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}
.card-qr-box svg {
  width: 110px;
  height: 110px;
}
.card-back-text {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8;
  text-align: center;
}

/* Wallet & Referrals Panels */
.dashboard-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.metric-tile {
  background: var(--surface-card);
  padding: 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--slate-200);
}
.wallet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.wallet-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--slate-600);
}
.wallet-balance {
  font-size: 32px;
  font-family: var(--font-header);
  font-weight: 800;
  color: var(--slate-900);
  display: flex;
  align-items: center;
  gap: 4px;
}
.wallet-balance i {
  color: var(--emerald-500);
}

.referral-box {
  background: var(--blue-50);
  border: 1.5px dashed var(--blue-500);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 16px;
}
.referral-code-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.referral-code-display {
  flex: 1;
  background: white;
  border: 1.5px solid var(--slate-200);
  border-radius: 8px;
  padding: 10px;
  font-weight: 800;
  font-family: var(--font-header);
  letter-spacing: 1px;
  text-align: center;
  color: var(--blue-900);
}
.btn-copy {
  background: var(--blue-600);
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.btn-copy:hover {
  background: var(--blue-700);
}

.dashboard-right {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.rewards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.reward-card {
  background: var(--surface-card);
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 16px;
  align-items: center;
}
.reward-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--teal-50);
  color: var(--teal-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.reward-details h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}
.reward-details p {
  font-size: 12px;
  color: var(--slate-600);
}

.transactions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.transaction-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--slate-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--slate-200);
}
.tx-info {
  display: flex;
  gap: 12px;
  align-items: center;
}
.tx-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--emerald-50);
  color: var(--emerald-500);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tx-icon.tx-out {
  background: var(--blue-50);
  color: var(--blue-500);
}
.tx-desc h5 {
  font-size: 13.5px;
  font-weight: 700;
}
.tx-desc p {
  font-size: 11px;
  color: var(--slate-600);
}
.tx-amount {
  font-weight: 800;
  font-family: var(--font-header);
  font-size: 14px;
}
.tx-amount.positive {
  color: var(--emerald-600);
}
.tx-amount.negative {
  color: var(--slate-900);
}

/* --------------------------------------------------------------------------
   8. SCREEN: ADMIN DASHBOARD
   -------------------------------------------------------------------------- */
.admin-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}
.admin-metric-card {
  background: var(--surface-card);
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-metric-info h4 {
  font-size: 14px;
  color: var(--slate-600);
  font-weight: 500;
  margin-bottom: 4px;
}
.admin-metric-info h2 {
  font-size: 32px;
  font-family: var(--font-header);
  font-weight: 800;
}
.admin-metric-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.admin-metric-icon.purple { background: #f3e8ff; color: #a855f7; }
.admin-metric-icon.blue { background: #dbeafe; color: #3b82f6; }
.admin-metric-icon.teal { background: #ccfbf1; color: #0d9488; }

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.admin-panel-card {
  background: var(--surface-card);
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
}
.admin-panel-card h3 {
  font-size: 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Card Verifier Mock scanner styling */
.card-verifier-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.card-scanner-box {
  border: 2px dashed var(--slate-300);
  border-radius: var(--radius-md);
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
  background: var(--slate-50);
}
.card-scanner-box:hover {
  border-color: var(--teal-500);
  background: var(--teal-50) / 10%;
}
.card-scanner-box.scanning::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--teal-500);
  box-shadow: 0 0 10px var(--teal-500);
  animation: scan-bar 2s infinite linear;
}
.scanner-icon {
  font-size: 32px;
  color: var(--slate-400);
  margin-bottom: 12px;
}
.scanner-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--slate-900);
}
.scanner-desc {
  font-size: 12px;
  color: var(--slate-600);
}

.verifier-input-group {
  display: flex;
  gap: 10px;
}
.verifier-input-group input {
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.verifier-input-group input:focus {
  border-color: var(--teal-500);
}
.verifier-input-group button {
  padding: 12px 24px;
}

.verification-result {
  padding: 16px;
  border-radius: var(--radius-md);
  margin-top: 16px;
  animation: slide-up-fade 0.3s ease;
}
.verification-result.success {
  background: var(--emerald-50);
  border: 1.5px solid var(--emerald-500);
}
.verification-result.error {
  background: #fdf2f2;
  border: 1.5px solid var(--rose-500);
}

/* Admin Doctor form and list */
.admin-form-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.admin-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.admin-form-field label {
  font-size: 13px;
  font-weight: 700;
  color: var(--slate-700);
}
.admin-form-field input, .admin-form-field select {
  padding: 12px;
  border: 1.5px solid var(--slate-200);
  border-radius: 8px;
  font-size: 14px;
  background: white;
}
.admin-form-field input:focus, .admin-form-field select:focus {
  border-color: var(--teal-500);
}

.form-double-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* --------------------------------------------------------------------------
   9. GLOBAL COMPONENT: RAZORPAY PAYMENT MODAL (High-Fidelity)
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.hidden { display: none !important; }

.razorpay-modal {
  width: 100%;
  max-width: 380px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: modal-enter 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.razorpay-header {
  background: #172554;
  color: white;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}
.rzp-logo-section {
  display: flex;
  flex-direction: column;
}
.rzp-merchant {
  font-size: 15px;
  font-weight: 700;
}
.rzp-amount {
  font-family: var(--font-header);
  font-size: 24px;
  font-weight: 800;
  margin-top: 4px;
}
.rzp-close {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.rzp-close:hover {
  background: rgba(255,255,255,0.25);
}

.razorpay-tabs {
  display: flex;
  border-bottom: 1px solid var(--slate-200);
}
.rzp-tab {
  flex: 1;
  text-align: center;
  padding: 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--slate-600);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}
.rzp-tab.active {
  color: var(--blue-600);
  border-color: var(--blue-600);
}

.razorpay-body {
  padding: 24px;
  flex: 1;
}

/* Pay Options lists (UPI apps) */
.upi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.upi-app-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.upi-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 11px;
  color: var(--slate-700);
  transition: all 0.2s ease;
}
.upi-app-btn:hover .upi-icon-circle {
  border-color: var(--blue-500);
  background: var(--blue-50);
}
.upi-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--slate-600);
}

.rzp-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.rzp-input-group label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--slate-600);
  letter-spacing: 0.5px;
}
.rzp-input-group input {
  padding: 12px;
  border: 1.5px solid var(--slate-200);
  border-radius: 8px;
  font-size: 14px;
}
.rzp-input-group input:focus {
  border-color: var(--blue-600);
}

.rzp-card-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn-rzp-pay {
  background: var(--blue-600);
  color: white;
  font-weight: 700;
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}
.btn-rzp-pay:hover {
  background: var(--blue-700);
}

.razorpay-footer {
  background: var(--slate-50);
  padding: 12px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--slate-600);
  border-top: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* RZP Processing Screen */
.rzp-processing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
}
.rzp-loader {
  width: 48px;
  height: 48px;
  border: 4px solid var(--slate-200);
  border-top-color: var(--emerald-500);
  border-radius: 50%;
  animation: rzp-spin 1s infinite linear;
  margin-bottom: 24px;
}
.rzp-processing h3 {
  font-size: 18px;
  margin-bottom: 8px;
}
.rzp-processing p {
  font-size: 13px;
  color: var(--slate-600);
}

/* --------------------------------------------------------------------------
   10. MOBILE BOTTOM TAB NAVIGATION & MOBILE STYLES
   -------------------------------------------------------------------------- */
.mobile-tabbar {
  display: none; /* Hidden by default on desktop */
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--slate-200);
  z-index: 90;
  padding: 8px 12px 14px 12px;
  justify-content: space-around;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.05);
}

.tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--slate-600);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
}
.tab-btn.active {
  color: var(--teal-600);
}
.tab-btn i {
  font-size: 20px;
  transition: transform 0.2s ease;
}
.tab-btn.active i {
  transform: translateY(-2px);
}

/* Premium Startup Footer */
.app-footer-section {
  background: var(--slate-900);
  color: white;
  padding: 60px 24px;
  border-top: 1px solid var(--slate-800);
}
.footer-container {
  max-width: var(--app-max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}
.footer-brand h3 {
  color: white;
  font-size: 22px;
  margin-bottom: 16px;
}
.footer-brand p {
  color: var(--slate-400);
  font-size: 14px;
  max-width: 320px;
  margin-bottom: 20px;
}
.footer-socials {
  display: flex;
  gap: 12px;
}
.footer-social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--slate-800);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-400);
  transition: all 0.2s ease;
}
.footer-social-icon:hover {
  background: var(--teal-600);
  color: white;
}
.footer-links h4 {
  color: white;
  font-size: 16px;
  margin-bottom: 16px;
}
.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links ul li {
  color: var(--slate-400);
  font-size: 14px;
  cursor: pointer;
  transition: color 0.2s ease;
}
.footer-links ul li:hover {
  color: white;
}

/* Toast styling */
.toast-wrapper {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 320px;
  width: calc(100% - 48px);
}
.toast-wrapper.hidden { display: none; }
.toast-card {
  background: var(--slate-900);
  color: white;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
  animation: slide-in-right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast-card.success {
  border-left: 4px solid var(--emerald-500);
}
.toast-card.error {
  border-left: 4px solid var(--rose-500);
}

/* --------------------------------------------------------------------------
   11. ANIMATIONS KEYFRAMES
   -------------------------------------------------------------------------- */
@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(0.95); opacity: 0; }
}

@keyframes scan-bar {
  0% { top: 0; }
  50% { top: 100%; }
  100% { top: 0; }
}

@keyframes modal-enter {
  from { transform: translateY(30px) scale(0.95); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes slide-up-fade {
  from { transform: translate(-50%, 15px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

@keyframes slide-in-right {
  from { transform: translateX(50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes rzp-spin {
  to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   12. MEDIA RESPONSIVE QUERIES
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .doctors-layout {
    grid-template-columns: 360px 1fr;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-left {
    max-width: 450px;
    margin: 0 auto;
    width: 100%;
  }
}

@media (max-width: 768px) {
  /* Hide standard header elements and footer on mobile */
  .navbar-container {
    padding: 12px 16px;
  }
  .nav-links, .nav-cta {
    display: none !important;
  }
  .app-footer-section {
    padding: 40px 16px 120px 16px; /* Space for bottom tabbar */
  }
  .footer-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  /* Show Mobile Bottom Navigation Tabbar */
  .mobile-tabbar {
    display: flex;
  }
  
  /* Page structure adjustments */
  body {
    background-color: white; /* Feel cleaner on mobile */
  }
  .app-content {
    padding: 16px 16px 100px 16px;
  }
  
  /* Landing page mobile scaling */
  .landing-hero {
    padding: 30px 10px 40px 10px;
  }
  .landing-hero h1 {
    font-size: 34px;
  }
  .landing-hero p {
    font-size: 15px;
  }
  
  .stepper-container {
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 40px 0;
  }
  
  .pricing-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .pricing-card {
    padding: 24px;
  }
  
  /* Doctor listing splits on mobile */
  .doctors-layout {
    grid-template-columns: 1fr;
    height: auto;
    min-height: auto;
  }
  .mobile-view-tabs {
    display: flex;
  }
  
  .search-sidebar {
    height: auto;
    box-shadow: none;
    border: none;
  }
  .sidebar-header {
    padding: 0 0 16px 0;
  }
  .doctors-list {
    padding: 0;
  }
  .map-canvas-container {
    height: 480px;
    margin-top: 10px;
  }
  .map-canvas-container.hidden-mobile {
    display: none;
  }
  .doctors-list.hidden-mobile {
    display: none;
  }
  
  /* Admin layout grid mobile adjustments */
  .admin-metrics {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .admin-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .admin-panel-card {
    padding: 20px;
  }
}
