/* "Raleway" Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');
:root {
    --btn-primary: #007bff;
    --btn-primary-hover: #0056b3;
    --btn-secondary: #ffc107;
    --btn-secondary-hover: #5a6268;
    --btn-tertiary: #28a745;
    --btn-tertiary-hover: #227b37;
    --bt-danger: #dc3545;
    --bt-danger-hover: #bd2130;
    --bg-offen:  #ffc107;
    --bg-bestaetigt: #28a745;
    --bg-abgelehnt: #dc3545;
}
* {
    font-family: "Raleway", sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
  background: #f0f2f5;
  font-family: 'Segoe UI', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  margin: 0;
}

.login-form {
  background: #fff;
  padding: 2.5rem 2rem;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 380px;
}
.logo-container {
  text-align: center;
  margin-bottom: 1rem;
}

.logo-container img {
  max-width: 120px;
  height: auto;
  display: inline-block;
  filter: drop-shadow(0 0 4px rgba(0,0,0,0.1));
}

.login-form h1 {
  margin-bottom: 1.5rem;
  font-size: 2rem;
  color: #333;
  text-align: center;
}

.inputs_container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.login-form input {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  transition: border-color 0.3s ease;
}

.login-form input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

.button-group {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
a {
  text-decoration: none;
}
/* btn Button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.5rem;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  color: white;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

/* Icon im Button */
.btn i {
  font-size: 1.1rem;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
}
.btn-primary {
  background-color: var(--btn-primary);
}

.btn-primary:hover {
  background-color: var(--btn-primary-hover);
}

.btn-secondary {
  background-color: var(--btn-secondary);
}

.btn-secondary:hover {
  background-color: var(--btn-secondary-hover);
}

.btn-tertiary {
  background-color: var(--btn-tertiary);
}

.btn-tertiary:hover {
  background-color: var(--btn-tertiary-hover);
}
.btn-danger {
  background-color: var(--bt-danger);
}

.btn-danger:hover {
  background-color: var(--bt-danger-hover);
}

.dashboard-container {
  display: flex;
  height: 100vh;
  width: 100%;
}
.sidebar {
  width: 220px;
  background-color: #343a40;
  color: white;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 1.5rem 1rem;
  overflow: hidden; /* verhindert doppeltes Scrollen */
  position: fixed; /* optional, falls Sidebar immer sichtbar bleiben soll */
  top: 0;
  left: 0;
}

