/* === KOREKTA FINALNA 2025-10 (DYSPOZYCYJNOŚĆ + MODAL PRZYWRÓCONY) === */

/* === MODAL (przywrócony, bez zmian wizualnych) === */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: all 0.25s ease;
}

.modal:not(.hidden) {
  display: flex !important;
}

.modal-content {
  background: var(--panel, #12264c);
  border-radius: 16px;
  padding: 24px 32px;
  max-width: 460px;
  width: 90%;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  transform: scale(0.96);
  opacity: 0;
  transition: all 0.25s ease;
}

.modal:not(.hidden) .modal-content {
  transform: scale(1);
  opacity: 1;
}

.modal-content h2 {
  color: var(--brand, #ffd347);
  margin-bottom: 10px;
}

.modal-content label {
  font-size: 14px;
  color: #fff;
}

.modal-content .form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}
/* === DYSPOZYCYJNOŚĆ — NOWY UKŁAD (DWIE TABELKI) 2025-10 === */

/* 🔹 Ogólny kontener dla tabel */
.tabela-blok {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  margin-top: 16px;
}

/* 🔹 Druga tabela ma jaśniejsze tło */
.tabela-blok.jasne-tlo {
  background: #0f2244;
}

/* 🔹 Tabela wewnętrzna */
.tabela-parametry {
  width: 100%;
  border-collapse: separate;
  border-spacing: 16px 10px;
}

.tabela-parametry td {
  vertical-align: middle;
}

.tabela-parametry label {
  display: block;
  font-size: 13px;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.tabela-parametry input {
  width: 100%;
  background: var(--bg);
  color: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}

/* 🔹 Odstęp między tabelami */
.tabela-blok + .tabela-blok {
  margin-top: 20px;
}

/* 🔹 Przyciski obok siebie */
.przyciski-blok {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  justify-content: flex-start;
}

.przyciski-blok .btn {
  flex: 0 0 auto;
  height: 38px;
  font-weight: 600;
  font-size: 14px;
  border-radius: 8px;
}

/* 🔹 Sekcja informacji (paski C/E info) */
.pill-wrap {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* 🔹 Automatyczne generowanie – wyśrodkowane */
.auto-raport {
  text-align: center;
  margin-top: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #cbd5e1;
}

.auto-raport input[type="checkbox"] {
  transform: scale(1.2);
  cursor: pointer;
}

/* 🔹 Responsywność */
@media (max-width: 900px) {
  .tabela-parametry {
    border-spacing: 10px 8px;
  }
  .przyciski-blok {
    flex-direction: column;
    align-items: stretch;
  }
}

/* === PANEL ADMINA (TOPBAR) – DODANE 2025-10 === */

.topbar {
  display: flex;
  gap: 8px;
  align-items: center;
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 1000;
}

#adminPanelBtn {
  display: none; /* domyślnie ukryty — JS pokaże tylko adminom */
  background-color: #ffd347;
  color: #0b1f3a;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease-in-out;
}

#adminPanelBtn:hover {
  filter: brightness(1.1);
  transform: scale(1.03);
}

/* 💡 Opcjonalne: lekki pulsujący efekt dla adminów */
@keyframes adminPulse {
  0%, 100% { box-shadow: 0 0 0px rgba(255,211,71,0.0); }
  50% { box-shadow: 0 0 12px rgba(255,211,71,0.4); }
}
#adminPanelBtn.active {
  animation: adminPulse 2s infinite ease-in-out;
}
/* === Poprawki sekcji Dyspozycyjność === */
.tabela-parametry input,
.tabela-parametry select {
  height: 30px;              /* 🔹 niższe pola */
  padding: 4px 6px;
  font-size: 13px;
  line-height: 1.2;
  background: var(--bg);
  color: #fff;
  border: 1px solid #2d4f8a;
  border-radius: 6px;
}

.tabela-parametry label {
  font-size: 13px;
  margin-bottom: 2px;
  color: #cbd5e1;
}

.disp-actions .btn {
  background: var(--brand);   /* jak w admin panelu */
  color: var(--bg) !important;
  font-weight: 600;
}

.disp-actions .btn.secondary {
  background: transparent;
  color: #fff !important;
  border: 1px solid #4b6ea9;
}
/* 🧭 Wyłączamy strzałki z pól liczbowych (C, D, E, F) */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] {
  -moz-appearance: textfield;
}
/* BANER COOKIES + MODAL */

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #020b1f;
  border-top: 1px solid #1e3b6c;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.6);
  z-index: 2000;
  display: none; /* domyślnie ukryty, JS go pokazuje */
  padding: 14px 16px;
  font-size: 0.9rem;
}

.cookie-banner__inner {
  max-width: 950px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.cookie-banner__text {
  flex: 1 1 260px;
  text-align: left;
}

.cookie-banner__text p {
  margin: 0;
  text-align: left;
  font-size: 0.9rem;
}

.cookie-banner__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.cookie-btn {
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  transition: 0.2s ease;
}

.cookie-btn--primary {
  background: #FFD347;
  color: #0B1F3A;
}

.cookie-btn--primary:hover {
  background: #E5B800;
}

.cookie-btn--ghost {
  background: transparent;
  color: #FFD347;
  border: 1px solid rgba(255, 211, 71, 0.6);
}

.cookie-btn--ghost:hover {
  background: rgba(255, 211, 71, 0.08);
}

/* Modal "Dostosuj" */

.cookie-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;            /* domyślnie ukryty */
  align-items: center;
  justify-content: center;
  z-index: 2100;
}

.cookie-modal {
  background: #12264c;
  border-radius: 14px;
  padding: 24px 24px 20px;
  max-width: 520px;
  width: 90%;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.7);
  font-size: 0.9rem;
}

.cookie-modal h3 {
  margin: 0 0 10px;
  color: #FFD347;
  font-size: 1.1rem;
}

.cookie-modal p {
  margin: 0 0 14px;
  text-align: left;
}

.cookie-modal__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 211, 71, 0.25);
}

.cookie-modal__row:last-of-type {
  border-bottom: 1px solid rgba(255, 211, 71, 0.25);
}

.cookie-modal__row div {
  max-width: 75%;
}

.cookie-switch {
  position: relative;
  width: 40px;
  height: 20px;
}

.cookie-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-switch span {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #24375b;
  border-radius: 999px;
  transition: 0.2s;
}

.cookie-switch span::before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background-color: #FFD347;
  transition: 0.2s;
}

.cookie-switch input:checked + span {
  background-color: #3a4f7c;
}

.cookie-switch input:checked + span::before {
  transform: translateX(18px);
}

.cookie-switch input:disabled + span {
  opacity: 0.4;
  cursor: not-allowed;
}

.cookie-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

@media (max-width: 600px) {
  .cookie-banner__inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .cookie-banner__buttons {
    width: 100%;
    justify-content: flex-start;
  }
}
