@import url('https://fonts.googleapis.com/css2?family=Squada+One&display=swap');


/* =================================
   1. Grundlagen & Globale Regeln
   ================================= */
* {
    box-sizing: border-box;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f9;
    margin: 0;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

h1, h2, h3 {
    color: #2c3e50;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
    margin-top: 20px;
    margin-bottom: 20px;
font-size: 18px;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

hr {
    border: none;
    border-top: 1px solid #e9ecef;
    margin: 30px 0;
}

/* =================================
   2. Header & Desktop-Menü
   ================================= */
.main-header {
    background-color: #ffffff;
    padding: 0 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 1010;
}

.logo-container .logo-link {
    font-weight: bold;
    font-size: 22px;
    text-decoration: none;
    color: #393185;
  font-family: 'Squada One', sans-serif;
  font-weight: 400;
  font-style: normal;
}
.logo-container .logo-link span {
color: #EF7F1A;
}
.logo-container .logo-link:hover {
    text-decoration: none;
}

.main-header .main-menu {
    display: flex;
}

.main-menu > ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    height: 100%;
}

.main-menu li {
    display: flex;
    align-items: center;
}

.dropdown {
    position: relative;
}

.main-menu li > a {
    display: flex;
    align-items: center;
    padding: 0 15px;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    height: 100%;
    transition: background-color 0.2s ease;
}

.main-menu li > a:hover,
.main-menu li:hover > a {
    color: #000;
    text-decoration: none;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    min-width: 250px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 1011;
    border-radius: 0 0 5px 5px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content li {
    width: 100%;
    height: auto;
}

.dropdown-content li a {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f1f1;
    display: block;
    width: 100%;
}

.dropdown-content li:last-child a {
    border-bottom: none;
}

.user-menu {
    margin-left: auto;
}

.user-menu .dropdown-content {
    left: auto;
    right: 0;
}

.admin-link a {
    color: #dc3545 !important;
}

/* =================================
   3. Mobiles Menü (Hamburger) & Overlay
   ================================= */
#hamburger-menu {
    display: none;
    cursor: pointer;
    z-index: 1030;
}

#hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background-color: #333;
    transition: all 0.3s ease-in-out;
}

.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1019; /* Unter dem Menü */
}

.nav-overlay.visible {
    display: block;
}


/* =================================
   4. Allgemeine & Spezifische Komponenten
   ================================= */
.button, button, input[type="submit"] {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-size: 12px;
    text-align: center;
    line-height: 1.5;
}
.button:hover {
    text-decoration: none;
}

.button-accept {
    background-color: #393185;
    color: white;
}
.button-accept:hover {
    background-color: #5C539D;
}

.button-secondary {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
}
.button-secondary:hover {
    background-color: rgba(0, 0, 0, 1);
}

.button-help {
    background-color: rgba(0, 0, 0, 0.1);
    color: #555;
}
.button-help:hover {
    background-color: rgba(0, 0, 0, 0.2);
}

.profile-form fieldset {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
}
.profile-form legend {
    font-weight: bold;
    padding: 0 10px;
    color: #2c3e50;
}
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}
.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="url"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group input[type="password" i],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}
.form-group input:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
}

