/* ============================================
   FuelCalc — Design System (Light Theme)
   Brand Colors extracted from logo:
     Primary Blue : #1a6fb5  (logo text)
     Deep Blue    : #0d3b66  (icon dark areas)
     Accent Green : #2e9e3e  (fuel nozzle / chart)
     Sky Blue     : #a8d4f0  (icon bg gradient)
     Light BG     : #f0f5fa
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Brand palette */
  --clr-primary:       #1a6fb5;
  --clr-primary-dark:  #0d3b66;
  --clr-primary-light: #3a9ad9;
  --clr-accent:        #2e9e3e;
  --clr-accent-light:  #4bbf5c;
  --clr-sky:           #a8d4f0;
  --clr-sky-light:     #dceefb;

  /* Neutrals */
  --clr-bg:            #f0f5fa;
  --clr-bg-alt:        #ffffff;
  --clr-surface:       #ffffff;
  --clr-text:          #1e293b;
  --clr-text-muted:    #64748b;
  --clr-border:        #e2e8f0;

  /* Functional */
  --clr-error:         #e74c3c;
  --clr-success:       #2e9e3e;
  --clr-warning:       #f39c12;

  /* Gradients */
  --grad-primary:      linear-gradient(135deg, #1a6fb5 0%, #0d3b66 100%);
  --grad-accent:       linear-gradient(135deg, #2e9e3e 0%, #1a6fb5 100%);
  --grad-hero:         linear-gradient(160deg, #f0f5fa 0%, #dceefb 40%, #a8d4f0 100%);
  --grad-glass:        linear-gradient(135deg, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0.55) 100%);

  /* Typography */
  --ff-heading:        'Outfit', sans-serif;
  --ff-body:           'Inter', sans-serif;

  /* Spacing */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Radius */
  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  22px;
  --radius-xl:  32px;
  --radius-pill: 100px;

  /* Shadow */
  --shadow-sm:  0 1px 3px rgba(13,59,102,0.06);
  --shadow-md:  0 4px 14px rgba(13,59,102,0.08);
  --shadow-lg:  0 8px 30px rgba(13,59,102,0.12);
  --shadow-xl:  0 16px 50px rgba(13,59,102,0.16);
  --shadow-glow:0 0 40px rgba(26,111,181,0.15);

  /* Transition */
  --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
  --transition: 0.3s var(--ease-out);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--ff-body);
  color: var(--clr-text);
  background: var(--clr-bg);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--clr-primary-dark);
}

a {
  color: var(--clr-primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--clr-primary-light); }

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

/* ---------- Utility Classes ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.text-center { text-align: center; }
.text-muted  { color: var(--clr-text-muted); }

.flex          { display: flex; }
.flex-col      { flex-direction: column; }
.items-center  { align-items: center; }
.justify-center{ justify-content: center; }
.gap-sm        { gap: var(--space-sm); }
.gap-md        { gap: var(--space-md); }
.gap-lg        { gap: var(--space-lg); }
.gap-xl        { gap: var(--space-xl); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.85rem 2rem;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--ff-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity var(--transition);
  background: rgba(255,255,255,0.18);
}
.btn:hover::after { opacity: 1; }

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(26,111,181,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(26,111,181,0.45);
  color: #fff;
}

.btn-accent {
  background: var(--grad-accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(46,158,62,0.3);
}
.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(46,158,62,0.4);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--clr-primary);
  border: 2px solid var(--clr-primary);
}
.btn-outline:hover {
  background: var(--clr-primary);
  color: #fff;
  transform: translateY(-2px);
}

.btn-google {
  background: var(--clr-surface);
  color: var(--clr-text);
  border: 2px solid var(--clr-border);
  box-shadow: var(--shadow-sm);
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
}
.btn-google:hover {
  border-color: var(--clr-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.btn-google img {
  width: 22px;
  height: 22px;
}

.btn-lg {
  padding: 1.1rem 2.8rem;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 0.55rem 1.4rem;
  font-size: 0.9rem;
}

/* ---------- Glass Card ---------- */
.glass-card {
  background: var(--grad-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-2xl);
  transition: all var(--transition);
}
.glass-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

.card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-2xl);
  transition: all var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

