/* === Grundlayout === */
body {
  font-family: "Segoe UI", Arial, sans-serif;
  margin: 0;
  background: #f3f5f7;
  color: #222;
}
h2 { color: #007c91; font-size: 1.8em; margin-bottom: 15px; }
h3 { color: #00acc1; font-size: 1.3em; margin: 12px 0; }
p { margin: 6px 0; }
.hidden { display:none; }

/* Karten */
.card {
  background: #fff;
  padding: 16px;
  margin: 10px 0;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.section { margin-top: 20px; }

/* Login */
.login { max-width: 400px; margin: 100px auto; text-align: center; }
.login input {
  width: 100%; padding: 14px; margin: 10px 0;
  border-radius: 8px; border: 1px solid #ccc; font-size: 1.1em;
}
.login button {
  width: 100%; padding: 14px; border: none; border-radius: 8px;
  background: #4caf50; color: #fff; font-size: 1.2em; cursor: pointer;
}
.login button:hover { background: #45a049; }

/* Buttons */
button {
  padding: 8px 14px; border: none; border-radius: 6px;
  cursor: pointer; background: #007c91; color: #fff;
}
button:hover { background: #006070; }
.btn-logout { background: #e74c3c; }
.btn-logout:hover { background: #c0392b; }

/* Kleine Buttons (z. B. Kundenliste) */
.btn-small {
  padding: 4px 8px;
  font-size: 0.8em;
  margin-left: 6px;
  background: #007c91;
  border-radius: 4px;
}
.btn-small:hover { background: #006070; }

/* Links (u.a. WhatsApp) */
a { color: #25D366; text-decoration: none; font-weight: bold; }
a:hover { text-decoration: underline; }

/* Terminfarben */
.termin { margin: 4px 0; padding: 8px; border-radius: 6px; }
.termin.soon  { background: rgba(255,200,0,0.15); }
.termin.later { background: rgba(0,200,255,0.15); }
.termin.past  { background: rgba(200,200,200,0.2); color:#777; }

/* kleine rote Lösch-Icons */
.delete-icon {
  display:inline-block; background:#e74c3c; color:#fff; border-radius:50%;
  width:20px; height:20px; font-size:12px; line-height:20px; text-align:center;
  cursor:pointer; margin-left:6px; user-select:none;
}
.delete-icon:hover { background:#c0392b; }

/* Admin-Layout */
.flex-columns { display:flex; gap:20px; margin-top:20px; align-items:stretch; }
.flex-col {
  background:#fff; border-radius:10px; box-shadow:0 2px 6px rgba(0,0,0,0.1);
  padding:16px; flex:1; display:flex; flex-direction:column;
}
/* Scrollbare linke Spalte in der Adminansicht */
.flex-col.scrollable {
  max-height: 75vh;
  overflow-y: auto;
}

/* Kunden-Tab Layout */
#kundenTab .flex-col:first-child { flex: 0 0 320px; }
#kundenTab .flex-col:last-child { flex: 1; }

/* Kundendaten Grid */
.customer-data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr; /* drei Spalten */
  gap: 12px;
}
.customer-data-grid label {
  font-weight: bold;
  font-size: 0.9em;
  margin-top: 6px;
  display: block;
}
.customer-data-grid input,
.customer-data-grid select {
  width: 100%;
  padding: 6px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

/* Responsive für kleinere Screens */
@media (max-width: 1200px) {
  .customer-data-grid {
    grid-template-columns: 1fr 1fr; /* zwei Spalten */
  }
}
@media (max-width: 700px) {
  .customer-data-grid {
    grid-template-columns: 1fr; /* eine Spalte */
  }
}

/* Hinweisfelder */
#editHinweise,
#editProdukteText {
  width: 100%;
  min-height: 30px;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 0.95em;
}
#editBehandlungen {
  width: 100%;
  min-height: 100px;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 0.95em;
}

/* Tabs + Buttons gemeinsam in Reihe */
.tabs { margin-bottom:15px; }
.tabs.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.tabs button {
  padding:10px 16px; border:none; background:#007c91; color:#fff;
  border-radius:6px; cursor:pointer;
}
.tabs button:hover { background:#006070; }
.admin-tab { display:block; }
.admin-tab.hidden { display:none; }

/* Kalender */
.kalender-flex { overflow-x: auto; }
.flex-col #calendar1,
.flex-col #calendar2,
.flex-col #calendar3,
.flex-col #calendar4,
.flex-col #calendar5 {
  height:70vh;
  border: 1px solid #e0e6ea;
  border-radius: 6px;
  background: #fafafa;
  min-width: 260px;
}
.fc { font-size: 0.75em; }
.fc .fc-col-header-cell { background:#f9f9f9; }
.fc .fc-daygrid-day-number { font-size:0.8em; padding:2px; }

/* Mini-Kalender */
#miniCalendar {
  max-width:100%;
  background:#fafafa;
  border-radius:6px;
  border: 1px solid #e0e6ea;
  padding:10px;
  min-height: 300px;
  box-shadow:0 1px 3px rgba(0,0,0,0.05);
}
#miniCalendar .fc-toolbar-title { font-size: 1.1em; font-weight: bold; }
#miniCalendar .fc-button {
  background: #007c91; color: #fff; border: none;
  padding: 2px 6px; font-size: 0.8em; border-radius: 4px; cursor: pointer;
}
#miniCalendar .fc-button:hover { background: #006070; }

/* Textarea im Popup */
textarea {
  font-family: inherit; font-size:1em; padding:8px;
  border-radius:6px; border:1px solid #ccc; margin:8px 0; resize:vertical;
}

/* Popup Overlay */
body::after {
  content:""; display:none; position:fixed; inset:0;
  background:rgba(0,0,0,0.5); z-index:9998;
}
body.popup-open::after { display:block; }

/* Popup Box */
.popup {
  position:fixed; top:25%; left:50%; transform:translate(-50%,-25%);
  z-index:9999; max-width:420px; width:90%;
}

:root{
  --h-list: 36vh;   /* Kundenliste links */
  --h-soon: 22vh;   /* 24h-Termine links */
  --h-past: 22vh;   /* Vergangene Termine links */
  --h-all:  40vh;   /* Alle kommenden Termine rechts */
}

/* Scroll-Container in Kunden-Ansicht (responsive, VH-basiert) */
#customerList     { max-height: var(--h-list); overflow: auto; }
#customerView #appointmentsSoon { max-height: 200px; overflow: auto; }
#customerView #appointmentsPast { max-height: 200px; overflow: auto; }
#customerView #appointmentsAll { max-height: 260px; overflow: auto; }

@media (max-width: 1200px){
  :root{
    --h-list: 34vh;
    --h-soon: 20vh;
    --h-past: 20vh;
    --h-all:  36vh;
  }
}
@media (max-width: 900px){
  :root{
    --h-list: 32vh;
    --h-soon: 18vh;
    --h-past: 18vh;
    --h-all:  34vh;
  }
}

/* Drei-Spalten-Layout für Produkte / Kommende / Vergangene (rechts) */
.triple-grid{
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 1200px){
  .triple-grid{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px){
  .triple-grid{ grid-template-columns: 1fr; }
}
/* Karten im Triple-Grid etwas kompakter */
.triple-grid .card{ margin: 0; }

/* Mobile */
@media (max-width: 900px) {
  body { background:#1c2e1c; color:#fff; }
  .card { background:rgba(0,0,0,0.2); color:#fff; box-shadow:none; }
  .flex-columns { flex-direction:column; }
  h2 { color:#fff; } h3 { color:#b8e6b8; }
  button { width:100%; margin-top:10px; }
  #calendar1,#calendar2,#calendar3,#calendar4,#calendar5,
  #miniCalendar { background:rgba(0,0,0,0.2); }
}

/* Events: Ruhezeiten grau markieren */
.fc-event.break-time {
  font-weight: 600;
  border-width: 1px !important;
  border-style: solid !important;
}

/* Buttons in einer Reihe (generisch) */
.button-row {
  display: flex;
  gap: 10px;
  margin: 10px 0;
  flex-wrap: wrap;
}

/* Scroll-Container in Kunden-Ansicht */
#customerList { max-height: 800px; overflow: auto; }
#customerView #appointmentsSoon { max-height: 200px; overflow: auto; }
#customerView #appointmentsPast { max-height: 200px; overflow: auto; }
#customerView #appointmentsAll { max-height: 260px; overflow: auto; }

/* === Fix: Inputs ragen nicht mehr aus dem Login-Container === */
*, *::before, *::after { box-sizing: border-box; }

.login.card { 
  width: min(92vw, 420px);
  margin: 80px auto;
}

.login input,
.login button {
  width: 100%;
  max-width: 100%;
  display: block;
  box-sizing: border-box;
}

.login input {
  background: #fff;
  border: 1px solid #dbe3e8;
  border-radius: 10px;
}


.login input:focus {
  outline: none;
  border-color: #00acc1;
  box-shadow: 0 0 0 3px rgba(0,172,193,0.15);
}

.login button {
  border-radius: 10px;
  font-weight: 600;
}

/* Überschriften über den 5 Kalender-Spalten */
.calendar-name{
  margin: 0 0 8px 0;
  padding: 4px 6px;
  text-align: center;
  font-weight: 700;
  color: #007c91;
  background: #e9f6f8;
  border: 1px solid #d2ecef;
  border-radius: 6px;
}

/* FullCalendar Titel kleiner machen */
.fc-toolbar-title {
  font-size: 0.5em;
  font-weight: 600;
}
.fc-toolbar-title {
  font-size: 0.5em;
  font-weight: normal;
}

/* ===== Desktop-Optimierung für Kalender-Spalten ===== */
@media (min-width: 901px) {
  .kalender-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }
  .calendar-col {
    flex: 1 1 260px;
    min-width: 260px;
  }
}

/* Scrollbare Listen im Adminbereich */
.scroll-box {
  max-height: 250px;
  overflow-y: auto;
}

/* Farben für die Mitarbeiter */
.fc-event.MA1 {
  background-color: peru !important;
  border-color: peru !important;
  color: #000 !important;
}
.fc-event.Veronika {
  background-color: blue !important;
  border-color: blue !important;
  color: #fff !important;
}
.fc-event.Sabine {
  background-color: green !important;
  border-color: green !important;
  color: #fff !important;
}
.fc-event.Tina {
  background-color: lightcoral !important;
  border-color: lightcoral !important;
  color: #000 !important;
}
.fc-event.Claudia {
  background-color: orange !important;
  border-color: orange !important;
  color: #000 !important;
}
/* Grid für Hinweise + Produkte nebeneinander */
.hinweise-produkte-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;  /* zwei gleich breite Spalten */
  gap: 16px;
  margin-bottom: 16px;
}
.hinweise-produkte-grid > div {
  display: flex;
  flex-direction: column;
}
.hinweise-produkte-grid textarea {
  min-height: 60px;
}

/* Behandlung darunter wieder volle Breite */
.behandlung-box {
  margin-top: 16px;
}
.behandlung-box textarea {
  min-height: 100px;
}

/* ===============================
   Kalender: TEXT größer (Name + Behandlung)
   Uhrzeit bleibt unverändert
   =============================== */

/* Nur Name + Behandlung */
.fc-event .fc-event-title,
.fc-event .fc-event-main {
  font-size: 1.25em !important;   /* 🔼 HIER größer machen */
  line-height: 1.3em !important;
  font-weight: 500;
}

/* Uhrzeit bewusst kleiner / normal lassen */
.fc-event .fc-event-time {
  font-size: 0.9em !important;
  font-weight: 400 !important;
  opacity: 0.9;
}




/* Heading row for title + inline input/button */
.heading-row{display:flex;align-items:center;gap:8px;margin:8px 0 6px;}
.heading-row h3{margin:0;flex:0 0 auto;}
.heading-row input { flex:0 0 40%; max-width:180px; padding:6px; border:1px solid #ccc; border-radius:6px; }
.heading-row button{flex:0 0 auto;}


/* === Rechte Notizspalte neben den Kalendern === */
.notes-col{ flex:0 0 240px; }
.notes-area{
  width:100%;
  height:70vh;
  border:1px solid #e0e6ea;
  border-radius:6px;
  padding:10px;
  background:#fafafa;
  box-sizing:border-box;
  font-family: inherit;
  font-size: 0.95em;
  resize: vertical;
}
@media (max-width: 1100px){
  .notes-col{ flex:0 0 200px; }
}
/* === Admin: Termin-Tab Spalten länger === */
#adminView #termineTab #appointmentsSoon,
#adminView #termineTab #appointmentsPast,
#adminView #termineTab #appointmentsAll {
  height: 1000px;      /* Höhe der Spalten im Termin-Tab */
  max-height: none;   /* Deckelung aufheben */
  overflow-y: auto;
}
/* Uhrzeit im Kalender dezenter anzeigen */
.fc-event .fc-event-time {
  font-size: 0.9em !important;
  color: #fff !important;
  font-weight: normal !important;
  opacity: 1;
}
.customer-popup {
  max-width: 600px;  /* größer */
}

.customer-popup h2 {
  color: #00acc1;
  margin-bottom: 15px;
}

.popup-grid {
  display: grid;
  grid-template-columns: 1fr 2fr; /* Label links, Feld rechts */
  gap: 10px 15px;
  margin-bottom: 15px;
}

.popup-grid label {
  font-weight: bold;
  align-self: center;
}

.popup-grid input,
.popup-grid select {
  width: 100%;
  padding: 6px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.customer-popup textarea {
  width: 100%;
  min-height: 70px;
  margin: 10px 0;
  border-radius: 6px;
  border: 1px solid #ccc;
  padding: 6px;
}
/* === Mobile/Tablet Optimierung für Popups === */
@media (max-width: 900px) {
  .popup {
    top: 5% !important;
    left: 50% !important;
    transform: translate(-50%, 0) !important;
    width: 95% !important;
    max-width: 95% !important;
    height: auto !important;
    max-height: 90vh;
    overflow-y: auto;
  }
}
/* === Kundenübersicht schöner machen === */
#customerView h2 {
  color: #007c91;
  margin-bottom: 10px;
}

#customerView .section {
  margin-top: 25px;
}

#customerView .section h3 {
  margin-bottom: 10px;
  font-size: 1.2em;
  color: #00acc1;
}

/* Kommende Termine */
.customer-appointments {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.customer-appointments .appt-card {
  background: #e9f6f8;
  border: 1px solid #d2ecef;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.95em;
}

/* Produkte Liste */
.customer-products {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
}

.customer-products li {
  background: #fafafa;
  border: 1px solid #ddd;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 0.95em;
}

/* Eingabe Neues Produkt */
.customer-product-input {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.customer-product-input input {
  flex: 1;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.customer-product-input button {
  padding: 8px 14px;
  background: #007c91;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.customer-product-input button:hover {
  background: #006070;
}
/* === Fix: Sichtbarkeit auf Mobile/Tablet (Dark Mode) === */
@media (max-width: 900px) {
  .customer-appointments .appt-card {
    background: rgba(0, 172, 193, 0.2); /* leicht türkis */
    color: #fff;  /* weiße Schrift */
    border-color: #00acc1;
  }

  .customer-products li {
    background: rgba(255, 255, 255, 0.1); /* leichtes Grau */
    color: #fff;
    border-color: #aaa;
  }

  .customer-product-input input {
    background: #fff;
    color: #000;
  }

  .customer-product-input button {
    background: #00acc1;
    color: #fff;
  }
}




/* === Admin: Kundenliste links scrollbar machen === */
#adminView #customerList {
  max-height: 70vh;
  overflow-y: auto;
}
/* Scrollbare Spalten in der Termine-Ansicht */
#adminView #termineTab .flex-col {
  max-height: 75vh;   /* Höhe begrenzen (75% der Viewport-Höhe) */
  overflow-y: auto;   /* vertikales Scrollen */
}


/* === Admin: Detailansicht scrollbare Spalten (Produkte / Kommende Termine / Vergangene Termine) === */
#customerDetail .customer-products,
#customerDetail .customer-appointments,
#customerDetail .section .scroll-box {
  max-height: 220px;   /* entspricht ca. 4 Einträgen */
  overflow-y: auto;
}

/* === Fix: Produkte (Liste), Kommende Termine, Vergangene Termine auf 2cm fixieren + Scrollbar === */
#customerDetail .triple-grid .card .customer-products,
#customerDetail .triple-grid .card .customer-appointments,
#customerDetail .triple-grid .card ul {
  height: 2cm;
  max-height: 2cm;
  overflow-y: auto;
}
/* === Einheitliche Höhe für Hinweise / Produkte / Behandlungen / Diodenlaser === */
#editHinweise,
#editProdukteText,
#editBehandlungen,
#editDiodenlaser {
  min-height: 140px;    /* gleiche Höhe */
  height: 140px;        /* feste Grundhöhe */
  resize: vertical;     /* optional verstellbar */
}
/* === Admin-Listenfelder (Hinweise, Produkte, Behandlungen, Diodenlaser) === */
.list-box {
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  min-height: 140px;
  max-height: 140px;
  overflow-y: auto;
  padding: 8px;
  margin-top: 4px;
}

.entry-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  margin: 3px 0;
  background: #f9f9f9;
  border: 1px solid #eee;
  border-radius: 6px;
  word-break: break-word;
}

.delete-icon {
  background: #e74c3c;
  color: #fff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  line-height: 20px;
}
.delete-icon:hover {
  background: #c0392b;
}
.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;
}
.modal.hidden { display: none; }
.modal-content {
  background: white; padding: 20px; border-radius: 10px;
  width: 60%; max-width: 600px; max-height: 80%;
  overflow-y: auto;
}
.modal-content textarea {
  width: 100%; height: 80px; margin-top: 10px;
}
.popup-buttons {
  text-align: right; margin-top: 10px;
}
.btn-anamnese {
  background-color: #007c91; /* Türkis wie Sidebar */
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: 0.2s;
}
.btn-anamnese:hover {
  background-color: #009fb5;
}
/* === Anamnese-Block === */
#anamneseDisplay {
  width: 100%;
  grid-column: 1 / -1;
  background: #fff;
  border: 1px solid #d2ecef;
  border-radius: 10px;
  padding: 16px 20px;
  margin: 20px 0;
  box-shadow: 0 2px 6px rgba(0, 124, 145, 0.15);
  box-sizing: border-box;
}

#anamneseDisplay h3 {
  color: #007c91;
  font-size: 1.3em;
  margin-bottom: 10px;
  border-bottom: 2px solid #00acc1;
  padding-bottom: 4px;
}

#anamneseDisplay p {
  font-size: 0.95em;
  line-height: 1.5;
  margin: 4px 0;
}

#anamneseDisplay b {
  color: #007c91;
}

