/* ==========================================================================
   Algo Streaks - Ultra Modern Glass & Electric Aurora Theme
   Inspired by Linear / Vercel / Raycast Dark Aesthetic
   ========================================================================== */

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

:root {
  /* Surface & Background Hierarchy */
  --bg-root: #05070f;
  --bg-surface: rgba(13, 18, 33, 0.7);
  --bg-surface-elevated: rgba(22, 29, 49, 0.85);
  --bg-card: rgba(15, 23, 42, 0.65);
  --bg-card-hover: rgba(26, 36, 64, 0.75);
  --bg-input: rgba(10, 15, 29, 0.8);

  /* Borders & Specular Highlights */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-glow: rgba(99, 102, 241, 0.4);
  --glass-specular: inset 0 1px 0 0 rgba(255, 255, 255, 0.1);

  /* Electric Gradients */
  --grad-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
  --grad-flame: linear-gradient(135deg, #ff4500 0%, #ff8c00 50%, #fbbf24 100%);
  --grad-solar: linear-gradient(135deg, #f43f5e 0%, #fb923c 100%);
  --grad-emerald: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
  --grad-cyan: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%);
  --grad-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);

  /* Neon Accents */
  --accent-indigo: #6366f1;
  --accent-violet: #8b5cf6;
  --accent-flame: #ff6b35;
  --accent-gold: #f59e0b;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --accent-cyan: #06b6d4;

  /* Typography Colors */
  --text-pure: #ffffff;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Shadows & Glows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 20px 50px -15px rgba(0, 0, 0, 0.8);
  --glow-indigo: 0 0 35px -5px rgba(99, 102, 241, 0.35);
  --glow-flame: 0 0 35px -5px rgba(255, 87, 34, 0.45);
  --glow-emerald: 0 0 30px -5px rgba(16, 185, 129, 0.35);

  /* Radius & Motion */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */
html {
  scrollbar-gutter: stable;
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-root);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  overflow-x: hidden;

  /* Ambient Mesh Lighting + Dot Matrix Grid */
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(99, 102, 241, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 90% 20%, rgba(244, 63, 94, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(255, 107, 53, 0.07) 0%, transparent 50%),
    radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 28px 28px;
  background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-pure);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

a {
  color: var(--accent-indigo);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: #a5b4fc;
}

code, pre {
  font-family: 'JetBrains Mono', monospace;
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.main-content {
  flex: 1;
  padding: 36px 0 70px 0;
}

/* ==========================================================================
   Header & Navbar
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(5, 7, 15, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  width: 100%;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-pure);
  letter-spacing: -0.03em;
}

.brand-icon {
  font-size: 1.7rem;
  display: inline-block;
  animation: flame-flicker 2.5s infinite ease-in-out;
  filter: drop-shadow(0 0 10px rgba(255, 107, 53, 0.6));
}

.brand-text span {
  background: var(--grad-flame);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  border: 1px solid transparent;
}

.nav-link:hover {
  color: var(--text-pure);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: #ffffff;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.2);
}

.nav-streak-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(255, 87, 34, 0.18) 0%, rgba(245, 158, 11, 0.1) 100%);
  border: 1px solid rgba(255, 107, 53, 0.35);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.88rem;
  color: #ff9d66;
  box-shadow: var(--glow-flame);
  letter-spacing: 0.02em;
}

/* ==========================================================================
   Buttons & Interactive Elements
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-base);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  user-select: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--grad-primary);
  color: #ffffff;
  box-shadow: 0 4px 20px -2px rgba(99, 102, 241, 0.5), var(--glass-specular);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px -2px rgba(99, 102, 241, 0.7), var(--glass-specular);
  color: #ffffff;
}

.btn-flame {
  background: var(--grad-flame);
  color: #05070f;
  font-weight: 800;
  box-shadow: 0 4px 20px -2px rgba(255, 107, 53, 0.5), var(--glass-specular);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-flame:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255, 107, 53, 0.7), var(--glass-specular);
  color: #000;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-pure);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateY(-1px);
}

.btn-success {
  background: var(--grad-emerald);
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.4);
}

.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.6);
  color: #fff;
}

.btn-emerald {
  background: var(--grad-emerald);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 20px -2px rgba(16, 185, 129, 0.5), var(--glass-specular);
  border: 1px solid rgba(255, 255, 255, 0.25);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-emerald:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(16, 185, 129, 0.7), var(--glass-specular);
  color: #ffffff;
}

.btn-danger {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.2) 0%, rgba(225, 29, 72, 0.15) 100%);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.35);
}

.btn-danger:hover {
  background: #f43f5e;
  color: #fff;
  border-color: #f43f5e;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 30px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

/* ==========================================================================
   Cards & Glass Surfaces
   ========================================================================== */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  transition: var(--transition-base);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow-lg);
}