/* ---------- Form Elements ---------- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--clr-primary-dark);
  letter-spacing: 0.02em;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.85rem 1.2rem;
  border: 2px solid var(--clr-border);
  border-radius: var(--radius-md);
  font-family: var(--ff-body);
  font-size: 1rem;
  color: var(--clr-text);
  background: var(--clr-bg);
  transition: all var(--transition);
  outline: none;
}
.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--clr-text-muted);
  opacity: 0.7;
}
.form-input:focus,
.form-textarea:focus {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 4px rgba(26,111,181,0.12);
  background: var(--clr-surface);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-md) 0;
  transition: all var(--transition);
  background: rgba(240, 245, 250, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(226,232,240,0.5);
}

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

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--ff-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--clr-primary-dark);
}
.navbar-brand img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  list-style: none;
}

.navbar-links a:not(.btn) {
  font-weight: 500;
  color: var(--clr-text-muted);
  position: relative;
  padding: var(--space-xs) 0;
}
.navbar-links a:not(.btn)::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--clr-primary);
  border-radius: 2px;
  transition: width var(--transition);
}
.navbar-links a:not(.btn):hover {
  color: var(--clr-primary);
}
.navbar-links a:not(.btn):hover::after {
  width: 100%;
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: var(--space-xs);
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--clr-primary-dark);
  border-radius: 3px;
  transition: all var(--transition);
}

/* ---------- Hero / Landing Section ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--grad-hero);
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26,111,181,0.08) 0%, transparent 70%);
  animation: float 8s ease-in-out infinite;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -15%;
  left: -5%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(46,158,62,0.06) 0%, transparent 70%);
  animation: float 10s ease-in-out infinite reverse;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

.hero-text { max-width: 560px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.5rem 1.2rem;
  background: rgba(26,111,181,0.08);
  border: 1px solid rgba(26,111,181,0.15);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--clr-primary);
  margin-bottom: var(--space-lg);
  animation: fadeInUp 0.6s var(--ease-out) both;
}
.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: var(--clr-accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
  animation: fadeInUp 0.6s var(--ease-out) 0.1s both;
}
.hero-title .highlight {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--clr-text-muted);
  margin-bottom: var(--space-xl);
  max-width: 480px;
  animation: fadeInUp 0.6s var(--ease-out) 0.2s both;
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  animation: fadeInUp 0.6s var(--ease-out) 0.3s both;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeInUp 0.8s var(--ease-out) 0.3s both;
}

.hero-logo-wrapper {
  position: relative;
  width: 340px;
  height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo-wrapper img {
  width: 240px;
  height: 240px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  position: relative;
  z-index: 2;
  animation: logoFloat 6s ease-in-out infinite;
}

.hero-logo-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px dashed rgba(26,111,181,0.15);
  animation: spinSlow 30s linear infinite;
}

.hero-logo-ring::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  width: 12px;
  height: 12px;
  background: var(--clr-accent);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 12px rgba(46,158,62,0.5);
}

/* Floating stat cards around the hero visual */
.hero-float-card {
  position: absolute;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.2rem;
  box-shadow: var(--shadow-lg);
  z-index: 3;
  animation: floatCard 5s ease-in-out infinite;
}
.hero-float-card .card-icon {
  font-size: 1.4rem;
  margin-bottom: 2px;
}
.hero-float-card .card-value {
  font-family: var(--ff-heading);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--clr-primary-dark);
}
.hero-float-card .card-label {
  font-size: 0.72rem;
  color: var(--clr-text-muted);
  font-weight: 500;
}
.hero-float-card.card-1 { top: 10%; right: -10%; animation-delay: 0s; }
.hero-float-card.card-2 { bottom: 15%; left: -8%; animation-delay: 1.5s; }
.hero-float-card.card-3 { top: 55%; right: -15%; animation-delay: 3s; }

/* ---------- Features Section ---------- */
.section {
  padding: var(--space-3xl) 0;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--space-3xl);
}
.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  margin-bottom: var(--space-md);
}
.section-header p {
  font-size: 1.1rem;
  color: var(--clr-text-muted);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.feature-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  text-align: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--grad-accent);
  transform: scaleX(0);
  transition: transform var(--transition);
}
.feature-card:hover::before { transform: scaleX(1); }
.feature-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-6px);
}