#anamneseDisplay button {
  background: #00acc1;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 10px;
  font-size: 0.9em;
  transition: background 0.2s ease;
}
#anamneseDisplay button:hover {
  background: #007c91;
}
/* === Nur Termin-Popup größer machen === */
.popup.termin-popup .card {
  max-width: 800px;      /* bisher 600px oder kleiner */
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
}

.popup.termin-popup {
  top: 10%;
  transform: translate(-50%, -10%);
}
/* Nur das Termin-Popup größer machen */
.popup.termin-popup {
  max-width: 1150px;
  width: 96%;
}
.popup.termin-popup .card {
  padding: 24px; /* etwas mehr Innenabstand */
}


/* 🌿 Farbige Hinterlegung für Kundendatenfelder */
.customer-data-grid {
  background: #e8fbe8;       /* hellgrün */
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 15px;
}

/* optional: Labels etwas absetzen */
.customer-data-grid label {
  font-weight: 600;
  color: #064d06;
}
/* 🔎 Suchfeld-Design mit X-Button */
.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 8px;
}

#searchCustomer {
  width: 100%;
  padding: 12px 38px 12px 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1em;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
  transition: all 0.2s;
}

#searchCustomer:focus {
  border-color: #00acc1;
  outline: none;
  box-shadow: 0 0 3px rgba(0,172,193,0.4);
}

