/* Grundlayout */
body {
  font-family: Calibri, sans-serif;
  font-size: 12pt;
  margin: 0;
  line-height: 1.6;
  padding-top: 60px; /* Platz für fixierte Navbar */
  background-color: #f9fafb; /* hell und freundlich */
  color: #333;
}

body.ferienwohnungen-bg {
  background: url("/images/backgrounds/ferienwohnungen-bg.jpg") no-repeat center center fixed;
  background-size: cover;
}

body.startseite-bg {
  background: url("/images/backgrounds/startseite-bg.jpg") no-repeat center center fixed;
  background-size: cover;
}

main {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 1rem;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #0077b6;
  color: white;
  z-index: 1000;
}

/* Container für Logo + Links + Button */
.navbar-container {
  display: flex;
  justify-content: center;  /* Links mittig */
  align-items: center;
  height: 60px;              /* feste Höhe für sauberes Layout */
  padding: 0 1rem;
  position: relative;       /* wichtig für Logo/Button-Position */
  max-width: 1200px;
  margin: 0 auto;
}

/* Logo */
.logo {
  font-size: 1.2rem;
  font-weight: bold;
  color: #0077b6;           /* Logo in Blau */
  text-decoration: none;
  background-color: white;   /* weißer Hintergrund für Kontrast */
  padding: 8px 12px;
  border-radius: 4px;
  position: absolute;
  left: 1rem;
  line-height: 1;            /* verhindert, dass Text zu hoch sitzt */
  z-index: 1100;
}

/* Standard-Links */
.nav-links {
  display: flex;
  list-style: none;
  gap: 1rem;
}

.nav-links li {
  margin: 0;
}

.nav-links a {
  text-decoration: none;  /* keine Unterstreichung */
  color: white;           /* weiß wie Footer */
  font-weight: bold;
  padding: 15px 20px;
  transition: background 0.3s, color 0.3s;
}

.nav-links a:hover {
  background-color: #555;
  border-radius: 5px;
  color: #fff;
}

/* --- Login / Logout Bereich (Desktop) --- */
.auth-area {
  position: fixed;
  top: 0;
  right: 0;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 1rem;
  background-color: #0077b6;
  backdrop-filter: blur(4px);
  z-index: 2000;
}

.login-form,
.logout-section {
  display: flex;
  align-items: center;
  gap: 6px;
}

.login-form input {
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 0.9rem;
  width: 120px;
}

.login-form button,
.logout-section button {
  padding: 5px 10px;
  border: none;
  border-radius: 4px;
  background-color: #ffffff;
  color: #0077b6;
  cursor: pointer;
  font-weight: bold;
}

.login-form button:hover,
.logout-section button:hover {
  background-color: #555;
  color: white;
}

/* Nutzerrolle Label (z. B. „Eingeloggt als Verwaltung“) */
#userRoleLabel {
  color: white;
  font-size: 0.9rem;
  margin-right: 8px;
}

/* Hamburger-Button (Standard: unsichtbar auf PC/Tablet) */
.menu-toggle {
  display: none;            /* Standardmäßig ausgeblendet */
  background-color: white;   /* Weißer Kreis */
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  position: absolute;
  right: 1rem;
  top: 50%;                    /* mittig zur Navbar-Höhe */
  transform: translateY(-50%); /* exakt vertikal mittig */
  z-index: 1100;

  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;                  /* Abstand zwischen Strichen */
}

/* Die 3 weißen Striche im Hamburger-Button */
.menu-toggle span {
  display: block;
  width: 24px;
  height: 4px;
  background-color: #0077b6; /* Blaue Striche */
  border-radius: 2px;
}

/* Hover-Effekt für PC/Tablet */
.menu-toggle:hover {
  background-color: #005f8a;  /* dunkleres Blau */
  color: white;               /* Symbol dann weiß */
}