.feature-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto var(--space-lg);
  background: linear-gradient(135deg, var(--clr-sky-light), var(--clr-sky));
  color: var(--clr-primary-dark);
}

.feature-card h3 {
  font-size: 1.2rem;
  margin-bottom: var(--space-sm);
}
.feature-card p {
  color: var(--clr-text-muted);
  font-size: 0.95rem;
}

/* ---------- Stats Row ---------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  padding: var(--space-3xl) 0;
}

.stat-item {
  text-align: center;
}
.stat-number {
  font-family: var(--ff-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label {
  font-size: 0.95rem;
  color: var(--clr-text-muted);
  margin-top: var(--space-xs);
  font-weight: 500;
}

/* ---------- CTA Section ---------- */
.cta-section {
  background: var(--grad-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-3xl);
  text-align: center;
  margin: var(--space-2xl) 0;
  position: relative;
  overflow: hidden;
}
.cta-section::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.05'%3E%3Cpath d='m36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm-22 22v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.cta-section h2 {
  color: #fff;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  margin-bottom: var(--space-md);
  position: relative;
}
.cta-section p {
  color: rgba(255,255,255,0.85);
  font-size: 1.1rem;
  margin-bottom: var(--space-xl);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}
.cta-section .btn {
  position: relative;
}

.btn-white {
  background: #fff;
  color: var(--clr-primary-dark);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  color: var(--clr-primary-dark);
}

/* ---------- Footer ---------- */
.footer {
  padding: var(--space-2xl) 0;
  text-align: center;
  border-top: 1px solid var(--clr-border);
  color: var(--clr-text-muted);
  font-size: 0.9rem;
}
.footer a {
  color: var(--clr-primary);
  font-weight: 600;
}

/* ---------- Page Wrapper (for auth pages) ---------- */
.page-center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  background: var(--grad-hero);
  position: relative;
  overflow: hidden;
}
.page-center::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26,111,181,0.06) 0%, transparent 70%);
  animation: float 10s ease-in-out infinite;
}

.auth-container {
  width: 100%;
  max-width: 460px;
  text-align: center;
}

.auth-logo {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  margin: 0 auto var(--space-lg);
  box-shadow: var(--shadow-md);
}

.auth-card {
  background: var(--grad-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: var(--space-3xl) var(--space-2xl);
  position: relative;
  z-index: 2;
}

.auth-card h1 {
  font-size: 1.8rem;
  margin-bottom: var(--space-sm);
}
.auth-card .subtitle {
  color: var(--clr-text-muted);
  margin-bottom: var(--space-2xl);
  font-size: 1rem;
}

.divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-xl) 0;
  color: var(--clr-text-muted);
  font-size: 0.85rem;
}
.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--clr-border);
}

/* ---------- User Info Form ---------- */
.userinfo-page {
  min-height: 100vh;
  background: var(--grad-hero);
  padding-top: 100px;
  padding-bottom: var(--space-3xl);
}

.userinfo-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}
.userinfo-header h1 {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}
.userinfo-header p {
  color: var(--clr-text-muted);
  font-size: 1.05rem;
}

.userinfo-card {
  max-width: 580px;
  margin: 0 auto;
}

.userinfo-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.userinfo-icon {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--clr-sky-light), var(--clr-sky));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto var(--space-lg);
  border: 4px solid var(--clr-surface);
  box-shadow: var(--shadow-lg);
}

/* ---------- 404 Page ---------- */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-hero);
  text-align: center;
  padding: var(--space-xl);
}

.error-code {
  font-family: var(--ff-heading);
  font-size: clamp(6rem, 15vw, 12rem);
  font-weight: 900;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: var(--space-md);
  animation: fadeInUp 0.6s var(--ease-out) both;
}

.error-title {
  font-size: 1.6rem;
  margin-bottom: var(--space-md);
  animation: fadeInUp 0.6s var(--ease-out) 0.1s both;
}

.error-text {
  color: var(--clr-text-muted);
  font-size: 1.05rem;
  margin-bottom: var(--space-xl);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 0.6s var(--ease-out) 0.2s both;
}

