/* GPSPOL R21 — czytelność bez ruszania funkcji */

@media (max-width: 900px) {

  /* usuń drugie Wyloguj */
  #gpspol-action-logout,
  #gpspol-logout-button {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* menu boczne: jasne tło = ciemny tekst */
  [class*="MuiDrawer-paper"],
  [class*="MuiDrawer-paper"] * {
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
    opacity: 1 !important;
    text-shadow: none !important;
  }

  [class*="MuiDrawer-paper"] {
    background: #ffffff !important;
  }

  [class*="MuiDrawer-paper"] svg {
    color: #0f172a !important;
    fill: currentColor !important;
  }

  /* raporty: jasne tło = ciemny tekst */
  body.gpspol-r21-reports main,
  body.gpspol-r21-reports main * {
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
    opacity: 1 !important;
    text-shadow: none !important;
  }

  body.gpspol-r21-reports main input,
  body.gpspol-r21-reports main textarea,
  body.gpspol-r21-reports main select,
  body.gpspol-r21-reports main .MuiInputBase-input,
  body.gpspol-r21-reports main .MuiOutlinedInput-input,
  body.gpspol-r21-reports main .MuiSelect-select {
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
    caret-color: #0f172a !important;
    background: #ffffff !important;
  }

  body.gpspol-r21-reports main th,
  body.gpspol-r21-reports main thead *,
  body.gpspol-r21-reports main .MuiTableHead-root * {
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
    font-weight: 900 !important;
  }

  /* login: białe pola = czarny tekst */
  body.gpspol-r21-login form input,
  body.gpspol-r21-login form textarea,
  body.gpspol-r21-login form select,
  body.gpspol-r21-login form .MuiInputBase-input,
  body.gpspol-r21-login form .MuiOutlinedInput-input {
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
    caret-color: #0f172a !important;
    background: #ffffff !important;
  }

  body.gpspol-r21-login form label,
  body.gpspol-r21-login form .MuiFormLabel-root,
  body.gpspol-r21-login form .MuiInputLabel-root {
    color: #475569 !important;
    -webkit-text-fill-color: #475569 !important;
  }

  /* ustawienia: pola białe = czarny tekst */
  body.gpspol-r21-settings main input,
  body.gpspol-r21-settings main textarea,
  body.gpspol-r21-settings main select,
  body.gpspol-r21-settings main .MuiInputBase-input,
  body.gpspol-r21-settings main .MuiOutlinedInput-input,
  body.gpspol-r21-settings main .MuiSelect-select {
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
    caret-color: #0f172a !important;
    background: #ffffff !important;
  }

  /* popup pojazdu: ciemne tło = jasny tekst */
  .maplibregl-popup-content,
  .maplibregl-popup-content *,
  .mapboxgl-popup-content,
  .mapboxgl-popup-content * {
    color: #f8fafc !important;
    -webkit-text-fill-color: #f8fafc !important;
    opacity: 1 !important;
    text-shadow: none !important;
  }

  .maplibregl-popup-content a,
  .mapboxgl-popup-content a {
    color: #bfdbfe !important;
    -webkit-text-fill-color: #bfdbfe !important;
  }

  input::placeholder,
  textarea::placeholder {
    color: #64748b !important;
    -webkit-text-fill-color: #64748b !important;
    opacity: 1 !important;
  }
}
