body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}

.sidebar-title {
  font-family: "Capture Smallz", sans-serif; /* Corrected Name */
  /* Add any additional styling if needed */
}

.welcome-message {
  font-family: "Capture Smallz", sans-serif; /* Corrected Name */
  /* Add any additional styling if needed */
}

/* Font definitions for the MyRacing App */
@font-face {
  font-family: 'CaptureSmallz';
  src: url(/e29ae9794c8a1fcbca56.ttf) format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap; /* Show fallback font immediately while loading */
}

/* Racing-style text styling */
.racing-font {
  font-family: 'CaptureSmallz', 'Impact', 'Haettenschweiler', sans-serif;
  letter-spacing: 1px;
  font-weight: bold;
}

.racing-text {
  color: white;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
  position: relative;
  display: inline-block;
  padding: 0 5px;
}

.racing-text::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100%;
  height: 3px;
  background: red;
  transform: skew(-15deg);
}
.App {
  text-align: center;
}

.App-logo {
  height: 40vmin;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .App-logo {
    animation: App-logo-spin infinite 20s linear;
  }
}

.App-header {
  background-color: #282c34;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: calc(10px + 2vmin);
  color: white;
}

.App-link {
  color: #61dafb;
}

@keyframes App-logo-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ============================================= */
/* FIX FOR BLURRY INPUT FIELDS - TARGETED APPROACH */
/* ============================================= */

/* ONLY remove blur from MUI input field borders (fieldsets) */
.MuiOutlinedInput-notchedOutline,
fieldset.MuiOutlinedInput-notchedOutline {
  /* Remove the problematic blur that was making text unreadable */
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  filter: none !important;
  -webkit-filter: none !important;
}

/* Ensure input text itself is crisp */
.MuiInputBase-input,
.MuiOutlinedInput-input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
  /* No blur on the actual input elements */
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  filter: none !important;
  -webkit-filter: none !important;
  
  /* Ensure text is readable */
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  text-rendering: optimizeLegibility !important;
}

/* Remove blur from buttons ONLY if they're causing issues */
.MuiButton-root.MuiButton-contained,
.MuiButton-root.MuiButton-outlined {
  /* Buttons can keep their glassmorphic effect if using opacity */
  /* Only remove if text is blurry */
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Disabled contained buttons must stay READABLE (previously a dark gradient kept
   showing with faint text → unreadable until enabled). Flat grey + visible label. */
.MuiButton-root.MuiButton-contained.Mui-disabled {
  background: #cbd5e1 !important;
  background-image: none !important;
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
  opacity: 1 !important;
  box-shadow: none !important;
}

/* ============================================= */
/* PRESERVE GLASSMORPHIC DESIGN */
/* ============================================= */

/* Glass panels should use opacity-based glass effect, not blur */
.glass-panel,
.login-panel,
.form-container {
  /* Keep the glassmorphic look without blur */
  background: rgba(255, 255, 255, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: 
    0 8px 32px rgba(31, 38, 135, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5) !important;
}

/* Input containers should have subtle background */
.MuiTextField-root .MuiOutlinedInput-root {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(26, 43, 99, 0.2);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.MuiTextField-root .MuiOutlinedInput-root:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(26, 43, 99, 0.3);
}

.MuiTextField-root .MuiOutlinedInput-root.Mui-focused {
  background: rgba(255, 255, 255, 0.95);
  border-color: #1976d2;
  box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.1);
}

/* Labels should be visible */
.MuiInputLabel-root {
  background-color: white;
  padding: 0 4px;
  color: rgba(0, 0, 0, 0.6);
}

/* FIX FOR LOGIN/REGISTER PAGE LABEL POSITIONING */

/* Fix non-shrunk label position (when input is empty) */
.MuiInputLabel-root.MuiInputLabel-outlined:not(.MuiInputLabel-shrink) {
  /* Center the label properly in the input field */
  transform: translate(14px, 20px) scale(1) !important;
  background-color: transparent !important;
  z-index: 1;
}

/* Fix shrunk label position (when input has value or is focused) */
.MuiInputLabel-root.MuiInputLabel-outlined.MuiInputLabel-shrink {
  /* Position label on the top border */
  transform: translate(14px, -9px) scale(0.75) !important;
  background-color: white !important;
  padding: 0 8px !important;
  z-index: 10 !important;
}

/* Ensure proper background for shrunk labels */
.MuiInputLabel-shrink,
.MuiInputLabel-formControl.MuiInputLabel-shrink,
.MuiFormLabel-filled {
  background-color: white !important;
  padding: 0 8px !important;
  z-index: 10 !important;
}

/* Fix the notched outline legend that creates space for the label */
.MuiOutlinedInput-root .MuiOutlinedInput-notchedOutline legend {
  padding: 0 8px !important;
  max-width: 1000px !important;
  font-size: 0.75em !important;
}

/* When input is focused, ensure label stays visible */
.MuiOutlinedInput-root.Mui-focused .MuiInputLabel-shrink,
.MuiOutlinedInput-root.Mui-focused .MuiInputLabel-formControl {
  background-color: white !important;
  color: #1976d2 !important;
}

/* Specific fix for login and register forms */
.form-section .MuiInputLabel-root,
.login-panel .MuiInputLabel-root,
.register-panel .MuiInputLabel-root {
  z-index: 10 !important;
}

/* Override any conflicting background when not shrunk */
.form-section .MuiInputLabel-root:not(.MuiInputLabel-shrink) {
  background-color: transparent !important;
}
/* Login Page Glassmorphic Styles */

.login-glass-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #F0F4F8 0%, #E2E8F0 100%);
}

