/* ============================================================
   Teacher Match-AI — Material 3 · Mobile-First · Animated
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --m3-primary:           #1a73e8;
  --m3-primary-dark:      #1557b0;
  --m3-primary-light:     #4a90e2;
  --m3-on-primary:        #ffffff;
  --m3-primary-container: #d3e3fd;
  --m3-on-primary-cont:   #041e49;
  --m3-secondary-cont:    #dce8ff;
  --m3-on-secondary-cont: #0a2547;
  --m3-bg:        #f0f4ff;
  --m3-surface:   #f8faff;
  --m3-surface-1: #eef2ff;
  --m3-surface-2: #e3ecff;
  --m3-surface-3: #d6e4ff;
  --m3-white:     #ffffff;
  --m3-on-surface:     #1a1c1e;
  --m3-on-surface-var: #44474f;
  --m3-muted:          #5f6368;
  --m3-outline:        #8fa3c7;
  --m3-outline-var:    #c0ceeb;
  --shadow-1: 0 1px 3px rgba(26,115,232,.10),0 1px 2px rgba(26,115,232,.08);
  --shadow-2: 0 3px 8px rgba(26,115,232,.12),0 1px 3px rgba(26,115,232,.08);
  --shadow-3: 0 6px 16px rgba(26,115,232,.15),0 2px 6px rgba(26,115,232,.10);
  --shadow-4: 0 12px 28px rgba(26,115,232,.18),0 4px 10px rgba(26,115,232,.12);
  --radius-xs: 4px; --radius-sm: 8px; --radius-md: 12px;
  --radius-lg: 16px; --radius-xl: 24px; --radius-full: 9999px;
  --font:         'Google Sans','Segoe UI',system-ui,sans-serif;
  --font-display: 'Google Sans Display','Google Sans',system-ui,sans-serif;
  --nav-h: 60px;
}

/* ── Reset & base ─────────────────────────────────────────── */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--m3-bg);
  color: var(--m3-on-surface);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--m3-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { font-family: var(--font); }

/* ════════════════════════════════════════════════════════════
   ANIMATIONS
   ════════════════════════════════════════════════════════════ */

/* --- Core keyframes --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(.92); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes pulse {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
@keyframes ripple {
  0%   { transform: scale(0); opacity: .5; }
  100% { transform: scale(4); opacity: 0; }
}
@keyframes numberCount {
  from { opacity: 0; transform: translateY(8px) scale(.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes gradientShift {
  0%,100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
@keyframes spinIn {
  from { transform: rotate(-8deg) scale(.9); opacity: 0; }
  to   { transform: rotate(0) scale(1); opacity: 1; }
}
@keyframes bounceIn {
  0%   { transform: scale(.3); opacity: 0; }
  50%  { transform: scale(1.05); opacity: 1; }
  70%  { transform: scale(.95); }
  100% { transform: scale(1); }
}
@keyframes glowPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(26,115,232,.3); }
  50%      { box-shadow: 0 0 0 8px rgba(26,115,232,0); }
}
@keyframes dotBlink {
  0%,100% { opacity: 1; }
  50%      { opacity: .3; }
}
@keyframes navSlide {
  from { transform: translateY(-100%); }
  to   { transform: translateY(0); }
}
@keyframes heroText {
  from { opacity: 0; transform: translateY(30px) skewY(2deg); }
  to   { opacity: 1; transform: translateY(0) skewY(0); }
}
@keyframes cardEntrance {
  from { opacity: 0; transform: translateY(28px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes walletBounce {
  0%,100% { transform: translateY(0) scale(1); }
  30%      { transform: translateY(-4px) scale(1.06); }
  60%      { transform: translateY(-2px) scale(1.02); }
}

/* --- Utility animation classes --- */
.anim-fade-up     { animation: fadeUp .5s cubic-bezier(.22,.68,0,1.2) both; }
.anim-fade-in     { animation: fadeIn .4s ease both; }
.anim-slide-down  { animation: slideDown .4s cubic-bezier(.22,.68,0,1.2) both; }
.anim-slide-left  { animation: slideInLeft .45s cubic-bezier(.22,.68,0,1.2) both; }
.anim-slide-right { animation: slideInRight .45s cubic-bezier(.22,.68,0,1.2) both; }
.anim-scale-in    { animation: scaleIn .4s cubic-bezier(.22,.68,0,1.2) both; }
.anim-spin-in     { animation: spinIn .45s cubic-bezier(.22,.68,0,1.2) both; }
.anim-bounce-in   { animation: bounceIn .55s cubic-bezier(.22,.68,0,1.2) both; }