.logo-container {
  align-self: center;
  margin-bottom: 1.5rem;
}
.logo-container img {
  max-width: 100px;
  height: auto;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* Menübereich wird scrollbar, wenn zu viel Inhalt */
.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar a {
  display: flex;
  align-items: center;
  gap: 0.5rem; /* Abstand zwischen Icon und Text */
  padding: 0.5rem;
  border-radius: 4px;
  color: #ffffff;
  text-decoration: none;
  transition: background 0.2s;
}

.sidebar a:hover {
  background-color: #495057;
  color: #fff;
}

/* Footerbereich fixiert */
.sidebar-bottom {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid #495057;
  text-align: center;
  font-size: 0.85rem;
  color: #ccc;
  position: relative;
  margin-bottom: 100px;
}

.sidebar-bottom a {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.5rem;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.2s;
}

.sidebar-bottom a:hover {
  background-color: #495057;
}
.sidebar-separator {
  padding: 0.5rem 0;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: bold;
  color: #999;
  border-top: 1px solid #495057;
}

.burger-menu {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.burger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #333;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.burger-menu {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.burger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #333;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Animation zur X-Form */
.burger-menu.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.burger-menu.open span:nth-child(2) {
  opacity: 0;
}
.burger-menu.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 1024px) {
  .burger-menu {
    display: flex;
  }
}

/* Hauptbereich */
.main-content {
  margin-left: 220px; /* entspricht Sidebar-Breite */
  padding: 2rem;
  flex: 1;
  overflow-y: auto;
  min-height: 100vh;
  background-color: #f0f2f5;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.logout-button {
  background-color: #dc3545;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
}

.logout-button:hover {
  background-color: #c82333;
}

/* Widgets */
.dashboard-widgets {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.card {
  background-color: white;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  font-size: 1.1rem;
  flex: 1;
  min-width: 220px;
}
/* Content */
.dashboard-content h2 {
  margin-bottom: 1rem;
  font-size: 1.4rem;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.admin-table th,
.admin-table td {
  padding: 0.8rem;
  text-align: left;
  border-bottom: 1px solid #eee;
  border-right: 1px solid #eee;
}
.message-cell {
  max-width: 500px;
  min-width: 150px;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  overflow: auto;
  font-size: 0.9rem;
}
.admin-table th {
  background: #f9f9f9;
  font-weight: bold;
}
.admin-table tr:nth-child(even) {
  background: #f5f5f5;
}
.admin-table tr:hover {
  background: #e5e5e5;
}
.action-buttons {
  display: flex;
  gap: 0.5rem;
}
.status-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: bold;
  text-transform: capitalize;
  color: white;
  line-height: 1;
  white-space: nowrap;
}

/* Optional: Icon in Status-Label */
.status-label i {
  font-size: 1rem;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
}
/* Statusfarben */
.offen {
  background-color: var(--bg-offen);
  color: #212529;
}

.bestaetigt {
  background-color: var(--bg-bestaetigt);
}

.abgelehnt {
  background-color: var(--bg-abgelehnt);
}

.sort-button {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: bold;
}


.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.search-form input[type="text"] {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  min-width: 250px;
}
/* Modal Overlay */
.modal {
  position: absolute;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(3px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* Versteckt per default */
.modal.hidden {
  display: none !important;
}

/* Modal Box */
.modal-box {
  background-color: #fff;
  padding: 2rem;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Modal Title */
.modal-box h3 {
  margin-bottom: 1.2rem;
  font-size: 1.4rem;
  text-align: center;
}

/* Form Fields */
#editReservationForm input,
#editReservationForm textarea,
#editReservationForm select {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  transition: border-color 0.3s;
}

#editReservationForm input:focus,
#editReservationForm textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Textarea height */
#editReservationForm textarea {
  min-height: 100px;
  resize: vertical;
}


.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.chart-container {
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* === Responsive Breakpoints === */
@media (max-width: 1024px) {
   .sidebar {
    position: absolute;
    left: -100%;
    top: 0;
    height: 100vh;
    z-index: 1000;
    transition: left 0.3s ease;
  }

  .sidebar.active {
    left: 0;
  }
  .main-content {
    margin-left: 0;
    padding: 1rem;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .dashboard-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 768px) {
  .login-form {
    width: 80%;
    height: 80%;
    padding: 2rem 1rem;
  }
  .dashboard-container {
    flex-direction: column;
  }

  .sidebar {
    position: absolute;
    left: -100%;
    top: 0;
    height: 100vh;
    z-index: 1000;
    transition: left 0.3s ease;
  }
  .main-content {
    margin-left: 0;
    padding: 1rem;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .dashboard-widgets {
    flex-direction: row;
  }

  .search-form input[type="text"] {
    min-width: 100%;
  }

  .button-group {
    flex-direction: column;
    align-items: stretch;
  }

  .chart-grid {
    grid-template-columns: 1fr;
  }
  .admin-table {
    border: 0;
  }

  .admin-table thead {
    display: none;
  }

  .admin-table tr {
    display: block;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    padding: 1rem;
  }

  .admin-table td {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem 0;
    border: none;
    border-bottom: 1px solid #eee;
  }

  .admin-table td::before {
    content: attr(data-label);
    font-weight: bold;
    color: #333;
    flex-basis: 40%;
    text-align: left;
  }

  .admin-table .action-buttons {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.5rem;
  }

  .admin-table td:last-child {
    border-bottom: none;
  }

  .message-cell {
    white-space: normal;
  }
}

@media (max-width: 480px) {
  .login-form {
    width: 80%;
    height: 80%;
    padding: 2rem 1rem;
  }

  .login-form h1 {
    font-size: 1.5rem;
  }

  .btn {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }
  .sidebar {
    position: absolute;
    left: -100%;
    top: 0;
    height: 100vh;
    z-index: 1000;
    transition: left 0.3s ease;
  }
  .sidebar a {
    font-size: 0.95rem;
  }

  .admin-table th,
  .admin-table td {
    font-size: 0.85rem;
    padding: 0.6rem;
  }

  .modal-box {
    padding: 1.5rem;
  }
}