.success-message {
    padding: 15px;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
}
.error-summary {
    padding: 15px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

.table-wrapper { overflow-x: auto; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 14px;
}
.admin-table th, .admin-table td {
    padding: 12px 15px;
    text-align: left;
}
.admin-table th { background-color: #f2f2f2; font-weight: bold; }
.admin-table tbody tr:nth-child(even) { background-color: #f9f9f9; }
.admin-table tbody tr:hover { background-color: #f1f1f1; }


.admin-table td[data-label="Aktionen"] {
    display: flex
;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.job-card {
    border: 1px solid #ddd;
    border-left: 5px solid #007bff;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    background-color: #fdfdfd;
}
.job-card.angenommen { border-left-color: #28a745; }
.job-card.erledigt { border-left-color: #6c757d; background-color: #f8f9fa; }
.job-card.storniert, .job-card.stornierung_beantragt { border-left-color: #dc3545; text-decoration: line-through; opacity: 0.7; }
.job-card h4 { margin-top: 0; }
a.job-card-link { text-decoration: none; color: inherit; display: block; }
a.job-card-link:hover .job-card { box-shadow: 0 4px 10px rgba(0,0,0,0.1); }

.modal-backdrop {
    display: none; position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1020;
}
.modal {
    display: none; position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: white; padding: 30px; border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 1021; width: 90%; max-width: 500px;
font-size: 14px;
}
.modal-content h2 { margin-top: 0; color: #c0392b; }
.modal-content p { line-height: 1.6; }
.modal-actions { margin-top: 20px; display: flex; justify-content: flex-end; gap: 15px; }

.chart-container {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 1; 
    margin-top: 15px;
}

.filter-fieldset {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}
.filter-fieldset .form-group { flex: 1; min-width: 200px; margin-bottom: 0; }
.filter-fieldset .filter-buttons { display: flex; gap: 10px; }


/* =================================
   6. Responsive Design
   ================================= */
@media (max-width: 992px) {
    .main-header .main-menu {
        display: none;
    }
    #hamburger-menu { 
        display: block; 
    }
    nav.main-menu {
        display: block;
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        max-width: 80%;
        height: 100%;
        background-color: #ffffff;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        z-index: 1020;
        transition: right 0.3s ease-in-out;
        padding-top: 20px;
        overflow-y: auto;
    }
    .main-menu.nav-active {
        right: 0;
    }
    .main-menu ul { flex-direction: column; height: auto; }
    .main-menu li { width: 100%; flex-wrap: wrap; }
    .main-menu li > a {
        height: auto;
        padding: 15px 20px;
        border-bottom: 1px solid #f1f1f1;
        justify-content: space-between;
    }
    .dropdown:hover .dropdown-content { display: none; }
    .dropdown > a::after { content: '▾'; font-size: 14px; }
    
    .dropdown-content {
        position: static;
        display: block;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        background-color: #f8f9fa;
        box-shadow: none;
        width: 100%;
    }
    .dropdown.dropdown-active > .dropdown-content {
        max-height: 100%;
    }
    .dropdown-content li a {
        padding-left: 35px;
    }
    .user-menu { margin-left: 0; }
}

@media (max-width: 768px) {
  .container {
    margin: 10px;
    padding: 15px;
  }

  /* Tabelle bleibt Tabelle, nur horizontal scrollen */
  .table-wrapper {
    overflow-x: auto;
    /* optional: scrollbar immer sichtbar machen */
    -webkit-overflow-scrolling: touch;
  }

  /* Falls du sonst noch Filter-Feldsets umstellen willst */
  .filter-fieldset {
    flex-direction: column;
    align-items: stretch;
  }

  /* Alles andere, was du wirklich mobil brauchst, hier hin */
}


/* ====== Mobile Overlay Menü anpassen ====== */
.nav-overlay {
    display: none; /* Ausgangszustand */
}
.nav-overlay.visible {
    display: block; /* Overlay einblenden */
}

/* Seitenleiste innerhalb des Overlays */
.nav-overlay .mobile-nav-content {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    max-width: 80%;
    height: 100%;
    background: #ffffff;
    padding: 20px;
    box-shadow: 2px 0 12px rgba(0,0,0,0.2);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
}

/* Wenn das Overlay sichtbar ist, Slide-in aktivieren */
.nav-overlay.visible .mobile-nav-content {
    transform: translateX(0);
}

/* Liste und Links aufräumen */
.mobile-nav-content ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.mobile-nav-content li {
    margin-bottom: 12px;
}
.mobile-nav-content a {
    display: block;
    padding: 8px 0;
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}
.mobile-nav-content a:hover {
    color: #0056b3;
}

@media (max-width: 992px) {
  /* Desktop-Menü ausblenden, Hamburger zeigen */
  .main-header .main-menu-desktop { display: none; }
  #hamburger-menu { display: block; cursor: pointer; }

  /* Vollbild-Overlay */
  .nav-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    z-index: 2000;
  }
  .nav-overlay.visible {
    display: block;
  }

  /* Sidebar */
  .nav-overlay .mobile-nav-content {
    position: fixed;
    top: 0; left: 0;
    width: 280px; max-width: 80%;
    height: 100%;
    background: #fff;
    padding: 20px;
    box-shadow: 2px 0 12px rgba(0,0,0,0.2);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
  }
  .nav-overlay.visible .mobile-nav-content {
    transform: translateX(0);
  }

  /* Liste aufräumen */
  .mobile-nav-content ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .mobile-nav-content li {
    margin-bottom: 12px;
  }
  .mobile-nav-content a {
    display: block;
    padding: 8px 0;
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
  }
  .mobile-nav-content a:hover {
    color: #0056b3;
  }

  /* Dropdown-Inhalte initial verstecken */
  .mobile-nav-content .dropdown-content {
    display: none;
    padding-left: 15px;
  }
  /* Wenn aktiv, einblenden */
  .mobile-nav-content .dropdown-active > .dropdown-content {
    display: block;
  }
}

/* ===== Feinjustierung Mobile Dropdown ===== */

/* 1) Entferne den extra Pfeil aus dem CSS, falls du in deinem HTML schon einen ► hast */
/* Wenn du den Pfeil lieber per CSS anzeigen lassen willst, entferne ihn im HTML */
.mobile-nav-content .dropdown > a::after {
  content: none !important;
}

/* 2) Mach das Untermenü komplett transparent und bündig */
.mobile-nav-content .dropdown-content {
  background: transparent !important;
  padding-left: 0 !important;
  box-shadow: none !important;
}

/* 3) Entferne den linken Einzug bei den Link-Elementen im Untermenü */
.mobile-nav-content .dropdown-content li a {
  padding-left: 0 !important;
}

/* Mobile-Menü: Links in derselben Farbe und Hover-Effekt wie im Desktop-Header */
.mobile-nav-content a {
  color: #555 !important;               /* gleiche Link-Farbe wie .main-menu li > a */
  text-decoration: none !important;
  font-weight: 500;
}
.mobile-nav-content a:hover {
  background-color: #f8f9fa !important; /* gleicher Hover-Hintergrund */
  color: #000 !important;               /* gleiche Hover-Text-Farbe */
}

/* ===== Spezifische Link-Farben im mobilen Menü ===== */

/* 1) „Auftrag erstellen“ wieder blau und fett */
.mobile-nav-content a[href*="auftrag_erstellen.php"] {
  color: #007bff !important;
  font-weight: bold !important;
}

/* 2) Admin-Links (Storno-Anträge, -Historie, Benutzer) wieder rot */
.mobile-nav-content .admin-link a {
  color: #dc3545 !important;
}

/* 3) Optional: Preisliste-Link weiter in Standard-Grau (oder passe an) */
.mobile-nav-content a[href*="preisliste.php"] {
  color: #555 !important;
}

/* =================================
   Tags für Einsatzgebiete
   ================================= */
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tags-container .tag {
  display: inline-flex;
  align-items: center;
  background-color: #e9ecef;
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 14px;
}

.tags-container .tag .tag-label {
  margin-right: 6px;
  color: #495057;
}

.tags-container .tag-close-btn {
  background: transparent;
  border: none;
  font-size: 16px;
  line-height: 1;
  color: #6c757d;
  cursor: pointer;
  padding: 0;
}

.tags-container .tag-close-btn:hover {
  color: #dc3545;
}

#tag-input-field {
  flex: 1;
  min-width: 80px;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 8px;
  font-size: 14px;
}

#tag-input-field:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.chart-container {
    position: relative;
    width: 100%;
    /* Seitenverhältnis 3:1 (Breite zu Höhe) macht das Chart flacher. */
    aspect-ratio: 3 / 1; 
    margin-top: 15px;
}

/* Ergänzung im Bereich "Allgemeine Komponenten" */
.button-delete {
    background-color: #dc3545;
    color: white;
}
.button-delete:hover {
    background-color: #c82333;
}

.button-warning {
    background-color: #ffc107;
    color: black;
}
.button-warning:hover {
    background-color: #e0a800;
}

/* Anpassung für Aktionen-Spalte, damit Buttons nebeneinander passen */
[data-label="Aktionen"] .button {
    margin-top: 5px;
    display: inline-block;
    width: auto;
}

/* =================================
   Button-Anpassungen
   ================================= */
.action-button {
    padding: 5px 10px;
    font-size: 12px;
    margin-top: 5px; /* Sorgt für Abstand auf Mobilgeräten */
}
.button-warning {
    background-color: #ffc107;
    color: white; /* Schriftfarbe auf Weiß geändert */
}
.button-warning:hover {
    background-color: #e0a800;
}

/* =================================
   Login-Seite
   ================================= */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 10px;
}
.login-box {
    background: #ffffff;
    padding: 30px 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 420px;
}
.login-box h1 {
    text-align: center;
    border-bottom: none;
    margin-top: 0;
    margin-bottom: 30px;
}
.register-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

/* =================================
   Paginierung
   ================================= */
.pagination {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cent-box {
text-align: center;
padding: 0 0 20px 0;
}

/* ==============================
   Responsive Sterne-Bewertung
   ============================== */

.rating {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.25em;          /* Abstand zwischen den Sternen */
  font-size: 2rem;      /* Basisgröße, skaliert mit viewport */
  line-height: 0.2;       /* verhindert Überlauf in Textzeile */
  margin: 1em 0;      /* Abstand nach oben/unten */
}

.rating > input {
  display: none;        /* Radios ausblenden */
}

.rating > label {
  position: relative;
  width: 1.2em;         /* Breite pro Stern */
  cursor: pointer;
  color: #ccc;          /* Grundfarbe ausgegraut */
  transition: color 0.2s ease;
}

/* Stern als Content */
.rating > label::before {
  content: "★";
  position: absolute;
  top: 0; left: 0;
  right: 0; bottom: 0;
  font-size: inherit;
  line-height: inherit;
  opacity: 0.4;
}

/* Hover- und Checked-Effekte */
.rating > label:hover::before,
.rating > label:hover ~ label::before,
.rating > input:checked ~ label::before {
  color: #f5b301;       /* goldener Stern */
  opacity: 1;
}

/* Mobile kleinere Sterne */
@media (max-width: 600px) {
  .rating {
    font-size: 1.5rem;
    gap: 0.2em;
  }
}

/* Extra: Tastatur-Fokus sichtbar machen */
.rating > input:focus + label::before {
  outline: 2px solid #f5b301;
  outline-offset: 2px;
}

#terms-backdrop {
      position: fixed;
      top: 0; left: 0;
      width: 100vw; height: 100vh;
      background: rgba(0,0,0,0.7);
      z-index: 9998;
    }

    /* --- Modal Window --- */
    #terms-modal {
      position: fixed;
      top: 50%; left: 50%;
      transform: translate(-50%, -50%);
      width: 90vw; max-width: 800px;
      height: 80vh; max-height: 600px;
      background: #fff;
      border-radius: 10px;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      box-shadow: 0 2px 10px rgba(0,0,0,0.3);
      z-index: 9999;
    }

    /* Scrollbarer Container für die AGB */
    #terms-modal .iframe-container {
      flex: 1;
      overflow: hidden; /* iframe übernimmt Größe */
    }

    #terms-modal iframe {
      width: 100%; height: 100%;
      border: none;
      border-radius: inherit;
    }

    /* Footer-Bereich mit Button */
    #terms-modal .terms-footer {
      padding: 1em;
      text-align: right;
      background: #f9f9f9;
    }

    /* Auf kleineren Screens etwas mehr Höhe */
    @media (max-width: 600px) {
      #terms-modal {
        width: 95vw;
        height: 90vh;
      }
    }

