html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background-color: #eeeeee;
  font-family: Arial, sans-serif;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
}

.flex-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  padding: 10px;
  width: 100%;
  max-width: 95vw;
  margin: 30px auto;
  box-sizing: border-box;
}


/* Formularelemente – mobile Optimierung als Standard */
table,
input[type="text"], 
input[type="date"], 
input[type="time"], 
input[type="number"],
input[type="password"],
input[type="email"],
select,
button {
  font-size: 14px;
  padding: 5px;
  margin: 8px 0;
  width: 100%;
  box-sizing: border-box;
  border: 2px solid #cccccc;
  border-radius: 5px;
  min-width: 120px;
}

table { min-width: 700px; width: 100%; border-collapse: collapse; margin-top: 16px; }
th, td { padding: 8px 6px; border: 1px solid #bbb; text-align: left; }

button {
  background-color: #111111;
  color: #dece64;
  border: none;
  cursor: pointer;
  font-weight: bold;
}

button:hover {
  background-color: #000000;
  color: #ffff00;
  text-shadow: 0px 0px 12px #ffff00;
}

button[type="submit"] {
  padding: 33px 0;
}

form {
  width: 100%;
}

.form-group {
  margin-bottom: 6px;
}

.small {
  font-size: 12px;
}

.customtext1 {
  font-size: 22px;
  color: #000000;
  font-weight: bold;
  display: block;
  text-align: center;
  text-shadow: 0px 0px 5px #dece64;
}

nav {
  width: 100%;
  padding: 10px;
  text-align: center;
  background: #fff;
  border-bottom: 1px solid #ccc;
  margin-bottom: 20px;
}


footer {
  width: 100%;
  text-align: center;
  margin: 30px 0 10px 0;
  color: #888;
}
.inhalt-wrapper {
  background: rgba(255, 200, 200, 0.5);  /* Hellrot-transparent */
  overflow-x: auto;
  width: 100%;
}

.table-wrapper {
  background: rgba(180, 200, 255, 0.7);  /* Hellblau-transparent */
  overflow-x: auto;
  width: 100%;
  border: 2px dashed #3377ff;
}


.required {
  color: red;
  margin-left: 4px;
  font-weight: bold; 
}

@media (max-width: 768px) {
  .table-wrapper {
    margin: 0;
    padding: 0;
    border-radius: 0;
  }
}

/* Desktop-Optimierungen ab 1080px */
@media (min-width: 1080px) {
  .flex-container {
    flex-direction: column;
    justify-content: flex-start;
    max-width: 80%;
    min-width: 800px;
    padding: 20px;
    margin: 40px auto;
  }

  input[type="text"], 
  input[type="date"], 
  input[type="time"], 
  input[type="number"],
  input[type="password"],
  input[type="email"],
  select,
  button {
    font-size: 16px;
    padding: 10px;
    min-width: 160px;
  }

  .form-group {
    margin-bottom: 18px;
  }
}

nav {
  width: 80%;
  background-color: #111;
  padding: 10px 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  position: relative;
  z-index: 10;
}

#menu-toggle {
  background: none;
  border: none;
  font-size: 28px;
  color: #dece64;
  cursor: pointer;
  display: block;
  margin-left: auto;
}

#menu-links {
  display: none;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

#menu-links a {
  text-decoration: none;
  color: #dece64;
  background-color: #222;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: bold;
  text-align: center;
  transition: background 0.3s;
}

#menu-links a:hover {
  background-color: #333;
  color: #ffff00;
  text-shadow: 0 0 5px #ffff00;
}


/* Desktop-Ansicht */
@media (min-width: 768px) {
  #menu-toggle {
    display: none;
  }

  #menu-links {
    display: flex !important;
    flex-direction: row;
    flex-wrap: wrap;  /* <--- NEU */
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 0;
  }

  #menu-links a {
    background: none;
    padding: 8px 12px;
    border-radius: 0;
  }

  #menu-links a::after {
    content: "";
    color: #888;
    margin-left: 8px;
  }

  #menu-links a:last-child::after {
    content: "";
  }
}

  /* Chart.js spezifische Controls-Layout */
#chartjs-height-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

#chartjs-height-controls .chartjs-axis0 {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Chart.js-Containerbreite (wie früher #chart-container) */
#chartjs-container {
  width: 100%;
  max-width: 950px;
  margin: 32px auto 0; /* zentriert + Abstand nach oben */
}

/* Canvas soll wirklich die volle Breite nutzen */
#chartjs-canvas {
  display: block;
  width: 100% !important; /* überschreibt evtl. Fremdstyles */
}

/* Mobile-Engstellung wie zuvor */
@media (max-width: 600px) {
  #chartjs-container { max-width: 98vw; }
}