/* ==========================================================================
   1. Importy i reset
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ==========================================================================
   2. Ustawienia globalne
   ========================================================================== */
html, body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e0);
  min-height: 100vh;
  color: #333;
}

img {
  max-width: 100%;
  height: auto;
}

/* ==========================================================================
   3. Nagłówek i Navbar
   ========================================================================== */
.header {
  text-align: center;
  padding: 20px 0;
  background: #ffffff;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.05);
}

.logo {
  width: 160px;
  display: block;
  margin: 0 auto 10px;
}

.system-title {
  font-size: 1.6rem;
  color: #333;
  font-weight: 600;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between; /* kluczowe */
  background: #ffffff;
  padding: 14px 25px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-bottom: 4px solid #1e3a8a;
  height: 60px;
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  transition: background 0.3s ease-in-out;
}

.navbar-left {
  display: flex;
  align-items: center; /* wyrównanie w pionie */
  gap: 10px;           /* odstęp między logo a ewentualnym tytułem */
}

.navbar-right {
  display: flex;
  align-items: center; /* wyrównanie w pionie */
  gap: 20px;           /* odstęp między linkami */
}


.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}


.navbar-left img.logo {
  width: 60px;
  height: auto;
}

.navbar-toggle {
  display: none;
  cursor: pointer;
  font-size: 22px;
  color: #1e3a8a;
}

.navbar-toggle i {
  font-size: 18px;
}


.navbar-right li a {
  text-decoration: none;
  color: #1e3a8a;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 4px;
  transition: background 0.3s, color 0.3s;
}

.navbar-right li a:hover {
  background: #edf2f7;
  color: #2c5282;
}

/* ==========================================================================
   4. Layout: Sidebar + Content
   ========================================================================== */
.layout {
  display: flex;
  min-height: calc(100vh - 60px);
}

/* --- SIDEBAR: Szerokość 160px na desktopie --- */
.sidebar {
  width: 160px;
  background: #2a2f36; /* ciemne tło */
  color: #fff;
  position: fixed;
  top: 60px;           /* poniżej navbaru */
  left: 0;
  height: calc(100vh - 60px);
  transition: left 0.3s ease-in-out, width 0.3s ease-in-out;
  overflow-x: hidden;
  z-index: 999;
  padding-top: 10px;
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}

.sidebar-collapsed {
  width: 60px; /* węższy sidebar, jeśli chcesz go zwężać na desktopie */
}

.sidebar-toggle {
  font-size: 22px;
  cursor: pointer;
  text-align: center;
  padding: 12px;
  color: #cbd5e1;
  transition: transform 0.3s;
}

.sidebar-toggle i {
  font-size: 18px;
}

.sidebar-toggle.rotated {
  transform: rotate(180deg);
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 10px 0;
}

.sidebar-menu li {
  display: flex;
  align-items: center;
}

.sidebar-menu li a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #e2e8f0;
  text-decoration: none;
  padding: 12px 18px;
  border-radius: 6px;
  transition: background 0.3s, color 0.3s;
  white-space: nowrap;
  width: 100%;
}

.sidebar-menu li a:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.sidebar-menu li a.active {
  background: #005f73;
  color: #fff;
}