.mobile-nav-content a[href*="rechnung_erstellen.php"] {
    color: #007bff !important;
    font-weight: bold !important;
}

/* Buttons nebeneinander mit Abstand */
.button-group {
  display: inline-flex;      /* inline, damit es sich an den Textfluss anpasst */
  gap: 10px;                 /* horizontaler Abstand zwischen den Buttons */
  flex-wrap: wrap;           /* bei sehr kleinen Breiten umbrechen */
  margin-top: 10px;          /* Abstand nach oben zum vorherigen <p> */
}

.button-group .button {
  white-space: nowrap;       /* Verhindert Zeilenumbruch im Buttontext */
}

/* Banner ganz oben in Auftrags-Details */
.info-banner {
  padding: 12px 16px;
  background-color: #e7f5ff;
  border: 1px solid #91d5ff;
  border-radius: 5px;
margin-top: 20px;
  margin-bottom: 20px;
  font-size: 14px;
  color: #0050b3;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Timer im Banner */
.info-banner .timer {
  font-weight: bold;
}











/* Entferne ggf. das alte .status-label/.status-value-Styles */

/* Gesamt-Container */
.status-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

/* Einzelne Pill */
.status-card {
  display: inline-flex;
  align-items: center;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 8px 12px;
  transition: background-color .2s;
}
.status-card:hover {
}

/* Rundes Icon links */
.status-icon {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 12px;
  flex-shrink: 0;
}

/* Text in einer Zeile, normale Schreibweise */
.status-text {
  font-size: 12px;
  color: #111827;
  white-space: nowrap;
}

/* Link nur auf der Zahl */
.status-text a {
  color: inherit;
  text-decoration: none;
}

@media (max-width: 600px) {
  .status-cards {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .status-card {
    flex: 1 1 calc(33.333% - 10px); /* 2 Cards à ~50% minus Gap */
    width: auto;
  }
}







.status-card {
  display: inline-flex;
  align-items: center;
  /* … deine anderen Styles … */
}

.status-dot {
  display: inline-block;
  width: 10px;            /* Durchmesser des Punktes */
  height: 10px;
  border-radius: 50%;     /* rund */
  background-color: #28a745; /* Grün – passe die Farbe inline oder per Klasse an */
  margin-right: 8px;      /* Abstand zum Text */
  flex-shrink: 0;         /* schrumpft nicht */
  vertical-align: middle;
}

















.status-card.pulse-bg {
  /* 1) Basis-Shadow, damit das Element ÜBER dem Rippel liegt */
  position: relative;
  z-index: 1;
  animation: pulse-shadow 2s ease-out infinite;
background: #EF7F1A;
border: 1px solid #EF7F1A;
min-width: 160px;
}

.status-card.pulse-bg a {
  position: absolute;
  inset: 0;              /* top:0; right:0; bottom:0; left:0; */
  display: flex;         /* um den Text vertikal/horizontal zu zentrieren */
  align-items: center;
  justify-content: center;
  text-decoration: none; /* Unterstreichung weg */
  color: #fff !important;/* bleibt wie gehabt */
  font-weight: bold;     /* bleibt wie gehabt */
  cursor: pointer;       /* Hand-Cursor */
  /* kein Padding/Margin hier, die Kachel behält ihr Padding */
padding: 8px 12px;
}

@keyframes pulse-shadow {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 127, 26, 1);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(239, 127, 26, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 127, 26, 0);
  }
}