.card-flame-highlight {
  border-color: rgba(255, 107, 53, 0.35);
  background: linear-gradient(180deg, rgba(255, 107, 53, 0.08) 0%, rgba(15, 23, 42, 0.65) 100%);
  box-shadow: var(--glow-flame);
}

/* ==========================================================================
   Hero & Showcase
   ========================================================================== */
.hero {
  padding: 70px 0 50px;
  text-align: center;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 107, 53, 0.1);
  border: 1px solid rgba(255, 107, 53, 0.35);
  padding: 7px 18px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  color: #ff9d66;
  margin-bottom: 24px;
  box-shadow: 0 0 16px rgba(255, 107, 53, 0.2);
}

.hero-title {
  font-size: 3.8rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 22px;
}

.hero-title .gradient-text {
  background: var(--grad-flame);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 20px rgba(255, 107, 53, 0.3));
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 38px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

/* ==========================================================================
   Stats Grid
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow-md);
}

.stat-icon-wrapper {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.stat-flame-icon {
  background: linear-gradient(135deg, rgba(255, 87, 34, 0.2) 0%, rgba(245, 158, 11, 0.1) 100%);
  border-color: rgba(255, 107, 53, 0.4);
  box-shadow: 0 0 20px rgba(255, 107, 53, 0.3);
}

.stat-info .stat-value {
  font-family: 'Outfit', sans-serif;
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-pure);
}

.stat-info .stat-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 6px;
}

/* ==========================================================================
   Streak Banner Widget
   ========================================================================== */
.streak-banner {
  background: linear-gradient(135deg, rgba(255, 87, 34, 0.15) 0%, rgba(245, 158, 11, 0.05) 50%, rgba(15, 23, 42, 0.6) 100%);
  border: 1px solid rgba(255, 107, 53, 0.35);
  border-radius: var(--radius-lg);
  padding: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--glow-flame);
}

.streak-banner::before {
  content: '🔥';
  position: absolute;
  right: -25px;
  bottom: -35px;
  font-size: 11rem;
  opacity: 0.07;
  pointer-events: none;
}

.streak-banner-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.streak-banner-desc {
  color: var(--text-muted);
  max-width: 580px;
  font-size: 0.98rem;
  line-height: 1.6;
}

/* ==========================================================================
   Forms & Inputs
   ========================================================================== */
.form-group {
  margin-bottom: 22px;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.form-control {
  width: 100%;
  padding: 13px 18px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-pure);
  font-family: inherit;
  font-size: 0.96rem;
  transition: var(--transition-fast);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25), inset 0 2px 4px rgba(0, 0, 0, 0.4);
  background: rgba(14, 21, 38, 0.9);
}

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

input[type="date"] {
  color-scheme: dark;
  cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.85);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: opacity var(--transition-fast);
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 0.8;
}

.form-help {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 6px;
}

/* File Upload Zone */
.upload-zone {
  border: 2px dashed rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  padding: 38px 24px;
  text-align: center;
  background: rgba(10, 15, 29, 0.5);
  cursor: pointer;
  transition: var(--transition-base);
  position: relative;
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--accent-flame);
  background: rgba(255, 107, 53, 0.06);
  box-shadow: 0 0 30px rgba(255, 107, 53, 0.15);
}

.upload-icon {
  font-size: 2.8rem;
  margin-bottom: 12px;
  display: inline-block;
  animation: float-icon 3s ease-in-out infinite;
}

.upload-preview {
  margin: 18px auto 0;
  max-width: 100%;
  max-height: 260px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  display: none;
  object-fit: contain;
  box-shadow: var(--shadow-md);
}

/* ==========================================================================
   Badges
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge-pending {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-approved {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-rejected {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.35);
}

.badge-admin {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.15) 100%);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.4);
}

/* ==========================================================================
/* ==========================================================================
   Alerts & Toast Popups (Optimized for Readability & Polish)
   ========================================================================== */
.flash-container {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  width: 90%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.alert {
  pointer-events: auto;
  width: 100%;
  box-sizing: border-box;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid transparent;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 25px rgba(0, 0, 0, 0.4);
  animation: toast-pop-in 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 0.35s ease, transform 0.35s ease;
  word-break: break-word;
}

.alert-close {
  background: none;
  border: none;
  color: currentColor;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.75;
  padding: 4px 6px;
  margin-left: 6px;
  flex-shrink: 0;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.alert-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.1);
}

