/* Allgemeine Einstellungen */
body {
  font-family: Arial, sans-serif;
  background-color: #f2f2f2;
  margin: 0;
  padding: 0;
}
.debug {
  color: red;
  font-weight: bold;
}
/* Headerbereich */
header {
  background-color: #fff;
  color: white;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: right;
  height: 315px;
  flex-direction: column;
}

/* Header oben – für Infos, Logout, etc. */
.header-top {
    width: 100%;
    background: #fff;      /* Farbe kannst du anpassen */
    padding: 5px 10px;
    display: flex;
    justify-content: space-between; /* Button nach rechts */
    align-items: center;
    box-sizing: border-box;
    color: #000;
    box-shadow: 3px 15px 10px #807f7f;
    font-weight: bold;
}

/* Header unten – Logo */
.header-bottom {
    width: 100%;
    background: #ffffff;
    padding: 10px;
    text-align: center;
    box-sizing: border-box;
    box-shadow: 3px 12px 10px #807f7f;
    border-radius: 0 0 5px 5px;
}

.headerinfo {
  color: #000;
  font-size: 16px;
}

header .logo {
  width: 481px;
  height: 200px;
  display: block;
  margin: 0 auto;
}

/* Navigation */
.main-nav {
  text-align: center;
  background-color: #333;
  padding: 10px 0;
}
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
}
.main-nav li {
  margin: 0 10px;
}
.main-nav a,
nav ul li a {
  text-decoration: none;
  color: white;
  font-size: 16px;
  padding: 10px 20px;
  border-radius: 5px;
  border: 2px solid transparent;
  background-color: #555;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  font-weight: bold;
  display: inline-block;
}
.main-nav a:hover {
  background-color: red;
  border-color: white;
}
nav ul li.user-info {
  font-style: italic;
  color: #ffcc00;
}
nav ul li {
  margin-right: 15px;
}
nav ul {
  justify-content: center;
}

/* Bug-Icon rechts oben fixieren */
.bug-icon img {
    width: 40px;
    height: 40px;
    display: block;
}

.bug-icon {
    position: fixed;
    top: 350px;
    right: 10px;
    z-index: 1000;
}


/* Main */
main {
  padding: 20px;
  background-color: #fff;
}
.content-container {
  margin-left: 20px;
}
h1 {
  margin-left: 50px;
  color: #333;
}
h2 {
  text-align: center;
  color: #333;
}
h3 {
  color: #555;
}

/* Tables */
.centered {
  text-align: center;
}
.table-container {
  display: flex;
  justify-content: center;
  margin: 20px 10px;
}
table {
  width: 90%;
  border-collapse: collapse;
  margin: 0 auto 20px;
}
th,
td {
  padding: 6px 10px;
  border-bottom: 1px solid #ddd;
  border-right: 1px solid #ddd;
  text-align: left;
}
table td.input {
  width: 70%;
  padding: 10px;
  margin: 10px 0;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
}
#td3 {
  text-align: left;
}
#td2 {
  font-weight: bold;
  text-align: right;
  width: 300px;
}

/* Table Rows */
.no-felgen {
  background-color: #ff6666;
}
.empty-lagerort {
  background-color: green;
}
table tr.hover:hover {
  background-color: #f4f4f4;
}
table tr.no-felgen.hover:hover,
table tr.empty-lagerort.hover:hover {
  background-color: transparent !important;
  cursor: default !important;
  pointer-events: none !important;
}