@media (max-width: 600px) {
.status-card.pulse-bg {height: 33px;}
.status-card.pulse-bg a {padding: 8px 12px;}
}















.chart-footer {
  text-align: center;
  color: #6B7280;
  font-size: 0.85rem;
margin-top: 0;
}

.chart-container {
  position: relative;
  width: 100%;
  /* Standard-Höhe Desktop: Seitenverhältnis 3:1 */
  aspect-ratio: 4 / 1;
  margin-top: 15px;
}

/* Mobil etwas flacher: 2:1 */
@media (max-width: 600px) {
  .chart-container {
    aspect-ratio: 3 / 1;
  }
}

/* Canvas füllt den Container voll aus */
.chart-container canvas {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
}














/* — Eine Status-Card für das Dropdown — */
.period-card {
  padding: 0;       /* enger als normale Cards */
  min-width: 140px;
border: none;
margin-top: 10px;
margin-bottom: -10px;
}

/* Das Select wie eine Pill-Card stylen */
.period-card select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  font-size: 12px;
  font-weight: 500;
  color: #333;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 8px 28px 8px 12px;
  cursor: pointer;
  background-image: url('data:image/svg+xml;utf8,\
    <svg xmlns="http://www.w3.org/2000/svg" width="10" height="6">\
      <path fill="%23666" d="M0 0l5 6 5-6z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
}