@keyframes toast-pop-in {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.alert-danger,
.alert-error {
  background: rgba(36, 10, 18, 0.96);
  color: #fecdd3;
  border-color: rgba(244, 63, 94, 0.55);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(244, 63, 94, 0.3);
}

.alert-danger:hover,
.alert-error:hover {
  border-color: rgba(244, 63, 94, 0.75);
}

.alert-success {
  background: rgba(8, 28, 20, 0.96);
  color: #a7f3d0;
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 25px rgba(16, 185, 129, 0.25);
}

.alert-warning {
  background: rgba(32, 22, 8, 0.96);
  color: #fef08a;
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 25px rgba(245, 158, 11, 0.25);
}

.alert-info {
  background: rgba(14, 20, 42, 0.96);
  color: #c7d2fe;
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 25px rgba(99, 102, 241, 0.25);
}

/* ==========================================================================
   Tables & Leaderboards
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.table th {
  padding: 16px 20px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border-subtle);
}

.table td {
  padding: 18px 20px;
  font-size: 0.96rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.table tr {
  transition: var(--transition-fast);
}

.table tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

/* ==========================================================================
   Submission Gallery
   ========================================================================== */
.entries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.entry-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-base);
  display: flex;
  flex-direction: column;
}

.entries-grid .entry-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
}

.entry-screenshot-thumb {
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: #000;
  cursor: pointer;
  transition: var(--transition-base);
}

.entry-screenshot-thumb:hover {
  transform: scale(1.03);
}

.entry-content {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.entry-date {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
}

.entry-problems-tag {
  background: rgba(99, 102, 241, 0.15);
  color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, 0.35);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
}

.entry-notes {
  font-size: 0.92rem;
  color: var(--text-main);
  white-space: pre-wrap;
  margin-top: 8px;
  line-height: 1.6;
  flex: 1;
}

/* ==========================================================================
   Lightbox Modal
   ========================================================================== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 5, 12, 0.88);
  backdrop-filter: blur(14px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal.active {
  display: flex;
}

.modal-content {
  max-width: 90%;
  max-height: 90vh;
  position: relative;
}

.modal-content img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.9);
}

.modal-close {
  position: absolute;
  top: -45px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.2rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.modal-close:hover {
  color: #ff6b35;
  transform: scale(1.1);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 34px 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* ==========================================================================
   Micro-Animations
   ========================================================================== */
@keyframes flame-flicker {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    filter: drop-shadow(0 0 8px rgba(255, 107, 53, 0.6));
  }
  33% {
    transform: scale(1.12) rotate(-3deg);
    filter: drop-shadow(0 0 16px rgba(255, 107, 53, 0.9));
  }
  66% {
    transform: scale(1.05) rotate(3deg);
    filter: drop-shadow(0 0 12px rgba(255, 140, 0, 0.8));
  }
}

@keyframes float-icon {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* ==========================================================================
   SaaS Dashboard & Sidebar Layout
   ========================================================================== */
.saas-wrapper {
  display: flex;
  height: 100vh;
  width: 100vw;
  max-width: 100vw;
  overflow: hidden;
  background-color: var(--bg-root);
}

.saas-sidebar {
  width: 240px;
  min-width: 240px;
  max-width: 240px;
  background: #0d121f;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  height: 100vh;
  z-index: 100;
  flex-shrink: 0;
  overflow: hidden;
  transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1),
              min-width 0.2s cubic-bezier(0.4, 0, 0.2, 1),
              max-width 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Collapsed Compact State */
.saas-sidebar.collapsed {
  width: 68px;
  min-width: 68px;
  max-width: 68px;
}

.saas-sidebar.collapsed .brand-text,
.saas-sidebar.collapsed .saas-nav-header,
.saas-sidebar.collapsed .nav-text,
.saas-sidebar.collapsed .nav-count,
.saas-sidebar.collapsed .user-info-text,
.saas-sidebar.collapsed .sidebar-badge {
  display: none !important;
}

.saas-sidebar.collapsed .saas-sidebar-brand {
  justify-content: center;
  padding: 18px 0;
}

.saas-sidebar.collapsed .saas-nav-item {
  justify-content: center;
  padding: 10px 0;
  margin-bottom: 4px;
}

.saas-sidebar.collapsed .saas-nav-left {
  gap: 0;
  font-size: 1.15rem;
}

.saas-sidebar.collapsed .saas-sidebar-footer {
  justify-content: center;
  padding: 14px 0;
  flex-direction: column;
  gap: 8px;
}

.sidebar-toggle-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.sidebar-mobile-close-btn {
  display: none !important;
}

.saas-sidebar-brand {
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.saas-nav-group {
  padding: 12px 8px;
  flex: 1;
  overflow-y: auto;
}

.saas-nav-header {
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 10px 6px;
}

.saas-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: var(--radius-xs);
  color: #94a3b8;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 2px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease;
}

.saas-nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.saas-nav-item.active {
  background: #1e293b;
  color: #ffffff;
  font-weight: 600;
  border-color: rgba(255, 255, 255, 0.08);
}

.saas-nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.saas-sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #090d17;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.saas-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-root);
}

