/* -----------------------------
   1. CSS Variables (Custom Properties)
----------------------------- */
:root {
  /* Dark Theme Colors */
  --primary-color: #ff5c00;
  --primary-hover: #fc8846;
  --text-bialy: #ffffff;
  --text-light: #c9c9c9;
  --text-lighter: #b0bec5;
  --text-dark: #808080;
  --bg-dark: #2a353d;
  --bg-darker: #212a34;
  --bg-darkest: #0f1318;
  --border-color: #4b5c64;
  --nav-calendar-bg: rgba(7, 186, 255, 0.14);

  /* Status Colors */
  --status-free: #00b500;
  --status-repair: #ff8100;
  --status-rented: #fd0019;
  --status-reserved: #07baff;

  /* Spacing */
  --spacing-xs: 5px;
  --spacing-sm: 6px;
  --spacing-md: 20px;
  --spacing-lg: 30px;

  /* Border Radius */
  --border-radius: 4px;
  --border-radius-lg: 6px;
}

body.light-theme {
  --primary-color: #ff5c00;
  --primary-hover: #fb752a;
  --text-bialy: #2a2a2a;
  --text-light: #525252;
  --text-lighter: #7b7b7b;
  --text-dark: #101010;
  --bg-dark: #fdfdfd;
  --bg-darker: #e9e9e9;
  --bg-darkest: #d3d3d3;
  --border-color: #bcbcbc;
  --nav-calendar-bg: rgba(7, 186, 255, 0.1);
}

/* -----------------------------
   2. Reset & Base Styles
----------------------------- */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  height: 100vh;
  overflow-y: auto;
  background: var(--bg-darkest);
  color: var(--text-dark);
  transition: background 0.3s ease, color 0.3s ease;
}

body::before {
  content: "";
  position: absolute;
  top: -30%;
  left: 0;
  width: 100%;
  height: 140%;
  background: linear-gradient(
    to bottom,
    var(--bg-darkest) 0%,
    var(--bg-darker) 50%,
    var(--bg-darkest) 100%
  );
  /*filter: blur(30px);*/
  /*animation: waveFlow1 60s ease-in-out infinite;*/
  /*transform: skewY(-10deg);*/
  z-index: -1;
}

body::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><circle cx="50" cy="50" r="1" fill="rgb(75, 92, 100)"/></svg>');
  background-size: 15px 15px;
  opacity: 0.6;
  z-index: -1;
}

body.light-theme::after {
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><circle cx="50" cy="50" r="1" fill="rgb(188, 188, 188)"/></svg>');
}

.blokada-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(20, 20, 20, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99998;
  pointer-events: auto;
  overflow: hidden;
}

/* Dodaj pseudo-element do efektu tła z SVG */
.blokada-overlay::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Ccircle cx='50' cy='50' r='1' fill='rgb(75, 92, 100)'/%3E%3C/svg%3E");
  background-size: 15px 15px;
  opacity: 0.6;
  z-index: -1;
}

.blokada-overlay {
  transition: opacity 0.3s ease;
  opacity: 1;
}

.blokada-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.blokada-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 3rem 2rem 2rem 2rem;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 99999;
  color: #fff;
  font-family: "Segoe UI", Arial, sans-serif;
}
.blokada-message h1 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.blokada-message p {
  font-size: 1.12rem;
  margin-bottom: 1.8rem;
}

.selected_kalendarz {
  width: 100%;
}

h2 {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 1.6em;
  margin-top: 30px;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 10px;
}

h3 {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 1.2em;
  padding-bottom: 10px;
}

a {
  text-decoration: none;
  font-size: 0.875rem;
  color: var(--text-dark);
}

/* -----------------------------
   3. Layout Components
----------------------------- */
.top {
  background-color: var(--bg-darker);
  padding: 10px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid var(--border-color);
}

.top .wyszukiwarka {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 60%;
  margin-left: 90px;
}

/* Licznik do wygaśnięcia sesji (bezczynność) */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.session-timer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  /*color: var(--primary-color);*/
  user-select: none;
}

body.light-theme .session-timer {
  background: rgba(255, 255, 255, 0.65);
}

.session-timer-icon {
  font-size: 18px;
  /*color: var(--primary-color);*/
  opacity: 0.9;
}

.session-timer-clock {
  display: inline-flex;
  align-items: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.session-timer-digit {
  width: 18px;
  height: 24px;
  display: inline-block;
  position: relative;
  overflow: hidden;
  /*border-radius: 7px;
  border: 1px solid var(--border-color);
  background: var(--bg-darkest);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);*/
}

.session-timer-strip {
  position: absolute;
  inset: 0;
  display: block;
  will-change: transform;
  transition: transform 240ms ease-in-out;
}

.session-timer-cell {
  height: 24px;
  width: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

body.light-theme .session-timer-cell {
  color: var(--primary-color);
  text-shadow: none;
}

.session-timer-colon {
  opacity: 0.85;
  transform: translateY(-1px);
}

.session-timer--warn {
  border-color: rgba(255, 129, 0, 0.9);
  box-shadow: 0 0 0 3px rgba(255, 129, 0, 0.12);
}

@keyframes sessionDangerPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(253, 0, 25, 0.18);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(253, 0, 25, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(253, 0, 25, 0);
  }
}

.session-timer--danger {
  border-color: rgba(253, 0, 25, 0.9);
  animation: sessionDangerPulse 1.3s ease-in-out infinite;
}

.logo {
  display: block;
  margin: 0 auto;
  width: 300px;
  max-width: 100%;
}

.logo_naglowek {
  padding-left: 50px;
  color: var(--primary-color);
  display: inline-block;
  vertical-align: middle;
}

.logo_naglowek svg {
  height: 57px;
  width: auto;
  display: block;
  margin-left: -23px;
}

main.zalogowany {
  margin-left: 200px;
  padding: 20px;
  padding-top: 90px;
  padding-bottom: 100px;
  color: var(--text-lighter);
  min-height: 100vh;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: margin-left 0.3s ease, padding-top 0.3s ease;
  overflow-y: auto;
}

footer {
  background-color: var(--bg-darker);
  color: var(--text-lighter);
  text-align: center;
  padding: 15px;
  margin-top: 50px;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.1);
}

footer a {
  color: var(--primary-color);
}

footer a:hover {
  color: var(--primary-hover);
}

.pulpit-container {
  padding: 0 0px;
  margin: 0 auto;
  max-width: 725px; /* Ograniczenie szerokości w widoku jednokolumnowym */
}
.pulpit-container > section {
  margin-bottom: 20px;
}