/* Background Effects - Simple demo style */
.login-background {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  pointer-events: none;
}

.logo-watermark {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60%;
  height: 60%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.03;
  transform: rotate(-15deg);
}

/* Language Switcher Container */
.language-switcher-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
}

/* Login Content */
.login-content {
  position: relative;
  z-index: 1;
  padding: 2rem 1rem;
}

/* Glass Panel - Cross-browser solution without backdrop-filter issues */
.login-panel {
  position: relative;
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(26, 43, 99, 0.15);
  border-radius: 24px !important;
  box-shadow: 
    0 20px 40px -12px rgba(50, 50, 93, 0.25),
    0 10px 20px -8px rgba(0, 0, 0, 0.15),
    inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  padding: 3rem 2.5rem;
  transition: all 0.3s ease;
  overflow: hidden;
}

/* REMOVED backdrop-filter from login-panel to prevent input blur
   The blur effect was causing all child elements (including inputs) to appear blurry
   Now using only background opacity for the glass effect */

.login-panel:hover {
  box-shadow: 
    0 24px 48px -12px rgba(50, 50, 93, 0.3),
    0 12px 24px -8px rgba(0, 0, 0, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
}

/* Login Header */
.login-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.login-logo {
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 4px 20px rgba(26, 43, 99, 0.15));
  transition: transform 0.3s ease;
}

.login-logo:hover {
  transform: scale(1.05);
}

.login-title {
  font-family: 'CaptureSmallz', sans-serif !important;
  font-weight: 900 !important;
  margin-bottom: 0.5rem !important;
}