.saas-topbar {
  height: 62px;
  min-height: 62px;
  max-height: 62px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(13, 18, 31, 0.98);
  backdrop-filter: blur(16px);
  flex-shrink: 0;
  z-index: 90;
  width: 100%;
  box-sizing: border-box;
}

.saas-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px 32px 48px;
  width: 100%;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

.saas-tab-pane {
  display: none;
  animation: fadeIn 0.25s ease-out;
}

.saas-tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* SaaS Page Header Banners */
.saas-header-banner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.saas-header-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-pure);
  display: flex;
  align-items: center;
  gap: 10px;
}

.saas-header-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 4px;
  max-width: 680px;
  line-height: 1.5;
}

/* Dashboard Grid Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1100px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-widget {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: var(--transition-base);
}

.dashboard-widget:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.dashboard-widget::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

.dashboard-widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dashboard-widget-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-pure);
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-card-clickable {
  cursor: pointer;
  text-decoration: none;
}

.stat-card-clickable:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.4);
}

/* Quick Action List */
.quick-action-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  transition: var(--transition-fast);
}

.quick-action-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.16);
}

/* Scoreboard Podium in Dashboard & Scoreboard */
.podium-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .podium-grid {
    grid-template-columns: 1fr;
  }
}

.podium-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: var(--transition-base);
}

.podium-card:hover {
  transform: translateY(-3px);
}

.podium-card.podium-gold {
  border-color: rgba(245, 158, 11, 0.45);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.08) 0%, var(--bg-card) 100%);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
}

.podium-card.podium-silver {
  border-color: rgba(148, 163, 184, 0.35);
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.08) 0%, var(--bg-card) 100%);
}

.podium-card.podium-bronze {
  border-color: rgba(217, 119, 6, 0.35);
  background: linear-gradient(180deg, rgba(217, 119, 6, 0.08) 0%, var(--bg-card) 100%);
}

/* ==========================================================================
   Desktop-First Baseline Protections (PC & Laptop >= 992px)
   ========================================================================== */