.sidebar-menu li i {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.sidebar-collapsed .sidebar-text {
  display: none;
}

/* Główna zawartość – przesunięta o 160px w prawo na desktopie */
.content {
  flex: 1;
  margin-top: 60px;    /* by nie nachodziła na navbar */
  margin-left: 160px;
  padding: 20px;
  transition: margin-left 0.3s ease-in-out;
}

/* ==========================================================================
   5. Stopka
   ========================================================================== */
.footer {
  background: #fff;
  text-align: center;
  padding: 10px 0;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
  border-top: 1px solid #ddd;
}

.footer p {
  margin: 0;
  font-size: 0.9rem;
  color: #4a5568;
}

/* ==========================================================================
   6. Ekran logowania
   ========================================================================== */
main {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
}

.login-container {
  width: 100%;
  margin-top: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-box {
  background: #ffffff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  width: 400px;
  text-align: center;
}

.login-box h2 {
  margin-bottom: 20px;
  font-size: 1.4rem;
  color: #1e3a8a;
  font-weight: 700;
}

.error-text {
  color: #e53e3e;
  font-weight: 600;
  margin-bottom: 15px;
}

.input-group {
  text-align: left;
  margin-bottom: 15px;
}

input {
  width: 100%;
  padding: 10px;
  border: 1px solid #cbd5e0;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
}

input:focus {
  border-color: #1e3a8a;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.3);
}

.login-btn {
  background: #1e3a8a;
  color: #fff;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  width: 100%;
  transition: background 0.3s;
  font-weight: 600;
}

.login-btn:hover {
  background: #2c5282;
}

/* ==========================================================================
   7. Strona główna, widgety, wydarzenia
   ========================================================================== */
.hero-list {
  list-style: none;
  padding: 0;
  margin: 20px auto;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.hero-box {
  background: #f0f4f8;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  text-align: center;
  width: 100%;
  max-width: 700px;
}

.clock-container {
  background: #f0f4f8;
  display: inline-block;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.weather-icon-wrap {
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
}

.weather-icon {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.upcoming-event {
  background: #f0f4f8;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.event-card {
  padding: 15px;
  background: #f0f4f8;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.wydarzenia-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.add-event-section {
  background: #f0f4f8;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.add-event-section h2 {
  margin-bottom: 15px;
  color: #1e3a8a;
}

.form-row {
  margin-bottom: 15px;
}

.form-row label {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
}

.form-row input[type="text"],
.form-row input[type="date"],
.form-row input[type="time"],
.form-row textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
}

.btn-add-event {
  background: #1e3a8a;
  color: #fff;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.btn-add-event:hover {
  background: #2c5282;
}

.list-section h2 {
  margin-bottom: 10px;
  color: #1e3a8a;
}

.events-list {
  display: block;
}

.event-tile {
  width: 100%;
  margin-bottom: 20px;
  background: #f0f4f8;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.event-tile h3 {
  margin-bottom: 8px;
}

.wave {
  display: inline-block;
  animation: wave-animation 2s infinite;
  transform-origin: 70% 70%;
}

@keyframes wave-animation {
  0% { transform: rotate(0deg); }
  10% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  30% { transform: rotate(14deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
  60% { transform: rotate(0deg); }
  100% { transform: rotate(0deg); }
}

.stats-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
  justify-content: center;
}

.stats-card {
  flex: 1 1 220px;
  max-width: 260px;
  background: #1e3a8a;
  border-radius: 8px;
  padding: 15px;
  color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.stats-card h3 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.stats-card p {
  font-size: 0.9rem;
  font-weight: 500;
}

.charts-container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 20px;
  justify-content: center;
}

.chart-box {
  flex: 1 1 350px;
  max-width: 450px;
  background: #1e3a8a;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chart-box h3 {
  text-align: center;
  color: #fff;
  margin-bottom: 10px;
  font-size: 1rem;
}

.dashboard-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px;
  gap: 15px;
  width: 100%;
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
  transition: background 0.3s ease, transform 0.1s ease;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: #e53e3e;
}

.logout-btn i {
  font-size: 18px;
  color: #e53e3e;
}

/* ==========================================================================
   8. Ustawienia, formularze
   ========================================================================== */
.settings-container {
  width: 60%;
  max-width: 600px;
  margin: 40px auto;
  background: #f0f4f8;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.settings-container h2 {
  text-align: center;
  font-size: 24px;
  margin-bottom: 20px;
  color: #1e3a8a;
  font-weight: 700;
}

.messages {
  margin-bottom: 15px;
}

.alert {
  padding: 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
}

.alert.success {
  background: #d4edda;
  color: #155724;
  border-left: 5px solid #28a745;
}

.alert.error {
  background: #f8d7da;
  color: #721c24;
  border-left: 5px solid #dc3545;
}

.settings-container fieldset {
  border: none;
  margin-bottom: 20px;
}

.settings-container legend {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
  border-bottom: 2px solid #ddd;
  padding-bottom: 5px;
  color: #1e3a8a;
}

.settings-container label {
  font-weight: 600;
  color: #333;
  display: block;
  margin-bottom: 5px;
}

.settings-container input {
  width: 100%;
  padding: 10px;
  border: 1px solid #cbd5e0;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s;
}

.settings-container input:focus {
  border-color: #1e3a8a;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.3);
}

.settings-container .btn {
  display: block;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
  margin-top: 10px;
}

.settings-container .btn-primary {
  background: #1e3a8a;
  color: #fff;
}

.settings-container .btn-primary:hover {
  background: #2c5282;
}

.settings-container .btn-danger {
  background: #e53e3e;
  color: #fff;
}

.settings-container .btn-danger:hover {
  background: #c53030;
}

hr {
  margin: 20px 0;
  border: 0;
  height: 1px;
  background: #ddd;
}

/* ==========================================================================
   9. Responsywność (sidebar + navbar)
   ========================================================================== */
@media screen and (max-width: 768px) {
  .layout {
    flex-direction: column;
  }
  /* Sidebar schowany – wysuwanie po .active */
  .sidebar {
    left: -160px;
    width: 160px;
  }
  .sidebar.active {
    left: 0;
  }
  .content {
    margin-left: 0;
    margin-top: 60px;
  }

  .navbar {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px;
  }
  .navbar-left {
    flex-direction: column;
    align-items: center;
  }

  .navbar-toggle {
    display: block;
    margin-top: 10px;
  }

  .navbar-right {
    flex-direction: column;
    width: 100%;
    text-align: center;
    gap: 10px;
    background: #ffffff;
    border-top: 1px solid #ddd;
    margin-top: 10px;
    padding: 10px 0;
  }


  .navbar-right.active {
    display: flex;
  }

  .navbar-right li {
    margin-bottom: 5px;
  }

  .hero-box,
  .widget-box {
    width: 100%;
    max-width: 95%;
    text-align: center;
    margin-bottom: 15px;
  }

  .stats-cards {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  .stats-card {
    width: 90%;
    max-width: 400px;
    text-align: center;
  }

  .charts-container {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  .chart-box {
    width: 90%;
    max-width: 400px;
  }
}

@media screen and (max-width: 480px) {
  html, body {
    font-size: 0.9rem;
  }
  .navbar, .login-box, .settings-container {
    padding: 10px;
  }
}

/* ==================================================================
   Poster Thumbnail (np. do plakatów)
   ================================================================== */
.poster-thumbnail {
  width: 80px !important;
  height: auto;
  cursor: pointer;
  transition: width 0.3s ease;
}

.poster-thumbnail.fullsize {
  width: 100% !important;
  max-width: 600px !important;
}

/* ==================================================================
   Poster Chat Styles
   ================================================================== */
.poster-chat-container {
  max-width: 800px;
  margin: 20px auto;
  background: #f0f4f8;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.poster-image {
  text-align: center;
  margin-bottom: 20px;
}

.poster-thumbnail {
  width: 80px !important;
  height: auto;
  cursor: pointer;
  transition: width 0.5s ease-out;
  border: 2px solid #cbd5e0;
  border-radius: 4px;
}

.poster-thumbnail.fullsize {
  width: 600px !important;
  max-width: 100%;
}

/* ==================================================================
   Plakaty Page Styles
   ================================================================== */
.plakaty-container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 20px;
  background: #f0f4f8;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.plakaty-container h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #1e3a8a;
}

.events-list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.event-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 15px;
  width: 100%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease;
}

.event-card:hover {
  transform: translateY(-5px);
}

.event-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: #1e3a8a;
}

.event-card p {
  font-size: 0.95rem;
  color: #333;
  margin-bottom: 15px;
}

.btn-add-poster {
  background: #1e3a8a;
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn-add-poster:hover {
  background: #2c5282;
}

.event-card a img {
  width: 120px;
  height: auto;
  border: 2px solid #ccc;
  border-radius: 4px;
  transition: transform 0.3s ease;
}

.event-card a img:hover {
  transform: scale(1.05);
}

.comments-section {
  margin-top: 30px;
  background: #fff;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.comments-section h3 {
  margin-bottom: 10px;
  color: #1e3a8a;
  text-align: center;
}

/* Kontenery podstron (wydarzenia, statystyki) */
.wydarzenia-container,
.stats-container {
  max-width: 1200px;
  margin: 80px auto 20px auto; /* margines górny, by nie nachodzić na navbar */
  padding: 20px;
  background: #f0f4f8;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}


/* ===============================
   Chat dla plakatu – Style
   =============================== */
.poster-chat-container {
  max-width: 800px;
  margin: 100px auto 20px auto; /* zwiększony margines od góry, aby nie nachodził na navbar */
  padding: 20px;
  background-color: #f0f4f8; /* jasne tło */
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.poster-chat-container h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #1e3a8a; /* akcentowy kolor */
  font-size: 1.8rem;
}

.poster-image {
  text-align: center;
  margin-bottom: 20px;
}

.poster-thumbnail {
  width: 80px; /* miniaturka */
  height: auto;
  cursor: pointer;
  transition: width 0.5s ease-out;
  border: 2px solid #cbd5e0;
  border-radius: 4px;
}

.poster-thumbnail.fullsize {
  width: 600px;
  max-width: 100%;
}

.chat-messages {
  max-height: 400px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #cbd5e0;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.chat-message {
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.chat-message:last-child {
  border-bottom: none;
}

.chat-message strong {
  color: #1e3a8a;
  font-size: 1rem;
}

.chat-message em {
  color: #555;
  font-size: 0.8rem;
  margin-left: 10px;
}

.chat-message p {
  margin-top: 5px;
  font-size: 0.95rem;
  line-height: 1.4;
}

.chat-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #cbd5e0;
  border-radius: 4px;
  resize: vertical;
  font-size: 1rem;
  margin-bottom: 10px;
}

.chat-form button {
  background: #1e3a8a;
  color: #fff;
  padding: 10px 16px;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.chat-form button:hover {
  background: #2c5282;
}


/* Przycisk mobilny (hamburger) do togglowania sidebara */
.mobile-sidebar-toggle {
  display: none; /* domyślnie ukryty */
  position: fixed;
  top: 70px;      /* nieco poniżej navbaru */
  left: 10px;
  background: #1e3a8a;
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 50%;
  z-index: 1100;
}

@media screen and (max-width: 768px) {
  .mobile-sidebar-toggle {
    display: block;
  }
  /* Sidebar – schowany domyślnie na mobile */
  .sidebar {
    left: -160px; /* szerokość sidebara ustawiona na 160px */
    width: 160px;
  }
  .sidebar.active {
    left: 0;
  }
  /* Treść – pełna szerokość */
  .content {
    margin-left: 0;
    margin-top: 60px; /* upewnij się, że treść zaczyna się poniżej navbaru */
  }
}

/* Nagłówek strony */
.naglowek-notatek {
  text-align: center;
  margin-bottom: 40px;
}

.naglowek-notatek h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: #222;
  border-bottom: 3px solid #007bff;
  display: inline-block;
  padding-bottom: 10px;
}

/* Główna siatka wydarzeń */
.notatki-container {
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
}

/* Karta wydarzenia */
.notatka-karta {
  background: #ffffff;
  padding: 25px 30px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  border-left: 6px solid #ccc;
}

/* Notatki */
.pojedyncza-notatka {
  background: #f8f9fa;
  border: 1px solid #ddd;
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 15px;
}

.notatki-lista h4 {
  margin-bottom: 15px;
}

.notatka-akcje {
  margin-top: 10px;
}

.btn-akcja {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  text-decoration: none;
  margin-right: 6px;
  cursor: pointer;
}

.btn-akcja.edytuj {
  background-color: #e2e6ea;
  color: #333;
}

.btn-akcja.usun {
  background-color: #f8d7da;
  color: #721c24;
  border: none;
}

/* Formularz */
.formularz-notatki {
  background: #e7f1ff;
  padding: 20px;
  border: 1px solid #cce5ff;
  border-radius: 6px;
  margin-top: 25px;
}

.formularz-notatki textarea {
  width: 100%;
  min-height: 90px;
  padding: 10px;
  border-radius: 4px;
  border: 1px solid #aaa;
  resize: vertical;
}

.btn-zapisz {
  margin-top: 10px;
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
}

.brak-notatek {
  margin-top: 10px;
  color: #6c757d;
  font-style: italic;
}