#clearSearchBtn {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: #888;
  font-size: 1.2em;
  cursor: pointer;
  display: none;
}

#clearSearchBtn:hover {
  color: #e74c3c;
}
/* 🔹 Logout-Button unter Überschrift für Kundenansicht */
.logout-wrapper {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

@media (max-width: 900px) {
  .logout-wrapper {
    justify-content: flex-start;
    margin-top: 5px;
  }
  .logout-wrapper .btn-logout {
    width: 100%;
  }
}
/* Zoom-/Skalierungs-Fix für Tablet */
@media (max-width: 1200px) {
  #calendar {
    transform: scale(0.85);       /* verkleinert den Kalender leicht */
    transform-origin: top center; /* zentriert die Ansicht */
  }
}
/* === Schönere Darstellung: Pause + (NK) Neukunde === */
.pause-new-block {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 40px;
  background: #e9f6f8;          /* leicht türkis, passt zu deinem Layout */
  border-radius: 10px;
  padding: 10px 18px;
  margin-bottom: 12px;
  border: 1px solid #d2ecef;
  box-shadow: 0 2px 4px rgba(0, 124, 145, 0.1);
}

.pause-new-block label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #004d40;
  cursor: pointer;
}

.pause-new-block input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: #00acc1;       /* dein Türkiston */
  cursor: pointer;
  transform: scale(1.1);
}
/* === Kalender-Navigation über den Mitarbeitern === */
.calendar-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 10px 0 15px;
}
.calendar-nav button {
  background: #00acc1;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9em;
}
.calendar-nav button:hover {
  background: #007c91;
}
/* Datum (z. B. 30. Oktober 2025) schwarz */
.fc-toolbar-title {
  color: #000;
}