.saas-admin-body {
  background-color: var(--bg-root);
  margin: 0;
  padding: 0;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

.navbar-toggle {
  display: none !important;
}

.saas-sidebar-backdrop {
  display: none;
}

/* ==========================================================================
   Responsive Styles: Tablet & Mobile (< 992px)
   Strictly isolated from PC & Laptop viewports
   ========================================================================== */
@media (max-width: 991.98px) {
  /* ── 1. Navbar & Mobile Drawer Navigation ── */
  .navbar-inner {
    height: 64px;
    padding: 0 16px;
    position: relative;
    justify-content: space-between;
  }

  .brand {
    font-size: 1.25rem;
    gap: 8px;
  }

  .brand-icon {
    font-size: 1.45rem;
  }

  .navbar-toggle {
    display: inline-flex !important;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 1001;
  }

  .navbar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(99, 102, 241, 0.4);
  }

  .hamburger-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .navbar-toggle.active .hamburger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .navbar-toggle.active .hamburger-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }

  .navbar-toggle.active .hamburger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10, 15, 29, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.85);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 18px 24px;
    gap: 8px;
    z-index: 1000;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    box-sizing: border-box;
  }

  .nav-links.nav-links-open {
    display: flex !important;
    animation: navMenuSlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes navMenuSlideDown {
    from {
      opacity: 0;
      transform: translateY(-8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .nav-links li {
    width: 100%;
  }

  .nav-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    width: 100%;
    box-sizing: border-box;
  }

  .nav-links .btn {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
    margin-top: 4px;
    box-sizing: border-box;
  }

  .nav-streak-pill {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
    padding: 8px 16px;
  }

  /* ── 2. SaaS Admin Operations Center: Off-Canvas Drawer ── */
  .saas-admin-body {
    overflow: hidden;
    height: 100vh;
    width: 100vw;
  }

  .saas-wrapper {
    display: block;
    position: relative;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
  }

  .saas-sidebar-backdrop {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .saas-sidebar-backdrop.active {
    opacity: 1;
    pointer-events: auto;
  }

  .saas-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 275px !important;
    max-width: 82vw !important;
    min-width: 0 !important;
    height: 100vh !important;
    z-index: 999 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.26s ease !important;
    box-shadow: none !important;
    background: #0d121f !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  .saas-sidebar.mobile-open {
    transform: translateX(0) !important;
    box-shadow: 12px 0 36px rgba(0, 0, 0, 0.85) !important;
  }

  .saas-sidebar.collapsed {
    width: 275px !important;
  }
  .saas-sidebar.collapsed .brand-text,
  .saas-sidebar.collapsed .saas-nav-header,
  .saas-sidebar.collapsed .nav-text,
  .saas-sidebar.collapsed .nav-count,
  .saas-sidebar.collapsed .user-info-text,
  .saas-sidebar.collapsed .sidebar-badge {
    display: inline !important;
  }
  .saas-sidebar.collapsed .saas-nav-header {
    display: block !important;
  }
  .saas-sidebar.collapsed .saas-nav-item {
    justify-content: space-between !important;
    padding: 9px 12px !important;
  }
  .saas-sidebar.collapsed .saas-sidebar-brand {
    justify-content: space-between !important;
    padding: 18px 16px !important;
  }
  .saas-sidebar.collapsed .saas-sidebar-footer {
    justify-content: flex-start !important;
    padding: 16px !important;
    flex-direction: row !important;
  }

  .sidebar-mobile-close-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease;
  }
  .sidebar-mobile-close-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
  }

  .sidebar-toggle-btn {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    font-size: 1.15rem !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    color: #f1f5f9 !important;
  }

  .saas-main {
    width: 100% !important;
    height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .saas-topbar {
    height: 56px;
    min-height: 56px;
    padding: 0 12px !important;
    gap: 10px !important;
    justify-content: space-between !important;
  }

  .saas-topbar-left {
    gap: 10px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  .saas-breadcrumb-wrap {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #active-breadcrumb {
    font-size: 0.9rem !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 150px;
  }

  .saas-topbar-right {
    gap: 8px !important;
  }

  .saas-logout-btn {
    padding: 5px 9px !important;
    font-size: 0.76rem !important;
  }

  .saas-content {
    padding: 18px 16px 40px;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Fix Form Centering Scroll Trap on Mobile/Tablet */
  .saas-content.tab-upload-active,
  .saas-content:has(#tab-upload-question.active),
  .saas-content:has(#tab-change-password.active) {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 16px 14px 40px !important;
    height: auto !important;
    max-height: none !important;
  }

  .upload-question-pane {
    height: auto !important;
    max-height: none !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  #tab-upload-question.active,
  #tab-change-password.active {
    display: block !important;
    min-height: auto !important;
  }

  .upload-question-card {
    margin: 0 auto 30px !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 18px 14px !important;
  }

  /* ── 3. SaaS Operations Cards & Banners ── */
  .stats-grid-squarish {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
  }

  .stat-card-squarish {
    width: auto;
    min-height: 140px;
    padding: 16px;
  }

  .stat-value-squarish {
    font-size: 1.75rem;
  }

  .stat-icon-squarish {
    width: 38px;
    height: 38px;
    font-size: 1.2rem;
  }

  .saas-header-banner {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    margin-bottom: 18px;
  }

  .saas-header-title {
    font-size: 1.25rem;
  }
}

/* ==========================================================================
   Responsive Styles: Compact Mobile Devices (<= 768px)
   ========================================================================== */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.1rem;
  }

  .streak-banner {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
    padding: 18px 16px;
  }

  .container {
    padding: 0 12px;
  }

  /* Stats cards */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .stat-card {
    padding: 16px 18px;
    gap: 14px;
  }

  .stat-value {
    font-size: 1.6rem;
  }

  /* Clean Leaderboard on Mobile */
  .lb-page-title {
    font-size: 1.6rem;
  }

  .lb-controls-wrap {
    width: 100%;
  }

  .lb-search-input {
    flex: 1 1 100% !important;
    width: 100% !important;
  }

  .lb-shift-select {
    flex: 1 1 110px !important;
  }

  #lb-my-rank-btn {
    width: 100%;
    justify-content: center;
  }

  .lb-podium-strip {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .lb-podium-card {
    padding: 14px 16px;
  }

  .lb-podium-avatar-frame {
    margin: 4px 0 8px;
  }

  .lb-table-avatar,
  .lb-table-avatar-initials {
    width: 38px;
    height: 38px;
    font-size: 0.95rem;
  }

  /* Tables horizontal touch scrolling */
  .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table th {
    padding: 12px 14px;
    font-size: 0.72rem;
  }

  .table td {
    padding: 12px 14px;
    font-size: 0.88rem;
  }

  .table-pagination-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    text-align: center;
    padding: 12px 14px;
  }

  /* Admin Filter Rows & Search */
  .saas-filter-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100%;
  }

  .saas-filter-group {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .saas-filter-group select {
    flex: 1;
    width: 100% !important;
  }

  .saas-search-input {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .saas-search-wrapper {
    width: 100%;
  }

  .saas-qm-filters {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .saas-qm-filters #qm-search {
    width: 100% !important;
    flex: 1 1 100%;
  }

  .saas-qm-filters #qm-diff-filter,
  .saas-qm-filters #qm-date-filter {
    flex: 1 1 calc(50% - 4px);
    width: auto !important;
    min-width: 120px;
  }

  .saas-qm-filters #qm-clear-filters {
    width: 100% !important;
  }

  /* Modals on mobile */
  .modal {
    padding: 12px !important;
    align-items: center !important;
  }

  .modal-card {
    max-height: 90vh !important;
    overflow-y: auto !important;
    padding: 16px 14px !important;
    border-radius: 12px !important;
    width: 100% !important;
    box-sizing: border-box;
  }

  /* Form 3-col row stacks to single column on mobile */
  .saas-form-row-3col {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  /* Member Table pagination controls center */
  .table-pagination-footer > div:last-child {
    justify-content: center !important;
    flex-wrap: wrap !important;
  }

  /* Flash toasts on mobile - properly centered with transform: none and edge margin */
  .flash-container {
    top: 14px !important;
    left: 14px !important;
    right: 14px !important;
    width: auto !important;
    max-width: none !important;
    transform: none !important;
  }

  .alert {
    padding: 12px 14px;
    font-size: 0.88rem;
    gap: 10px;
  }
}

/* ==========================================================================
   Responsive Styles: Medium Mobile Screens (<= 640px)
   ========================================================================== */
@media (max-width: 640px) {
  .saas-topbar-date {
    display: none !important;
  }
  #active-breadcrumb-section,
  #active-breadcrumb-separator {
    display: none !important;
  }
  #toggle-declined-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   Responsive Styles: Small Mobile Screens (<= 480px)
   ========================================================================== */
@media (max-width: 480px) {
  /* Prevent iOS Safari auto-zoom on form field focus */
  input[type="text"],
  input[type="password"],
  input[type="email"],
  select,
  textarea {
    font-size: 16px !important;
  }

  .btn {
    padding: 9px 16px;
    font-size: 0.88rem;
  }

  .auth-card {
    padding: 20px 16px !important;
  }

  .entry-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .entry-header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .upload-question-card {
    padding: 16px !important;
  }

  .saas-topbar-badge {
    display: none !important;
  }
  .stat-card-squarish {
    min-height: 110px !important;
    padding: 12px 10px !important;
  }
  .stat-value-squarish {
    font-size: 1.45rem !important;
  }
  .stat-label-squarish {
    font-size: 0.74rem !important;
  }
}

/* ==========================================================================
   Member Status Indicators (Active / Inactive)
   ========================================================================== */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.status-pill.status-active {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-pill.status-active .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  flex-shrink: 0;
}

.status-pill.status-inactive {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.status-pill.status-inactive .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #64748b;
  flex-shrink: 0;
}

/* ==========================================================================
   Table Pagination Controls
   ========================================================================== */
.table-pagination-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.4);
  flex-wrap: wrap;
  gap: 12px;
}