.error-actions {
  animation: fadeInUp 0.6s var(--ease-out) 0.3s both;
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(20px, -30px); }
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-14px) rotate(1deg); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.5); opacity: 0.5; }
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Scroll-triggered animation class */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Loading Spinner ---------- */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--clr-sky);
  border-top-color: var(--clr-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Toast / Notification ---------- */
.toast {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 9999;
  background: var(--clr-surface);
  border-left: 4px solid var(--clr-accent);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  padding: var(--space-md) var(--space-lg);
  font-weight: 500;
  transform: translateX(120%);
  transition: transform var(--transition);
  max-width: 360px;
}
.toast.show {
  transform: translateX(0);
}
.toast.error {
  border-left-color: var(--clr-error);
}

/* ============================================
   Dashboard Styles
   ============================================ */

/* ---------- Dashboard Layout ---------- */
.dashboard-page {
  min-height: 100vh;
  background: var(--clr-bg);
  padding-top: 80px;
  padding-bottom: var(--space-3xl);
}

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  padding-top: var(--space-xl);
}

.dash-header h1 {
  font-size: 1.8rem;
}
.dash-header .greeting {
  color: var(--clr-text-muted);
  font-size: 1rem;
  font-weight: 400;
  margin-top: 2px;
}

.dash-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* ---------- Filter Bar ---------- */
.filter-bar {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  padding: var(--space-md) var(--space-lg);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-xl);
}

.filter-bar label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--clr-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-select {
  padding: 0.55rem 2.2rem 0.55rem 0.9rem;
  border: 2px solid var(--clr-border);
  border-radius: var(--radius-md);
  font-family: var(--ff-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--clr-text);
  background: var(--clr-bg);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  cursor: pointer;
  transition: all var(--transition);
  outline: none;
}
.form-select:focus {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 4px rgba(26,111,181,0.12);
}

.filter-dates {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.filter-dates input[type="date"] {
  padding: 0.45rem 0.7rem;
  border: 2px solid var(--clr-border);
  border-radius: var(--radius-md);
  font-family: var(--ff-body);
  font-size: 0.85rem;
  color: var(--clr-text);
  background: var(--clr-bg);
  outline: none;
  transition: all var(--transition);
}
.filter-dates input[type="date"]:focus {
  border-color: var(--clr-primary);
}
.filter-separator {
  color: var(--clr-text-muted);
  font-weight: 500;
  font-size: 0.85rem;
}

/* ---------- Stat Cards Grid ---------- */
.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.stat-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-xl);
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}
.stat-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.stat-card.blue::before    { background: var(--clr-primary); }
.stat-card.green::before   { background: var(--clr-accent); }
.stat-card.sky::before     { background: var(--clr-sky); }
.stat-card.dark::before    { background: var(--clr-primary-dark); }

.stat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: var(--space-md);
}
.stat-card.blue .stat-card-icon    { background: rgba(26,111,181,0.08); }
.stat-card.green .stat-card-icon   { background: rgba(46,158,62,0.08); }
.stat-card.sky .stat-card-icon     { background: rgba(168,212,240,0.3); }
.stat-card.dark .stat-card-icon    { background: rgba(13,59,102,0.08); }

.stat-card-value {
  font-family: var(--ff-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--clr-primary-dark);
  line-height: 1.1;
}

.stat-card-label {
  font-size: 0.85rem;
  color: var(--clr-text-muted);
  font-weight: 500;
  margin-top: 4px;
}

/* ---------- Tab Group ---------- */
.tab-group {
  display: flex;
  gap: 2px;
  background: var(--clr-border);
  border-radius: var(--radius-md);
  padding: 3px;
  margin-bottom: var(--space-xl);
  width: fit-content;
}

.tab-btn {
  padding: 0.6rem 1.5rem;
  border: none;
  border-radius: calc(var(--radius-md) - 2px);
  font-family: var(--ff-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--clr-text-muted);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition);
}
.tab-btn:hover {
  color: var(--clr-text);
}
.tab-btn.active {
  background: var(--clr-surface);
  color: var(--clr-primary);
  box-shadow: var(--shadow-sm);
}

.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
  animation: fadeInUp 0.3s var(--ease-out) both;
}

/* ---------- Data Table ---------- */
.data-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  background: var(--clr-surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.data-table thead {
  background: var(--clr-bg);
  border-bottom: 2px solid var(--clr-border);
}
.data-table th {
  padding: 0.85rem 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--clr-text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--clr-border);
  color: var(--clr-text);
  white-space: nowrap;
}
.data-table tbody tr {
  transition: background var(--transition);
}
.data-table tbody tr:hover {
  background: rgba(26,111,181,0.03);
}
.data-table tbody tr:last-child td {
  border-bottom: none;
}