/* Wochentag (z. B. Donnerstag) größer und schwarz */
.fc-col-header-cell-cushion {
  color: #000;
  font-size: 1.1em;
  font-weight: 600;
}
:root{
  --h-list: 70vh;   /* mehr Kunden sichtbar */
}
#adminView #customerList {
  max-height: 85vh; /* auch im Admin etwas höher */
}
.fc-timeline-slot {
  background: #fafafa;
}
.fc-datagrid-cell {
  background: #eef6f8;
  font-weight: 600;
  text-align: center;
}
.fc-timeline-event {
  border-radius: 8px !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.fc-col-header-cell[data-resource-id="MA1"] { background:#c8facc; }
.fc-col-header-cell[data-resource-id="Veronika"] { background:#fcd6e2; }
.fc-col-header-cell[data-resource-id="Sabine"] { background:#d3f7f7; }
.fc-col-header-cell[data-resource-id="Tina"] { background:#ff8585; }
.fc-col-header-cell[data-resource-id="Claudia"] { background:#a3ffaf; }
/* === Kalender-Spalten optisch verbessern === */
.fc-col-header-cell {
  background: #e6f7fb;
  color: #007c91;
  font-weight: 600;
  text-align: center;
}
.fc-timegrid-slot {
  border-color: #eee !important;
}
.fc-resource-timegrid {
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
}
.fc-license-message {
  display: none !important;
}
/* Kopfzeilen-Farben der Mitarbeiter */
.fc-resource-column[data-resource-id="MA1"]   { background:#c8facc !important; }
.fc-resource-column[data-resource-id="Veronika"] { background:#fcd6e2 !important; }
.fc-resource-column[data-resource-id="Sabine"]   { background:#d3f7f7 !important; }
.fc-resource-column[data-resource-id="Tina"]     { background:#ff8585 !important; }
.fc-resource-column[data-resource-id="Claudia"]  { background:#a3ffaf !important; }
.fc-tooltip {
  box-shadow: 0 2px 6px rgba(15, 157, 77, 0.719);
  transition: opacity 0.1s ease-in-out;
}
/* === Geburtstage heute (Scroll erst bei vielen Einträgen) === */
#birthdaysToday {
  max-height: 480px;   /* erst ab ca. 10–12 Personen Scrollbar */
  overflow-y: auto;
  padding-right: 6px;  /* etwas Platz für Scrollbar */
}

#birthdaysToday .termin {
  padding: 6px 8px;
  margin: 4px 0;
}
/* Einheitliches Design für "Kunde öffnen"-Button */
button.customer-open {
  background: #00acc1;
  color: #fff;
  border: none;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9em;
  margin-left: 6px;
}
button.customer-open:hover {
  background: #007c91;
}
/* --- ALT: Popup Inline-Fix (nicht mehr aktiv, kann später entfernt werden) --- */

@keyframes fadeInOut {
  0% { opacity: 0; transform: translate(-50%, -60%); }
  10%, 90% { opacity: 1; transform: translate(-50%, -50%); }
  100% { opacity: 0; transform: translate(-50%, -40%); }
}
/* Klickbarer Kundenname in Terminlisten */
.cust-link {
  color: #007c91;
  font-weight: 600;
  text-decoration: none;
}
.cust-link:hover {
  text-decoration: underline;
  color: #00acc1;
}
/* === Breiteres Kunden-Detail-Popup === */
.popup.customer-popup .card {
  max-width: 1200px !important;
  width: 95% !important;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-sizing: border-box;
}

/* Für große Monitore noch breiter */
@media (min-width: 1400px) {
  .popup.customer-popup .card {
    max-width: 1300px;
  }
}

/* Für Tablets leicht kleiner */
@media (max-width: 900px) {
  .popup.customer-popup .card {
    width: 95%;
    max-width: 95%;
    padding: 16px;
  }
}
/* ========== Kunden-Detail-Popup (breit + 3 Spalten) ========== */
.popup.customer-popup .customer-card {
  max-width: 1200px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  box-sizing: border-box;
}

.popup.customer-popup h2 {
  color: #007c91;
  margin-bottom: 18px;
}

/* Header (Anrede, Tel, Ort...) */
.customer-header {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 16px;
  background: #e8fbe8;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 20px;
}

/* 3 Spalten für Hinweise / Produkte / Behandlungen */
.customer-sections {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 10px;
}

.cust-box {
  background: #f9fffa;
  border-radius: 10px;
  padding: 14px 16px;
  border: 1px solid #d2ecef;
}

.cust-box h3 {
  color: #00acc1;
  margin-bottom: 8px;
}

/* Diodenlaser extra unterhalb */
.cust-box.diodenlaser {
  margin-top: 20px;
}

/* Schließen-Button rechts */
.close-row {
  text-align: right;
  margin-top: 20px;
}

/* Responsive Anpassung */
@media (max-width: 1000px) {
  .customer-header,
  .customer-sections {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .customer-header,
  .customer-sections {
    grid-template-columns: 1fr;
  }
  .popup.customer-popup .customer-card {
    width: 95%;
    max-width: 95%;
    padding: 16px;
  }
}
/* === Breiteres Kunden-Detail-Popup (wie Kundendatei) === */
.popup.customer-popup {
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  width: 96vw;              /* volle Bildschirmbreite */
  max-width: 1150px;        /* identisch mit Kundendatei */
  max-height: 90vh;
  overflow-y: auto;
  z-index: 9999;
}

.popup.customer-popup .card.customer-detail-card {
  width: 100%;
  padding: 24px;
  box-sizing: border-box;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.customer-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: #e8fbe8;
  padding: 14px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.card.light {
  background: #f9fffa;
  padding: 12px 16px;
  border-radius: 8px;
}
.btn-open {
  background: #00acc1;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease;
}
.btn-open:hover {
  background: #007c91;
}
/* === Breiteres Kunden-Detail-Popup (wie Kundendatei) === */
.popup.customer-popup {
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  width: 96vw;              /* volle Bildschirmbreite */
  max-width: 1150px;        /* identisch mit Kundendatei */
  max-height: 90vh;
  overflow-y: auto;
  z-index: 9999;
}

.popup.customer-popup .card.customer-detail-card {
  width: 100%;
  padding: 24px;
  box-sizing: border-box;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.customer-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: #e8fbe8;
  padding: 14px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.card.light {
  background: #f9fffa;
  padding: 12px 16px;
  border-radius: 8px;
}
/* === Farbige Admin-Buttons für bessere Übersicht === */
.tabs.button-row button {
  color: white;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Jeder Button eigene Farbe */
#btnRefresh       { background: #007c91; }  /* Türkis */
#btnCustomers     { background: #009688; }  /* Smaragdgrün */
#btnCalendar      { background: #3f51b5; }  /* Blau */
#btnAppointments  { background: #795548; }  /* Braun */
#btnNewCustomer   { background: #9c27b0; }  /* Violett */
#btnSaveCustomer  { background: #4caf50; }  /* Grün */
#btnDeleteCustomer{ background: #f44336; }  /* Rot */

/* Hover-Farben */
#btnRefresh:hover       { background: #006070; }
#btnCustomers:hover     { background: #00796b; }
#btnCalendar:hover      { background: #303f9f; }
#btnAppointments:hover  { background: #5d4037; }
#btnCustomerReviews { background: #7b5bb5; }
#btnCustomerReviews:hover { background: #624493; }
#btnNewCustomer:hover   { background: #7b1fa2; }
#btnSaveCustomer:hover  { background: #388e3c; }
#btnDeleteCustomer:hover{ background: #d32f2f; }
.fc-event.holiday {
  font-weight: bold;
  text-align: center;
  opacity: 0.9;
}
/* Feiertage sichtbar machen */
.fc .holiday-bg {
  background-color: #ffebc6 !important;
  opacity: 0.6 !important;
}

/* WICHTIG: Hintergrund auch in resource columns anzeigen */
.fc-resourceTimeGrid .fc-bg-event {
  z-index: 1 !important;
}

/* Normaler Inhalt soll darüber bleiben */
.fc-resourceTimeGrid .fc-event {
  z-index: 2 !important;
}
/* Feiertag im Datum oben (Bild 1) */
.holiday-label {
  color: #b30000 !important;   /* kräftiges Rot */
  font-weight: 700 !important; /* fett */
}
#btnMonthlyAction {
  background: #ff9800;
  color: #fff;
  font-weight: 600;
}
#btnMonthlyAction:hover {
  background: #fb8c00;
}
/* 📣 Monatsaktion Popup – immer über Overlay */
#monthlyActionPopup {
  position: fixed;
  inset: 0;
  z-index: 10001;
}

#monthlyActionPopup .modal-content {
  pointer-events: auto;
}
/* =========================================
   📣 Monatsaktion – Vorschau Styling
   ========================================= */

#monthlyActionPreview {
  background: #ffffff;
  padding: 16px 18px;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0, 124, 145, 0.25);
  max-width: 520px;
   /* 👇 HIER die Verkleinerung */
  max-width: 420px;     /* vorher 520px */
  width: 92vw;          /* passt sich dem Bildschirm an */
  max-height: 85vh;     /* verhindert „zu hoch“ */
  overflow-y: auto;     /* scrollt sauber, falls nötig */
}

/* Bild */
#monthlyActionPreview img {
  max-height: 45vh;
  object-fit: contain;
  margin-bottom: 12px;
}


/* Text der Monatsaktion */
#previewMonthlyText {
  color: #007c91;          /* dein Türkis */
  font-weight: 700;        /* fett */
  font-size: 1.05em;
  line-height: 1.5;
  margin: 10px 0 6px;
}

/* Datum */
#previewMonthlyDate {
  display: block;
  color: #666;
  font-size: 0.85em;
  font-style: italic;
  margin-bottom: 12px;
}

/* Schließen-Button */
#monthlyActionPreview button {
  background: #00acc1;
  color: #fff;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
}
#monthlyActionPreview button:hover {
  background: #007c91;
}
/* ===============================
   🔎 Terminsuche – Outlook-Style
   =============================== */

.appt-search {
  position: relative;
  margin-bottom: 16px;
}

#searchAppointment {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1.05em;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

#searchAppointment:focus {
  outline: none;
  border-color: #00acc1;
  box-shadow: 0 0 3px rgba(0,172,193,0.4);
}

.appt-search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: 86px;
  max-height: 320px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
  z-index: 10000;
}

