html, body {
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
}

@media (prefers-color-scheme: dark) {
  body {
    background: black;
  }
}

.root {
  display: flex;
  flex-direction: column;
  height: 100%;
}

@media print {
  * {
    height: auto !important;
    overflow: visible !important;
  }
}

/* =========================================================
   WAY PULSE: SAFE VISUAL OVERRIDES (NO STRUCTURAL CHANGES)
   ========================================================= */

/* 1. Global Dark Theme Background (Visual Only) */
body {
  background-color: #0b0f19 !important;
  background-image: url('/bg.webp') !important;
  background-size: cover !important;
  background-position: center !important;
  background-attachment: fixed !important;
  background-repeat: no-repeat !important;
  color: #f1f5f9 !important;
  font-family: 'Inter', 'Roboto', 'Segoe UI', sans-serif !important;
}

/* 2. Glassmorphism for Panels and Dialogs (Visual Only) */
.MuiPaper-root {
  background: rgba(20, 25, 40, 0.65) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4) !important;
  color: #ffffff !important;
}

.MuiMenu-paper, .MuiDialog-paper, .MuiDrawer-paper {
  background: rgba(15, 20, 35, 0.85) !important;
}

/* 3. High Contrast Typography (Visual Only) */
.MuiTypography-root, 
.MuiFormLabel-root, 
.MuiInputBase-input, 
.MuiSelect-select,
.MuiTableCell-root,
.MuiMenuItem-root {
  color: #f1f5f9 !important;
}

.MuiTypography-colorTextSecondary {
  color: rgba(255, 255, 255, 0.6) !important;
}

/* 4. Input Fields Styling (Visual Only) */
.MuiOutlinedInput-root {
  background: rgba(255, 255, 255, 0.05) !important;
  border-radius: 8px !important;
  color: #ffffff !important;
}

.MuiOutlinedInput-notchedOutline {
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline {
  border-color: rgba(255, 255, 255, 0.3) !important;
}

.MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline {
  border-color: #0ea5e9 !important;
}

.MuiInputLabel-root.Mui-focused {
  color: #0ea5e9 !important;
}

/* 5. Buttons (Visual Only) */
.MuiButton-containedPrimary {
  background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%) !important;
  color: #ffffff !important;
  border-radius: 8px !important;
  text-transform: none !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4) !important;
  transition: opacity 0.2s ease !important;
}

.MuiButton-containedPrimary:hover {
  opacity: 0.9 !important;
}

.MuiButton-text {
  color: #38bdf8 !important;
  text-transform: none !important;
}

/* 6. Fix for map controls readability (Visual Only) */
.ol-control button {
  background: rgba(20, 25, 40, 0.8) !important;
  color: white !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  backdrop-filter: blur(10px) !important;
}

.ol-control button:hover {
  background: rgba(14, 165, 233, 0.8) !important;
}

/* =========================================================
   7. PERFECT LOGIN DESIGN (100% Safe via .login-page class)
   ========================================================= */

/* Hide the blue Traccar logo banner ONLY on the login page */
body.login-page main > div:first-child:not(.MuiPaper-root) {
  display: none !important;
}

body.login-page main > div > div:first-child:not(.MuiPaper-root) {
  display: none !important;
}

/* Enhance the login card size slightly */
body.login-page main .MuiPaper-root {
  padding: 40px 32px !important;
  max-width: 420px !important;
  width: 100% !important;
  margin: auto !important;
}