/* -----------------------------
   4. Forms & Inputs
----------------------------- */
.nasz_formularz,
.nasz_formularz_500,
.nasz_formularz_karta_uzytkownika,
.nasz_formularz_ubezpieczalnie {
  /*margin: 60px 0;*/
  color: var(--text-light);
  background-color: var(--bg-dark);
  padding: var(--spacing-lg);
  border-radius: var(--border-radius-lg);
  box-shadow: 7px 7px 10px rgba(0, 0, 0, 0.3);
  animation: slideDown 1s ease-out forwards;
  max-width: 500px;
}

.nasz_formularz {
  max-width: 725px;
}

.nasz_formularz_500 {
  max-width: 500px;
}

.nasz_formularz_karta_uzytkownika {
  width: 760px;
  margin: 60px 0px;
}

.nasz_formularz_logowanie {
  position: relative;
  width: 320px;
  margin: 50px auto;
  background-color: var(--text-light);
  padding: var(--spacing-lg);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  animation: slideDown 1s ease-out forwards;
  display: grid;
  justify-content: center;
  z-index: 2;
}

.form-group {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  align-items: flex-end;
}

.form-group-item {
  flex: 1;
  min-width: 45%;
  box-sizing: border-box;
}

.form-group-item_50 {
  flex: 1;
  width: 48%;
  box-sizing: border-box;
}

.form-group-zmiana_haslo {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: var(--spacing-md);
  margin: 0 0 20px 0;
}

.form-group-2obrys_w_karcie {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: var(--spacing-md);
  margin: 30px 0 20px 0;
}

.form-group-2obrys_w_karcie_dark {
  background-color: var(--bg-darker);
  border-radius: var(--border-radius);
  padding: var(--spacing-md);
  margin: 30px 0 20px 0;
  box-shadow: 7px 7px 10px rgba(0, 0, 0, 0.3);
}

.form-group-container {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.form-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 15px;
}

.input-group {
  flex: 1;
  margin: 0;
}

.input-group select,
.input-group input[type="text"] {
  width: 100%;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
textarea,
select {
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  padding: var(--spacing-sm);
  margin: 10px 0;
  width: 100%;
  box-sizing: border-box;
  font-size: 0.875rem;
  background-color: var(--bg-darker);
  color: var(--text-light);
  transition: all 0.3s ease-in-out;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
}

.readonly-value {
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  padding: var(--spacing-sm);
  margin: 10px 0;
  width: 100%;
  box-sizing: border-box;
  font-size: 0.875rem;
  color: var(--text-light);
  transition: all 0.3s ease-in-out;
  display: inline-block;
  background-color: var(--bg-darker);
}

.uwagi-text {
  min-height: 100px;
  text-align: left;
}

.ikony_kontener {
  text-align: left;
  padding: 10px 0px 0px 0px;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: flex-start; /* Wyrównanie do lewej */
  gap: 4px; /* Odstęp między ikonami */
}

.ikony_kontener .mdi-alert {
  font-size: 28px;
  color: var(--primary-color);
  cursor: help; /* Zmienia kursor, aby sugerować, że element ma tooltip */
}

.info_rok_produkcji {
  background-color: rgb(15 19 24 / 50%);
  margin: 0px 0px 0px 0px;
  padding: 10px 3px 10px 3px;
  border-radius: 2px;
  /* text-align: center; */
  /* font-weight: bold; */
  font-size: 0.84em;
}

textarea {
  resize: vertical;
  height: 100px;
}

select {
  line-height: 2;
}

select option {
  background-color: var(--bg-darker);
  color: var(--text-light);
  padding: 8px;
  line-height: 1.5;
}

.date-inputs {
  display: flex;
  gap: 10px;
}

.date-inputs select {
  min-width: 70px;
  padding-right: 5px;
  appearance: auto;
  -webkit-appearance: auto;
  -moz-appearance: auto;
  background-color: var(--bg-dark);
}

.radio-option {
  color: var(--primary-color);
  margin: var(--spacing-md);
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-direction: column;
}

.radio-option label {
  display: flex;
  align-items: center;
  gap: 5px;
}

.radio-option input[type="radio"],
.input-group input[type="checkbox"] {
  margin: 0;
}

.input-group.gps-container {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.input-group.gps-container label {
  margin: 0;
}

.input-group.gps-container input[type="checkbox"] {
  margin: 0;
  transform: scale(1.2);
  cursor: pointer;
  margin-top: 5px;
}

.password-container {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-input {
  padding-right: 40px;
  width: 100%;
  box-sizing: border-box;
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--text-dark);
  z-index: 1;
}

.toggle-password:hover {
  color: var(--primary-color);
}

.progress {
  width: 100%;
  height: 5px;
  background-color: var(--bg-darker);
  border-radius: 10px;
  margin-bottom: var(--spacing-md);
}

.progress-bar {
  margin-right: 5px;
  height: 5px;
  width: 50%;
  border-radius: 5px;
  transition: width 2s ease-in-out, background-image 1s ease-in-out;
}

.progress-bar:last-child {
  margin-right: 0;
}

fieldset {
  border: 1px solid var(--border-color);
  padding: var(--spacing-md);
  border-radius: var(--border-radius-lg);
}

legend {
  font-size: 2em;
  padding: 6px;
  color: var(--primary-color);
  font-weight: bold;
  margin-bottom: 10px;
  text-align: center;
}

.nasz_formularz_logowanie_logo {
  width: 90%;
  min-width: 60%;
  padding: 30px;
}

.nasz_formularz_logowanie_txt {
  color: var(--text-dark);
  font-size: 0.875rem;
  margin-top: 10px;
  text-align: left;
}

.forgot-password-link {
  display: inline-block;
  text-decoration: none;
  font-size: 0.875rem;
  text-align: center;
  transition: color 0.3s ease;
}

.forgot-password-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.zapomnialem_hasla_box {
  margin: auto;
  padding: 3% 0;
  color: var(--text-dark);
}

.tytul_karty_poj_nazwa {
  color: var(--primary-color);
  font-weight: bold;
  font-size: 2.4em;
  display: flex;
  padding: 30px;
  justify-content: center;
  margin-bottom: 50px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  background-color: var(--bg-darker);
}

.nazwa-pola-txt,
.tyt_txt_karta_poj {
  color: var(--primary-color);
  font-size: 14px;
  padding: 0 0 0 10px;
}

.text-rodo {
  text-align: justify;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  padding: var(--spacing-sm);
  margin: 40px 0px 0px 0px;
  width: 100%;
  box-sizing: border-box;
  font-size: 0.775rem;
  color: var(--border-color);
}

.disabled-input {
  opacity: 0.3;
  pointer-events: none;
}

input[type="file"] {
  display: none;
}

/* -----------------------------
   5. Navigation & Menu
----------------------------- */
nav {
  background-color: var(--bg-dark);
  width: 200px;
  position: fixed;
  top: 78px;
  bottom: 0;
  padding-top: var(--spacing-md);
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease-in-out;
  /* Zapobiega "wystawaniu" tekstu poza menu w trakcie animacji */
  overflow-x: hidden;
}

/* Podczas wczytywania (ustawiania stanu z localStorage) nie animujemy – usuwa "losowe" zwijanie/rozwijanie */
nav.no-transition,
nav.no-transition * {
  transition: none !important;
}

nav a {
  display: block;
  padding: 15px;
  text-decoration: none;
  background-color: var(--bg-darker);
  margin: 10px 5px;
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease;
  color: var(--text-light);
}

/* Specjalne przyciski menu: kalendarze (Napraw/Rezerwacji) */
nav a.nav-link-calendar {
  background-color: var(--nav-calendar-bg);
}

/* Linki menu jako flex (ikona + tekst) */
nav .nav-link {
  display: flex;
  align-items: center;
}

.menu-item-text {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  max-width: 220px;
  opacity: 1;
  /* Rozwijanie: najpierw poszerza się menu, potem pojawia tekst */
  transition: max-width 0.3s ease-in-out, opacity 0.15s ease 0.15s;
}

nav a:hover {
  background-color: var(--primary-color);
  color: var(--text-bialy);
  font-size: 0.875rem;
}

nav a.aktywny_program {
  background: linear-gradient(to right, var(--primary-color), var(--bg-dark));
  color: var(--text-bialy);
  margin: 10px 5px;
  border: 1px solid var(--primary-color);
}

.navbar-nav i {
  font-size: 24px;
  margin-right: 8px;
  color: var(--primary-color);
}

.navbar-nav .nav-item i {
  margin-right: 8px;
  font-size: 20px;
}

nav a:hover i,
nav a.aktywny_program i {
  color: var(--text-bialy);
}

.navbar-nav i:hover {
  transform: scale(1.2);
  transition: transform 0.3s;
}

.user-info {
  font-size: 0.875rem;
  color: var(--text-lighter);
  display: flex;
  align-items: center;
  position: relative;
  cursor: pointer;
  margin-right: 30px;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--bg-darker);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  list-style: none;
  z-index: 1000;
  max-width: 250px;
}

.dropdown-menu li {
  margin: 0;
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  text-decoration: none;
  color: var(--text-lighter);
  border-radius: 2px;
  margin: 0px;
}

.dropdown-menu a:hover {
  background: var(--primary-color);
  color: var(--text-bialy);
  margin: 0px;
}

.dropdown-menu i {
  margin-right: 8px;
}

.dropdown-menu.show {
  display: block;
  animation: fadeIn 0.2s ease;
}

body.light-theme .dropdown-menu a {
  color: var(--text-dark);
}
body.light-theme .dropdown-menu a:hover {
  color: var(--text-bialy);
}
body.light-theme .dropdown-menu a i.text-warning {
  color: #d39e00;
}
body.light-theme .dropdown-menu a i.text-primary {
  color: var(--primary-color);
}
body.light-theme .dropdown-menu a i.text-success {
  color: #28a745;
}

/* Dropdown menu dla kalendarza w nawigacji */
.nav-item.dropdown {
  position: relative;
}

.nav-item.dropdown .dropdown-toggle {
  cursor: pointer;
}

.nav-item.dropdown:hover .kalendarz-submenu,
.nav-item.dropdown .kalendarz-submenu.show {
  display: block;
}

.kalendarz-submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--bg-darker);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  min-width: 220px;
  z-index: 1000;
  margin-top: 5px;
}