.table-actions {
  display: flex;
  gap: var(--space-xs);
}

.btn-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  background: var(--clr-bg);
  color: var(--clr-text-muted);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.85rem;
  padding: 0;
}
.btn-icon:hover {
  border-color: var(--clr-primary);
  color: var(--clr-primary);
  background: rgba(26,111,181,0.05);
}
.btn-icon.danger:hover {
  border-color: var(--clr-error);
  color: var(--clr-error);
  background: rgba(231,76,60,0.05);
}

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}
.badge-petrol {
  background: rgba(46,158,62,0.1);
  color: #2e9e3e;
}
.badge-diesel {
  background: rgba(26,111,181,0.1);
  color: #1a6fb5;
}
.badge-gas {
  background: rgba(243,156,18,0.1);
  color: #e67e22;
}

/* ---------- Vehicle Cards ---------- */
.vehicles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.vehicle-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition);
  position: relative;
}
.vehicle-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.vehicle-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.vehicle-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--clr-sky-light), var(--clr-sky));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.vehicle-card-name {
  font-family: var(--ff-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--clr-primary-dark);
  margin-bottom: 2px;
}

.vehicle-card-plate {
  font-size: 0.85rem;
  color: var(--clr-text-muted);
  font-weight: 500;
  letter-spacing: 0.03em;
}

.vehicle-card-details {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-lg);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--clr-border);
}

.vehicle-detail {
  font-size: 0.82rem;
  color: var(--clr-text-muted);
}
.vehicle-detail span {
  font-weight: 600;
  color: var(--clr-text);
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(13,59,102,0.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  animation: fadeIn 0.2s ease both;
}
.modal-overlay.active {
  display: flex;
}

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

.modal-content {
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--clr-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: var(--space-2xl);
  animation: slideUp 0.3s var(--ease-out) both;
  position: relative;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
}

.modal-header h2 {
  font-size: 1.4rem;
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--clr-bg);
  color: var(--clr-text-muted);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 1.2rem;
}
.modal-close:hover {
  background: rgba(231,76,60,0.1);
  color: var(--clr-error);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.modal-form .form-select {
  width: 100%;
  padding: 0.85rem 2.4rem 0.85rem 1.2rem;
  font-size: 1rem;
}

/* ---------- Empty State ---------- */
.empty-state {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
  color: var(--clr-text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.2rem;
  color: var(--clr-text-muted);
  margin-bottom: var(--space-sm);
}

.empty-state p {
  font-size: 0.95rem;
  max-width: 360px;
  margin: 0 auto var(--space-lg);
}

/* ---------- Confirm Dialog ---------- */
.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 6000;
  background: rgba(13,59,102,0.3);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
}
.confirm-overlay.active { display: flex; }

.confirm-box {
  background: var(--clr-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: var(--space-2xl);
  max-width: 400px;
  text-align: center;
  animation: slideUp 0.25s var(--ease-out) both;
}
.confirm-box h3 {
  margin-bottom: var(--space-sm);
}
.confirm-box p {
  color: var(--clr-text-muted);
  margin-bottom: var(--space-xl);
}
.confirm-actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
}

.btn-danger {
  background: var(--clr-error);
  color: #fff;
  box-shadow: 0 4px 16px rgba(231,76,60,0.3);
}
.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(231,76,60,0.4);
  color: #fff;
}

/* ---------- User Menu ---------- */
.user-menu {
  position: relative;
}

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.4rem 0.8rem 0.4rem 0.5rem;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-pill);
  background: var(--clr-surface);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--ff-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--clr-text);
}
.user-menu-btn:hover {
  border-color: var(--clr-primary);
  box-shadow: var(--shadow-sm);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  padding: var(--space-sm) 0;
  display: none;
  z-index: 100;
  animation: slideUp 0.2s var(--ease-out) both;
}
.user-dropdown.active { display: block; }