/* Hover- und Focus-Effekt */
.period-card select:hover,
.period-card select:focus {
  border-color: #bbb;
  outline: none;
}

/* 3. Focus- und Hover-Effekt auf das Select selbst */
.period-card select:hover {
  border-color: #9ca3af;  /* etwas dunkleres Grau */
}

/* 4. Option-Styling (funktioniert nur in einigen Browsern) */
.period-card select option {
  background-color: #fff;
  color: #1f2937;
  padding: 4px 8px;
  font-size: 12px;
}
/* in Firefox kann man das aktivierte Element etwas hervorheben */
.period-card select option:checked {
  background-color: #e5e7eb;
  color: #111827;
}






/* Gesamt-Container für das Fälligkeit-Feld */
.faelligkeit-group {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

/* Radios nebeneinander */
.faelligkeit-options {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

/* Datum & Uhrzeit inline, mit flex-wrap für Mobile */
.faelligkeit-datetime {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.faelligkeit-datetime {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.faelligkeit-datetime input[type="date"],
.faelligkeit-datetime input[type="time"] {
  /* Höhe anpassen */
  height: 37.14px;
  line-height: 37.14px;

  /* Innenabstand & Schrift */
  padding: 0 0.75rem;
  font-size: 12px;

  /* Rahmen & Rundungen */
  border: 1px solid #ccc;
  border-radius: 4px;

  /* Hintergrund & Box-Sizing */
  background: #fff;
  box-sizing: border-box;

  /* nebeneinander */
  display: inline-block;
  vertical-align: middle;
}

/* Datum auf exakt 120px */
.faelligkeit-datetime input[type="date"] {
  width: 122px;
  max-width: 100%;  /* nie größer als Container */
}

/* Uhrzeit auf exakt 60px */
.faelligkeit-datetime input[type="time"] {
  width: 90px;
  max-width: 100%;
}
















.admin-table td[data-label="Aktionen"] {
  display: flex;
  flex-direction: column;
  align-items: flex-end; /* Linksbündig */
  gap: 0.5rem;             /* Abstand zwischen den Buttons */
}

/* 2) Buttons nur so breit wie ihr Inhalt */
.admin-table td[data-label="Aktionen"] .action-button,
.admin-table td[data-label="Aktionen"] .button {
  display: inline-block !important;
  width: auto !important;
}


.examples {
  display: flex;
  flex-wrap: wrap;       /* Zeilenumbruch bei zu schmalen Containern */
  gap: 0.5em;            /* gleichmäßiger Abstand rundherum */
  margin-bottom: 0.5em;
  font-weight: normal;
  color: #333;           /* etwas helleres Schwarz */
}

.examples .example-btn {
  flex: 0  auto;         /* nur so breit wie der Inhalt */
  padding: 0.4em 0.8em;
  font-weight: normal;
  background-color: #f4f4f4;
  color: #666;           /* etwas helleres Grau für den Text */
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.examples .example-btn:hover {
  background-color: #e2e2e2;
}











/* =================================
   Tabelle overflow und fixe Zellen
   ================================= */
.table-wrapper {
  overflow-x: auto;            /* horizontal scroll immer erlauben */
  -webkit-overflow-scrolling: touch;
}

.admin-table {
  display: table;              /* klassische Tabellen-Darstellung */
  width: max-content;          /* so breit wie nötig, nicht 100% */
  min-width: 100%;             /* aber mindestens so breit wie der Container */
  table-layout: auto;          /* Zellen passen ihre Breite dem Inhalt an */
}

.admin-table th,
.admin-table td {
  white-space: nowrap;         /* niemals umbrechen */
  padding: 12px 15px;          /* bereits vorhanden, hier zur Vollständigkeit */
}




















/* Standard: dropdown öffnet nach unten */
.dropdown-menu {
  top: 100%;
  bottom: auto;
}

/* Sobald .dropup auf das .dropdown kommt, öffnet es nach oben */
.dropdown.dropup .dropdown-menu {
  top: auto;
  bottom: 100%;
}
/* Dropdown öffnen, wenn .open auf .dropdown sitzt */
.dropdown.open .dropdown-menu {
  display: block;
}

/* Dropup bleibt bestehen */
.dropdown.dropup .dropdown-menu {
  top: auto;
  bottom: 100%;
}







 /* Styling exakt wie in auftraege.php */
    .filter-toolbar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:0; }
    .filter-toolbar button, .filter-toolbar select, .filter-toolbar input, .filter-toolbar .button-secondary {
      font-size:12px!important; height:30px; line-height:30px; font-size:14px; border-radius:6px; box-sizing:border-box;
    }
    .filter-toolbar .button-secondary, #filter-go {
      background:#fff; border:1px solid #d1d5da; color:#24292e; padding:0 10px; display:inline-flex;
      align-items:center; gap:6px; cursor:pointer; box-shadow:inset 0 -1px 0 rgba(27,31,35,0.15);
    }
    #filter-go { background:#393185; border-color:#393185; color:#fff; }
    #filter-go:hover { background:#5C539D; }
    #status, #search {
      border:1px solid #d1d5da; background:#fff; padding:0 12px;
      box-shadow:inset 0 -1px 0 rgba(27,31,35,0.15);
    }
    #filter-reset {
      font-size:12px!important; background:#fff; border:1px solid #d1d5da; color:#24292e;
      padding:0 10px; display:inline-flex; align-items:center; height:30px; border-radius:6px;
      cursor:pointer;
    }
    .daterangepicker{ z-index:9999!important; }
    .table-wrapper{ overflow-x:auto; }
    .admin-table th, .admin-table td{ text-align:left; }
/* 1) Zelle als Column-Flex, damit Kinder (Buttons) untereinander stehen */


/* 2) Buttons nur so breit wie ihr Inhalt */
.admin-table td[data-label="Aktionen"] .action-button,
.admin-table td[data-label="Aktionen"] .button {
  display: inline-block !important;
  width: auto !important;
}

    .pagination{ margin:1em 0; text-align:center; }
    .pagination .page-link, .pagination .current-page{ margin:0 5px; text-decoration:none; }
    .current-page{ font-weight:bold; }
/* Zelle perfekt zentrieren */
.actions-cell {
  position: relative;
  text-align: center;
}

/* Drei-Punkte-Button */
.dropdown-toggle {
  background: none;
  border: none;
  font-size: 1.2em;
  cursor: pointer;
  padding: 0 0.5em;
}

/* Menü ausblenden */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border: 1px solid #ccc;
  list-style: none;
  margin: 0.2em 0 0;
  padding: 0.2em 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  z-index: 1000;
}
.dropdown-menu li {
  white-space: nowrap;
}
.dropdown-menu li a {
  display: block;
  padding: 0.5em 1em;
  text-decoration: none;
  color: #333;
}
.dropdown-menu li a:hover {
  background: #f5f5f5;
}
.table-wrapper {
  overflow-x: auto;
  overflow-y: visible; /* zusätzlich erlauben, dass das Dropdown nach unten sichtbar bleibt */
}