.kalendarz-submenu .dropdown-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text-lighter);
  transition: all 0.2s;
  border-bottom: 1px solid var(--border-color);
}

.kalendarz-submenu .dropdown-item:last-child {
  border-bottom: none;
}

.kalendarz-submenu .dropdown-item:hover {
  background-color: var(--primary-color);
  color: var(--text-bialy);
}

.kalendarz-submenu .dropdown-item.active {
  background-color: rgba(25, 118, 210, 0.2);
  color: var(--primary-color);
  font-weight: 600;
}

.kalendarz-submenu .dropdown-item i {
  margin-right: 10px;
  font-size: 18px;
}

body.light-theme .kalendarz-submenu {
  background-color: #fff;
  border-color: #e0e0e0;
}

body.light-theme .kalendarz-submenu .dropdown-item {
  color: #333;
  border-bottom-color: #e0e0e0;
}

body.light-theme .kalendarz-submenu .dropdown-item:hover {
  background-color: #1976d2;
  color: #fff;
}

body.light-theme .kalendarz-submenu .dropdown-item.active {
  background-color: #e3f2fd;
  color: #1976d2;
}

.wyszukiwarka_wygaszony {
  color: var(--text-lighter);
}

.wyszukiwarka_wygaszony::placeholder {
  color: var(--text-lighter);
  opacity: 1;
}

.navbar-profile {
  display: flex;
  align-items: center;
  padding: 8px;
  transition: background-color 0.3s ease;
}

.navbar-profile:hover .fa-chevron-down {
  color: var(--primary-color);
  transform: rotate(180deg);
}

.fa-chevron-down {
  margin-left: 8px;
  color: var(--text-light);
  transition: all 0.3s ease;
}

.fa-chevron-down.rotated {
  transform: rotate(180deg);
  color: var(--text-bialy);
}

.rotated {
  transform: rotate(180deg);
  transition: transform 0.3s ease;
}

.menu-toggle-btn {
  background-color: var(--bg-darker);
  border: none;
  color: var(--text-light);
  width: 60px;
  height: 40px;
  font-size: 20px;
  cursor: pointer;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0px 5px 0px auto;
  transition: margin 0.3s ease-in-out;
  padding: 23px;
}

.menu-toggle-btn:hover {
  background-color: var(--primary-color);
  color: var(--text-bialy);
}

nav.minimized {
  width: 70px;
}

nav.minimized .menu-item-text {
  max-width: 0;
  opacity: 0;
  /* Zwijanie: tekst znika od razu, a menu zwęża się płynnie */
  transition: max-width 0.3s ease-in-out, opacity 0.05s ease;
}

nav.minimized .nav-link {
  justify-content: center;
}

main.zalogowany.minimized {
  margin-left: 70px;
}

/* ===== KOMUNIKAT: WYLOGOWANIE Z POWODU BEZCZYNNOŚCI (LOGIN) ===== */
.timeout-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px;
  margin-bottom: 18px;
  border-radius: 6px;
  border: 1px solid rgb(236 105 16);
  background: rgb(255 125 0 / 14%);
  color: #aa1200;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.timeout-alert__icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: rgb(236 105 16);
  border: 1px solid rgb(155 40 3);
  color: #cfc0b0;
}

.timeout-alert__title {
  font-weight: 800;
  margin-bottom: 2px;
  line-height: 1.2;
}