.appt-hit {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  cursor: pointer;
}

.appt-hit:last-child {
  border-bottom: none;
}

.appt-hit:hover {
  background: rgba(0,159,179,0.08);
}

.appt-hit .line1 {
  font-weight: 700;
  color: #007c91;
}

.appt-hit .line2 {
  font-size: 0.95em;
  color: #444;
  margin-top: 2px;
}

.appt-hit .badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.8em;
  background: rgba(0,0,0,0.08);
  margin-left: 8px;
}
/* Monat (Timeline) kompakter */
.fc-timeline-slot-cushion { font-size: 12px; }
.fc-timeline-header-row { position: sticky; top: 0; background: #fff; z-index: 5; }

.calendar-nav{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.calendar-nav .nav-emp{
  margin-left:10px;
  font-weight:700;
  color:#084c61;
  display:flex;
  align-items:center;
  gap:8px;
}

.calendar-nav #employeeJump{
  padding:6px 10px;
  border-radius:8px;
  border:1px solid #cfe7ef;
}


.break-options-block {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 14px;
  background: #f3fbfd;
  border: 1px solid #d2ecef;
  border-radius: 10px;
  margin-bottom: 6px;
}

.break-option-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #084c61;
}

.break-option-inline input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #00acc1;
}

.break-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.break-edit-grid input {
  width: 100%;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

@media (max-width: 700px) {
  .break-edit-grid {
    grid-template-columns: 1fr;
  }
}
#appLoadingOverlay{
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.96);
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-loading-box{
  width: min(420px, 88vw);
  background: #fff;
  border: 1px solid #d2ecef;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  text-align: center;
}