/* Falls das nicht reicht, darf auch die td selbst overflow sichtbar sein: */
.actions-cell {
  overflow: visible;
}
  .dropdown {
    position: relative;
  }
  .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    list-style: none;
    margin: 0.2em 0 0;
    padding: 0.2em 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    z-index: 1000;
  }
  .dropdown.open .dropdown-menu {
    display: block;
  }
  /* Mit .dropup öffnet es nach oben */
  .dropdown.dropup .dropdown-menu {
    top: auto;
    bottom: 100%;
    margin: 0 0 0.2em;
  }
/* dropdown-menu immer fixed im Viewport */
.dropdown-menu {
  position: fixed !important;
  display: none;
  margin: 0;
  padding: 0.2em 0;
  list-style: none;
  background: #fff;
  border: 1px solid #ccc;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  z-index: 2000;
}
/* dropup braucht hier nichts mehr */
/* Eigene Firma/Name farblich hervorheben */
td.self {
  font-weight: bold;
  color: #EF7F1A; /* oder jede beliebige Farbe */
}












    .filter-toolbar { display:flex; align-items:center; gap:10px; margin-bottom:0px; flex-wrap:wrap; }
    .filter-toolbar button,
    .filter-toolbar select,
    .filter-toolbar input,
    .filter-toolbar .button-secondary {font-size: 12px !important;
      height: 30px; line-height:30px; font-size:14px; border-radius:6px; box-sizing:border-box;
    }
    .filter-toolbar .button-secondary,
    #filter-go {
      background:#fff; border:1px solid #d1d5da; color:#24292e; padding:0 10px;
      display:inline-flex; align-items:center; gap:6px; cursor:pointer;
      box-shadow:inset 0 -1px 0 rgba(27,31,35,0.15);
    }
    .filter-toolbar .button-secondary,
    #filter-go:hover { background:#fff; }