.timeout-alert__text {
  font-weight: 600;
  line-height: 1.25;
  opacity: 0.95;
}

/* -----------------------------
   6. Tables
----------------------------- */
table {
  width: 100%;
  border-spacing: 0;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-collapse: collapse;
  border: none;
}

table th {
  padding: 12px 15px;
  text-align: left;
  font-size: 0.875rem;
  color: var(--text-bialy);
  background-color: var(--bg-darker);
  font-weight: bold;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  position: relative;
  padding-right: 20px;
  white-space: nowrap;
  border: none;
}

table td {
  padding: 12px 15px;
  text-align: left;
  font-size: 0.875rem;
  background-color: var(--bg-dark);
  color: var(--text-light);
  border: none;
}

table tr:nth-child(even) td {
  background-color: var(--bg-darker);
}

table tr:hover td {
  background-color: rgb(252, 136, 70, 0.2);
}

table th:first-child,
table td:first-child {
  border-left-radius: var(--border-radius);
}

table th:last-child,
table td:last-child {
  border-right-radius: var(--border-radius);
}

table tr:last-child td:first-child {
  border-bottom-left-radius: var(--border-radius);
}

table tr:last-child td:last-child {
  border-bottom-right-radius: var(--border-radius);
}

table tr:not(:first-child) {
  border-top: 1px solid var(--border-color);
}

table td:not(:first-child) {
  border-left: 1px solid var(--border-color);
}

table td a {
  color: var(--primary-color);
  text-decoration: none;
}

table td a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.scrollable-table-wrapper {
  max-height: 645px;
  overflow-y: hidden;
  position: relative;
  transition: overflow-y 0.3s ease;
}

.scrollable-table-wrapper::-webkit-scrollbar {
  width: 4px;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.scrollable-table-wrapper::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 10px;
}

.scrollable-table-wrapper::-webkit-scrollbar-track {
  background-color: var(--bg-dark);
}

.scrollable-table-wrapper:hover {
  overflow-y: auto;
}

.scrollable-table-wrapper:hover::-webkit-scrollbar {
  opacity: 1;
}

.sort-arrows {
  position: absolute;
  top: 50%;
  right: 5px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 16px;
  color: #596574;
  transition: transform 0.3s ease, color 0.3s ease;
}

.sort-arrows i {
  font-size: 16px;
  transition: transform 0.3s ease, color 0.3s ease;
}

.sorting_asc .mdi-chevron-up,
.sorting_desc .mdi-chevron-down {
  color: var(--primary-color);
  font-size: 18px;
}

.sorting_disabled .mdi-chevron-up,
.sorting_disabled .mdi-chevron-down {
  color: #596574;
}

/* -----------------------------
   7. Buttons
----------------------------- */
input[type="button"] {
  display: inline-block;
  width: 100%;
  padding: 10px 20px;
  text-align: center;
  cursor: pointer;
  border-radius: var(--border-radius);
  box-sizing: border-box;
}

.btn-dodaj,
.btn-grey,
.btn-grey_zapisz,
.btn-usun,
.file-upload-btn {
  border-radius: var(--border-radius);
  border: none;
  box-sizing: border-box;
  color: white;
  cursor: pointer;
  margin: 10px 0;
  /*max-width: 180px;*/
  padding: 10px;
  text-align: center;
  transition: all 0.3s ease-in-out;
  width: 100%;
}

.btn-dodaj {
  background-color: var(--primary-color);
  font-size: 0.875rem;
}

.btn-dodaj:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.btn-grey,
.file-upload-btn {
  background-color: #3a4c55;
}

.btn-grey:hover,
.file-upload-btn:hover {
  background-color: #4d6069;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.btn-grey_zapisz {
  background-color: #3a4c55;
  /*font-size: 16px;*/
}

.btn-grey_zapisz:hover {
  font-weight: 600;
  color: #212a34;
  background-color: #00b500;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.btn-usun {
  background-color: #3a4c55;
  color: #212a34;
  font-size: 16px;
  font-weight: 600;
}

.btn-usun:hover {
  background-color: #ff0000;
  transform: translateY(-2px);
}

.form-buttons {
  display: flex;
  justify-content: space-around;
  gap: 15px;
  margin-top: 20px;
}

.glitch-btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--primary-color);
  color: #000;
  text-decoration: none;
  border-radius: 5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  z-index: 3;
}