/* Login */
.login-container {
  max-width: 400px;
  margin: 50px auto;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* UL & LI sauber vertikal */
.login-container ul {
  padding: 0;
  margin: 0;
}

.login-container ul li {
  list-style: none;
  margin: 10px 0;
  display: flex;
  flex-direction: column; /* sorgt für vertikale Ausrichtung */
}
/* Container für die News-Seite */
.news-container {
    width: 80%; /* Nimmt 80% der Seite ein */
    margin: 0 auto; /* Zentriert den Container horizontal */
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
/* Inputs */
.login-container input[type="text"],
.login-container input[type="password"] {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
}

button {
  width: 250px;
  padding: 10px;
  background-color: #333;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  margin-bottom: 10px;
}
button:hover {
  background-color: #575757;
}
.error {
  color: red;
  text-align: center;
  margin-bottom: 15px;
}

/* Pagination */
.pagination {
  text-align: center;
  margin: 20px 0;
}
.pagination a {
  margin: 0 5px;
  padding: 8px 10px;
  text-decoration: none;
  color: #333;
  background-color: #f1f1f1;
  border-radius: 5px;
  transition: all 0.3s ease;
}
.pagination a.active {
  background-color: #ff6666;
  color: #fff;
}
.pagination a:hover {
  background-color: #4caf50;
  color: #fff;
}
.pagination a.disabled {
  background-color: #ddd;
  color: #999;
  pointer-events: none;
}

/* Lager Container */
.lager-container {
  width: 90%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(25, 60px);
  gap: 5px;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background-color: #f4f4f4;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  overflow-x: auto;
}
.lagerort {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 60px;
  height: 60px;
  border-radius: 15px;
  font-weight: bold;
  color: white;
  font-size: 14px;
  padding: 1px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}
.belegt {
  background-color: darkred;
}
.frei {
  background-color: green;
}
.lagerort:hover {
  background-color: darkgray;
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
}
a:hover,
a:focus {
  color: rgb(31, 31, 31);
  text-decoration: none;
}

/* Input focus */
input[type="text"]:focus {
  border: 1px solid red;
  box-shadow: 2px 2px 5px rgba(255,0,0,0.3);
  outline: none;
}

/* Search form */
.searchform {
  background-color: white;
  margin: 0 auto;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  text-align: center;
  width: 400px;
  box-sizing: border-box;
}
.search-container {
  display: block;
  margin: 0 auto;
  align-items: center;
  gap: 8px;
}
.search-input {
  width: 250px;
  padding: 8px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  transition: border-color 0.3s;
}
.search-input:focus {
  border-color: red;
  outline: none;
}
.search-button {
  padding: 8px 12px;
  font-size: 16px;
  border: none;
  background-color: #808080;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}
.search-button:hover {
  background-color: red;
}

/* Chart container */
.chart-container {
  width: 90%;
  max-width: 1000px;
  margin: 0 auto 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}
.chart-box {
  flex: 1 1 45%;
  max-width: 45%;
  min-width: 250px;
  background-color: var(--background-secondary);
  padding: 5px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.chart-box:hover {
  transform: scale(1.01);
}
.chart-box canvas,
.chart-box svg {
  width: 100% !important;
  height: auto !important;
}

/* Chart max sizes */
#pieChart {
  width: 400px !important;
  height: 400px !important;
  max-width: 100%;
  margin: 0 auto;
  display: block;
}
#barChart,
#lagerortChart,
#kundenChart,
#profilChart {
  width: 550px !important;
  height: 400px !important;
  max-width: 100%;
  margin: 0 auto;
  display: block;
}
#alterChart {
  width: 400px !important;
  height: 400px !important;
  max-width: 100%;
  margin: 0 auto;
  display: block;
}

/* Container */
.container {
  width: 80%;
  max-width: 1200px;
  margin: 40px auto;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  box-sizing: border-box;
}

/* Form sections */
.form-section {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  padding: 20px;
  margin-bottom: 20px;
}
.form-section h2 {
  color: #333;
  font-size: 24px;
  margin-bottom: 10px;
}
.form-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
.form-group input,
.form-group textarea {
  width: 45%;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
}
label {
  font-size: 14px;
  color: #555;
  display: block;
  margin-bottom: 5px;
}

/* Responsive form */
@media (max-width: 768px) {
  form {
    width: 95%;
  }
  .form-group {
    flex-direction: column;
  }
  .form-group input,
  .form-group textarea {
    width: 100%;
  }
}
@media (max-width: 600px) {
  form label,
  form input[type="text"],
  form input[type="number"] {
    display: block;
    width: 100%;
  }
  form button {
    width: 100%;
  }
  .label-group label {
    width: 100%;
    margin-bottom: 5px;
  }
}

/* Buttons */
/* Buttons stabilisieren */
.btn,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  min-width: 120px;
  padding: 0 20px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
  color: #fff;
  box-sizing: border-box;
  transition: background-color .3s ease, transform .2s ease;
}