#filter-go:hover { background:#f6f8fa; }
    #filter-go { background:#393185; border-color:#393185; color:#fff; }
    #filter-go:hover { background:#5C539D; }
    #status, #search {
      border:1px solid #d1d5da; background:#fff; padding:0 12px;
      box-shadow:inset 0 -1px 0 rgba(27,31,35,0.15); cursor:text;
    }
    #status {cursor:pointer;}
    #status:hover {background:#f6f8fa;}
    #status { appearance:none; -webkit-appearance:none; padding:0 16px; }
    #search { flex:1; max-width:250px; }
    #search:focus { outline:none; box-shadow:0 0 0 3px rgba(3,102,214,0.3); }
    .daterangepicker{z-index:9999!important;}
    .table-wrapper{overflow-x:auto;}
    .admin-table th,.admin-table td{text-align:left;}
    .pagination{margin:1em 0;text-align:center;}
    .pagination .page-link,.pagination .current-page{margin:0 5px;text-decoration:none;}
    .current-page{font-weight:bold;}
    /* Reset-Button */
    #filter-reset {
      font-size:12px!important;
      background:#fff; border:1px solid #d1d5da; color:#24292e;
      padding:0 10px; display:inline-flex; align-items:center; height:30px;
      font-size:14px; border-radius:6px; cursor:pointer;
    }
    #filter-reset:hover { background:#f6f8fa; text-decoration:none; }