/* Mobile Ansicht */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex; /* auf Handy anzeigen */
  }

  .navbar {
    background-color: #0077b6;   /* Blau erzwingen */
  }

  .nav-links {
    display: none; /* zu im Standard */
    flex-direction: column;
    width: 100%;
    background-color: #0077b6;
    position: absolute;
    top: 60px; /* direkt unter Navbar */
    left: 0;
    padding: 1rem 0;
  }

  .nav-links.active {
    display: flex; /* sichtbar bei Klick */
  }

  .nav-links li {
    text-align: center;
    margin: 0;
  }

  .nav-links a {
    padding: 15px;
    display: block;
    font-size: 1.2rem;
    color: white; /* Menü-Links weiß auf blau */
  }

  .auth-area {
    display: none !important;
  }
}

/* Footer */
footer {
  background-color: #0077b6;
  color: white;
  text-align: center;
  padding: 20px;
  margin-top: 40px;
}

/* Galerie */
.gallery {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.gallery img {
  width: 30%;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Dashboard Layout */
#finance-chart {
  max-width: 1000px;
  margin: 2rem auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  padding: 1rem;
}

/* Kalenderbereich */
#calendar {
  margin: 2rem auto;
  padding: 1rem;
  max-width: 800px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Modal-Fenster */
/*
.modal.hidden {
  display: none;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  width: 90%;
  max-width: 400px;
}

.modal-content form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-content button {
  background: #0077b6;
  color: white;
  border: none;
  padding: 0.6rem;
  border-radius: 5px;
  cursor: pointer;
}

.modal-content button:hover {
  background: #005f8a;
}

canvas {
  display: block;
  margin: 2rem auto;
  max-width: 700px;
}
*/

/* --- Admin-Dashboard Verwaltungsfunktionen --- */
.admin-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.admin-box {
  flex: 1;
  min-width: 300px;
  background: #f0f8ff;
  border: 1px solid #0077b6;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.admin-box h3 {
  color: #0077b6;
}

.admin-box form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-box input,
.admin-box select {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.admin-box button {
  background-color: #0077b6;
  color: white;
  padding: 10px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.admin-box button:hover {
  background-color: #005f8a;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.admin-table th,
.admin-table td {
  border: 1px solid #ddd;
  padding: 6px 8px;
  text-align: left;
}

.admin-table th {
  background-color: #f2f2f2;
  font-weight: bold;
}

/* Chart.js Farbschema */
.chartjs-render-monitor {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  padding: 1rem;
}

canvas {
  max-width: 100%;
}

.chart-legend {
  color: #0077b6;
  font-weight: bold;
  text-align: center;
}

/* Dashboard: kleine Stil-Anpassungen */
#dashboardContent h1 { color:#0077b6; margin-bottom:0.5rem; }
#dashboardContent section { margin-bottom: 1.5rem; }
#dashboardContent label { font-size: 0.95rem; color:#333; }
#dashboardContent input, #dashboardContent select { padding:6px 8px; border-radius:4px; border:1px solid #d0d7de; }
#dashboardContent button { background:#0077b6; color:white; border:none; padding:8px 10px; border-radius:6px; cursor:pointer; }
#dashboardContent button:hover { background:#005f8a; }
table { width:100%; border-collapse:collapse; }
table th, table td { border:1px solid #eee; padding:8px; text-align:left; }

#apartmentsContainer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin: 2rem auto;
  max-width: 1200px;
  padding: 1rem;
}

.apartment-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  overflow: hidden;
  padding: 1rem;
  text-align: center;
}

.apt-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 8px;
}

.booking-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.booking-content {
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  width: 320px;
  max-width: 90%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.booking-content label {
  display: block;
  margin-top: 0.5rem;
}

.booking-content input {
  width: 100%;
  padding: 0.3rem;
  margin-top: 0.2rem;
  border-radius: 5px;
  border: 1px solid #ccc;
}

.booking-content button {
  background: #3a86ff;
  color: white;
  border: none;
  padding: 0.6rem;
  border-radius: 8px;
  cursor: pointer;
}

.booking-content button:hover {
  background: #265dce;
}

.mini-calendar {
  margin-top: 0.5rem;
  background: #f9f9f9;
  border-radius: 6px;
  padding: 0.5rem;
}

.msg { font-size: 0.9rem; }