/* Stagger delays */
.d-0  { animation-delay: 0s; }
.d-1  { animation-delay: .08s; }
.d-2  { animation-delay: .16s; }
.d-3  { animation-delay: .24s; }
.d-4  { animation-delay: .32s; }
.d-5  { animation-delay: .40s; }
.d-6  { animation-delay: .48s; }
.d-7  { animation-delay: .56s; }
.d-8  { animation-delay: .64s; }

/* Legacy compat */
.fade-up   { animation: fadeUp .5s .0s cubic-bezier(.22,.68,0,1.2) both; }
.fade-up-2 { animation: fadeUp .5s .1s cubic-bezier(.22,.68,0,1.2) both; }
.fade-up-3 { animation: fadeUp .5s .2s cubic-bezier(.22,.68,0,1.2) both; }

/* Scroll-reveal (JS adds class) */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s cubic-bezier(.22,.68,0,1.2), transform .6s cubic-bezier(.22,.68,0,1.2); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Hover micro-interactions */
.hover-lift { transition: transform .2s, box-shadow .2s; }
.hover-lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-3); }
.hover-scale { transition: transform .2s; }
.hover-scale:hover { transform: scale(1.02); }

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--m3-surface-1) 25%, var(--m3-surface-2) 50%, var(--m3-surface-1) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-md);
}

/* ════════════════════════════════════════════════════════════
   NAVBAR
   ════════════════════════════════════════════════════════════ */
.navbar {
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--m3-outline-var);
  position: sticky; top: 0; z-index: 200;
  box-shadow: var(--shadow-1);
  animation: navSlide .4s cubic-bezier(.22,.68,0,1.2) both;
}
.nav-container {
  max-width: 1200px; margin: auto;
  padding: 0 16px;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.25rem; font-weight: 700;
  color: var(--m3-primary); text-decoration: none;
  display: flex; align-items: center; gap: 8px;
  letter-spacing: -.02em; flex-shrink: 0;
  transition: opacity .2s;
}
.brand:hover { opacity: .85; text-decoration: none; }
.brand-dot {
  width: 8px; height: 8px;
  background: var(--m3-primary); border-radius: 50%;
  animation: dotBlink 2.4s 1s ease-in-out infinite;
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  color: var(--m3-on-surface-var); font-size: .88rem; font-weight: 500;
  padding: 7px 12px; border-radius: var(--radius-full);
  transition: background .15s, color .15s; text-decoration: none; white-space: nowrap;
}
.nav-links a:hover { background: var(--m3-surface-1); color: var(--m3-primary); }
.wallet-badge {
  background: var(--m3-primary-container) !important;
  color: var(--m3-on-primary-cont) !important;
  font-weight: 600 !important; font-size: .82rem !important;
  animation: walletBounce 3s 2s ease-in-out infinite;
}
.wallet-badge:hover { background: var(--m3-surface-2) !important; }
.btn-nav {
  background: var(--m3-primary) !important; color: white !important;
  padding: 8px 18px !important; border-radius: var(--radius-full) !important;
  font-weight: 500 !important; font-size: .86rem !important;
  transition: background .15s, box-shadow .15s, transform .1s !important;
}
.btn-nav:hover { background: var(--m3-primary-dark) !important; transform: translateY(-1px); box-shadow: var(--shadow-2) !important; }
.btn-nav.btn-outline {
  background: transparent !important; border: 1.5px solid var(--m3-outline) !important;
  color: var(--m3-primary) !important;
}
.btn-nav.btn-outline:hover { background: var(--m3-surface-1) !important; }

/* Mobile hamburger */
.nav-hamburger {
  display: none !important; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 8px; border: none; background: none;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--m3-on-surface); border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.nav-drawer {
  display: none; position: fixed; inset: 0; top: var(--nav-h);
  background: rgba(4,30,73,.45); z-index: 199;
  backdrop-filter: blur(4px);
  animation: fadeIn .25s ease both;
}
.nav-drawer.open { display: block; }
.nav-drawer-inner {
  background: var(--m3-white); padding: 16px;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  animation: slideDown .35s cubic-bezier(.22,.68,0,1.2) both;
  box-shadow: var(--shadow-4);
}
.nav-drawer-inner a {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: var(--radius-md);
  color: var(--m3-on-surface); font-weight: 500; font-size: 1rem;
  border-bottom: 1px solid var(--m3-outline-var); text-decoration: none;
  transition: background .15s;
}
.nav-drawer-inner a:last-child { border-bottom: none; }
.nav-drawer-inner a:hover { background: var(--m3-surface-1); color: var(--m3-primary); }
.nav-drawer-inner .drawer-wallet {
  background: var(--m3-primary-container); border-radius: var(--radius-md);
  padding: 14px 16px; text-align: center; margin-bottom: 8px; font-weight: 600;
  color: var(--m3-on-primary-cont); font-size: .95rem; border-bottom: none;
}