.user-dropdown a,
.user-dropdown button {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  padding: 0.65rem var(--space-lg);
  font-family: var(--ff-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--clr-text);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition);
  text-decoration: none;
}
.user-dropdown a:hover,
.user-dropdown button:hover {
  background: var(--clr-bg);
  color: var(--clr-primary);
}
.user-dropdown .divider-line {
  height: 1px;
  background: var(--clr-border);
  margin: var(--space-xs) 0;
}

/* ---------- Dashboard Loading ---------- */
.dash-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl);
  gap: var(--space-md);
  flex-direction: column;
  color: var(--clr-text-muted);
}

/* ============================================
   Responsive Breakpoints
   ============================================ */


@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-2xl);
  }
  .hero-text {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .hero-subtitle { text-align: center; }
  .hero-actions { justify-content: center; }
  .hero-visual { order: -1; }
  .hero-logo-wrapper { width: 280px; height: 280px; }
  .hero-logo-wrapper img { width: 190px; height: 190px; }
  .hero-float-card.card-1 { right: 0%; }
  .hero-float-card.card-3 { right: 0%; }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }

  /* Dashboard */
  .dash-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .navbar-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(240,245,250,0.98);
    backdrop-filter: blur(20px);
    padding: var(--space-lg);
    gap: var(--space-md);
    border-bottom: 1px solid var(--clr-border);
    box-shadow: var(--shadow-md);
  }
  .navbar-links.active { display: flex; }

  .nav-toggle { display: flex; }
  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  .hero {
    padding-top: 100px;
    min-height: auto;
    padding-bottom: var(--space-3xl);
  }

  .hero-title { font-size: clamp(2rem, 7vw, 3rem); }

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

  .stats-row {
    grid-template-columns: 1fr 1fr;
  }

  .cta-section {
    padding: var(--space-2xl) var(--space-lg);
    border-radius: var(--radius-lg);
  }

  .hero-float-card { display: none; }

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

  .auth-card {
    padding: var(--space-2xl) var(--space-lg);
  }

  /* Dashboard */
  .dash-stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .dash-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .vehicles-grid {
    grid-template-columns: 1fr;
  }
  .modal-content {
    padding: var(--space-xl);
  }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--space-md); }

  .hero-logo-wrapper { width: 220px; height: 220px; }
  .hero-logo-wrapper img { width: 160px; height: 160px; }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .hero-actions .btn { width: 100%; }

  .btn { padding: 0.75rem 1.6rem; }
  .btn-lg { padding: 0.95rem 2rem; }

  .stats-row { grid-template-columns: 1fr; }

  /* Dashboard */
  .dash-stats-grid {
    grid-template-columns: 1fr;
  }
  .dash-actions {
    width: 100%;
  }
  .dash-actions .btn {
    flex: 1;
  }
  .tab-group {
    width: 100%;
  }
  .tab-btn {
    flex: 1;
    text-align: center;
    padding: 0.6rem 0.8rem;
    font-size: 0.82rem;
  }
  .stat-card-value {
    font-size: 1.6rem;
  }
}

/* ============================================
   Notification Bell & FCM Toast
   ============================================ */

/* Nav right container */
.nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* Notification Bell */
.notif-bell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--clr-border);
  background: var(--clr-surface);
  cursor: pointer;
  transition: all var(--transition);
  color: var(--clr-text-muted);
}
.notif-bell:hover {
  border-color: var(--clr-primary);
  color: var(--clr-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.notif-bell:active {
  transform: translateY(0) scale(0.95);
}

/* Bell states */
.notif-bell.notif-enabled {
  border-color: var(--clr-accent);
  color: var(--clr-accent);
  background: rgba(46,158,62,0.06);
}
.notif-bell.notif-enabled:hover {
  background: rgba(46,158,62,0.12);
  border-color: var(--clr-accent-light);
}
.notif-bell.notif-denied {
  border-color: var(--clr-error);
  color: var(--clr-error);
  opacity: 0.6;
}
.notif-bell.notif-default {
  animation: bellWiggle 3s ease-in-out 2s 2;
}

/* Bell dot indicator */
.notif-bell-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--clr-warning);
  border: 2px solid var(--clr-surface);
}
.notif-bell-dot.dot-active {
  background: var(--clr-accent);
  animation: dotPulse 2s ease-in-out infinite;
}

/* Bell pulse on notification receive */
.notif-bell.notif-pulse {
  animation: bellRing 0.6s ease-in-out 3;
}