.glitch-btn:hover {
  background: var(--primary-hover);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.powrot-link {
  display: inline-block;
  padding: 10px 20px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 5px;
  transition: all 0.3s ease;
  z-index: 3;
  animation: glitch-text-animation 2s infinite;
}

.powrot-link:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* -----------------------------
   8. Messages & Status Indicators
----------------------------- */
.status-wolny {
  color: var(--status-free);
}

.status-wypozyczony {
  color: var(--status-rented);
  font-weight: bold;
}

.status-zarezerwowany {
  color: var(--status-reserved);
}

.status-w_naprawie {
  color: var(--status-repair);
}

/* Style dla pojazdów z przekroczonym terminem zwrotu */
.overdue-rental {
  background-color: #fff3cd !important;
  border-left: 4px solid #ff5c00;
}

.overdue-icon {
  font-size: 1.2em;
  margin-right: 5px;
  vertical-align: middle;
}

.overdue-badge {
  display: inline-block;
  background-color: #dc3545;
  color: #fff;
  font-size: 0.75em;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-zalogowany {
  color: var(--status-free);
}

.status-zablokowany {
  color: var(--status-rented);
  font-weight: bold;
}

.edytowany-status {
  color: var(--text-dark);
  cursor: not-allowed;
}

.error-message {
  color: var(--status-rented);
  font-size: 14px;
  text-align: center;
  margin-top: 10px;
}

.error {
  font-size: 0.9em;
  margin-top: 5px;
}

.success-message,
.sukces-komunikat,
.success-legend,
.komunikat-wyszukiwania {
  color: var(--status-free);
}

.message-container {
  margin-bottom: 15px;
}

.success-fieldset {
  border: 1px solid var(--status-free) !important;
}

.error-fieldset {
  border: 1px solid var(--status-rented) !important;
}

.error-legend {
  color: var(--status-rented) !important;
}

.sukces-komunikat,
.error-komunikat {
  padding: 15px;
  margin: 10px 0px 40px 0;
  border-radius: 4px;
  text-align: center;
  font-weight: 600;
}

.sukces-komunikat {
  background-color: rgb(0 181 0 / 10%);
  border: 1px solid var(--status-free) !important;
}

.error-komunikat {
  background-color: rgb(255 0 0 / 20%);
  border: 1px solid var(--status-rented);
}

.box_komunikatu {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 500px;
  transform: translate(-50%, -50%);
  background-color: var(--bg-darker);
  color: var(--text-light);
  text-align: center;
  padding: 30px 40px;
  border: 1px solid var(--primary-color);
  border-radius: 12px;
  max-width: 600px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
  text-transform: uppercase;
  animation: fadeIn 0.5s ease-out;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 99999;
}

.box_komunikatu h2 {
  font-size: 2.5em;
  color: var(--primary-color);
  margin-bottom: 20px;
  text-transform: uppercase;
  position: relative;
  animation: glitch-text-animation 2s infinite;
  text-shadow: 0 0 10px var(--primary-color);
}

.box_komunikatu p {
  font-size: 16px;
  line-height: 1.5;
  animation: glitch-text-animation 2.5s infinite;
}

.box_komunikatu-2 {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 500px;
  transform: translate(-50%, -50%);
  background-color: var(--bg-darker);
  color: var(--text-light);
  text-align: center;
  padding: 30px 40px;
  border: 1px solid var(--primary-color);
  border-radius: 12px;
  max-width: 600px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 99999;
}

.box_komunikatu-2 h2 {
  font-size: 2.5em;
  color: var(--primary-color);
  margin-bottom: 20px;
  text-transform: uppercase;
  position: relative;
}

.blurred {
  filter: blur(5px);
  pointer-events: none;
}

.komunikat_dodawania {
  font-size: 16px;
  color: var(--bg-dark);
  background-color: var(--border-color);
  padding: 10px;
  border-radius: 5px;
  margin-top: 10px;
}

.komunikat_dodania-ok {
  color: var(--status-free);
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  padding: var(--spacing-md);
  margin: 40px auto;
  border-top: 4px solid var(--status-free);
  border-bottom: 4px solid var(--status-free);
  border-radius: 10px;
  width: auto;
  max-width: 80%;
  text-transform: uppercase;
}

.imieNazwiskoUzytkownika {
  color: var(--text-bialy);
  font-weight: bold;
  font-size: 2.2em;
  display: inline-block;
  padding: 10px;
}

.typ_konta {
  color: var(--text-lighter);
  font-weight: bold;
  font-size: 1em;
}

.history-box {
  min-width: 250px;
  color: var(--text-light);
  padding: 0 0 0 30px;
  border-radius: var(--border-radius);
}

/* -----------------------------
   9. Animations & Special Effects
----------------------------- */
@keyframes waveFlow1 {
  0% {
    transform: skewY(-10deg) translateY(-10%);
    opacity: 0.6;
  }
  50% {
    transform: skewY(-10deg) translateY(10%);
    opacity: 0.9;
  }
  100% {
    transform: skewY(-10deg) translateY(-10%);
    opacity: 0.6;
  }
}

@keyframes slideDown {
  0% {
    transform: translateY(-1%);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -40%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@keyframes glitch-text-animation {
  0%,
  10% {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    transform: translateX(0) translateY(0);
    text-shadow: none;
  }
  2% {
    transform: translateX(-4px) skewX(-2deg) translateY(-2px);
    text-shadow: -4px 0 #ff0000, 4px 0 #00ff00, 0 -4px #0000ff;
  }
  4% {
    transform: translateX(4px) skewX(2deg) translateY(2px);
    text-shadow: -4px 0 #ffff00, 4px 0 #ff00ff, 0 4px #00ffff;
  }
  6% {
    transform: translateX(-3px) skewX(-1deg) translateY(0);
    text-shadow: -3px 0 #00ff00, 3px 0 #ff0000, 0 -3px #0000ff;
  }
  8% {
    transform: translateX(3px) skewX(1deg) translateY(-1px);
    text-shadow: -3px 0 #ff00ff, 3px 0 #ffff00, 0 3px #00ffff;
  }
}

.glitch-container {
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.glitch-box {
  padding: 30px;
  border-radius: 15px;
  background-color: transparent;
  color: #fff;
  font-family: "Arial Black", sans-serif;
  position: relative;
  overflow: hidden;
}

.glitch-title {
  font-size: 2.5em;
  margin: 0;
  text-transform: uppercase;
  animation: glitch-text-animation 2s infinite;
  position: relative;
  z-index: 2;
  color: #fff;
}

.glitch-text {
  font-size: 1.2em;
  margin: 10px 0;
  animation: glitch-text-animation 2.5s infinite;
  position: relative;
  z-index: 2;
  color: #fff;
}

/* -----------------------------
   10. Media Queries
----------------------------- */
@media (max-width: 768px) {
  .dropdown-menu {
    width: 100%;
    max-width: 250px;
    right: 10px;
  }
  .form-group {
    flex-direction: column;
    gap: 20px;
  }
  .form-group-item {
    min-width: 100%;
  }
  .top input[type="text"],
  .top input[type="submit"] {
    width: 100%;
  }
  nav {
    width: 100%;
  }
  .wyszukiwarka {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (min-width: 901px) {
  .pulpit-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(700px, 1fr));
    gap: 20px;
    max-width: 3440px;
  }
  .pulpit-container > h2 {
    grid-column: 1 / -1;
    margin-bottom: -10px;
  }
  .pulpit-container > .radial-charts {
    grid-column: 1 / -1;
  }
}

/* -----------------------------
   11. Print Styles (Optional)
----------------------------- */
@media print {
  .no-print {
    display: none;
  }
  body {
    background: none;
    color: #000;
  }
  main {
    margin: 0;
    padding: 0;
  }
}

/* -----------------------------
   12. Tabs
----------------------------- */
.tabs {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
}

.tab-link {
  padding: 10px;
  cursor: pointer;
  color: #ffa877;
  background-color: #ff5c00;
  margin-right: 10px;
  margin-bottom: 20px;
  border-radius: 0px 0px 6px 6px;
  transform: translateY(-2px);
  transition: all 0.3s ease-in-out;
}

.tab-link.active {
  background-color: #ff5c00;
  color: white;
  box-shadow: 0px 6px 5px rgba(0, 0, 0, 0.2);
  transform: translateY(0px);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.selected {
  background: linear-gradient(to top, #1670ce, #007dff);
  color: #9cdeff;
  font-weight: bold;
  text-shadow: 0px 0px 2px black;
}

/* Dzień zwrotu (nakładka na zakres .selected) */
.selected-return {
  box-shadow: 0 0 0 2px #007dff inset, 0 0 0 1px rgba(0, 0, 0, 0.25);
}

/* Jeśli dzień zwrotu jest też w zakresie (.selected), nie zmieniaj tła – tylko ramkę */
.selected.selected-return {
  box-shadow: 0 0 0 2px #007dff inset, 0 0 0 1px rgba(0, 0, 0, 0.25);
}

/* -----------------------------
   13. Charts & Statistics
----------------------------- */
.stats-container {
  max-width: 725px;
  margin: 60px 0;
  display: flex;
  color: var(--text-light);
  background-color: var(--bg-dark);
  padding: var(--spacing-lg);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  animation: slideDown 1s ease-out forwards;
}

.stats-container legend {
  font-size: 24px;
  color: var(--primary-color);
  padding: 0 10px;
}

.stats-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 20px;
}

.dropdown {
  position: relative;
}

.dropdown-toggle {
  cursor: pointer;
  color: #666;
  font-size: 24px;
}

.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 8px 16px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
}

.dropdown-item:hover {
  background-color: #f5f5f5;
}

.radial-charts {
  display: flex;
  border-radius: var(--border-radius);
  margin-bottom: 20px;
  gap: 5px;
}

.radial-chart {
  flex: 1;
  display: flex;
  align-items: center;
  background-color: var(--bg-darker);
  padding: 15px;
  border-radius: var(--border-radius);
  box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.3);
  margin: 50px 0px 0px 0px;
}

.chart-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  color: #93e41c;
  flex-shrink: 0;
}

.chart-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.chart-info h3 {
  margin: 0;
  font-size: 1em;
  font-weight: bold;
  color: var(--primary-color);
  padding-bottom: 0;
}

.chart-info p {
  margin: 0;
  font-weight: normal;
  font-size: 1.1em;
}

.chart-details {
  margin-top: 5px;
  font-size: 0.9em;
  color: #b0b0b0;
}

.chart-details p {
  font-size: 0.9em;
  font-weight: normal;
  margin: 0;
}

.change-indicator .material-icons-outlined {
  font-size: 1em;
  vertical-align: text-bottom;
  margin-right: 2px;
}

.increase,
.decrease,
.bosks_procentys {
  width: 60px;
  height: 37px;
  border-radius: 7px;
  padding: 6px;
}

.increase {
  color: #93e41c;
  background: rgba(0, 210, 91, 0.11);
}

.decrease {
  background: rgba(252, 66, 74, 0.11);
  color: #ff0000;
}

.bosks_procentys {
  background: rgba(0, 210, 91, 0.11);
  color: #00d25b;
}

.peity-donut {
  display: none;
}

.peity {
  width: 100%;
  height: 100%;
}

.chart-days {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 20px;
  font-weight: bold;
  color: #fff;
}

.bar-chart {
  padding: 20px 0px 0px 0px;
  background-color: var(--bg-dark);
  border-radius: 12px;
  overflow-x: auto;
}

.bar-chart svg text {
  font-family: "Helvetica, Arial, sans-serif";
  fill: #9ba7b2;
}

.bar-chart svg .xaxis-label {
  font-size: 12px;
}

.bar-chart svg .yaxis-label {
  font-size: 11px;
}

#rentalChart {
  max-width: 100%;
}

.tooltip {
  position: absolute;
  background-color: #333;
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  pointer-events: none;
  z-index: 10;
}

.chart-container-svg {
  background-color: #2a2a38;
  border-radius: 15px;
  padding: 20px;
  margin: 25px auto;
  max-width: 680px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  border: 1px solid #3a3a4c;
}

.chart-subtitle-svg {
  color: #b0b0b0;
  text-align: center;
  font-size: 0.85em;
  margin-bottom: 15px;
}

.chart-svg {
  width: 100%;
  height: auto;
  display: block;
}

.month-label,
.year-label,
.day-label,
.bar-label {
  opacity: 0;
}

.month-label {
  fill: var(--primary-color);
  font-size: 14px;
  font-weight: bold;
}

.year-label {
  fill: #9a9a9a;
  font-size: 11px;
}

.day-label {
  fill: #999;
  font-size: 10px;
}

.bar-label {
  fill: var(--text-light);
  font-weight: lighter;
  font-size: 11px;
  pointer-events: none;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

.chart-bar {
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
  cursor: pointer;
  transform-box: fill-box;
}

.chart-bar.is-dimmed {
  opacity: 0.25;
}

#svg-tooltip {
  position: absolute; /* Kluczowe do pozycjonowania */
  display: none; /* Domyślnie ukryty */
  background-color: rgba(25, 28, 36, 0.95); /* Ciemne tło z przezroczystością */
  color: #fff;
  padding: 10px 10px 10px 10px;
  border-radius: 8px;
  font-size: 14px;
  pointer-events: none; /* Ważne, aby tooltip nie blokował myszki */
  z-index: 1000;
  border: 1px solid var(--primary-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  line-height: 1.5;

  /* === NOWE ZMIANY === */
  max-width: 600px; /* Maksymalna szerokość dymka */
  word-wrap: break-word; /* Zapewnia, że długie słowa bez spacji będą łamane */
}

#svg-tooltip strong {
  display: block;
  margin-bottom: 0px;
  font-size: 16px;
  font-weight: bold;
  color: var(--primary-color);
}

.tooltip-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}

.legend-btn {
  background-color: #4a4a58;
  color: #fff;
  border: 1px solid #6a6a78;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  margin: 0 5px;
  transition: all 0.25s ease-out;
}

.legend-btn:not(.inactive):hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.legend-btn.inactive {
  opacity: 0.4;
}

.legend-btn[data-series="rented"].active {
  background: linear-gradient(90deg, #1e88e5, var(--bg-dark));
  border-color: #1e88e5;
}

.legend-btn[data-series="repair"].active {
  background: linear-gradient(90deg, var(--primary-color), var(--bg-dark));
  border-color: var(--primary-color);
}

.legend-series {
  display: flex;
  align-items: center;
}

.legend-marker {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 8px;
}

.legend-text {
  font-size: 14px;
  color: var(--text-lighter);
}

.chart-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  text-align: center;
}

.sort-controls-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.sort-controls-container > div {
  display: flex;
  flex-direction: column;
}

.sort-toggle-group {
  display: inline-flex;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 20px;
  border: 1px solid #4a4a58;
}

.sort-toggle-btn {
  background: transparent;
  color: #a0a0b0;
  border: none;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
  border-radius: 20px;
}

.sort-toggle-btn .material-icons-outlined {
  font-size: 18px;
}

.sort-toggle-btn.is-active {
  background-color: var(--primary-color);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.sort-toggle-btn:not(.is-active):hover {
  color: #fff;
}

.chart-type-controls {
  display: inline-flex;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 20px;
  border: 1px solid #4a4a58;
}

.chart-type-btn {
  background: transparent;
  color: #a0a0b0;
  border: none;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
  border-radius: 20px;
}

.chart-type-btn.is-active {
  background-color: #007bff;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.chart-type-btn:not(.is-active):hover {
  color: #fff;
}

.chart-menu {
  position: absolute;
  top: 10px;
  right: 10px;
}

.chart-menu.active .dropdown-menu {
  display: block;
}

@keyframes drawBar {
  from {
    transform: scaleX(2);
  }
  to {
    transform: scaleX(1);
  }
}
@keyframes fadeInBlur {
  from {
    opacity: 0;
    filter: blur(4px);
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}
.bar-rented,
.bar-repair {
  transform-origin: left;
  transition: x 0.4s cubic-bezier(0.23, 1, 0.32, 1),
    width 0.4s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.3s ease;
}
.animated-bar,
.animated-text,
.bar-bg {
  animation-fill-mode: forwards;
}
.animated-bar {
  animation-name: drawBar;
  animation-duration: 0.9s;
  animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
}
.animated-text {
  animation-name: fadeInBlur;
  animation-duration: 0.7s;
  animation-timing-function: ease-out;
}
.bar-bg {
  fill: rgba(70, 70, 90, 0.2);
  animation-name: fadeInBlur;
  animation-duration: 0.5s;
}
.animated-bar-vertical {
  transform-origin: bottom;
  animation: growBar 0.9s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}
@keyframes growBar {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}
.chart-line {
  animation: dash 1.5s ease-out forwards;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
}
@keyframes dash {
  to {
    stroke-dashoffset: 0;
  }
}
.chart-point {
  animation: fadeIn 0.5s ease-out forwards;
  opacity: 0;
}

/* -----------------------------
   14. Vehicle Display Boxes
----------------------------- */
.gorna_belka_tablicy {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  gap: 20px;
}

.gorna_belka_tablicy a {
  color: white;
  text-decoration: none;
}

.logo_belka_tablicy img {
  vertical-align: middle;
}

.gorna_belka_tablicy_sortowanie {
  display: flex;
  align-items: center;
  gap: 15px;
}

.gorna_belka_tablicy select {
  padding: 5px;
  border-radius: 4px;
  border: 1px solid #4a4a58;
  color: var(--primary-color);
}

.pojazdy-container {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 20px;
  justify-content: center;
}

.box_pojazdu {
  position: relative;
  background: url(../zdjecia/TloRamki-2048x546-2.png);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  border: 1px solid #3a4c55;
  width: 320px;
  padding: 10px 4px 10px 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 4px 4px 7px rgba(0, 0, 0, 0.4);

  /* Usuwamy border-radius, bo zastępujemy go clip-path */
  border-radius: var(--border-radius);

  /* Zaokrąglone trzy rogi + ścięty prawy dolny */
  clip-path: polygon(
    0 0,
    /* lewy górny */ 100% 0,
    /* prawy górny */ 100% calc(100% - 20px),
    /* początek ścięcia */ calc(100% - 20px) 100%,
    /* koniec ścięcia */ 0 100%,
    /* lewy dolny */ 0 0 /* z powrotem do początku */
  );
}

.box_pojazdu:hover {
  transform: translateY(-3px);
  box-shadow: 8px 8px 7px rgba(0, 0, 0, 0.4);
}
.box_content {
  display: flex;
}
.kolumna_lewa {
  width: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.kolumna_srodkowa {
  width: 70%; /* Ustal szerokość kolumny środkowej */
  display: flex;
  flex-direction: column;
  align-items: center;
}
.kolumna_prawa {
  width: 30%; /* Ustal szerokość kolumny prawej */
}
.info_kategoria {
  background-color: rgb(15 19 24 / 50%); /* Ustal domyślny kolor tła */
  margin: 5px 0px; /* Ustal margines między prostokątami */
  padding: 5px;
  border-radius: 4px;
  text-align: center;
  font-weight: bold;
  font-size: 2em;
}

.info_nr_katalogowy {
  background-color: rgb(15 19 24 / 50%); /* Ustal domyślny kolor tła */
  margin: 5px 0px; /* Ustal margines między prostokątami */
  padding: 5px;
  border-radius: 4px;
  text-align: center;
  font-weight: bold;
  font-size: 2em;
  color: var(--bg-darker);
}

.info_ubezpieczenie {
  margin: 5px 0; /* Ustal margines między prostokątami */
  padding: 5px;
  border-radius: 4px;
  text-align: center;
  font-size: 0.7rem;
}

.hr {
  border: none;
  height: 1px;
  background-color: var(--status-free);
  margin: -6px -12px 0px -6px;
  width: 186px;
}

.uwagi {
  margin-top: 10px;
}
.ikony_prawe {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-top: auto; /* Umożliwia wyrównanie ikon do dołu */
}

.box_header,
.box_footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.box_body {
  text-align: center;
  flex-grow: 1;
}

.nazwa_pojazdu {
  font-size: 1.8em; /* Początkowy rozmiar czcionki */
  font-weight: bold;
  padding: 2px 10px 10px 20px;
  white-space: normal; /* Umożliwia zawijanie tekstu */
  word-wrap: break-word; /* Umożliwia zawijanie słów */
  overflow: hidden; /* Ukrywa tekst, który wychodzi poza kontener */
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Ogranicza do 2 linii */
  -webkit-box-orient: vertical;
  text-overflow: ellipsis; /* Dodaje '...' jeśli tekst jest za długi */
  line-height: 1.2em; /* Wysokość linii */
  max-height: 2.8em; /* Maksymalna wysokość dla dwóch linii */
  text-shadow: 1px 1px 3px black;
}

.nr_rejestracyjny,
.marka_pojazdu {
  font-size: 1em;
  color: var(--text-dark);
}

.ikonka {
  height: 32px;
}

.ikonka_ubezpieczenia {
  width: 80px;
  margin-top: 10px;
}

/* -----------------------------
   15. Legend / Footer
----------------------------- */
.legenda {
  border-top: 1px solid #555;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 14px;
  z-index: 1000;
}

.legenda-kolor {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: inline-block;
}

.group-title {
  text-align: center;
  margin: 20px;
  color: var(--primary-color);
}

.legenda-item {
  display: flex;
  align-items: center;
  gap: 5px; /* Odstęp między opisem a licznikiem */
  border: 1px solid #555;
  border-radius: 4px;
}
.legenda-opis {
  padding: 5px 8px;
}
.legenda-licznik {
  color: white;
  padding: 5px;
  min-width: 30px;
  text-align: center;
  border-radius: 4px;
  font-weight: bold;
}

/* Ustawienie koloru tła dla każdego statusu w legendzie */
.legenda-licznik.status-wypozyczony {
  background-color: var(--status-rented);
  color: #fff !important; /* Używamy !important, aby mieć pewność, że tekst będzie biały */
}

.legenda-licznik.status-zarezerwowany {
  background-color: var(--status-reserved);
  color: #fff !important;
}

.legenda-licznik.status-wolny {
  background-color: var(--status-free);
  color: #000 !important; /* Czarny tekst dla lepszego kontrastu na jasnym zielonym tle */
}

.legenda-licznik.status-w-naprawie {
  background-color: var(--status-repair);
  color: #000 !important; /* Czarny tekst dla lepszego kontrastu na jasnym pomarańczowym tle */
}

/* Styl dla licznika sumy, aby pasował do reszty */
.legenda-licznik.status-suma {
  background-color: #3a4c55;
  color: #fff !important;
}

.etykieta {
  display: inline-block;
  white-space: nowrap; /* najważniejsze! */
  vertical-align: middle;
}

.popup {
  position: absolute;
  width: 600px;
  height: 300px;
  background-color: white;
  border: 1px solid #ccc;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  padding: 10px;
  overflow: auto; /* Umożliwia przewijanie, jeśli treść jest zbyt długa */
}
.popup_content {
  /* Dostosuj style wewnętrznego kontenera, jeśli to konieczne */
}
.popup_nazwa_pojazdu {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
}

/* -----------------------------
   16. Calendar Styles
----------------------------- */
/* Kontener kalendarza */
#calendar {
  background-color: var(--bg-dark);
  padding: 20px;
  border-radius: var(--border-radius-lg);
  box-shadow: 7px 7px 10px rgba(0, 0, 0, 0.3);
  margin: 20px 0;
  min-height: 600px;
}

/* Nagłówek kalendarza */
.fc-header-toolbar {
  padding: 10px !important;
  margin-bottom: 1.5em !important;
  background-color: var(--bg-darker);
  border-radius: var(--border-radius);
}

.fc-toolbar-title {
  color: var(--primary-color) !important;
  font-size: 1.5em !important;
  font-weight: 600 !important;
}

/* Przyciski w kalendarzu */
.fc-button {
  background-color: var(--bg-darker) !important;
  border-color: var(--border-color) !important;
  color: var(--text-light) !important;
  padding: 8px 16px !important;
  transition: all 0.3s ease !important;
}

.fc-button:hover {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: var(--text-bialy) !important;
}

.fc-button-active {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: var(--text-bialy) !important;
}

/* Style dla wydarzeń */
.fc-event {
  border: none !important;
  padding: 2px 5px !important;
  margin: 1px 0 !important;
  cursor: pointer !important;
  border-radius: var(--border-radius) !important;
}

.fc-event-title {
  font-weight: 500 !important;
  padding: 2px !important;
}

/* Kolory statusów napraw */
.repair-status-new {
  background-color: #90ee90 !important;
  border-color: #90ee90 !important;
  color: #000000 !important;
}

.repair-status-in-progress {
  background-color: #006400 !important;
  border-color: #006400 !important;
  color: var(--text-bialy) !important;
}

.repair-status-waiting {
  background-color: #808080 !important;
  border-color: #808080 !important;
  color: var(--text-bialy) !important;
}

.repair-status-delayed {
  background-color: #ff0000 !important;
  border-color: #ff0000 !important;
  color: var(--text-bialy) !important;
}

.repair-status-ready {
  background-color: #0000ff !important;
  border-color: #0000ff !important;
  color: var(--text-bialy) !important;
}

.repair-status-completed {
  background-color: #d3d3d3 !important;
  border-color: #d3d3d3 !important;
  color: #000000 !important;
}

/* Style dla modali */
.repair-modal {
  background-color: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
}

.repair-modal .modal-header {
  background-color: var(--bg-darker);
  border-bottom: 1px solid var(--border-color);
  padding: 15px 20px;
}

.repair-modal .modal-title {
  color: var(--primary-color);
  font-weight: 600;
}

.repair-modal .modal-body {
  padding: 20px;
}

/* Style dla formularzy w modalach */
.repair-form .form-label {
  color: var(--text-light);
  margin-bottom: 5px;
}

.repair-form .form-control {
  background-color: var(--bg-darker);
  border: 1px solid var(--border-color);
  color: var(--text-light);
  border-radius: var(--border-radius);
}

.repair-form .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(255, 92, 0, 0.25);
}

/* Style dla legendy i limitów */
.calendar-info-card {
  background-color: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  margin-bottom: 20px;
}

.calendar-info-card .card-header {
  background-color: var(--bg-darker);
  border-bottom: 1px solid var(--border-color);
  padding: 15px 20px;
}

.calendar-info-card .card-title {
  color: var(--primary-color);
  margin: 0;
  font-size: 1.1em;
  font-weight: 600;
}

.calendar-info-card .card-body {
  padding: 15px 20px;
}

/* Status dot w legendzie */
.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
  border: 1px solid var(--border-color);
}

/* Ikona wykrzyknika dla opóźnień */
.delay-warning {
  color: #ff0000;
  margin-left: 5px;
  animation: blink 1s infinite;
}

@keyframes blink {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

/* Responsywność */
@media (max-width: 768px) {
  #calendar {
    padding: 10px;
    margin: 10px 0;
  }

  .fc-toolbar-title {
    font-size: 1.2em !important;
  }

  .fc-button {
    padding: 6px 12px !important;
    font-size: 0.9em !important;
  }

  .calendar-info-card {
    margin-bottom: 15px;
  }
}

/* Style dla historii napraw */
.repair-history {
  max-height: 200px;
  overflow-y: auto;
  padding: 10px;
  background-color: var(--bg-darker);
  border-radius: var(--border-radius);
}

.repair-history-item {
  padding: 10px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 5px;
}

.repair-history-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.repair-history-date {
  color: var(--primary-color);
  font-weight: 600;
}

.repair-history-status {
  margin-left: 10px;
  padding: 2px 6px;
  border-radius: var(--border-radius);
  font-size: 0.9em;
}

/* Toast notifications */
.calendar-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1060;
  min-width: 250px;
  background-color: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.calendar-toast.success {
  border-left: 4px solid var(--status-free);
}

.calendar-toast.error {
  border-left: 4px solid var(--status-rented);
}

.calendar-toast-header {
  padding: 10px 15px;
  background-color: var(--bg-darker);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calendar-toast-body {
  padding: 15px;
  color: var(--text-light);
}

/* Style dla legendy statusów */
.status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  padding: 15px;
  background-color: var(--bg-dark);
  border-radius: var(--border-radius);
  margin-bottom: 20px;
}

.status-legend-item {
  display: flex;
  align-items: center;
  padding: 5px 10px;
  background-color: var(--bg-darker);
  border-radius: var(--border-radius);
  min-width: 200px;
}

.status-text {
  color: var(--text-light);
  font-size: 0.9em;
}

/* Style dla limitów dziennych */
.daily-limits {
  margin-top: 20px;
}

.limits-container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: space-between;
}

.limit-item {
  display: flex;
  align-items: center;
  padding: 8px 15px;
  background-color: var(--bg-darker);
  border-radius: var(--border-radius);
  min-width: 180px;
}

.limit-item .day {
  color: var(--primary-color);
  font-weight: 600;
  margin-right: 8px;
}

.limit-item .count {
  color: var(--text-light);
}