/* ════════════════════════════════════════════════════════════
   LAYOUT
   ════════════════════════════════════════════════════════════ */
.main-content { min-height: calc(100vh - var(--nav-h) - 280px); }
.container { max-width: 1200px; margin: auto; padding: 24px 16px; }
.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  font-weight: 500; color: var(--m3-on-surface);
  margin-bottom: 20px; letter-spacing: -.02em;
}
.section-title { font-size: 1rem; font-weight: 500; color: var(--m3-on-surface); margin-bottom: 12px; }

/* ════════════════════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════════════════════ */
.hero {
  background: linear-gradient(135deg, #041e49 0%, #1a73e8 55%, #4a90e2 100%);
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
  color: white; padding: 56px 20px 52px;
  text-align: center; position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 60% 40%, rgba(255,255,255,.07) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute; bottom: -2px; left: 0; right: 0;
  height: 40px;
  background: var(--m3-bg);
  clip-path: ellipse(55% 100% at 50% 100%);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 6vw, 3.2rem);
  font-weight: 500; letter-spacing: -.03em; margin-bottom: 14px;
  position: relative;
  animation: heroText .7s .1s cubic-bezier(.22,.68,0,1.2) both;
}
.hero p {
  font-size: clamp(.9rem, 2.5vw, 1.1rem);
  opacity: .85; margin-bottom: 32px; position: relative;
  animation: heroText .7s .25s cubic-bezier(.22,.68,0,1.2) both;
}
.hero-search {
  display: flex; max-width: 540px; margin: 0 auto;
  background: white; border-radius: var(--radius-full);
  padding: 5px 5px 5px 18px;
  box-shadow: var(--shadow-4);
  position: relative;
  animation: scaleIn .6s .4s cubic-bezier(.22,.68,0,1.2) both;
}
.hero-search input {
  flex: 1; border: none; outline: none;
  font-size: .95rem; font-family: var(--font);
  color: var(--m3-on-surface); background: transparent;
  min-width: 0;
}
.hero-search input::placeholder { color: var(--m3-outline); }
.hero-search button {
  background: var(--m3-primary); color: white; border: none;
  padding: 10px 20px; border-radius: var(--radius-full);
  font-family: var(--font); font-size: .9rem; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: background .15s, transform .1s;
}
.hero-search button:hover { background: var(--m3-primary-dark); transform: scale(1.02); }

/* ── Stats bar ────────────────────────────────────────────── */
.stats-bar {
  background: var(--m3-white); border-bottom: 1px solid var(--m3-outline-var);
  padding: 16px 16px; display: flex;
  justify-content: center; flex-wrap: wrap;
  animation: fadeIn .5s .5s ease both;
}
.stat-item {
  text-align: center; padding: 6px 20px;
  border-right: 1px solid var(--m3-outline-var);
}
.stat-item:last-child { border-right: none; }
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.3rem,3vw,1.7rem);
  font-weight: 700; color: var(--m3-primary); line-height: 1;
  animation: numberCount .6s cubic-bezier(.22,.68,0,1.2) both;
}
.stat-lbl { font-size: .72rem; color: var(--m3-muted); margin-top: 3px; font-weight: 500; letter-spacing: .04em; }