/* --- Cookie-Banner --- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #fff;
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
  padding: 15px 20px;
  z-index: 99999;
  display: flex;
  justify-content: center;
  transition: transform 0.3s ease-in-out;
}

.cookie-banner.hidden {
  transform: translateY(100%);
}

.cookie-content {
  max-width: 1100px;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  color: var(--text-color-dark);
  gap: 10px;
}

.cookie-content p {
  margin: 0;
  flex: 1 1 70%;
}

.cookie-content a {
  color: var(--primary-color);
  text-decoration: underline;
}

.cookie-content button {
  background-color: #393185;
  color: white;
  border: none;
  padding: 5px 10px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.2s;
  flex-shrink: 0;
}

.cookie-content button:hover {
  background-color: #393185;
}

@media (max-width: 600px) {
.cookie-banner {text-align: center;}
.cookie-content {font-size: 12px;}
.cookie-content button {margin: auto; font-size: 12px;}
}







/* Installations-Button */
.install-button {
  position: fixed; /* Fixiere den Button an einer festen Position */
  top: -60px; /* Button startet außerhalb des Bildschirms (oberhalb) */
  left: 50%;
  transform: translateX(-50%); /* Zentriere den Button horizontal */
  padding: 15px 30px;
  background-color: #4CAF50; /* Grüner Hintergrund */
  color: white;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: top 0.5s ease-in-out; /* Animation beim Einfahren */
  z-index: 1000; /* Sicherstellen, dass der Button über anderen Elementen liegt */
}

/* Wenn der Button sichtbar wird, fährt er von oben ein */
.install-button.show {
  top: 20px; /* Zeige den Button 20px unterhalb des oberen Randes */
}
