/* DivTable.com */
.divTable {
  display: table;
  width: 100%;
}
.divTableRow {
  display: table-row;
}
.divTableHeading {
  padding-top: 12px;
  padding-bottom: 12px;
  text-align: left;
  background-color: #4CAF50;
  color: white;
}
.divTableCell, .divTableHead {
  border: 1px solid #999999;
  display: table-cell;
  padding: 3px 10px;
}
.divTableFoot {
  background-color: #EEE;
  display: table-footer-group;
  font-weight: bold;
}
.divTableBody {
  display: table-row-group;
}

.background {
  background-color: #FFFFFF;
  align-content: center;
  padding: 0px 200px;
}

.button {
  background-color: grey;
  margin: 5px 5px 0px 0px;
  width: 200px;
  border: none;
  border-radius: 15px;
  color: white;
  padding: 15px 32px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  cursor: pointer;
}

.headline {
  margin: 15px 0px;
  padding: 0px 15px;
  font-size: 14pt;
  border: 0px solid;
}


/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {
  .logo {
    margin: 15px 0px;
    padding: 0px 15px;
  }

  .barcode {
    background: #d3d3d3;
    margin: 0px 15px;
    padding: 0px 15px;
    width: 280px;
    border-radius: 15px;
    border: 0px solid;
    float: left;
  }
  .dashboard {
    background: #d3d3d3;
    padding: 0px 15px;
    width: 100%;
    border-radius: 15px;
    border: 0px solid;
    clear: both;
  }

  .gesamt, .lager, .nicht_einsatzbereit {
    margin: 10px;
    padding: 0px 15px;
    box-sizing: border-box;
    border-radius: 15px;
    background: rgb(0, 102, 152);
    width: 30%;
    border: 0px solid;
    float: left;
    display: inline-block;
  }

  .sonderpruefung, .naechster_verfall {
    background-color: #ff6666;
    margin: 10px;
    padding: 5px 15px;
    border-radius: 15px;
    width: calc(100% - 20px);
    border: 0px solid;
    clear: both;
  }

  .box {
    width: 80%;
  }

  db_h3 {
    color: black;
    font-size: 14pt;
  }

  db_wert {
    color: white;
    font-size: 18pt;
  }

  db_platzhalter {
    color: white;
    font-size: 18pt;
    text-decoration: line-through;
  }

  .material_bild, .material_info {
    float: left;
    width: 52%;
    border: 0px solid;
  }

  img {
    max-width: 150px;
  }

  /* Gesamtübersicht Tabelle */
  table.overview {
    border-collapse: collapse;
    border-spacing: 1px;
    margin: 0px 10px;
    font-size: 1.3em;
  }

  table.overview th {
    background-color: #666;
    color: #fff;
  }
  table.overview tr {
    border-bottom: 1px solid black;
    font-size: 1.3em;
  }
  table.overview tr:nth-child(1n+2) {
    background-color: #d3d3d3;
    color: #000;
    border-bottom: 1px solid black;
  }
  table.overview tr:nth-child(2n+3) {
    background-color: #ffffff;
    color: #000;
    border-bottom: 1px solid black;
  }
}