/* ════════════════════════════════════════════════════════════
   CARDS
   ════════════════════════════════════════════════════════════ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px,100%), 1fr));
  gap: 14px;
}
.card {
  background: var(--m3-white);
  border: 1px solid var(--m3-outline-var);
  border-radius: var(--radius-xl); padding: 18px;
  box-shadow: var(--shadow-1);
  transition: box-shadow .25s cubic-bezier(.22,.68,0,1.2), transform .25s cubic-bezier(.22,.68,0,1.2);
  position: relative; overflow: hidden;
  animation: cardEntrance .5s cubic-bezier(.22,.68,0,1.2) both;
}
.card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--m3-primary), var(--m3-primary-light));
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s cubic-bezier(.22,.68,0,1.2);
}
.card:hover { box-shadow: var(--shadow-3); transform: translateY(-4px); }
.card:hover::before { transform: scaleX(1); }
.card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.avatar {
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--m3-primary-container); color: var(--m3-on-primary-cont);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; font-weight: 700; flex-shrink: 0; overflow: hidden;
  transition: transform .2s; box-shadow: var(--shadow-1);
}
.card:hover .avatar { transform: scale(1.08); }
.avatar img, .avatar-photo { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.card-name { font-size: .95rem; font-weight: 500; color: var(--m3-on-surface); }
.card-sub  { font-size: .8rem; color: var(--m3-muted); margin-top: 2px; }
.stars { color: #f59e0b; font-size: .88rem; }

/* ════════════════════════════════════════════════════════════
   BADGES
   ════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: .73rem; font-weight: 600; letter-spacing: .03em;
  transition: transform .15s;
}
.badge:hover { transform: scale(1.04); }
.badge            { background: var(--m3-secondary-cont); color: var(--m3-on-secondary-cont); }
.badge-green      { background: #c8f5d1; color: #0a3d1f; }
.badge-amber      { background: #fef3c7; color: #7c4a00; }
.badge-red        { background: #fee2e2; color: #7f1d1d; }
.badge-primary    { background: var(--m3-primary-container); color: var(--m3-on-primary-cont); }

/* ════════════════════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 22px;
  border-radius: var(--radius-full);
  font-family: var(--font); font-size: .88rem; font-weight: 500;
  cursor: pointer; border: none; text-decoration: none;
  transition: background .15s, box-shadow .15s, transform .12s;
  white-space: nowrap; position: relative; overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
/* Ripple on click */
.btn::after {
  content: ''; position: absolute;
  width: 100%; height: 100%; top: 0; left: 0;
  background: rgba(255,255,255,.25);
  transform: scale(0); border-radius: 50%;
  transition: transform .4s, opacity .4s;
  pointer-events: none;
}
.btn:active::after { transform: scale(2); opacity: 0; }
.btn:active { transform: scale(.97); }
.btn-primary  { background: var(--m3-primary); color: white; }
.btn-primary:hover  { background: var(--m3-primary-dark); box-shadow: var(--shadow-2); color: white; text-decoration: none; }
.btn-tonal    { background: var(--m3-primary-container); color: var(--m3-on-primary-cont); }
.btn-tonal:hover    { box-shadow: var(--shadow-1); color: var(--m3-on-primary-cont); text-decoration: none; }
.btn-outline  { background: transparent; border: 1.5px solid var(--m3-outline); color: var(--m3-primary); }
.btn-outline:hover  { background: var(--m3-surface-1); color: var(--m3-primary); text-decoration: none; }
.btn-success  { background: #16a34a; color: white; }
.btn-danger   { background: #dc2626; color: white; }
.btn-sm   { height: 32px; padding: 0 14px; font-size: .8rem; }
.btn-lg   { height: 48px; padding: 0 30px; font-size: .98rem; }
.btn-block { display: flex; width: 100%; }
.btn-razorpay {
  background: var(--m3-primary); color: white; width: 100%; height: 48px;
  padding: 0 24px; border: none; border-radius: var(--radius-full);
  font-family: var(--font); font-size: .98rem; font-weight: 500; cursor: pointer;
  transition: background .15s, box-shadow .15s, transform .12s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  animation: glowPulse 2.5s 1.5s ease-in-out infinite;
}
.btn-razorpay:hover { background: var(--m3-primary-dark); box-shadow: var(--shadow-3); transform: translateY(-1px); }

/* ════════════════════════════════════════════════════════════
   FORMS
   ════════════════════════════════════════════════════════════ */
.form-card {
  background: var(--m3-white); border: 1px solid var(--m3-outline-var);
  border-radius: var(--radius-xl); padding: 28px;
  max-width: 500px; margin: 32px auto; box-shadow: var(--shadow-2);
  animation: scaleIn .4s cubic-bezier(.22,.68,0,1.2) both;
}
.form-card h2 {
  font-family: var(--font-display); font-size: 1.4rem; font-weight: 500;
  margin-bottom: 22px; color: var(--m3-on-surface);
}
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block; font-size: .78rem; font-weight: 500;
  color: var(--m3-muted); margin-bottom: 5px; letter-spacing: .03em;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--m3-outline-var); border-radius: var(--radius-md);
  font-family: var(--font); font-size: .92rem;
  color: var(--m3-on-surface); background: var(--m3-white); outline: none;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--m3-primary);
  box-shadow: 0 0 0 3px rgba(26,115,232,.12);
}
.form-group textarea { resize: vertical; min-height: 88px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ════════════════════════════════════════════════════════════
   ALERTS
   ════════════════════════════════════════════════════════════ */
.alert {
  padding: 12px 16px; border-radius: var(--radius-md);
  font-size: .88rem; margin-bottom: 14px;
  display: flex; align-items: flex-start; gap: 9px;
  animation: slideDown .35s cubic-bezier(.22,.68,0,1.2) both;
}
.alert-success { background: #dcfce7; color: #14532d; border: 1px solid #86efac; }
.alert-danger  { background: #fee2e2; color: #7f1d1d; border: 1px solid #fca5a5; }
.alert-info    { background: var(--m3-primary-container); color: var(--m3-on-primary-cont); border: 1px solid var(--m3-outline-var); }
.alert-warning { background: #fef3c7; color: #78350f; border: 1px solid #fcd34d; }

/* ════════════════════════════════════════════════════════════
   DASHBOARD
   ════════════════════════════════════════════════════════════ */
.dashboard-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 18px; align-items: start;
}
.sidebar {
  background: var(--m3-white); border: 1px solid var(--m3-outline-var);
  border-radius: var(--radius-xl); padding: 14px;
  box-shadow: var(--shadow-1); position: sticky; top: 80px;
  animation: slideInLeft .5s cubic-bezier(.22,.68,0,1.2) both;
}
.sidebar-user {
  text-align: center; padding: 14px 8px 18px;
  border-bottom: 1px solid var(--m3-outline-var); margin-bottom: 8px;
}
.sidebar-avatar {
  width: 62px; height: 62px; border-radius: 50%;
  background: var(--m3-primary-container); color: var(--m3-on-primary-cont);
  margin: 0 auto 10px; display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 700; overflow: hidden;
  box-shadow: var(--shadow-2); transition: transform .2s;
}
.sidebar-avatar:hover { transform: scale(1.05); }
.sidebar a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-md);
  text-decoration: none; color: var(--m3-on-surface-var);
  font-size: .88rem; font-weight: 500; margin-bottom: 2px;
  transition: background .15s, color .15s, transform .15s;
}
.sidebar a:hover, .sidebar a.active {
  background: var(--m3-primary-container); color: var(--m3-on-primary-cont); transform: translateX(3px);
}
.sidebar a i { font-size: 17px; width: 20px; }
.dash-card {
  background: var(--m3-white); border: 1px solid var(--m3-outline-var);
  border-radius: var(--radius-xl); padding: 22px; box-shadow: var(--shadow-1);
  margin-bottom: 14px; transition: box-shadow .2s;
}
.dash-card:hover { box-shadow: var(--shadow-2); }
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px; margin-bottom: 18px;
}
.kpi {
  background: var(--m3-surface-1); border-radius: var(--radius-lg);
  padding: 16px 14px; text-align: center; border: 1px solid var(--m3-outline-var);
  transition: transform .2s, box-shadow .2s;
  animation: scaleIn .5s cubic-bezier(.22,.68,0,1.2) both;
}
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.kpi-num {
  font-family: var(--font-display); font-size: 1.7rem; font-weight: 700;
  color: var(--m3-primary); line-height: 1;
  animation: numberCount .6s cubic-bezier(.22,.68,0,1.2) both;
}
.kpi-lbl { font-size: .72rem; color: var(--m3-muted); margin-top: 4px; font-weight: 500; }