.page-num-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: var(--transition-fast);
}

.page-num-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-pure);
  border-color: rgba(255, 255, 255, 0.2);
}

.page-num-btn.active {
  background: var(--accent-indigo);
  color: #ffffff;
  border-color: var(--accent-indigo);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.45);
}

.page-num-btn:disabled,
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ==========================================================================
   Squarish Metric Cards (Operations Dashboard)
   ========================================================================== */
.stats-grid-squarish {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.stat-card-squarish {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 22px;
  width: 220px;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  box-sizing: border-box;
}

.stat-card-squarish:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.45);
}

.stat-icon-squarish {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.stat-info-squarish {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: auto;
  width: 100%;
}

.stat-value-squarish {
  font-family: 'Outfit', sans-serif;
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-pure);
}

.stat-label-squarish {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 8px;
  line-height: 1.3;
}

/* ==========================================================================
   Upload Question & Change Password Panes - Desktop Centered Form
   ========================================================================== */
.saas-content.tab-upload-active,
.saas-content:has(#tab-upload-question.active),
.saas-content:has(#tab-change-password.active) {
  padding: 0 !important;
  overflow: hidden !important;
}

.upload-question-pane {
  padding: 16px !important;
  margin: 0 !important;
  height: calc(100vh - 62px);
  max-height: calc(100vh - 62px);
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}

#tab-upload-question.active,
#tab-change-password.active {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100%;
}

.upload-question-card {
  max-width: 540px !important;
  width: 100%;
  margin: auto auto !important;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(99, 102, 241, 0.35) !important;
  border-radius: var(--radius-md) !important;
  padding: 20px 24px !important;
  box-sizing: border-box;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
}

.saas-form-row-3col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.upload-question-pane::-webkit-scrollbar {
  width: 5px;
}
.upload-question-pane::-webkit-scrollbar-track {
  background: rgba(10, 15, 29, 0.4);
}
.upload-question-pane::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.4);
  border-radius: var(--radius-full);
}

/* ==========================================================================
   Auth Pages (Login & Register) - Centered, Compact & Sleek
   ========================================================================== */