/* Bell animations */
@keyframes bellWiggle {
  0%, 100% { transform: rotate(0); }
  15% { transform: rotate(12deg); }
  30% { transform: rotate(-10deg); }
  45% { transform: rotate(8deg); }
  60% { transform: rotate(-6deg); }
  75% { transform: rotate(3deg); }
}

@keyframes bellRing {
  0%, 100% { transform: rotate(0) scale(1); }
  25% { transform: rotate(15deg) scale(1.1); }
  50% { transform: rotate(-12deg) scale(1.05); }
  75% { transform: rotate(8deg) scale(1.08); }
}

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(46,158,62,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(46,158,62,0); }
}

/* FCM Foreground Toast */
.fcm-toast {
  position: fixed;
  top: 80px;
  right: var(--space-lg);
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  max-width: 400px;
  padding: var(--space-lg);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-left: 4px solid var(--clr-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  z-index: 5000;
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.4s var(--ease-out);
}
.fcm-toast.show {
  transform: translateX(0);
  opacity: 1;
}

.fcm-toast-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--clr-sky-light), var(--clr-sky));
  border-radius: var(--radius-sm);
}

.fcm-toast-content {
  flex: 1;
  min-width: 0;
}

.fcm-toast-title {
  font-family: var(--ff-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--clr-primary-dark);
  margin-bottom: 2px;
}

.fcm-toast-body {
  font-size: 0.85rem;
  color: var(--clr-text-muted);
  line-height: 1.4;
}

.fcm-toast-close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  background: none;
  border: none;
  color: var(--clr-text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 4px;
  border-radius: 4px;
  transition: all var(--transition);
  line-height: 1;
}
.fcm-toast-close:hover {
  background: var(--clr-bg);
  color: var(--clr-text);
}

/* Responsive */
@media (max-width: 480px) {
  .fcm-toast {
    right: var(--space-md);
    left: var(--space-md);
    max-width: none;
  }
  .notif-bell {
    width: 38px;
    height: 38px;
  }
  .notif-bell svg {
    width: 18px;
    height: 18px;
  }
}

/* Notification wrapper for relative positioning */
.notif-wrapper {
  position: relative;
}

/* ─── Notification Panel ─────────────────── */
.notif-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 380px;
  max-height: 480px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 3000;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: fadeInUp 0.25s var(--ease-out);
}
.notif-panel.active {
  display: flex;
}

.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--clr-border);
}
.notif-panel-header h3 {
  font-family: var(--ff-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--clr-primary-dark);
  margin: 0;
}

.notif-clear-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: var(--clr-text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.notif-clear-btn:hover {
  background: rgba(228,63,63,0.08);
  color: var(--clr-error);
}

.notif-panel-body {
  overflow-y: auto;
  max-height: 400px;
  padding: var(--space-sm) 0;
}

/* Notification Item */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  transition: background var(--transition);
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.notif-item:last-child {
  border-bottom: none;
}
.notif-item:hover {
  background: var(--clr-bg);
}

.notif-item-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(26,111,181,0.08), rgba(26,111,181,0.04));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.notif-item-content {
  flex: 1;
  min-width: 0;
}

.notif-item-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--clr-primary-dark);
  margin-bottom: 2px;
  line-height: 1.3;
}

.notif-item-body {
  font-size: 0.8rem;
  color: var(--clr-text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-item-time {
  font-size: 0.7rem;
  color: var(--clr-text-muted);
  margin-top: 4px;
  opacity: 0.7;
}

/* Empty & Loading States */
.notif-empty {
  padding: var(--space-2xl) var(--space-lg);
  text-align: center;
}
.notif-empty-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
  opacity: 0.4;
}
.notif-empty p {
  font-weight: 600;
  color: var(--clr-text-muted);
  margin: 0 0 4px;
  font-size: 0.9rem;
}
.notif-empty span {
  font-size: 0.8rem;
  color: var(--clr-text-muted);
  opacity: 0.7;
}

.notif-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
}

/* Responsive */
@media (max-width: 480px) {
  .notif-panel {
    position: fixed;
    top: 60px;
    right: var(--space-sm);
    left: var(--space-sm);
    width: auto;
    max-height: 70vh;
  }
}

/* ============================================
   Legal Pages (Terms / Privacy)
   ============================================ */