/* ════════════════════════════════════════════════════════════
   TABLE
   ════════════════════════════════════════════════════════════ */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 480px; }
thead th {
  background: var(--m3-surface-1); padding: 11px 14px; text-align: left;
  font-size: .72rem; font-weight: 600; letter-spacing: .06em;
  color: var(--m3-muted); text-transform: uppercase; border-bottom: 1.5px solid var(--m3-outline-var);
  position: sticky; top: 0;
}
tbody td { padding: 13px 14px; border-bottom: 1px solid var(--m3-outline-var); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background .15s; }
tbody tr:hover td { background: var(--m3-surface); }
.status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--radius-full); font-size: .73rem; font-weight: 600;
}
.status-confirmed { background: #dcfce7; color: #14532d; }
.status-pending   { background: #fef3c7; color: #7c4a00; }
.status-completed { background: var(--m3-primary-container); color: var(--m3-on-primary-cont); }
.status-cancelled { background: #fee2e2; color: #7f1d1d; }

/* ════════════════════════════════════════════════════════════
   PAYMENT MODAL
   ════════════════════════════════════════════════════════════ */
.payment-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(4,30,73,.55); z-index: 999;
  align-items: center; justify-content: center;
  backdrop-filter: blur(6px); padding: 16px;
}
.payment-overlay.show { display: flex; }
.payment-modal {
  background: var(--m3-white); border-radius: var(--radius-xl);
  padding: 28px; max-width: 460px; width: 100%;
  box-shadow: var(--shadow-4); border: 1px solid var(--m3-outline-var);
  animation: bounceIn .45s cubic-bezier(.22,.68,0,1.2) both;
  max-height: 90vh; overflow-y: auto;
}
.payment-modal h3 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 500; margin-bottom: 4px; }
.payment-summary {
  background: var(--m3-surface-1); border-radius: var(--radius-md);
  padding: 14px; margin: 14px 0; border: 1px solid var(--m3-outline-var);
}
.payment-row {
  display: flex; justify-content: space-between;
  padding: 4px 0; font-size: .88rem; color: var(--m3-on-surface-var);
}
.payment-row.total {
  border-top: 1px solid var(--m3-outline-var); margin-top: 7px;
  padding-top: 9px; font-weight: 600; font-size: .98rem; color: var(--m3-on-surface);
}
.razorpay-logo {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; font-size: .73rem; color: var(--m3-muted); margin-top: 9px;
}

/* ════════════════════════════════════════════════════════════
   PROFILE HERO
   ════════════════════════════════════════════════════════════ */
.port-hero {
  background: linear-gradient(135deg, #041e49 0%, #1a73e8 60%, #4a90e2 100%);
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
  color: white; padding: 40px 20px 32px;
  position: relative; overflow: hidden;
}
.port-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 80% at 30% 50%, rgba(255,255,255,.07) 0%, transparent 70%);
  pointer-events: none;
}
.port-avatar-wrap {
  width: 90px; height: 90px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  border: 3px solid rgba(255,255,255,.65); box-shadow: 0 4px 20px rgba(0,0,0,.25);
  background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
  animation: bounceIn .6s .2s cubic-bezier(.22,.68,0,1.2) both;
}
.port-avatar-wrap img  { width: 100%; height: 100%; object-fit: cover; display: block; }
.port-avatar-wrap span { font-size: 2.4rem; font-weight: 700; color: white; }
.info-chip {
  background: rgba(255,255,255,.18); border-radius: var(--radius-full);
  padding: 3px 11px; font-size: .78rem; display: inline-block; margin: 2px;
}
.section-block {
  background: var(--m3-white); border: 1px solid var(--m3-outline-var);
  border-radius: var(--radius-xl); padding: 22px; margin-bottom: 14px;
  box-shadow: var(--shadow-1);
  animation: fadeUp .5s cubic-bezier(.22,.68,0,1.2) both;
}