/* Farben */
.btn-success { background: #28a745; }
.btn-success:hover { background: #218838; }

.btn-danger { background: #dc3545; }
.btn-danger:hover { background: #c82333; }

.btn-cancel { background: #575757; }
.btn-cancel:hover { background: #3d3d3d; }

/* Logout-Button ohne Browser-Styles */
.logout-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    height: 32px;
    width: 32px;
}
.logout-btn:hover {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  height: 32px;
  width: 32px;
}
.logout-icon {
    width: 40px;   /* Größe anpassen */
    height: 40px;
    background-color: #fff;
}
.vatoha {
  width: 100px;
  display: flex;
  justify-content: end;
  margin-left: auto;
}

/* Container */
.button-container {
  display: flex;
  gap: 12px;
}


/* Table user management */
.table {
  width: 90%;
  border-collapse: collapse;
  margin-top: 20px;
}
.table th,
.table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}
.table th {
  background-color: #f8f9fa;
  font-weight: bold;
}
.table tbody tr:hover {
  background-color: #f1f1f1;
}

/* Status dots */
.status-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: inline-block;
}
.status-dot.online {
  background-color: green;
}
.status-dot.offline {
  background-color: gray;
}

/* Checkbox custom */
input[type="checkbox"] {
  transform: scale(1.3);
  cursor: pointer;
  margin-right: 8px;
}
input[type="checkbox"] + label {
  position: relative;
  padding-left: 35px;
  cursor: pointer;
  font-size: 18px;
  line-height: 20px;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 5px;
}
input[type="checkbox"] + label:before {
  content: '';
  position: absolute;
  left: 0; top: 0;
  width: 20px; height: 20px;
  border: 2px solid #007bff;
  border-radius: 5px;
  background: #fff;
  transition: background-color 0.3s, border-color 0.3s;
}
input[type="checkbox"]:checked + label:before {
  background-color: #007bff;
  border-color: #007bff;
}
input[type="checkbox"]:checked + label:after {
  content: '\2714';
  position: absolute;
  left: 4px;
  top: -2px;
  color: white;
  font-size: 16px;
  font-weight: bold;
  transition: opacity 0.3s;
}
input[type="checkbox"]:not(:checked) + label:after {
  content: '';
}

/* Reifenbilder in Show.php */
.reifensh,
.felgensh {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.reifenpi,
.felgenpi {
  display: flex;
  width: 150px;
  height: 150px;
  border: 1px solid #999;
  border-radius: 5px;
  padding: 5px;
}
.reifenbilder-container,
.felgenbilder-container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 10px;
}
.bild-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 150px;
  height: 150px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #f9f9f9;
  transition: transform 0.2s, box-shadow 0.2s;
}
.bild-block:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}
.bild-block img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin-bottom: 8px;
}
.bild-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.checkbox-label {
  font-size: 0.9rem;
}
.custom-file-upload {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  margin-left: 50px;
  background-color: #333;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}
.custom-file-upload:hover {
  background-color: #f44336;
  transform: translateY(-1px);
}
.custom-file-upload:active {
  transform: translateY(1px);
}
.custom-file-upload input[type="file"] {
  display: none;
}
.custom-file-upload .upload-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Image overlay */
.image-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.image-overlay img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  box-shadow: 0 0 25px rgba(255,255,255,0.4);
  cursor: zoom-out;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
  from {opacity: 0; transform: scale(0.9);}
  to {opacity: 1; transform: scale(1);}
}
.overlay-close {
  position: fixed;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  z-index: 10000;
  font-weight: bold;
  text-shadow: 0 0 10px black;
}