.gradient-text {
  background: linear-gradient(135deg, #1A2B63, #457B9D);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-subtitle {
  color: #64748B;
  font-size: 0.95rem;
}

/* Form Section - Completely isolated from any blur effects */
.form-section {
  margin-bottom: 2rem;
  position: relative;
  z-index: 100;
  /* Create new stacking context */
  isolation: isolate;
  /* Ensure no filters affect this section */
  filter: none !important;
  -webkit-filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* CRITICAL FIX: Label positioning for login form */
.form-section .MuiInputLabel-root.MuiInputLabel-outlined:not(.MuiInputLabel-shrink) {
  /* Label position when input is empty - centered in field */
  transform: translate(14px, 20px) scale(1) !important;
  background-color: transparent !important;
  padding: 0 !important;
  z-index: 11;
}

.form-section .MuiInputLabel-root.MuiInputLabel-outlined.MuiInputLabel-shrink {
  /* Label position when input is focused or has value - on border */
  transform: translate(14px, -9px) scale(0.75) !important;
  background-color: white !important;
  padding: 0 8px !important;
  z-index: 12 !important;
}

/* OAuth Section */
.oauth-section {
  margin: 2rem 0;
}

.divider-glass {
  margin: 2rem 0 !important;
  &::before,
  &::after {
    border-color: rgba(26, 43, 99, 0.1) !important;
  }
}

.divider-text {
  color: #64748B;
  padding: 0 1rem;
}

.google-button {
  padding: 0.75rem 1rem !important;
  font-weight: 500 !important;
  text-transform: none !important;
  background: white !important;
  border: 1px solid rgba(26, 43, 99, 0.2);
  transition: all 0.3s ease !important;
  /* Chrome blur fix */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.google-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 43, 99, 0.15);
}

/* Sign Up Link Section */
.signup-link-section {
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Footer */
.login-footer {
  text-align: center;
  margin-top: 2rem;
  padding: 1rem;
}

/* Form Input Styling Override */
.form-section .MuiTextField-root {
  margin-bottom: 1rem;
}

/* Input fields - Guaranteed clarity across all browsers */
.form-section .MuiOutlinedInput-root {
  background: #FFFFFF !important;
  border: 2px solid rgba(26, 43, 99, 0.2) !important;
  border-radius: 8px !important;
  transition: all 0.3s ease;
  position: relative;
  z-index: 10;
  /* Force rendering context */
  will-change: border-color, box-shadow;
  /* Disable any inherited filters */
  filter: none !important;
  -webkit-filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.form-section .MuiOutlinedInput-root fieldset {
  border: none !important;
}

.form-section .MuiOutlinedInput-root:hover {
  background: #FFFFFF !important;
  border-color: rgba(26, 43, 99, 0.4) !important;
  box-shadow: 0 4px 12px rgba(26, 43, 99, 0.08);
}

.form-section .MuiOutlinedInput-root.Mui-focused {
  background: #FFFFFF !important;
  border-color: #1A2B63 !important;
  box-shadow: 0 6px 20px rgba(26, 43, 99, 0.15);
  outline: none;
}

.form-section .MuiButton-contained {
  background: linear-gradient(135deg, #1A2B63, #457B9D) !important;
  box-shadow: 0 4px 20px rgba(26, 43, 99, 0.25) !important;
  font-weight: 600 !important;
  padding: 0.75rem !important;
  transition: all 0.3s ease !important;
}

.form-section .MuiButton-contained:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(26, 43, 99, 0.35) !important;
}

/* Responsive Design */
@media (max-width: 600px) {
  .login-panel {
    padding: 2rem 1.5rem;
    border-radius: 20px !important;
  }

  .login-logo {
    width: 80px !important;
    height: 80px !important;
  }

  .login-title {
    font-size: 1.75rem !important;
  }

  .login-subtitle {
    font-size: 0.875rem;
  }

  .language-switcher-container {
    top: 0.5rem;
    right: 0.5rem;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .login-panel {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid #1A2B63;
  }

  .google-button,
  .form-section .MuiOutlinedInput-root {
    border-width: 2px !important;
    border-color: #1A2B63 !important;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .login-logo:hover,
  .google-button:hover,
  .form-section .MuiButton-contained:hover {
    transform: none;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}

/* Loading State */
.login-panel.loading {
  pointer-events: none;
  opacity: 0.7;
}

/* Input Text - Maximum clarity */
.form-section .MuiOutlinedInput-input {
  color: #000000 !important;
  font-weight: 600 !important;
  font-size: 16px !important;
  opacity: 1 !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* Ensure text is not affected by any filters */
  filter: none !important;
  -webkit-filter: none !important;
}

.form-section .MuiInputLabel-root {
  color: rgba(26, 43, 99, 0.8) !important;
  font-weight: 600 !important;
  /* Remove fixed background and padding - let shrink state control it */
}

.form-section .MuiInputLabel-root.Mui-focused {
  color: #1A2B63 !important;
  font-weight: 700 !important;
}

/* Error State */
.error-message {
  background: rgba(230, 57, 70, 0.1);
  border: 1px solid rgba(230, 57, 70, 0.3);
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
  color: #E63946;
  text-align: center;
}
/* RegisterPageGlass CSS - Glassmorphic Design */

.register-container {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Background Effects - Simple demo style */
.register-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(135deg, #F0F4F8 0%, #E2E8F0 100%);
}

.register-background .logo-watermark {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60%;
  height: 60%;
  opacity: 0.03;
  pointer-events: none;
  transform: rotate(-15deg);
}

/* Language Switcher */
.language-switcher-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

/* Main Content */
.register-content {
  position: relative;
  z-index: 1;
  padding: 2rem 1rem;
}

/* Glass Panel */
.register-panel {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px !important;
  border: 1px solid rgba(26, 43, 99, 0.1);
  box-shadow: 
    0 8px 32px 0 rgba(31, 38, 135, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5) !important;
  padding: 3rem 2.5rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.register-panel:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 12px 40px 0 rgba(31, 38, 135, 0.15),
    inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

/* Header Section */
.register-header {
  text-align: center;
  margin-bottom: 2rem;
}

.register-logo {
  margin: 0 auto 1rem;
  transition: transform 0.3s ease;
}

.register-logo:hover {
  transform: scale(1.05);
}

.register-title {
  font-family: 'CaptureSmallz', 'Bebas Neue', sans-serif !important;
  font-size: 2.5rem !important;
  font-weight: 400 !important;
  margin-bottom: 0.5rem !important;
  letter-spacing: 0.1em;
}

.gradient-text {
  background: linear-gradient(135deg, #1A2B63 0%, #457B9D 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.register-subtitle {
  color: #64748B;
  font-size: 1rem;
  margin-top: 0.5rem;
}

/* Form Section */
.form-section {
  margin-bottom: 1.5rem;
}

/* CRITICAL FIX: Label positioning for register form */
.form-section .MuiInputLabel-root.MuiInputLabel-outlined:not(.MuiInputLabel-shrink) {
  /* Label position when input is empty - centered in field */
  transform: translate(14px, 20px) scale(1) !important;
  background-color: transparent !important;
  padding: 0 !important;
  z-index: 11;
}

.form-section .MuiInputLabel-root.MuiInputLabel-outlined.MuiInputLabel-shrink {
  /* Label position when input is focused or has value - on border */
  transform: translate(14px, -9px) scale(0.75) !important;
  background-color: white !important;
  padding: 0 8px !important;
  z-index: 12 !important;
}

.form-section .MuiTextField-root {
  margin-bottom: 1rem;
}

.form-section .MuiOutlinedInput-root {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(26, 43, 99, 0.2);
  transition: all 0.3s ease;
}

.form-section .MuiOutlinedInput-root:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(26, 43, 99, 0.3);
}

.form-section .MuiOutlinedInput-root.Mui-focused {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(26, 43, 99, 0.4);
}

/* OAuth Section */
.oauth-section {
  margin: 1.5rem 0;
}

.auth-divider {
  margin: 1.5rem 0;
}

.auth-divider .divider-text {
  color: #94A3B8;
  padding: 0 1rem;
  background: rgba(255, 255, 255, 0.8);
}

.oauth-button {
  padding: 0.75rem !important;
  border-color: rgba(26, 43, 99, 0.2) !important;
  background: rgba(255, 255, 255, 0.5) !important;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease !important;
}

.oauth-button:hover {
  background: rgba(255, 255, 255, 0.8) !important;
  border-color: rgba(26, 43, 99, 0.3) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.google-button {
  color: #1A2B63 !important;
}

/* Login Link Section */
.login-link-section {
  text-align: center;
  margin-top: 1.5rem;
}

.auth-prompt {
  color: #64748B;
}

.auth-link {
  color: #457B9D !important;
  text-decoration: none !important;
  font-weight: 500;
  transition: color 0.3s ease;
}

.auth-link:hover {
  color: #1A2B63 !important;
  text-decoration: underline !important;
}

/* Footer */
.auth-footer {
  text-align: center;
  margin-top: 2rem;
  padding: 1rem;
}

.footer-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
}

/* Loading State */
.register-panel.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* Responsive Design */
@media (max-width: 600px) {
  .register-panel {
    padding: 2rem 1.5rem;
    border-radius: 20px !important;
  }

  .register-logo {
    width: 80px !important;
    height: 80px !important;
  }

  .register-title {
    font-size: 2rem !important;
  }

  .language-switcher-container {
    top: 10px;
    right: 10px;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: high) {
  .register-panel {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid #1A2B63;
  }
  
  .gradient-text {
    background: #1A2B63;
    -webkit-text-fill-color: #1A2B63;
  }
}

/* Focus States */
.oauth-button:focus-visible,
.auth-link:focus-visible {
  outline: 2px solid #457B9D;
  outline-offset: 2px;
}

/* Password Requirements */
.password-requirements {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 0.5rem;
  border: 1px solid rgba(26, 43, 99, 0.1);
}

/* Country Select */
.country-select {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
}

.country-select:hover {
  background: rgba(255, 255, 255, 0.7);
}

/* Role Select */
.role-buttons {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.role-button {
  flex: 1;
  background: rgba(255, 255, 255, 0.5) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(26, 43, 99, 0.2) !important;
  transition: all 0.3s ease !important;
}

.role-button:hover {
  background: rgba(255, 255, 255, 0.7) !important;
  border-color: rgba(26, 43, 99, 0.3) !important;
}

.role-button.selected {
  background: rgba(26, 43, 99, 0.1) !important;
  border-color: #457B9D !important;
  color: #1A2B63 !important;
}
/* GlassmorphicLayout — MotoGP-inspired sidebar navigation */

/* ========================================================================== */
/* Layout Structure                                                            */
/* ========================================================================== */

.glassmorphic-layout {
  min-height: 100vh;
  width: 100%;
  position: relative;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* ========================================================================== */
/* Centralized Background                                                      */
/* ========================================================================== */

.glassmorphic-background-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #F0F4F8 0%, #E2E8F0 100%);
  z-index: -1;
  pointer-events: none;
}


/* Transparent page containers */
[class*="-glass-container"],
[class*="-container"][class*="glass"],
[class*="-page"][class*="glass"] {
  background: transparent !important;
  position: relative;
}

/* ========================================================================== */
/* Sidebar                                                                     */
/* ========================================================================== */

.sidebar-motogp {
  width: 240px;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  background: #ffffff;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow: hidden;
}

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 6px 8px;
}

/* Hide scrollbar but keep scrollable */
.sidebar-scroll::-webkit-scrollbar {
  width: 3px;
}
.sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 3px;
}

/* Main content shifts right on desktop */
.glassmorphic-content {
  margin-left: 240px;
  min-height: 100vh;
  position: relative;
}

.glassmorphic-content > * {
  padding: 2rem;
  max-width: 1600px;
  margin: 0 auto;
}

/* ========================================================================== */
/* Brand Header                                                                */
/* ========================================================================== */

.sidebar-brand {
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.sidebar-brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}


.sidebar-brand-name {
  font-family: 'CaptureSmallz', 'Bebas Neue', sans-serif;
  font-size: 1.625rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: #18181b;
  line-height: 1;
}

/* ========================================================================== */
/* Section Group Headers (collapsible)                                         */
/* ========================================================================== */

.sidebar-group-header {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 8px 3px;
  cursor: pointer;
  font-size: 0.96875rem;
  letter-spacing: 0.04em;
  color: #52525b;
  text-transform: none;
  font-weight: 600;
  user-select: none;
  transition: color 0.1s;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}

.sidebar-group-header:hover {
  color: #71717a;
}

.sidebar-group-header::before {
  content: '';
  width: 2px;
  height: 9px;
  background: #dc2626;
  border-radius: 1px;
  flex-shrink: 0;
}

.sidebar-group-chevron {
  margin-left: auto;
  width: 10px;
  height: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.sidebar-group-chevron svg {
  width: 10px;
  height: 10px;
  font-size: 10px;
  opacity: 0.35;
}

.sidebar-group-chevron.collapsed svg {
  transform: rotate(-90deg);
}

.sidebar-group-body {
  overflow: hidden;
  max-height: 600px;
  transition: max-height 0.25s ease;
}

.sidebar-group-body.collapsed {
  max-height: 0;
}

/* ========================================================================== */
/* Navigation Items                                                            */
/* ========================================================================== */

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  margin: 1px 0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.1s;
  text-decoration: none;
  color: #52525b;
  font-size: 0.96875rem;
  font-weight: 500;
  position: relative;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}

.sidebar-item:hover {
  background: rgba(0, 0, 0, 0.035);
  color: #18181b;
}

.sidebar-item.active {
  background: rgba(220, 38, 38, 0.06);
  color: #dc2626;
}

.sidebar-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 3px;
  background: #dc2626;
  border-radius: 0 2px 2px 0;
}

.sidebar-item-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-item-icon svg,
.sidebar-item-icon .MuiSvgIcon-root {
  width: 17px;
  height: 17px;
  font-size: 17px;
}

.sidebar-item-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-item-chevron {
  width: 12px;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.sidebar-item-chevron svg {
  width: 11px;
  height: 11px;
  font-size: 11px;
  opacity: 0.3;
}

.sidebar-item-chevron.expanded svg {
  transform: rotate(180deg);
}

/* Sub-items */
.sidebar-sub-items {
  padding-left: 14px;
  overflow: hidden;
  max-height: 300px;
  transition: max-height 0.2s ease;
}

.sidebar-sub-items.collapsed {
  max-height: 0;
}

.sidebar-sub-items .sidebar-item {
  font-size: 0.84375rem;
  padding: 5px 10px;
  color: #71717a;
}

.sidebar-sub-items .sidebar-item:hover {
  color: #18181b;
}

.sidebar-sub-items .sidebar-item.active {
  color: #dc2626;
}

/* ========================================================================== */
/* Badges                                                                      */
/* ========================================================================== */

.sidebar-badge {
  font-size: 0.53125rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.sidebar-badge-pro {
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
}

.sidebar-badge-count {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
  min-width: 14px;
  text-align: center;
}

.sidebar-badge-beta {
  background: rgba(99, 102, 241, 0.08);
  color: #6366f1;
}

/* ========================================================================== */
/* Divider                                                                     */
/* ========================================================================== */

.sidebar-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.04);
  margin: 4px 8px;
}

/* ========================================================================== */
/* Footer                                                                      */
/* ========================================================================== */

.sidebar-footer {
  padding: 8px 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.sidebar-user-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dc2626, #ea580c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  cursor: pointer;
  border: none;
}


.sidebar-user-name {
  font-size: 0.90625rem;
  font-weight: 600;
  color: #18181b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.sidebar-user-plan {
  font-size: 0.84375rem;
  color: #a1a1aa;
}

.sidebar-footer-buttons {
  display: flex;
  gap: 2px;
}

.sidebar-footer-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: transparent;
  border: none;
  color: #a1a1aa;
  transition: all 0.1s;
}

.sidebar-footer-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #18181b;
}

.sidebar-footer-btn svg,
.sidebar-footer-btn .MuiSvgIcon-root {
  width: 14px;
  height: 14px;
  font-size: 14px;
}

.sidebar-subscription-link {
  font-size: 0.875rem;
  color: #71717a;
  cursor: pointer;
  margin-top: 6px;
  margin-left: 36px;
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  transition: color 0.1s;
  background: none;
  border: none;
  padding: 0;
}

.sidebar-subscription-link:hover {
  color: #dc2626;
}

.sidebar-subscription-link svg,
.sidebar-subscription-link .MuiSvgIcon-root {
  width: 12px;
  height: 12px;
  font-size: 12px;
}

.sidebar-version {
  font-size: 0.53125rem;
  color: #d4d4d8;
  text-align: center;
  margin-top: 4px;
}

/* ========================================================================== */
/* Mobile Top Bar                                                              */
/* ========================================================================== */

.mobile-topbar {
  display: none;
}

@media (max-width: 1024px) {
  .sidebar-motogp {
    position: fixed;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    width: 75%;
    max-width: 300px;
    box-shadow: none;
    z-index: 200;
  }

  .sidebar-motogp.open {
    transform: translateX(0);
    box-shadow: 8px 0 30px rgba(0, 0, 0, 0.15);
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 199;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .sidebar-overlay.visible {
    opacity: 1;
    pointer-events: auto;
  }

  .glassmorphic-content {
    margin-left: 0;
    /* No margin-top: .mobile-topbar is position:sticky (in flow) and already
       reserves its 48px. A margin here double-counts it and creates a big gap. */
    min-height: calc(100vh - 48px);
  }

  .glassmorphic-content > * {
    padding: 1rem;
  }

  .mobile-topbar {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 98;
    height: 48px;
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    align-items: center;
    padding: 0 12px;
    gap: 8px;
  }

  .mobile-topbar-hamburger {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: transparent;
    border: none;
    color: #18181b;
  }

  .mobile-topbar-hamburger svg,
  .mobile-topbar-hamburger .MuiSvgIcon-root {
    width: 20px;
    height: 20px;
    font-size: 20px;
  }

  .mobile-topbar-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
  }

  .mobile-topbar-logo-icon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    overflow: hidden;
  }

  .mobile-topbar-logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .mobile-topbar-logo-name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #18181b;
  }

  .mobile-topbar-avatar {
    display: none;
  }
}

/* Prevent body scroll when mobile drawer is open */
body.sidebar-open {
  overflow: hidden;
}

/* ========================================================================== */
/* Accessibility                                                               */
/* ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================= */
/* Redesign T4: mobile bottom tab bar ("next", riders)          */
/* ============================================================= */
.bottom-tab-bar { display: none; }

@media (max-width: 1024px) {
  .bottom-tab-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 150;
    min-height: 58px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(26, 43, 99, 0.97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.18);
  }
  .bottom-tab {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: none;
    background: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.62);
    padding: 8px 2px;
    transition: color 0.15s ease;
    min-width: 0;
  }
  .bottom-tab .MuiSvgIcon-root { font-size: 23px; }
  .bottom-tab-label {
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .bottom-tab--active { color: #fff; }
  .bottom-tab--active .MuiSvgIcon-root { color: #E63946; }

  /* keep page content clear of the fixed bar */
  .has-bottom-tabs .glassmorphic-content {
    padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px) + 12px);
  }
}

.admin-layout-container {
  min-height: 100vh;
  background: transparent;
  color: inherit;
}

.admin-layout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(26, 43, 99, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.admin-layout-logo {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #1A2B63 0%, #457B9D 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.admin-logout-button {
  color: #1A2B63 !important;
}

.admin-logout-button:hover {
  background: rgba(26, 43, 99, 0.1) !important;
}

.admin-layout-content {
  padding: 0;
  width: 100%;
  max-width: 100%;
}

/* Mobile responsive */
@media (max-width: 600px) {
  .admin-layout-header {
    padding: 0.75rem 1rem;
  }

  .admin-layout-logo {
    font-size: 1.25rem;
  }
}