/* ════════════════════════════════════════════════════════════
   WALLET
   ════════════════════════════════════════════════════════════ */
.preset-btn {
  padding: 6px 16px; border: 1.5px solid var(--m3-outline-var);
  border-radius: var(--radius-full); background: var(--m3-white);
  cursor: pointer; font-family: var(--font); font-weight: 600; font-size: .85rem;
  color: var(--m3-on-surface); transition: .2s; -webkit-tap-highlight-color: transparent;
}
.preset-btn:hover, .preset-btn.active {
  border-color: var(--m3-primary); color: var(--m3-primary);
  background: var(--m3-surface-1); transform: scale(1.04);
}

/* ════════════════════════════════════════════════════════════
   PHOTO UPLOAD
   ════════════════════════════════════════════════════════════ */
.photo-ring {
  width: 110px; height: 110px; border-radius: 50%;
  border: 3px dashed var(--m3-outline); cursor: pointer; overflow: hidden;
  position: relative; background: var(--m3-surface-1); transition: .2s; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  animation: float 4s ease-in-out infinite;
}
.photo-ring:hover { border-color: var(--m3-primary); background: var(--m3-surface-2); transform: scale(1.04); }
.photo-ring img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ring-initial { font-size: 2.4rem; font-weight: 700; color: var(--m3-primary); }
.ring-overlay {
  position: absolute; inset: 0; border-radius: 50%;
  background: rgba(26,115,232,.55); opacity: 0; transition: .2s;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: white; font-size: .73rem; font-weight: 600; gap: 3px;
}
.photo-ring:hover .ring-overlay { opacity: 1; }

/* ════════════════════════════════════════════════════════════
   MISC COMPONENTS
   ════════════════════════════════════════════════════════════ */