.app-loading-title{
  font-size: 1.15em;
  font-weight: 700;
  color: #007c91;
  margin-bottom: 16px;
}

.app-loading-bar{
  width: 100%;
  height: 16px;
  background: #e9f6f8;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #d2ecef;
}

#appLoadingBarFill{
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #00acc1, #007c91);
  transition: width 0.25s ease;
}

#appLoadingText{
  margin-top: 12px;
  font-weight: 700;
  color: #007c91;
}

/* =========================================================
   Kundenübersicht – neue Kundendatei-Optik (Ninox-Stil)
   Betrifft nur den Kunden-Tab, Kalender/Termine bleiben unverändert
   ========================================================= */
#kundenTab{
  --kd-bg:#f5f1ed;
  --kd-panel:#ffffff;
  --kd-ink:#26211d;
  --kd-muted:#746a62;
  --kd-line:#e0d7cf;
  --kd-accent:#9a6b4f;
  --kd-accent2:#efe2d7;
  --kd-shadow:0 12px 35px rgba(40,25,15,.08);
  --kd-radius:18px;
}
#kundenTab .flex-columns{
  display:grid;
  grid-template-columns: minmax(280px, 360px) minmax(520px, 1fr);
  gap:16px;
  align-items:start;
  background:var(--kd-bg);
  padding:14px;
  border-radius:22px;
}
#kundenTab .flex-col{
  background:var(--kd-panel);
  border:1px solid var(--kd-line);
  border-radius:var(--kd-radius);
  box-shadow:var(--kd-shadow);
  padding:16px;
  overflow:hidden;
}
#kundenTab .flex-col > h3,
#kundenTab #customerHeader{
  margin:0 0 12px 0;
  color:var(--kd-ink);
  font-size:20px;
}
#kundenTab .search-wrapper{ margin-bottom:12px; }
#kundenTab #searchCustomer{
  border:1px solid var(--kd-line);
  border-radius:14px;
  padding:12px 40px 12px 14px;
  background:#fff;
}
#kundenTab #customerList{
  max-height:calc(100vh - 260px);
  overflow:auto;
  display:grid;
  gap:8px;
  padding:2px 4px 2px 2px;
}
.kd-customer-card{
  border:1px solid var(--kd-line);
  border-radius:14px;
  padding:12px;
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px;
  cursor:pointer;
  background:#fff;
  transition:background .15s ease,border-color .15s ease,transform .15s ease;
}
.kd-customer-card:hover,
.kd-customer-card.active{
  border-color:var(--kd-accent);
  background:#fffaf6;
  transform:translateY(-1px);
}
.kd-customer-card h3{margin:0;font-size:17px;color:var(--kd-ink);}
.kd-meta{display:flex;gap:8px;flex-wrap:wrap;color:var(--kd-muted);font-size:13px;margin-top:4px;}
.kd-card-side{display:flex;gap:6px;align-items:flex-start;justify-content:flex-end;flex-wrap:wrap;max-width:130px;}
.kd-pill{display:inline-flex;align-items:center;border-radius:999px;padding:3px 8px;background:#f0ebe7;color:#5d534b;font-size:12px;white-space:nowrap;}
.kd-empty,.kd-detail-empty{padding:24px;color:var(--kd-muted);background:#fff;border-radius:14px;}
.kd-detail-shell{background:var(--kd-panel);border-radius:var(--kd-radius);overflow:hidden;}
.kd-detail-header{padding:18px;border-bottom:1px solid var(--kd-line);background:#fffaf6;display:flex;justify-content:space-between;gap:12px;align-items:flex-start;}
.kd-detail-header h2{margin:0;color:var(--kd-ink);font-size:25px;}
.kd-small{font-size:12px;color:var(--kd-muted);margin-top:4px;}
.kd-header-badges{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;}
.kd-detail-body{padding:16px;display:grid;gap:16px;background:#fff;}
.kd-section{border:1px solid var(--kd-line);border-radius:16px;padding:14px;background:#fff;box-shadow:none;margin:0;}
.kd-section h3{margin:0 0 12px;font-size:16px;color:var(--kd-accent);}
#kundenTab .kd-form-grid{background:#faf7f4;border-radius:14px;border:1px solid var(--kd-line);padding:12px;}
#kundenTab .kd-form-grid label,
#kundenTab .kd-section label{font-size:12px;font-weight:800;color:var(--kd-muted);text-transform:uppercase;letter-spacing:.03em;}
#kundenTab .kd-form-grid input,
#kundenTab .kd-form-grid select,
#kundenTab .kd-section input,
#kundenTab .kd-section textarea{
  border:1px solid var(--kd-line);
  border-radius:12px;
  padding:9px 11px;
  background:#fff;
  color:var(--kd-ink);
}
.kd-grid2{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
.kd-grid3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:16px;}
#kundenTab .heading-row{display:grid;grid-template-columns:auto minmax(120px,1fr) auto;gap:8px;align-items:center;margin:0 0 10px;}
#kundenTab .heading-row h3{margin:0;}
#kundenTab .heading-row input{max-width:none;}
#kundenTab #editHinweise,
#kundenTab #editProdukteText,
#kundenTab #editBehandlungen,
#kundenTab #editDiodenlaser{
  width:100%;
  height:170px;
  min-height:170px;
  box-sizing:border-box;
}
/* Diodenlaser exakt gleich breit/hoch wie Behandlungen */
#kundenTab #editDiodenlaser{
  display:block;
  width:100% !important;
}
.kd-anamnese{background:#fffaf6;}
.kd-list{list-style:none;margin:0;padding:0;max-height:170px;overflow:auto;display:grid;gap:7px;}
.kd-list li{background:#faf7f4;border:1px solid var(--kd-line);border-radius:10px;padding:8px 10px;line-height:1.35;}
.kd-list li.past{color:#746a62;background:#f7f3ef;}
.kd-inline-add{display:flex;gap:8px;margin-top:10px;}
.kd-inline-add input{flex:1;}
#kundenTab a{color:#9a6b4f;}
@media(max-width:1180px){
  #kundenTab .flex-columns{grid-template-columns:1fr;}
  #kundenTab #customerList{max-height:360px;}
  .kd-grid3{grid-template-columns:1fr;}
}
@media(max-width:760px){
  #kundenTab .flex-columns{padding:8px;}
  .kd-grid2,.kd-grid3{grid-template-columns:1fr;}
  .kd-detail-header{display:block;}
  .kd-header-badges{justify-content:flex-start;margin-top:10px;}
  .kd-customer-card{grid-template-columns:1fr;}
  .kd-card-side{justify-content:flex-start;max-width:none;}
  #kundenTab .heading-row{grid-template-columns:1fr;}
  .kd-inline-add{display:grid;}
}


/* === Kundenkartei kompakt: Stammdaten + Termine oben nebeneinander === */
#kundenTab .kd-top-compact-grid{
  display:grid;
  /* Stammdaten deutlich breiter, Terminboxen schmäler */
  grid-template-columns: minmax(620px, 1.45fr) minmax(235px, 0.55fr) minmax(235px, 0.55fr);
  gap:14px;
  align-items:stretch;
  margin-bottom:14px;
}
#kundenTab .kd-top-compact-grid .kd-section{ margin:0; }
#kundenTab .kd-stamm-compact .kd-form-grid-compact{
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:7px 10px;
  background:#fffaf6;
  padding:10px;
}
#kundenTab .kd-stamm-compact label,
#kundenTab .kd-form-grid-compact label{
  font-size:10px;
  margin-top:0;
  color:#7b5b45;
}
#kundenTab .kd-form-grid-compact input,
#kundenTab .kd-form-grid-compact select{
  padding:5px 7px;
  font-size:12px;
  min-height:28px;
}
#kundenTab .kd-appointments-compact .kd-list{
  max-height:174px;
  min-height:174px;
  overflow-y:auto;
  padding-right:4px;
}
#kundenTab .kd-appointments-compact li{
  font-size:12px;
  line-height:1.25;
  padding:5px 7px;
}
#kundenTab .kd-appointments-compact a{ font-size:12px; }
@media (max-width: 1350px){
  #kundenTab .kd-top-compact-grid{ grid-template-columns:1fr 1fr; }
  #kundenTab .kd-stamm-compact{ grid-column:1 / -1; }
}
@media (max-width: 900px){
  #kundenTab .kd-top-compact-grid{ grid-template-columns:1fr; }
  #kundenTab .kd-stamm-compact .kd-form-grid-compact{ grid-template-columns:1fr; }
  #kundenTab .kd-appointments-compact .kd-list{ max-height:220px; min-height:auto; }
}