/* Small devices (portrait tablets and large phones, 600px and up) */
@media only screen and (min-width: 600px) and (max-width: 992px) {
  .headline {
    margin: 15px 0px;
    padding: 0px 15px;
    font-size: 2em;
    border: 0px solid;
  }

  .logo {
    margin: 15px 0px;
    padding: 0px 15px;
  }

  input[type=text] {
    width: 90%;
    height: 80px;
    font-size: 1.4em;
    padding: 12px 20px;
    margin: 8px 0;
    box-sizing: border-box;
  }

  .button {
    background-color: grey;
    margin: 5px 5px 0px 0px;
    width: 360px;
    height: 120px;
    border: none;
    border-radius: 15px;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 1.4em;
    cursor: pointer;
  }

  .barcode {
    background: #d3d3d3;
    margin: 0px 15px;
    padding: 0px 15px;
    width: calc(100% - 60px);
    border-radius: 15px;
    border: 0px solid;
    font-size: 1.4em;
    float: left;
  }

  .dashboard {
    background: #d3d3d3;
    margin: 15px 15px;
    padding: 0px 15px;
    width: calc(100% - 60px);
    border-radius: 15px;
    border: 0px solid;
    font-size: 1.2em;
    float: left;
  }

  .dashboard-stats {
    width: calc(100% - 50px);
    padding: 0px 15px;
  }

  .gesamt, .lager, .nicht_einsatzbereit {
    padding: 0px 15px;
    box-sizing: border-box;
    border-radius: 15px;
    background: rgb(0, 102, 152);
    width: calc(100% / 3);
    border: 0px solid;
    float: left;
    display: inline-block;
  }

  .lager {
    position: relative;
    left: 10px;
    margin: 0px 0px 10px;
  }

  .nicht_einsatzbereit {
    position: relative;
    left: 20px;
  }

  .sonderpruefung, .naechster_verfall {
    position: relative;
    background-color: #ff6666;
    margin: 10px;
    padding: 5px 15px;
    border-radius: 15px;
    width: calc(100% - 55px);
    border: 0px solid;
    clear: both;
  }

  td {
    font-size: 1.6em;
    padding: 0px 5px 5px 0px;
  }

  .box {
    width: 80%;
  }

  db_h3 {
    color: black;
    font-size: 1.2em;
  }

  db_wert {
    color: white;
    font-size: 1.1em;
  }

  db_platzhalter {
    color: white;
    font-size: 1.1em;
    text-decoration: line-through;
  }

  .container {
    margin: 10px;
  }

  .material_container {
    width: 100%;
    background-color: #ffd3d3;
    padding: 5px 15px;
    border-radius: 15px;
    float: left;
  }

  .material_bild {
    width: 50%;
    border: 0px solid;
    float: left;
  }

  .material_info {
    width: 45%;
    border: 0px solid;
    float: left;
    font-size: 1.3em;
  }

  img {
    max-width: 240px;
  }

  /* Gesamtübersicht Tabelle */
  table.overview {
    border-collapse: collapse;
    border-spacing: 1px;
    margin: 0px 10px;
    font-size: 1.3em;
  }

  table.overview th {
    background-color: #666;
    color: #fff;
  }
  table.overview tr {
    border-bottom: 1px solid black;
    font-size: 1.3em;
  }
  table.overview tr:nth-child(1n+2) {
    background-color: #d3d3d3;
    color: #000;
    border-bottom: 1px solid black;
  }
  table.overview tr:nth-child(2n+3) {
    background-color: #ffffff;
    color: #000;
    border-bottom: 1px solid black;
  }
}

/* Large devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 992px) {
  .logo {
    margin: 15px 0px;
    padding: 0px 15px;
  }

  input[type=text] {
  }

  .barcode {
    background: #d3d3d3;
    margin: 0px 15px;
    padding: 0px 15px;
    width: 280px;
    border-radius: 15px;
    border: 0px solid;
    float: left;
  }

  .dashboard {
    background: #d3d3d3;
    padding: 0px 15px;
    width: 60%;
    border-radius: 15px;
    border: 0px solid;
    float: left;
  }

  .gesamt, .lager, .nicht_einsatzbereit {
    margin: 10px;
    padding: 0px 15px;
    box-sizing: border-box;
    border-radius: 15px;
    background: rgb(0, 102, 152);
    width: 30%;
    border: 0px solid;
    float: left;
    display: inline-block;
  }

  .sonderpruefung, .naechster_verfall {
    background-color: #ff6666;
    margin: 10px;
    padding: 5px 15px;
    border-radius: 15px;
    width: calc(100% - 20px);
    border: 0px solid;
    clear: both;
  }

  .box {
    width: 80%;
  }

  db_h3 {
    color: black;
    font-size: 14pt;
  }

  db_wert {
    color: white;
    font-size: 18pt;
  }

  db_platzhalter {
    color: white;
    font-size: 18pt;
    text-decoration: line-through;
  }

  .material_bild {
    clear: both;
    float: left;
    width: 52%;
    border: 0px solid;
  }

  img {
    max-width: 300px;
  }
}

/* Gesamtübersicht Tabelle */
table.overview {
  border-collapse: collapse;
  border-spacing: 1px;
  margin: 0px 10px;
  font-size: 1.2em;
}

table.overview th {
  background-color: #666;
  color: #fff;
}

table.overview tr {
  border-bottom: 1px solid black;
}

table.overview tr:nth-child(1n+2) {
  background-color: #d3d3d3;
  color: #000;
  border-bottom: 1px solid black;
}

table.overview tr:nth-child(2n+3) {
  background-color: #ffffff;
  color: #000;
  border-bottom: 1px solid black;
}
.desktop-only {
  display: table-row;
}

.mobile-only {
  display: none;
}

/* Für kleine Bildschirme: Tabelle verstecken, Karten zeigen */
@media only screen and (max-width: 600px) {
  .desktop-only {
    display: none;
  }
  .mobile-only {
    display: block;
  }
}

.sort-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
  justify-content: flex-start; /* linksbündig */
}

.sort-buttons a {
  display: inline-block;
  background-color: #0078d7;
  color: white;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 5px;
  font-size: 1em;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

.sort-buttons a:hover {
  background-color: #005fa3;
}

.sort-buttons a.active {
  background-color: #005fa3;
  font-weight: bold;
}

/* Mobile Optimierung */
@media (max-width: 600px) {
  .sort-buttons {
    flex-direction: column;
    width: 100%;
  }

  .sort-buttons a {
    width: 100%;
    text-align: center;
  }
}