.slabel {
  font-size: .73rem; font-weight: 600; color: var(--m3-primary);
  text-transform: uppercase; letter-spacing: .1em;
  margin: 22px 0 10px; padding-bottom: 7px;
  border-bottom: 1.5px solid var(--m3-primary-container);
}
.filter-bar {
  background: var(--m3-white); border: 1px solid var(--m3-outline-var);
  border-radius: var(--radius-xl); padding: 14px 18px;
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  margin-bottom: 20px; box-shadow: var(--shadow-1);
}
.filter-bar input, .filter-bar select {
  padding: 9px 14px; border: 1.5px solid var(--m3-outline-var);
  border-radius: var(--radius-full); font-family: var(--font); font-size: .88rem;
  outline: none; background: var(--m3-surface); color: var(--m3-on-surface);
  transition: border-color .15s; -webkit-appearance: none;
}
.filter-bar input:focus, .filter-bar select:focus { border-color: var(--m3-primary); }
.filter-bar input { flex: 1; min-width: 160px; }
.how-card {
  background: var(--m3-white); border: 1px solid var(--m3-outline-var);
  border-radius: var(--radius-xl); padding: 24px 18px; text-align: center;
  box-shadow: var(--shadow-1); transition: transform .25s, box-shadow .25s;
}
.how-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-3); }
.how-icon {
  width: 52px; height: 52px; background: var(--m3-primary-container);
  border-radius: var(--radius-lg); display: flex; align-items: center;
  justify-content: center; font-size: 1.4rem; margin: 0 auto 14px;
  transition: transform .2s;
}
.how-card:hover .how-icon { transform: scale(1.12) rotate(-4deg); }
.req-card {
  background: var(--m3-white); border: 1px solid var(--m3-outline-var);
  border-radius: var(--radius-xl); padding: 18px 20px;
  box-shadow: var(--shadow-1); transition: box-shadow .2s, transform .2s;
  margin-bottom: 12px;
  animation: cardEntrance .5s cubic-bezier(.22,.68,0,1.2) both;
}
.req-card:hover { box-shadow: var(--shadow-3); transform: translateY(-2px); }
.profile-stats-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 1px; background: var(--m3-outline-var);
  border-radius: var(--radius-md); overflow: hidden; margin-bottom: 18px;
}
.pstat { background: var(--m3-surface-1); padding: 14px; text-align: center; transition: background .15s; }
.pstat:hover { background: var(--m3-surface-2); }
.pstat-num { font-size: 1.45rem; font-weight: 700; color: var(--m3-primary); line-height: 1; }
.pstat-lbl { font-size: .72rem; color: var(--m3-muted); margin-top: 3px; }

/* ════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════ */
.footer { background: #041e49; color: #8fa3c7; padding: 48px 20px 20px; }
.footer-container {
  max-width: 1200px; margin: auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr));
  gap: 32px; margin-bottom: 32px;
}
.footer-col h4 { color: white; font-size: .88rem; font-weight: 600; margin-bottom: 14px; letter-spacing: .04em; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 7px; }
.footer-col ul li a { color: #8fa3c7; text-decoration: none; font-size: .85rem; transition: color .15s; }
.footer-col ul li a:hover { color: white; }
.footer-col p { font-size: .85rem; line-height: 1.7; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 16px; text-align: center; font-size: .78rem; max-width: 1200px; margin: auto; }
.payment-badges { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; font-size: .8rem; }

/* ════════════════════════════════════════════════════════════
   MOBILE BOTTOM NAV (shown only on mobile)
   ════════════════════════════════════════════════════════════ */
.mobile-bottom-nav {
  display: none !important;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--m3-outline-var);
  box-shadow: 0 -4px 16px rgba(26,115,232,.1);
  animation: slideUp .4s cubic-bezier(.22,.68,0,1.2) both;
  padding: 0 4px env(safe-area-inset-bottom,0);
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.mobile-bottom-nav ul { display: flex; list-style: none; }
.mobile-bottom-nav li { flex: 1; }
.mobile-bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 9px 4px 10px; text-decoration: none; color: var(--m3-muted);
  font-size: .64rem; font-weight: 500; letter-spacing: .03em;
  transition: color .15s; -webkit-tap-highlight-color: transparent;
}
.mobile-bottom-nav a .mbn-icon { font-size: 20px; line-height: 1; transition: transform .2s; }
.mobile-bottom-nav a:hover, .mobile-bottom-nav a.active { color: var(--m3-primary); }
.mobile-bottom-nav a:hover .mbn-icon, .mobile-bottom-nav a.active .mbn-icon { transform: translateY(-2px); }
.mobile-bottom-nav a.active .mbn-icon { animation: bounceIn .35s cubic-bezier(.22,.68,0,1.2) both; }
.mobile-bottom-nav a.active span:not(.mbn-icon) { font-weight: 600; }
/* Indicator dot for active */
.mobile-bottom-nav a.active::before {
  content: ''; position: absolute;
  width: 32px; height: 32px; border-radius: var(--radius-full);
  background: var(--m3-primary-container);
  top: 6px; left: 50%; transform: translateX(-50%);
  z-index: -1;
}
.mobile-bottom-nav li { position: relative; }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE FIRST
   ════════════════════════════════════════════════════════════ */

