body {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  background: #f4f4f4;
  color: #333;
}

/* Pasek nagłówka */
header {
  background: #79ba2b; /* Twój kolor */
  color: #fff;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
header .logo {
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-img {
  width: 48px; height: 48px;
  object-fit: contain;
  display: block;
}
nav.menu { display: flex; gap: 10px; }
nav.menu button {
  background: transparent; border: none; color: #fff;
  font-size: 16px; cursor: pointer; font-weight: 500;
}
/* Aktywna zakładka – wspólny wygląd desktop + mobile */
nav.menu button.active {
  background: #f4f4f4;    /* jasne tło */
  color: #2f5a0e;         /* ciemniejszy tekst */
  font-weight: 700;
  text-decoration: none;  /* usuń podkreślenie */
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
  border-radius: 6px;     /* lekko zaokrąglone */
}
/* HAMBURGER przy logo */
.menu-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  display: none;             /* na desktop ukryty, mobile pokaże */
  width: 48px;
  height: 48px;
  padding: 0;
  flex-direction: column;    /* <<< dodaj to – kreski pionowo */
  align-items: center;       /* wyśrodkuj w poziomie */
  justify-content: center;   /* wyśrodkuj w pionie */
  z-index: 1001;
}
.menu-toggle .bar {
  display: block;
  width: 24px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
.menu-toggle .bar + .bar {
  margin-top: 5px; /* odstęp między kreskami */
}

/* Animacja hamburger → X */
.menu-toggle.open .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.menu-toggle.open .bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle.open .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile: pokaż hamburgera */
@media (max-width:768px) {
  .menu-toggle { display: flex; }
}

@media (max-width: 768px) {
  nav.menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 10px;
    width: 200px;
    background: #5e9622;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    overflow: hidden;
    z-index: 999;

    /* animacja wysuwania */
    max-height: 0;
    opacity: 0;
    transition: max-height .3s ease, opacity .2s ease;
  }
  nav.menu.show {
    display: flex;
    max-height: 500px;
    opacity: 1;
  }

  nav.menu button {
    font-size: 14px;
    padding: 10px;                 /* trochę luzu, ale równo */
    border-bottom: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    margin: 0;
    display: flex;                 /* flexbox włączony */
    align-items: center;           /* idealne wyśrodkowanie pionowe */
    justify-content: left;       /* dodatkowo wyśrodkuj poziomo */
    line-height: normal;           /* normalny line-height, żeby nie zdołował tekstu */
    height: 40px;                  /* stała wysokość dla równości wszystkich wierszy */
  }
  nav.menu button:last-child {
    border-bottom: none;
  }
}


main { padding:20px; }
form, .filterBox {
  background:#fff; padding:15px; border-radius:6px;
  margin:15px auto; box-shadow:0 2px 4px rgba(0,0,0,0.1);
  max-width:800px;
}
input, select, button {
  padding:10px 14px; margin:6px 4px; border-radius:4px;
  border:1px solid #ccc; font-size:15px; box-sizing:border-box;
  font-family:'Roboto',sans-serif;
}
button { cursor:pointer; font-weight:500; transition:0.2s ease; }
.btn-main { background:#79ba2b; color:#fff; }
.btn-main:hover { background:#5e9622; }
.btn-take { background:#1a8754; color:#fff; }
.btn-take:hover { background:#146b43; }
.btn-end { background:#b53737; color:#fff; }
.btn-end:hover { background:#912d2d; }
.btn-reject { background:#ff9800; color:#fff; }
.btn-reject:hover { background:#e68900; }

#waitingList,#inProgressList,#doneList,#rejectedList {
  display:flex; flex-wrap:wrap;
  justify-content:center; gap:20px;
}

.task {
  background:#fff; border:1px solid #ddd; border-radius:6px;
  padding:15px; box-shadow:0 2px 4px rgba(0,0,0,0.08);
  width:500px; transition: box-shadow 0.2s ease;
}

.task:hover { box-shadow:0 6px 12px rgba(0,0,0,0.15); }

.task-header {
  padding:6px 12px; font-weight:600;
  border-radius:6px 6px 0 0; color:#fff;
  margin:-15px -15px 10px -15px;
}
.header-oczekuje{background:#ffc107;}
.header-progress{background:#007bff;}
.header-done{background:#198754;}
.header-rejected{background:#dc3545;}

.task-table{width:100%;border-collapse:collapse;margin-top:8px;font-size:14px;}
.task-table td{border:1px solid #eee;padding:6px 8px;vertical-align:top;}
.task-table td.label{font-weight:500;width:130px;background:#f9f9f9;}

.time-info{margin-top:5px;font-size:0.85em;color:#2f5a0e;font-weight:500;}

table{width:100%;border-collapse:collapse;margin-top:15px;font-size:14px;}
th,td{border:1px solid #ccc;padding:6px 10px;text-align:left;}
th{background:#eee;}

.summary-table {
  max-width: 600px;
  margin: 15px auto; /* wyśrodkowanie */
  border: 1px solid #ddd;
  border-collapse: collapse;
  font-size: 14px;
  background: #fff;
}
.summary-table th,
.summary-table td {
  border: 1px solid #ccc;
  padding: 6px 10px;
  text-align: center;
}
.summary-table th { background: #eee; font-weight: 600; }

/* Wykres w Statystykach */
.summary-chart {
  max-width: 600px;
  margin: 10px auto;
  height: 300px;
}
.summary-chart canvas {
  width: 100% !important;
  height: 100% !important;
}

@media(max-width:1200px){.task{width:45%;}}
@media(max-width:768px){
  #waitingList,#inProgressList,#doneList,#rejectedList{flex-direction:column;align-items:center;}
  .task{width:95%;}
  input,select,button{width:100%;min-width:unset;margin:6px 0;}
  .task-table td.label{width:100px;}
}

/* Modal do zdjęć */
.modal {
  display: none; 
  position: fixed; 
  z-index: 9999; 
  padding-top: 60px; 
  left: 0; top: 0;
  width: 100%; height: 100%;
  overflow: auto; 
  background-color: rgba(0,0,0,0.8);
}
.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80vh;
  border: 4px solid #fff;
  border-radius: 6px;
}
.close {
  position: absolute;
  top: 20px; right: 35px;
  color: #fff;
  font-size: 40px; font-weight: bold;
  cursor: pointer;
}
.close:hover { color: #ccc; }

#waitingCounter, #waitingCounterWaiting {
  color: #2f5a0e;
}

/* Statystyki – grid */
.stats-grid {
  display: grid;
  gap: 32px;               /* większy odstęp między kolumnami */
  max-width: 1200px;
  margin: 0 auto;
}
.stats-col { min-width: 0; }

/* 2 kolumny od 992px */
@media (min-width: 992px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
    column-gap: 48px;      /* dodatkowa przerwa na desktopie */
  }
}

/* 3 kolumny od 1280px */
@media (min-width: 1280px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* Wysokości wykresów w Statystykach */
#page_stats .summary-chart {
  height: 340px;
  margin: 0 0 16px 0;   /* oddech pod wykresem */
}
#page_stats .summary-chart canvas {
  width: 100% !important;
  height: 100% !important;
}

/* Tabela w Statystykach – pełna szerokość kolumny */
#page_stats .summary-table {
  max-width: 100%;
  margin: 0;
}

/* Desktop: aktywna zakładka jak "chip" z tłem strony */
@media (min-width: 992px) {
  nav.menu button {
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
    text-decoration: none;
  }
  nav.menu button:hover {
    background: rgba(255,255,255,0.15);
  }
  nav.menu button.active {
    background: #f4f4f4;   /* kolor tła strony */
    color: #2f5a0e;        /* kontrastowy tekst */
    text-decoration: none; /* bez podkreślenia na desktopie */
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
  }
  nav.menu button + button {
  border-left: 1px solid rgba(255,255,255,0.4);
  padding-left: 16px; /* trochę miejsca po separatorze */
  margin-left: 16px;  /* trochę miejsca przed separatorem */
}
  
}
/* Modal formularza: kontener dialogu */
.modal-form .modal-dialog {
  background: #fff;
  max-width: 720px;
  width: calc(100% - 32px);
  margin: 60px auto;
  padding: 16px;
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.25);
  position: relative;
}
.modal-form .close {
  position: absolute;
  top: 10px; right: 14px;
  color: #333;             /* ciemniejszy X nad białym tłem */
}
.modal-form form > * {
  width: 100%;
  box-sizing: border-box;
}
.modal-form form button[type="submit"] {
  margin-top: 8px;
}
/* Modal weryfikacji admina */
.modal-admin .modal-dialog {
  background: #fff;
  max-width: 400px;              /* węższy niż formularz zgłoszenia */
  width: calc(100% - 32px);      /* na małych ekranach */
  margin: 120px auto;            /* centrowanie w pionie */
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  position: relative;
  text-align: center;
}
.modal-admin .modal-dialog h2 {
  margin-top: 0;
  font-size: 18px;
}

/* Close button dla modal-admin (na białym tle) */
.modal-admin .close {
  position: absolute;
  top: 10px;
  right: 14px;
  color: #333;              /* ciemny, widoczny na białym tle */
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}
.modal-admin .close:hover {
  color: #000;
}
.btn-delete {
  background: #dc3545;   /* intensywna czerwień (jak w Bootstrap) */
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn-delete:hover {
  background: #b02a37; /* ciemniejszy czerwony przy hoverze */
}
.user-info {
  font-weight: 300;       /* lżejsza czcionka */
  font-size: 14px;        /* mniejsze literki */
  margin-left: 12px;      /* odstęp od napisu TRANSPORTY */
  color: rgba(255,255,255,0.85); /* jasnoszare, żeby nie konkurowało z logo */
}
.stats-col.wide { grid-column: span 2; }
.login-logo {
  width: px;
  height: px;
  object-fit: contain;
  margin-bottom: px;
}
/* Aby stopka była zawsze na dole */
html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1; /* zajmuje całą możliwą przestrzeń między header a footer */
}

footer {
  background: #5e9622;  /* ten sam kolor co header/menu */
  color: #fff;
  text-align: center;
  padding: 12px;
  font-size: 14px;
  font-weight: 500;
}
footer p {
  margin: 0;
}
/* Instrukcja – bloczki nagłówków */
.instr-section {
  padding: 6px 10px;
  margin: 16px 0 8px 0;
  border-radius: 6px;
  font-size: 1.05em;
  font-weight: 600;
  color: #fff;                 /* jasny tekst */
}

/* Zgłaszający – np. ciemno-niebieskie tło */
.instr-section.zg {
  background: #3a6ea5;
}

/* Operator – np. ciemno-zielone tło */
.instr-section.op {
  background: #2d8659;
}