/* ===================================================
   Zentrales Stylesheet – Reinigungs-Dashboard
   Für: Anreisen / Abreisen / Mitarbeiter
   =================================================== */

/* --- Grundlayout --- */
body {
  font-family: system-ui, sans-serif;
  background: #f4f6f8;
  margin: 0;
}

#content {
  max-width: 1000px;
  width: 95%;
  margin: 40px auto;
}

h2 {
  text-align: center;
  color: #333;
  margin-bottom: 20px;
  font-weight: 600;
}

h3, h4 {
  color: #2196F3;
  font-weight: 600;
  margin-top: 10px;
}

/* --- Navigation Buttons (Seitenwechsel) --- */
.switch-btn {
  display: inline-block;
  background: #2196F3;
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: .2s;
}
.switch-btn:hover {
  filter: brightness(1.15);
}

/* --- Gruppierungen nach Tag / Mitarbeiter --- */
.tag-box {
  background: #e9eef2;
  margin: 20px auto;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .1);
}

.reiniger-box {
  background: #fff;
  margin: 10px 0;
  padding: 10px;
  border-radius: 8px;
}

.reiniger-badge {
  font-weight: 700;
  display: inline-block;
  padding: 8px 14px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 18px;
}

/* --- Reinigungskarten (Wohnungen) --- */
.card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .1);
  margin: 10px;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-left: 10px solid #ccc;
  flex-wrap: wrap;
  flex: 1 1 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.card.offen { border-left-color: #f44336; }
.card.gestartet { border-left-color: #ff9800; }
.card.fertig { border-left-color: #4CAF50; }
.card.wechsel { border-left-color: #ffeb3b !important; background: #fffde7; }
.card.intern { background: #f9f9f9; border-left-color: #9e9e9e; }

/* --- Zusatz-Hinweis (Wechsel) --- */
.wechsel-hinweis {
  background: #ffeb3b;
  color: #000;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
  margin-top: 6px;
  display: inline-block;
  font-size: 14px;
}

/* --- Statusanzeige --- */
.status {
  font-weight: 600;
  font-size: 15px;
  margin-top: 4px;
}
.status.offen { color: #f44336; }
.status.gestartet { color: #ff9800; }
.status.fertig { color: #4CAF50; }

/* ===================================================
   🔘 EINHEITLICHES BUTTON-DESIGN (ALLE VARIANTEN)
   =================================================== */

/* Grundlayout */
.btn,
.start,
.done,
.start-btn,
.fertig-btn {
  display: inline-block !important;
  padding: 10px 18px !important;
  border: none !important;
  border-radius: 8px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #fff !important;
  cursor: pointer !important;
  transition: all 0.25s ease-in-out !important;
  appearance: none !important;
  text-align: center !important;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Farben & Hover */
.start,
.start-btn {
  background-color: #4CAF50 !important;
}
.start:hover,
.start-btn:hover {
  background-color: #43a047 !important;
}

.done,
.fertig-btn {
  background-color: #f44336 !important;
}
.done:hover,
.fertig-btn:hover {
  background-color: #d32f2f !important;
}

/* Deaktivierte Buttons */
.btn.disabled,
.start-btn.disabled,
.fertig-btn.disabled,
.start[disabled],
.done[disabled] {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

/* Gruppierung der Buttons */
.btn-group,
.button-group {
  display: flex !important;
  justify-content: flex-end !important; /* Desktop: rechtsbündig */
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  margin-top: 8px !important;
  width: 100%;
}

/* Mobile Ansicht */
@media screen and (max-width: 768px) {
  .btn-group,
  .button-group {
    justify-content: center !important; /* Mobile: zentriert */
  }

  .btn,
  .start,
  .done,
  .start-btn,
  .fertig-btn {
    flex: 1 1 45% !important;
    min-width: 120px !important;
  }
}

/* --- Mitarbeiter-Buttons (Token-Login) --- */
.personal-btn {
  transition: all .25s ease;
  border: none;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,.15);
}
.personal-btn:hover {
  filter: brightness(1.15);
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0,0,0,.25);
}

/* ===================================================
   📱 Optimierung für Handyansicht (max 768px)
   =================================================== */
@media screen and (max-width: 768px) {

/* Äußere Theme-Container übersteuern */
  body .site,
  body .container,
  body .content-area,
  body .site-content {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 93% !important;
    max-width: 96% !important;
  }

 /* Dein eigentlicher Dashboard-Bereich */
  #content {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 10px;
    box-sizing: border-box;
    overflow-x: hidden;
    text-align: center;
  }

  /* Graue Box (Tag) fast vollbreit */
  .tag-box,
  .card {
    width: 95%;
    margin-left: auto;
    margin-right: auto;
  }

  /* Weiße Karten breiter */
  .card {
    width: 96%;
    margin: 8px auto;
    padding: 14px;
    flex-direction: column;
    align-items: stretch;
    box-sizing: border-box;
  }

  .card > div {
    flex: 1 1 auto;
    min-width: 100%;
  }

  .btn-group {
    justify-content: center;
  }

  .switch-btn {
    display: block;
    width: 100%;
    margin: 6px 0;
    text-align: center;
  }

  h2 { font-size: 20px; }

  /* Blaue Namensleiste (Azad, Sarah etc.) schmaler und mittig */
  .reiniger-badge {
    display: inline-block;
    width: auto;
    min-width: 120px;
    text-align: center;
    padding: 8px 16px;
    margin: 6px auto;
  }
}

/* ===================================================
   Anpassung Reinigungskraft-Name in Anreisen-
   =================================================== */
.verantwortlich-wrap {
  margin-top: 6px;
}
.verantwortlich-label {
  color: #666;
  font-size: 13px;
}
.verantwortlich-badge {
  display: inline-block;
  margin-top: 2px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 13px;
  color: #fff;
}

/* ===================================================
   💎 Moderne Variante – Runde Ja/Nein Buttons mit Farbverlauf
   =================================================== */

.check-btn-group {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.check-btn {
  flex: 1 1 45%;
  text-align: center;
  padding: 12px 0;
  border-radius: 50px;
  border: 2px solid transparent;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  user-select: none;
  transition: all 0.25s ease-in-out;
  color: #333;
  background: linear-gradient(145deg, #ffffff, #f1f1f1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.check-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* ✅ JA aktiv */
.check-btn.active-yes {
  background: linear-gradient(145deg, #43a047, #66bb6a);
  color: #fff;
  border: 2px solid #388e3c;
  box-shadow: 0 4px 10px rgba(76, 175, 80, 0.5);
}

/* ❌ NEIN aktiv */
.check-btn.active-no {
  background: linear-gradient(145deg, #e53935, #ef5350);
  color: #fff;
  border: 2px solid #c62828;
  box-shadow: 0 4px 10px rgba(244, 67, 54, 0.5);
}

/* 🌙 Animierter Klick-Effekt */
.check-btn:active {
  transform: scale(0.97);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) inset;
}

/* 🎨 Hover auf inaktive Buttons */
.check-btn:not(.active-yes):not(.active-no):hover {
  background: linear-gradient(145deg, #f9f9f9, #eaeaea);
  border-color: #ccc;
}

/* ===================================================
   📱 Mobile Optimierung
   =================================================== */
@media screen and (max-width: 768px) {
  .check-btn {
    flex: 1 1 100%;
    font-size: 15px;
    padding: 14px 0;
    margin: 4px 0;
  }
}

/* ===================================================
   🧩 Fix für Ja/Nein-Buttons innerhalb von SweetAlert2
   =================================================== */

.swal2-popup .check-btn-group {
  display: flex !important;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.swal2-popup .check-btn {
  display: inline-block !important;
  flex: 1 1 40%;
  text-align: center;
  padding: 12px 0;
  border-radius: 50px;
  border: 2px solid transparent;
  font-weight: 600;
  font-size: 16px;
  user-select: none;
  transition: all 0.25s ease-in-out;
  color: #333;
  background: linear-gradient(145deg, #ffffff, #f1f1f1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.swal2-popup .check-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* ✅ JA aktiv */
.swal2-popup .check-btn.active-yes {
  background: linear-gradient(145deg, #43a047, #66bb6a);
  color: #fff;
  border: 2px solid #388e3c;
  box-shadow: 0 4px 10px rgba(76, 175, 80, 0.5);
}

/* ❌ NEIN aktiv */
.swal2-popup .check-btn.active-no {
  background: linear-gradient(145deg, #e53935, #ef5350);
  color: #fff;
  border: 2px solid #c62828;
  box-shadow: 0 4px 10px rgba(244, 67, 54, 0.5);
}

/* 🎨 Hover auf inaktive Buttons */
.swal2-popup .check-btn:not(.active-yes):not(.active-no):hover {
  background: linear-gradient(145deg, #f9f9f9, #eaeaea);
  border-color: #ccc;
}

/* 📱 Mobile */
@media screen and (max-width: 768px) {
  .swal2-popup .check-btn {
    flex: 1 1 100%;
    font-size: 15px;
    padding: 14px 0;
    margin: 4px 0;
  }
}