.auth-wrapper {
  min-height: calc(100vh - 76px - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 0;
  width: 100%;
  box-sizing: border-box;
}

.auth-card {
  width: 100%;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px -15px rgba(0, 0, 0, 0.85);
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.6), transparent);
}

.auth-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.22);
  padding: 3px 12px;
  border-radius: var(--radius-full);
}

@media (max-width: 600px) {
  .auth-grid-2col {
    grid-template-columns: 1fr !important;
    gap: 11px !important;
  }
}

/* ==========================================================================
   Clean Leaderboard UI (Spacious, Minimalist, Elegant)
   ========================================================================== */
.lb-page-header {
  margin-bottom: 24px;
}

.lb-page-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #818cf8;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.22);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
}

.lb-page-title {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-pure);
  margin-bottom: 6px;
}

.lb-page-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 14px;
}

.lb-stats-pill-bar {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 6px 18px;
  gap: 16px;
  font-size: 0.84rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.lb-stat-sep {
  width: 1px;
  height: 14px;
  background: var(--border-subtle);
}

.lb-user-banner {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  margin-bottom: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  gap: 12px;
}

/* Compact, graceful podium */
.lb-podium-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.lb-podium-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--transition-base);
}

.lb-podium-card:hover {
  transform: translateY(-2px);
}

.lb-podium-card.rank-1 {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(15, 23, 42, 0.7) 100%);
}

.lb-podium-card.rank-2 {
  border-color: rgba(203, 213, 225, 0.28);
  background: linear-gradient(135deg, rgba(203, 213, 225, 0.05) 0%, rgba(15, 23, 42, 0.7) 100%);
}

.lb-podium-card.rank-3 {
  border-color: rgba(217, 119, 6, 0.28);
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.05) 0%, rgba(15, 23, 42, 0.7) 100%);
}

/* Standings table card */
.lb-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.lb-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.35);
}

.lb-clean-table th {
  padding: 12px 18px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-subtle);
}

.lb-clean-table td {
  padding: 14px 18px;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
  vertical-align: middle;
}

.lb-clean-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.my-rank-row td {
  background: rgba(99, 102, 241, 0.04) !important;
}

.my-rank-row {
  border-left: 3px solid #6366f1;
}

@keyframes rowPulse {
  0% { background: rgba(99, 102, 241, 0.3); }
  100% { background: rgba(99, 102, 241, 0.04); }
}

.row-highlight-flash {
  animation: rowPulse 1.4s ease-out;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.spinner-inline {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #818cf8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

/* ==========================================================================
   Profile Page Redesign (Compact & Non-Scrollable)
   ========================================================================== */

.profile-layout-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  align-items: stretch;
}

@media (max-width: 920px) {
  .profile-layout-grid {
    grid-template-columns: 1fr;
  }
}

.profile-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.profile-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.16) 0%, rgba(217, 70, 239, 0.10) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.profile-avatar-wrap {
  position: relative;
  width: 54px;
  height: 54px;
  margin-top: 4px;
  margin-bottom: 8px;
}

.profile-avatar-initials {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
  border: 2px solid var(--bg-card);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.profile-avatar-img {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 2px solid var(--bg-card);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
  display: block;
}

.profile-avatar-edit-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #1e293b;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 2;
}

.profile-avatar-edit-badge:hover {
  background: #6366f1;
  border-color: #818cf8;
  transform: scale(1.1);
}

.profile-status-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  background: #10b981;
  border: 2px solid var(--bg-card);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.profile-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.profile-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
}

.profile-kpi-chip {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 8px 10px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.profile-kpi-chip:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
}

.profile-kpi-val {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.15;
}

.profile-kpi-lbl {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin-top: 2px;
}

.profile-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.81rem;
}

.profile-meta-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* Tabbed Settings Workspace */
.profile-settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
}

.profile-tabs-nav {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.03);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  margin-bottom: 12px;
}

.profile-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-xs);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.profile-tab-btn:hover {
  color: var(--text-pure);
  background: rgba(255, 255, 255, 0.04);
}

.profile-tab-btn.active {
  background: #1e293b;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.profile-tab-pane {
  display: none;
}