/* Extra small (< 480px) */
@media (max-width: 480px) {
  :root { --nav-h: 56px; }
  .hero { padding: 44px 16px 52px; }
  .hero h1 { font-size: 1.7rem; }
  .hero p { font-size: .88rem; }
  .hero-search { padding: 4px 4px 4px 14px; }
  .hero-search input { font-size: .88rem; }
  .hero-search button { padding: 9px 14px; font-size: .82rem; }
  .stats-bar { gap: 0; padding: 12px 8px; }
  .stat-item { padding: 5px 12px; border-right: none; border-bottom: none; flex: 1 1 50%; }
  .stat-item:nth-child(odd) { border-right: 1px solid var(--m3-outline-var); }
  .container { padding: 16px 12px; }
  .page-title { font-size: 1.35rem; margin-bottom: 16px; }
  .card { padding: 14px; }
  .dash-card { padding: 16px; }
  .form-card { padding: 20px 16px; margin: 16px auto; }
  .form-row { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2,1fr); gap: 8px; }
  .kpi { padding: 14px 10px; }
  .kpi-num { font-size: 1.5rem; }
  .btn { height: 38px; padding: 0 18px; font-size: .85rem; }
  .btn-sm { height: 30px; padding: 0 12px; font-size: .78rem; }
  .payment-modal { padding: 20px 16px; border-radius: var(--radius-lg); }
  .footer { padding: 36px 16px 80px; }
  .footer-container { grid-template-columns: 1fr 1fr; gap: 24px; }
  .port-hero { padding: 28px 16px 24px; }
  .port-avatar-wrap { width: 72px; height: 72px; }
}

/* Small (480px – 640px) */
@media (min-width: 480px) and (max-width: 640px) {
  .stats-bar { justify-content: center; }
  .stat-item { flex: 1 1 auto; }
  .cards-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer { padding-bottom: 80px; }
}

/* Medium (641px – 768px) */
@media (max-width: 768px) {
  /* Navbar */
  .nav-links > a:not(.wallet-badge):not(.btn-nav) { display: none !important; }
  .nav-links .wallet-badge { display: none !important; }
  .nav-hamburger { display: flex !important; }
  /* Dashboard */
  .dashboard-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; top: 0; }
  /* Stats */
  .stat-item { padding: 6px 14px; }
  /* Show mobile bottom nav */
  .mobile-bottom-nav { display: block !important; }
  /* Add padding to main content so bottom nav doesn't cover it */
  .main-content { padding-bottom: 72px; }
  .footer { padding-bottom: 88px; }
  /* Cards grid */
  .cards-grid { grid-template-columns: repeat(auto-fill, minmax(min(280px,100%),1fr)); }
  /* Filter bar */
  .filter-bar input { min-width: 120px; }
  /* Profile hero */
  .port-hero > div { flex-direction: column; align-items: center; text-align: center; }
  /* Tables scroll */
  .table-wrap { border-radius: var(--radius-md); }
  /* KPI */
  .kpi-grid { grid-template-columns: repeat(2,1fr); }
}

/* Landscape phone */
@media (max-width: 768px) and (orientation: landscape) {
  .hero { padding: 32px 16px 44px; }
  .hero h1 { font-size: 1.6rem; }
}

/* Tablet (769px – 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .dashboard-grid { grid-template-columns: 220px 1fr; }
  .cards-grid { grid-template-columns: repeat(2,1fr); }
  .kpi-grid { grid-template-columns: repeat(3,1fr); }
  .container { padding: 24px 20px; }
}

/* ════════════════════════════════════════════════════════════
   SCROLL REVEAL (JS driven)
   ════════════════════════════════════════════════════════════ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s cubic-bezier(.22,.68,0,1.2), transform .6s cubic-bezier(.22,.68,0,1.2); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Hover micro-interactions */
.hover-lift { transition: transform .2s, box-shadow .2s; }
.hover-lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-3); }
