/* ===== GLOBALNY STYL ===== */

/* Reset / baza */
html, body {
  height: 100%;
  margin: 0;
  background: #121212;
  color: #e0e0e0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  flex-direction: column;
  overflow-x: hidden; /* zawsze blokujemy poziomy scroll */
}

/* HEADER */
header {
  background: #000;
  color: rgb(255, 255, 255);
  padding: 10px 1rem !important;
}
.header-inner {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.logo img {
  height: 120px;
  width: auto;
}
.contact p {
  margin: 0;
  text-align: right;
  font-size: 0.9rem;
}
.contact a {
  color: #93fa73ff;
  text-decoration: none;
}
.contact a:hover {
  text-decoration: underline;
}

/* NAWIGACJA */
nav.main-nav {
  background: #1c1c1c;
  border-top: 1px solid #333;
  border-bottom: 1px solid #333;
  width: 100%;
}
nav.main-nav .desktop-menu {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  gap: 2rem;
  justify-content: center;
  list-style: none;
  padding: 1rem 1.5rem;
}
.desktop-menu a {
  color: #93fa73ff;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.2rem;
}
.desktop-menu a:hover,
.desktop-menu a.active {
  color: #fff;
}

/* MAIN */
main.container {
  width: 100%;
  max-width: 1600px;   /* szerokość taka jak header */
  margin: 0 auto;
  padding: 2rem 1rem;
  flex: 1;
  background: transparent;
  box-sizing: border-box;
}
main.container h2,
main.container .subheader {
  text-align: center;
}

/* FOOTER */
footer {
  background: #000;
  color: #93fa73ff;
  font-size: 0.8rem;
  height: 40px;
  line-height: 40px;
  text-align: center;
}
footer a {
  color: #93fa73ff;
  text-decoration: none;
}
footer a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ===== MOBILE NAV ===== */
.mobile-menu {
  display: none;
}

@media (max-width: 768px) {
  /* header wyśrodkowany */
  .header-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .logo img {
    margin: 0 auto;
    display: block;
  }
  .contact {
    margin-top: 0.5rem;
    text-align: center;
  }

  /* ukryj desktop menu */
  nav.main-nav .desktop-menu {
    display: none !important;
  }

  /* pokaż hamburgera */
  nav.main-nav .mobile-menu {
    display: block !important;
    position: relative;
  }

  .hamburger {
    font-size: 2rem;
    background: none;
    border: none;
    color: #93fa73ff;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 15px;
  }

  /* overlay */
  .mobile-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100%;
    background: #1c1c1c;
    box-shadow: -3px 0 8px rgba(0,0,0,0.5);
    transition: right 0.3s ease-in-out;
    padding: 2rem 1rem;
  }
  body.nav-open .mobile-overlay {
    right: 0;
  }

  .mobile-overlay ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  .mobile-overlay a {
    color: #93fa73ff;
    font-size: 1.2rem;
    text-decoration: none;
  }
  .mobile-overlay a:hover {
    color: #fff;
  }

  .close-menu {
    font-size: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 15px;
  }

  /* MAIN – fix szerokości */
  main.container {
    width: 100%;
    max-width: 100%;
    padding: 1rem;
    box-sizing: border-box;
  }
}
/* ===== GLOBALNE PRZYCISKI AKCJI ===== */

/* mały przycisk np. w tabeli */
.btn-action,
.small-btn {
  padding: 0.4rem 0.7rem;
  margin-right: 0.3rem;
  border-radius: 6px;
  font-size: 0.9rem;
  background: #2b2b2b;
  color: #fff;
  text-decoration: none;
  transition: background 0.2s ease;
  display: inline-block;
}
.btn-action:hover,
.small-btn:hover {
  background: #444;
}

/* przycisk edycji */
.btn-edit {
  background: #93fa73ff;
  color: #000 !important;
}
.btn-edit:hover {
  background: #7be85a;
}

/* przycisk usuwania */
.btn-delete,
.small-btn.secondary {
  background: #c62828;
  color: #fff !important;
}
.btn-delete:hover,
.small-btn.secondary:hover {
  background: #a91d1d;
}

/* przycisk powrotu / neutralny */
.btn-back,
.btn-secondary {
  background: #444;
  color: #fff !important;
}
.btn-back:hover,
.btn-secondary:hover {
  background: #666;
}
/* przycisk wylogowania */
.logout-btn {
  margin-left: auto;
}

/* domyślnie ukryty */
.btn-logout {
  display: none;
}

/* na mobile widoczny */
@media (max-width: 768px) {
  .btn-logout {
    display: inline-block;
    background: #c62828;
    color: #fff !important;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.2s ease;
  }
  .btn-logout:hover {
    background: #a91d1d;
  }
}
.alert {
  margin: 1rem 0;
  padding: 1rem 1.2rem;
  border-radius: 8px;
  font-weight: bold;
  background: #252525;
  color: #fff;
  border-left: 5px solid #93fa73;
}
.alert:has(:contains("⚠️")) {
  border-left-color: #ffcc00;
}
.alert:has(:contains("❌")) {
  border-left-color: #ff5555;
}
.alert {
  margin: 1rem 0;
  padding: 1rem 1.2rem;
  border-radius: 8px;
  font-weight: bold;
  background: #252525;
  color: #fff;
  border-left: 5px solid #93fa73;
}
.alert:has(:contains("⚠️")) {
  border-left-color: #ffcc00;
}
.alert:has(:contains("❌")) {
  border-left-color: #ff5555;
}