.profile-tab-pane.active {
  display: block;
  animation: tabFadeIn 0.18s ease-in-out;
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.password-input-wrap {
  position: relative;
}

.password-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px 6px;
  font-size: 0.85rem;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.password-toggle-btn:hover {
  color: var(--text-pure);
}

/* ==========================================================================
   Leaderboard Top 3 Podium Cards
   ========================================================================== */

.lb-podium-strip {
  display: grid;
  grid-template-columns: 1fr 1.05fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
  align-items: end;
}

@media (max-width: 768px) {
  .lb-podium-strip {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.lb-podium-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 14px 14px;
  text-align: center;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lb-podium-card:hover {
  transform: translateY(-2px);
}

.lb-podium-card.rank-1 {
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.09) 0%, var(--bg-card) 65%);
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow: 0 4px 20px rgba(251, 191, 36, 0.12);
  padding: 20px 16px 16px;
}

.lb-podium-card.rank-2 {
  background: linear-gradient(180deg, rgba(203, 213, 225, 0.06) 0%, var(--bg-card) 65%);
  border-color: rgba(203, 213, 225, 0.28);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.lb-podium-card.rank-3 {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.06) 0%, var(--bg-card) 65%);
  border-color: rgba(245, 158, 11, 0.28);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.lb-podium-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 800;
  border-radius: 20px;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.lb-podium-badge.badge-gold {
  background: rgba(251, 191, 36, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.4);
  font-size: 0.76rem;
  padding: 3px 11px;
}

.lb-podium-badge.badge-silver {
  background: rgba(203, 213, 225, 0.12);
  color: #e2e8f0;
  border: 1px solid rgba(203, 213, 225, 0.28);
  font-size: 0.72rem;
  padding: 2px 10px;
}

.lb-podium-badge.badge-bronze {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.28);
  font-size: 0.72rem;
  padding: 2px 10px;
}

/* Dominant Podium Avatars */
.lb-podium-avatar-frame {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 6px 0 14px;
}

.lb-podium-avatar {
  border-radius: 50%;
  object-fit: cover;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.lb-podium-avatar.avatar-gold {
  width: 84px;
  height: 84px;
  border: 3.5px solid #fbbf24;
  box-shadow: 0 0 25px rgba(251, 191, 36, 0.45), 0 8px 24px rgba(0, 0, 0, 0.55);
}

.lb-podium-avatar.avatar-silver {
  width: 70px;
  height: 70px;
  border: 3px solid #cbd5e1;
  box-shadow: 0 0 18px rgba(203, 213, 225, 0.35), 0 6px 18px rgba(0, 0, 0, 0.45);
}

.lb-podium-avatar.avatar-bronze {
  width: 70px;
  height: 70px;
  border: 3px solid #f59e0b;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.35), 0 6px 18px rgba(0, 0, 0, 0.45);
}

.lb-podium-avatar-initials {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #ffffff;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.lb-podium-avatar-initials.avatar-gold {
  width: 84px;
  height: 84px;
  font-size: 2rem;
  border: 3.5px solid #fbbf24;
  box-shadow: 0 0 25px rgba(251, 191, 36, 0.45), 0 8px 24px rgba(0, 0, 0, 0.55);
}

.lb-podium-avatar-initials.avatar-silver {
  width: 70px;
  height: 70px;
  font-size: 1.6rem;
  border: 3px solid #cbd5e1;
  box-shadow: 0 0 18px rgba(203, 213, 225, 0.35), 0 6px 18px rgba(0, 0, 0, 0.45);
}

.lb-podium-avatar-initials.avatar-bronze {
  width: 70px;
  height: 70px;
  font-size: 1.6rem;
  border: 3px solid #f59e0b;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.35), 0 6px 18px rgba(0, 0, 0, 0.45);
}

.lb-podium-card:hover .lb-podium-avatar,
.lb-podium-card:hover .lb-podium-avatar-initials {
  transform: scale(1.07);
}

/* Floating medal badges on podium avatar frames */
.lb-podium-medal-tag {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  border: 2px solid var(--bg-card);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.lb-podium-medal-tag.tag-gold {
  background: #fbbf24;
}

.lb-podium-medal-tag.tag-silver {
  background: #cbd5e1;
}

.lb-podium-medal-tag.tag-bronze {
  background: #f59e0b;
}

.lb-podium-stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  width: 100%;
}

.lb-podium-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lb-podium-stat-val {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.15;
}

.lb-podium-stat-lbl {
  font-size: 0.62rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 1px;
}

/* Dominant Table Avatars */
.lb-table-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease, border-color 0.22s ease;
}

.lb-table-avatar-initials {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease, border-color 0.22s ease;
}

.lb-table-avatar.avatar-rank-1,
.lb-table-avatar-initials.avatar-rank-1 {
  border-color: #fbbf24;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.45);
}

.lb-table-avatar.avatar-rank-2,
.lb-table-avatar-initials.avatar-rank-2 {
  border-color: #cbd5e1;
  box-shadow: 0 0 10px rgba(203, 213, 225, 0.35);
}

.lb-table-avatar.avatar-rank-3,
.lb-table-avatar-initials.avatar-rank-3 {
  border-color: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.35);
}

.lb-row:hover .lb-table-avatar,
.lb-row:hover .lb-table-avatar-initials {
  transform: scale(1.12);
  border-color: #818cf8;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.5);
}