/* =========================================================
   Kundenbewertung – interne Adminansicht
   ========================================================= */
.review-admin-head,
.review-evaluation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.review-admin-head h2,
.review-evaluation-head h3 {
  margin-bottom: 5px;
}

.review-admin-head p,
.review-evaluation-head p {
  margin: 0;
  color: #66777a;
}

.review-head-actions,
.review-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.review-head-actions #btnReviewEvaluation {
  background: #7b5bb5;
}

.review-head-actions #btnReviewTemplate {
  background: #d47b16;
}

.review-load-message {
  margin: 10px 0 14px;
  padding: 11px 14px;
  color: #005f70;
  font-weight: 700;
  background: #e9f8fa;
  border: 1px solid #c9e9ed;
  border-radius: 9px;
}

.review-date-navigation {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 9px;
  margin: 0 0 16px;
  padding: 12px;
  background: #eef7f8;
  border: 1px solid #d2e7ea;
  border-radius: 10px;
}

.review-date-navigation label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #365257;
  font-size: 0.78rem;
  font-weight: 750;
}

.review-date-navigation input {
  min-height: 38px;
  padding: 7px 9px;
  color: #294448;
  background: #fff;
  border: 1px solid #bdd6da;
  border-radius: 7px;
}

.review-nav-spacer {
  flex: 1 1 20px;
}

.review-date-navigation .review-batch-button {
  background: #1c9a52;
}

.review-date-navigation .review-batch-button.previous {
  background: #287fba;
}

.review-appointment-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.review-list-card,
.review-evaluation {
  background: #fff;
  border: 1px solid #e0eaec;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 78, 91, 0.08);
}

.review-list-card {
  padding: 15px;
}

.review-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.review-list-heading h3 {
  margin: 0;
}

.review-day-date {
  display: block;
  margin-top: 3px;
  color: #64777a;
  font-weight: 700;
}

.review-count {
  display: inline-grid;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  place-items: center;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  background: #007c91;
  border-radius: 999px;
}

.review-appointment-list {
  min-height: 300px;
  max-height: 62vh;
  overflow-y: auto;
  padding-right: 4px;
}