.legal-page {
  padding-top: 120px;
  padding-bottom: var(--space-3xl);
  min-height: 100vh;
  background: var(--grad-hero);
  position: relative;
  overflow: hidden;
}
.legal-page::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -15%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26,111,181,0.06) 0%, transparent 70%);
  animation: float 10s ease-in-out infinite;
  pointer-events: none;
}
.legal-page::after {
  content: '';
  position: absolute;
  bottom: -10%;
  left: -10%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(46,158,62,0.04) 0%, transparent 70%);
  animation: float 12s ease-in-out infinite reverse;
  pointer-events: none;
}

/* ─── Legal Hero ─── */
.legal-hero {
  text-align: center;
  margin-bottom: var(--space-3xl);
  position: relative;
  z-index: 2;
}
.legal-icon {
  width: 88px;
  height: 88px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto var(--space-lg);
  background: linear-gradient(135deg, var(--clr-sky-light), var(--clr-sky));
  box-shadow: var(--shadow-lg);
  animation: logoFloat 6s ease-in-out infinite;
}
.legal-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 900;
  margin-bottom: var(--space-sm);
}
.legal-subtitle {
  font-size: 1.15rem;
  color: var(--clr-text-muted);
  max-width: 500px;
  margin: 0 auto var(--space-lg);
}
.legal-meta {
  display: flex;
  justify-content: center;
}
.meta-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.45rem 1.1rem;
  background: rgba(26,111,181,0.08);
  border: 1px solid rgba(26,111,181,0.15);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--clr-primary);
}
.meta-badge svg {
  flex-shrink: 0;
}

/* ─── Legal Content Cards ─── */
.legal-content {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  position: relative;
  z-index: 2;
}

.legal-card {
  background: var(--grad-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-2xl);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.legal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-out);
}
.legal-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.legal-card:hover::before {
  transform: scaleX(1);
}

.legal-section-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
  background: linear-gradient(135deg, var(--clr-sky-light), var(--clr-sky));
}

.legal-card h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--clr-primary-dark);
}

.legal-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  color: var(--clr-primary);
}

.legal-card p {
  color: var(--clr-text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: var(--space-sm);
}

.legal-card ul {
  list-style: none;
  padding: 0;
  margin: var(--space-sm) 0 var(--space-md);
}

.legal-card ul li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: var(--space-sm);
  color: var(--clr-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.legal-card ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad-accent);
}

.legal-card ul li strong {
  color: var(--clr-text);
  font-weight: 600;
}

.legal-card a {
  color: var(--clr-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal-card a:hover {
  color: var(--clr-primary-light);
}

/* Highlight box for important info */
.highlight-box {
  background: rgba(46,158,62,0.08);
  border: 1px solid rgba(46,158,62,0.2);
  border-left: 4px solid var(--clr-accent);
  border-radius: var(--radius-sm);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-md) 0;
  font-size: 0.95rem;
  color: var(--clr-text);
}

/* Contact info box */
.contact-info {
  background: rgba(26,111,181,0.06);
  border: 1px solid rgba(26,111,181,0.12);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-top: var(--space-md);
}
.contact-info p {
  margin-bottom: var(--space-xs);
  color: var(--clr-text);
}

/* ─── Legal Navigation ─── */
.legal-nav {
  text-align: center;
  margin-top: var(--space-3xl);
  position: relative;
  z-index: 2;
}

/* ─── Updated Footer ─── */
.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}
.footer-links {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.footer-links a {
  color: var(--clr-text-muted);
  font-weight: 500;
  font-size: 0.85rem;
  transition: color var(--transition);
}
.footer-links a:hover {
  color: var(--clr-primary);
}
.footer-divider {
  color: var(--clr-border);
  font-size: 0.85rem;
  user-select: none;
}

/* ─── Legal Page Responsive ─── */
@media (max-width: 768px) {
  .legal-page {
    padding-top: 100px;
  }
  .legal-card {
    padding: var(--space-xl);
  }
  .legal-icon {
    width: 72px;
    height: 72px;
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .legal-page {
    padding-top: 90px;
  }
  .legal-card {
    padding: var(--space-lg);
  }
  .legal-hero h1 {
    font-size: 1.8rem;
  }
  .footer-content {
    gap: var(--space-xs);
  }
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}