/* Show.php Layout */
.la-box-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}
.la-box-container > div {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 15px;
  flex: 1 1 300px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.la-box-container h2 {
  margin-top: 0;
  color: #2c3e50;
}
.la-box-container ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.la-box-container ul li {
  padding: 3px 0;
  border-bottom: 1px solid #eee;
}
.la-box-container input[type="text"], input[type="email"], input[type="number"] {
  padding: 10px;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
}
.la-box-container input[type="text"]:focus, input[type="email"]:focus, input[type="number"]:focus {
    border: 1px solid rgb(255, 136, 0);       /* Oranger Rand, wenn das Feld aktiv ist */
    box-shadow: 2px 2px 5px rgba(255, 174, 0, 0.3); /* Leichter roter Schatten */
    outline: none;               /* Entfernt die Standardumrandung im Browser */
}
.la-box-container textarea {
  width: 70%;
  padding: 10px;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
}
.la-box-container textarea:focus {
  border: 1px solid rgb(255, 136, 0);
  box-shadow: 2px 2px 5px rgba(255, 174, 0, 0.3);
  outline: none;
}
.button-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
.btn {
  background-color: #f0f0f0;
  color: #333;
  padding: 8px 12px;
  border-radius: 5px;
  text-decoration: none;
  transition: background-color 0.2s;
  flex: 1 1 auto;
  max-width: 150px;
  text-align: center;
  white-space: nowrap;
}
.btn:hover {
  background-color: #e0e0e0;
  color: #000;
  border: 1px solid white;
}

/* Responsive Show.php */
@media (max-width: 768px) {
  .la-box-container {
    flex-direction: column;
  }
  .la-box-container > div {
    flex: 1 1 100%;
  }
}

/* edit.php grid */
.container.la-box-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.container.la-box-container > .la-box:nth-child(3),
.container.la-box-container > .la-box:nth-child(4),
.container.la-box-container > .la-box:nth-child(5) {
  grid-column: 1 / -1;
}

/* la-box styles */
.la-box {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 15px;
  background: #fafafa;
}
.la-box ul li {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}
.la-box ul li strong {
  width: 150px;
  margin: 0 10px 0 6px;
  text-align: left;
}
.la-box h2 {
  margin-top: 0;
}
.la-box input.tiresize {
  width: 90px;
}
.la-box input.tli {
  width: 40px;
}
.la-box input.anzahl {
  width: 50px;
}
.la-box input.gi {
  width: 30px;
}
.la-box input.profil {
  width: 50px;
}
.la-box input.dot {
  width: 60px;
}

/* Edit button container */
.editbutton {
  display: flex;
  justify-content: center;
  margin: 20px 0 20px 20px;
}
.editbutton button {
  margin-right: 10px; /* Abstand nach rechts */
}

.editbutton button:last-child {
  margin-right: 0; /* Letzter Button braucht keinen rechten Abstand */
}

/* Responsive edit.php */
@media (max-width: 900px) {
  .container.la-box-container {
    grid-template-columns: 1fr;
  }
}

/* Angebot erstellen */
.container {
  width: 100%;
}
.angebot-header {
  border: 1px solid #ccc;
  padding: 20px;
  margin-bottom: 20px;
  background: #f9f9f9;
  border-radius: 8px;
}
.angebot-header h3 {
  margin: 0 0 10px;
  color: #333;
  font-size: 1.2em;
  border-bottom: 1px solid #ddd;
  padding-bottom: 5px;
}
.angebot-header p {
  margin: 5px 0;
  font-size: 0.95em;
}

/* Checkbox groups and label groups */
.checkbox-group,
.label-group {
  border: 1px solid #ddd;
  padding: 10px 15px;
  margin-bottom: 15px;
  border-radius: 6px;
  background-color: #f7f7f7;
}
.checkbox-group label,
.label-group label {
  font-weight: normal;
  margin-bottom: 5px;
  display: block;
}
.label-group label {
  width: 150px;
  display: inline-block;
}

/* Textarea */
textarea {
  resize: vertical;
}

/* Notification & Toast */
.toast,
.success,
.error,
#deleteMessage,
#notification {
  padding: 10px;
  color: white;
  border-radius: 5px;
  text-align: center;
  margin: 10px 0;
}
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: #28a745;
  opacity: 1;
  transition: opacity 0.5s ease;
  z-index: 9999;
}
.toast.error,
.error {
  background-color: #dc3545;
}
.success {
  background-color: #28a745;
}
#notification {
  position: fixed;
  top: 390px;
  right: 20px;
  background-color: #4caf50;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  z-index: 9999;
}
#notification.show {
  opacity: 1;
}
#deleteMessage {
  background-color: #4caf50;
}
.modal {
  display: none; /* wichtig! */
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.5);
}

.modal-content {
  background: #fff;
  margin: 10% auto;
  padding: 20px;
  border-radius: 12px;
  width: 400px;
  max-width: 90%;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.close {
  float: right;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}