.review-appt-item {
  width: 100%;
  margin: 0 0 9px;
  padding: 11px 12px;
  color: #22383c;
  text-align: left;
  background: #f9fcfc;
  border: 1px solid #dbe8ea;
  border-left: 5px solid #aab9bc;
  border-radius: 9px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.review-appt-item:hover {
  color: #22383c;
  background: #fff;
  border-color: #93cbd2;
  box-shadow: 0 4px 13px rgba(0, 94, 110, 0.13);
  transform: translateY(-1px);
}

.review-appt-item.status-received { border-left-color: #2e9b59; }
.review-appt-item.status-history { border-left-color: #2e9b59; background: #f1fbf5; }
.review-appt-item.status-opened { border-left-color: #f39c12; }
.review-appt-item.status-waiting { border-left-color: #2785d0; }
.review-appt-item.status-prepared { border-left-color: #7d8c8f; }
.review-appt-item.status-new { border-left-color: #b5bec0; }

.review-appt-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.review-appt-name {
  color: #007c91;
  font-weight: 800;
}

.review-appt-time {
  white-space: nowrap;
  font-weight: 800;
}

.review-appt-details {
  margin-top: 4px;
  color: #53686c;
  font-size: 0.87rem;
  line-height: 1.35;
}

.review-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  padding: 4px 8px;
  font-size: 0.78rem;
  font-weight: 800;
  background: #edf2f3;
  border-radius: 999px;
}

.review-status.status-received { color: #18743b; background: #e7f7ed; }
.review-status.status-history { color: #18743b; background: #e7f7ed; }
.review-status.status-opened { color: #9a5b00; background: #fff1d9; }
.review-status.status-waiting { color: #176aa9; background: #e6f2fc; }
.review-status.status-prepared { color: #58676a; background: #edf1f2; }
.review-status.status-new { color: #637174; background: #f0f3f4; }

.review-empty {
  padding: 34px 15px;
  color: #6e7f82;
  text-align: center;
  background: #f8fbfb;
  border: 1px dashed #cddbdd;
  border-radius: 9px;
}

.review-evaluation {
  margin-top: 20px;
  padding: 17px;
}

.review-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 11px;
  margin: 15px 0 11px;
}

.review-filter-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #42575b;
  font-size: 0.83rem;
  font-weight: 750;
}

.review-filter-grid input,
.review-filter-grid select {
  width: 100%;
  min-height: 40px;
  padding: 8px 9px;
  color: #263b3f;
  background: #fff;
  border: 1px solid #cbdadd;
  border-radius: 7px;
}

.review-filter-actions {
  margin-bottom: 16px;
}

.review-filter-actions .secondary {
  color: #465a5e;
  background: #e6edef;
}

.review-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 11px;
  margin: 13px 0;
}

.review-stat-card {
  padding: 13px;
  text-align: center;
  background: #f4fafb;
  border: 1px solid #d9e9eb;
  border-radius: 10px;
}

.review-stat-value {
  display: block;
  color: #007c91;
  font-size: 1.65rem;
  font-weight: 850;
}

.review-stat-label {
  color: #627578;
  font-size: 0.8rem;
  font-weight: 700;
}

.review-question-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 11px;
  margin-bottom: 15px;
}

.review-summary-card {
  padding: 12px;
  background: #fbfdfd;
  border: 1px solid #e0e9ea;
  border-radius: 9px;
}

.review-summary-card strong {
  display: block;
  margin-bottom: 7px;
  color: #005f70;
}

.review-summary-values {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.review-summary-values span {
  padding: 4px 7px;
  color: #40575b;
  font-size: 0.76rem;
  font-weight: 700;
  background: #edf4f5;
  border-radius: 6px;
}

.review-table-wrap {
  max-height: 58vh;
  overflow: auto;
  border: 1px solid #dce7e9;
  border-radius: 9px;
}

.review-table {
  width: 100%;
  min-width: 1420px;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.review-table th,
.review-table td {
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #e3ebec;
}

.review-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #fff;
  background: #007c91;
}

.review-table tbody tr:nth-child(even) {
  background: #f7fbfb;
}

.review-table tbody tr.review-row-archived {
  color: #657478;
  background: #f0f2f3;
}

.review-archived-badge {
  display: block;
  width: max-content;
  margin-top: 6px;
  padding: 3px 6px;
  color: #5d6870;
  font-size: 0.72rem;
  font-weight: 800;
  background: #e3e7e9;
  border-radius: 6px;
}

.review-row-actions {
  display: flex;
  min-width: 175px;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.review-row-action {
  margin: 0;
  padding: 6px 8px;
  font-size: 0.75rem;
  line-height: 1.25;
  white-space: nowrap;
}

.review-row-action.archive {
  background: #7b6b4b;
}

.review-row-action.restore {
  background: #267c5a;
}

.review-row-action.delete {
  background: #b73b32;
}

.review-table-empty {
  padding: 26px !important;
  color: #6d7c7f;
  text-align: center !important;
}

/* Bewertungs-Popup */
.customer-review-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(20, 39, 43, 0.58);
}

.customer-review-popup {
  width: min(620px, 96vw);
  max-height: 92vh;
  overflow-y: auto;
  padding: 20px;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.3);
}

.customer-review-popup h3 {
  margin-top: 0;
}

.review-popup-customer {
  margin-bottom: 13px;
  padding: 11px 13px;
  background: #eef8f9;
  border-left: 5px solid #00a9bd;
  border-radius: 8px;
}

.review-popup-questions {
  margin: 12px 0;
  padding: 11px 13px 11px 30px;
  color: #41565a;
  font-size: 0.88rem;
  line-height: 1.45;
  background: #fafcfc;
  border: 1px solid #e1e9ea;
  border-radius: 8px;
}

.review-popup-questions li {
  margin: 4px 0;
}

.review-popup-message-label {
  display: block;
  margin: 12px 0 6px;
  color: #31474b;
  font-weight: 800;
}

.review-popup-message {
  width: 100%;
  min-height: 190px;
  resize: vertical;
  padding: 10px;
  border: 1px solid #cbdadd;
  border-radius: 8px;
}

.review-popup-link {
  padding: 8px 10px;
  overflow-wrap: anywhere;
  color: #476166;
  font-size: 0.75rem;
  background: #f4f7f8;
  border-radius: 7px;
}

.review-popup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.review-popup-actions .wa-send {
  background: #20aa5a;
}

.review-popup-actions .copy-link {
  background: #377eb8;
}

.review-popup-actions .close-review {
  margin-left: auto;
  background: #748286;
}

.review-popup-loading,
.review-popup-error {
  padding: 25px 12px;
  text-align: center;
}

.review-popup-error {
  color: #a43127;
}

.review-template-help {
  margin: 8px 0;
  padding: 9px 11px;
  color: #486065;
  font-size: 0.82rem;
  line-height: 1.45;
  background: #edf7f8;
  border-radius: 8px;
}

.review-template-textarea {
  width: 100%;
  min-height: 330px;
  resize: vertical;
  padding: 11px;
  border: 1px solid #c7d9dc;
  border-radius: 8px;
}

#reviewBatchCtrl {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 12000;
  width: min(430px, calc(100vw - 32px));
  padding: 13px 14px;
  color: #fff;
  background: #007c91;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.review-batch-title {
  font-weight: 850;
}

.review-batch-next-customer {
  margin: 5px 0 10px;
  color: #e9fbfd;
  font-size: 0.88rem;
}

.review-batch-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.review-batch-progress {
  margin-right: auto;
  font-weight: 800;
}

#reviewBatchNext {
  color: #075f2c;
  font-weight: 850;
  background: #fff;
}

#reviewBatchStop {
  background: #5d7478;
}

@media (max-width: 900px) {
  .review-appointment-columns,
  .review-filter-grid,
  .review-question-summary {
    grid-template-columns: 1fr;
  }

  .review-stats {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .review-admin-head,
  .review-evaluation-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .review-nav-spacer {
    display: none;
  }

  .review-appointment-list {
    min-height: 220px;
    max-height: 48vh;
  }
}

@media (max-width: 520px) {
  .review-stats {
    grid-template-columns: 1fr 1fr;
  }

  .customer-review-popup-overlay {
    padding: 7px;
  }

  .customer-review-popup {
    padding: 14px;
    border-radius: 11px;
  }

  .review-popup-actions button {
    width: 100%;
  }

  .review-popup-actions .close-review {
    margin-left: 0;
  }

  .review-date-navigation > button,
  .review-date-navigation label,
  .review-date-navigation input {
    width: 100%;
  }

  .review-batch-actions {
    flex-wrap: wrap;
  }

  .review-batch-progress {
    width: 100%;
  }
}
