/* css/style.css - FINAL MERGE */

/* --- VARIABLEN & GRUNDLAGEN (Dein Original) --- */
:root {
    --primary-dark: #000000;
    --secondary-dark: #000000;
    --panel-bg: #1a1a1a; /* Für Dashboard */
    --text-light: #ffffff;
    --text-muted: #cccccc;
    --accent-color: #e60023;
    --accent-hover: #ff3355;
    --border-color: #333333;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Roboto', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background-color: var(--primary-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

a { color: var(--text-light); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--accent-color); }

h1, h2, h3 { font-family: var(--font-heading); color: var(--text-light); margin-bottom: 20px; text-align: center; }
h1 { font-size: 3.5em; letter-spacing: 1px; }
h2 { font-size: 2.5em; margin-bottom: 40px; }
h3 { font-size: 1.8em; }

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--text-light);
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: 700;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}
.btn:hover { background-color: var(--accent-hover); transform: translateY(-2px); }

/* --- HEADER & NAVIGATION --- */
header {
    background-color: var(--primary-dark);
    padding: 15px 5%;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    height: 70px;
}

.header-left-spacer { flex-grow: 1; } /* Spacer für Desktop Zentrierung */

.logo-link {
    position: absolute; left: 50%; transform: translateX(-50%);
    z-index: 1001; display: flex; justify-content: center; align-items: center; height: 100%;
}

.header-logo-text {
    font-family: var(--font-heading); font-size: 3.5em; font-weight: 700;
    background: linear-gradient(to bottom, #AA4444 0%, #800020 25%, #0066B3 75%, #4080B0 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
    text-shadow: 0px 0px 8px rgba(0, 0, 0, 0.7), 0px 2px 4px rgba(0, 0, 0, 0.5);
    white-space: nowrap; line-height: 1;
}
.header-logo-image { height: 50px; width: auto; } /* Falls Logo-Bild genutzt wird */

.header-right-group { display: flex; align-items: center; gap: 15px; margin-left: auto; z-index: 1002; }
.header-icons { display: flex; gap: 15px; }
.language-switcher-icon, .employee-login-icon { background: none; border: none; color: var(--text-light); font-size: 1.5em; cursor: pointer; padding: 5px; }
.language-switcher-icon:hover, .employee-login-icon:hover { color: var(--accent-color); }
.hamburger-menu { display: block; background: none; border: none; color: var(--text-light); font-size: 2em; cursor: pointer; padding: 5px; }

nav {
    width: 100%; position: absolute; top: 100%; left: 0;
    background-color: var(--primary-dark); border-top: 1px solid var(--border-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4); display: none; padding-bottom: 20px; z-index: 999;
}
nav.active { display: block; }

.nav-links { list-style: none; display: flex; flex-direction: column; width: 100%; margin-top: 0; padding-top: 15px; }
.nav-links li { text-align: center; margin-bottom: 15px; }
.nav-links li a { font-weight: 400; padding: 5px 0; display: block; position: relative; }
.nav-links li a:hover, .nav-links li a.active-nav-link { color: var(--accent-color); }
.nav-button a { background-color: var(--accent-color); padding: 10px 20px; border-radius: 5px; font-weight: 700; color: #fff !important; display: inline-block; }
.nav-button a:hover { background-color: var(--accent-hover); }

/* --- SECTIONS --- */
.content-section {
    padding: 80px 5%; 
    background-color: var(--secondary-dark); 
    /* WICHTIG: Display none ist Standard */
    display: none; 
    flex-direction: column; 
    align-items: center; 
    justify-content: space-between;
    min-height: calc(100vh - 70px); 
    text-align: center;
    /* Animation für sanften Wechsel */
    animation: fadeIn 0.5s ease-in-out;
}

/* WICHTIG: !important zwingt den Browser, das Element anzuzeigen */
.content-section.active { 
    display: flex !important; 
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.section-content-area { 
    flex-grow: 1; 
    width: 100%; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
}

/* Hero Section (Original Design) */
.hero-section {
    position: relative;
    height: 100vh; /* Volle Bildschirmhöhe */
    min-height: 600px; /* Mindesthöhe für Handys */
    /* display: flex;  <-- WICHTIG: Diese Zeile wurde entfernt, damit das Ausblenden funktioniert! */
    padding: 0;
    overflow: hidden;
    background-color: #000;
}

/* Spezielle Ausrichtung NUR wenn Hero aktiv ist */
.hero-section.active {
    justify-content: center !important; /* Zentriert den Inhalt vertikal */
}
.hero-image {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; opacity: 0.6; z-index: 1;
}
/* WICHTIG: Text muss über dem Bild liegen */
.hero-content {
    position: relative;
    z-index: 5; /* Höher als das Bild */
    max-width: 800px;
    padding: 20px;
    margin-top: 50px; /* <-- KORREKTUR: Positiv statt negativ, schiebt Text nach unten */
}
.contact-buttons-at-bottom {
    position: relative; z-index: 10; margin-top: auto; padding-bottom: 40px;
}
.hero-section .contact-buttons-at-bottom { display: block; } /* Im Hero anzeigen */

.appointment-links { display: flex; justify-content: center; gap: 20px; }
.appointment-link {
    display: flex; align-items: center; background-color: var(--accent-color);
    color: var(--text-light) !important; /* !important, um Text sichtbar zu machen */
    padding: 12px 25px; border-radius: 5px;
    font-size: 1.1em; font-weight: 700;
    text-decoration: none !important;
    border-bottom: none !important;
}
.appointment-link:hover { background-color: var(--accent-hover); transform: translateY(-2px); }
.appointment-link i { margin-right: 10px; font-size: 1.3em; }

/* Services Grid (Leistungen) */
.services-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px;
    margin-bottom: 50px; max-width: 900px; margin-left: auto; margin-right: auto;
}
.service-card { /* War vorher .service-item */
    background-color: var(--primary-dark); border-radius: 8px; overflow: hidden;
    text-align: center; padding-bottom: 20px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease; border: 1px solid #222;
}
.service-card:hover { transform: translateY(-5px); border-color: var(--accent-color); }
.service-card img { width: 100%; height: 200px; object-fit: cover; margin-bottom: 15px; }
.service-card-content { padding: 0 15px; }
.service-card h3 { margin: 0 0 10px; font-size: 1.5em; color: var(--accent-color); font-family: var(--font-body); }
.service-card p { color: #ccc; font-size: 0.95em; }

.all-services {
    max-width: 900px; margin: 0 auto; background-color: var(--primary-dark);
    padding: 30px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}
.all-services ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px; }
/* Neue Klasse für die dynamisch gefüllte Liste */
/* Neue Klasse für die dynamisch gefüllte Liste */
.all-services ul#additional-services-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Flexibler für verschiedene Längen */
    gap: 10px;
    padding: 0;
    text-align: center;
}

/* Anpassung für Desktop, um 2 Spalten zu erzwingen */
@media (min-width: 769px) {
    .all-services ul#additional-services-list {
        grid-template-columns: repeat(2, 1fr);
    }
}
.all-services li { background-color: #2a2a2a; padding: 10px 15px; border-radius: 5px; font-size: 0.9em; color: #e0e0e0; }

/* Team / Über uns */
.about-us-image-placeholder { margin: 40px auto; max-width: 700px; width: 90%; border-radius: 8px; overflow: hidden; }
.about-us-image-placeholder img { width: 100%; height: auto; display: block; }
.team-container { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px; margin-top: 40px; }
.team-member { text-align: center; max-width: 300px; }
.team-member img { width: 200px; height: 200px; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent-color); margin-bottom: 15px; }
.team-member h3 { margin-bottom: 5px; color: #fff; }
.team-member span { color: var(--accent-color); font-weight: bold; display: block; margin-bottom: 10px; }

/* Öffnungszeiten */
.hours-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 15px;
    max-width: 800px; margin: 0 auto;
}
.hours-grid div {
    background-color: var(--primary-dark); padding: 20px 15px; border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3); color: #e0e0e0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hours-grid strong { color: var(--accent-color); }

/* Kontakt */
.contact-info-block {
    background-color: var(--primary-dark); padding: 30px; border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4); margin-bottom: 40px; max-width: 600px;
    margin-left: auto; margin-right: auto; text-align: center;
}
.social-icons { display: flex; justify-content: center; gap: 15px; margin-top: 10px; }
.social-icons a { font-size: 2em; color: #fff; } /* Icons größer */
.social-icons a:hover { color: var(--accent-color); }

/* Formulare (Termin & Dashboard) */
.appointment-form, .dashboard-form {
    max-width: 700px; margin: 0 auto; background: var(--primary-dark); padding: 30px;
    border-radius: 8px; border: 1px solid var(--border-color); text-align: left;
}
/* KORREKTUR: Fieldset-Rahmen entfernen für sauberen Look */
.appointment-form fieldset { border: none; padding: 0; margin-bottom: 0; }
.appointment-form legend { display: none; } /* Brauchen wir nicht mehr, da wir h3 nutzen */

/* Eingabefelder Style wie im Original */
.appointment-form input, .appointment-form textarea {
    background-color: #222; /* Dunkelgrau statt Schwarz */
    border: 1px solid #444;
    color: #fff;
    padding: 15px; /* Etwas mehr Padding */
    font-size: 1em;
    border-radius: 4px;
}

.appointment-form input:focus, .appointment-form textarea:focus {
    border-color: var(--accent-color);
    background-color: #333;
}
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; color: #ddd; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 12px; background: #1a1a1a; border: 1px solid var(--border-color);
    color: #fff; border-radius: 4px; font-family: inherit; font-size: 1em;
}
.form-group input:focus { border-color: var(--accent-color); outline: none; }

/* --- DASHBOARD (Admin Bereich) --- */
.dashboard-container {
    background-color: var(--panel-bg);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    min-height: 600px;
    width: 100%; /* NEU: Nimmt die volle Breite ein */
    max-width: 1200px; /* NEU: Aber maximal 1200px breit, damit es nicht über den ganzen Bildschirm geht */
    margin: 0 auto; /* NEU: Zentriert den Container auf der Seite */
}
/* Tabs Layout Optimiert (Desktop) */
.dashboard-tabs { 
    display: flex; 
    flex-wrap: wrap; /* Standardmäßig Umbruch erlauben */
    gap: 5px;
    border-bottom: 1px solid var(--border-color); 
    padding-bottom: 10px; 
    margin-bottom: 30px; 
    justify-content: flex-start;
}

.tab-link {
    background: transparent; 
    border: none; 
    color: #888; 
    font-size: 0.95rem; /* Etwas kleiner */
    font-weight: bold;
    padding: 10px 12px; /* Weniger Padding */
    cursor: pointer; 
    border-bottom: 2px solid transparent;
    white-space: nowrap; /* Kein Umbruch im Text */
}
.tab-link:hover, .tab-link.active { color: var(--accent-color); border-bottom-color: var(--accent-color); }
.tab-content { display: none; animation: fadeIn 0.3s; }
.tab-content.active { display: block; }

.dashboard-list-item {
    display: flex; justify-content: space-between; align-items: center;
    background: #111; padding: 15px; margin-bottom: 10px; border-radius: 4px; border: 1px solid #333;
}
.list-item-actions button {
    margin-left: 10px; padding: 5px 10px; font-size: 0.8rem;
    background: #333; color: #fff; border: none; border-radius: 3px; cursor: pointer;
}
.list-item-actions button:hover { background: var(--accent-color); }

/* Rechnungs-Elemente */
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.invoice-items-wrapper { background: #000; padding: 15px; border-radius: 4px; margin-top: 10px; border: 1px solid #333; overflow-x: auto; }
#invoice-items-table th { text-align: left; color: #888; border-bottom: 1px solid #333; padding-bottom: 10px; }
#invoice-items-table td { padding: 10px 0; border-bottom: 1px solid #222; }
#invoice-items-table input { background: transparent; border: none; color: #fff; width: 100%; }

/* Rechnungs-Modal Inputs Fix */
#invoice-modal input, 
#invoice-modal select, 
#invoice-modal textarea {
    background-color: #222 !important;
    color: #fff !important;
    border: 1px solid #444 !important;
    padding: 10px;
    border-radius: 4px;
}
#invoice-modal input:focus, 
#invoice-modal select:focus, 
#invoice-modal textarea:focus {
    border-color: var(--accent-color) !important;
    outline: none;
}

/* --- MODALS (Popups) --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9); /* Dunklerer Hintergrund */
    z-index: 2000; display: none;
    align-items: center; justify-content: center; 
    backdrop-filter: blur(5px);
}
.modal-overlay.active { display: flex; }

.modal-content {
    background: #111; /* Fast schwarz */
    padding: 30px; 
    border-radius: 8px;
    width: 600px; max-width: 90%; 
    position: relative; 
    border: 1px solid #333;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8); 
    max-height: 90vh; overflow-y: auto; 
    text-align: center;
}

/* KORREKTUR: Überschrift im Modal muss WEISS sein, nicht rot */
.modal-content h2 {
    color: #ffffff !important; 
    font-size: 1.8em;
    margin-top: 0;
    margin-bottom: 20px;
    padding-right: 20px; /* Platz für X */
}

/* KORREKTUR: Schließen-X muss WEISS sein */
.modal-close { 
    position: absolute; top: 15px; right: 15px; 
    background: none; border: none; 
    color: #ffffff !important; 
    font-size: 2rem; cursor: pointer; 
    z-index: 10;
}

/* Cookie Kategorien Boxen */
.cookie-category {
    background-color: #1f1f1f; /* Dunkelgrau wie im Screenshot */
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    text-align: left;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.category-header h3 {
    margin: 0;
    font-size: 1.1em;
    color: #fff;
}

/* --- TOGGLE SWITCHES (Schalter) --- */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #666; /* Grau wenn AUS */
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

/* Wenn AN -> ROT */
input:checked + .slider {
    background-color: var(--accent-color);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--accent-color);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* Deaktivierter Schalter (Notwendig) */
input:disabled + .slider {
    background-color: #444;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Statische Seiten (Impressum etc.) */
.static-content-wrapper h2 { margin-top: 0; }

/* Footer */
footer { background-color: var(--primary-dark); padding: 20px; text-align: center; border-top: 1px solid var(--border-color); font-size: 0.9em; color: #a0a0a0; }
.footer-links { margin-top: 15px; display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--accent-color); }

/* --- RESPONSIVE ANPASSUNGEN (Wichtig!) --- */
@media (max-width: 768px) {
    /* Header Umbau für Mobile */
    header { justify-content: space-between; padding: 15px 0; }
    .header-left-spacer { display: none; }
    .logo-link { position: static; transform: none; padding-left: 5%; flex-grow: 1; justify-content: flex-start; }
    .header-logo-text { font-size: 1.8em; white-space: normal; }
    .header-right-group { padding-right: 5%; margin-left: 0; flex-grow: 0; }
    .hamburger-menu { display: block; }
    
    nav { top: 70px; } /* Menü unter Header */
    
    .hero-content h1 { font-size: 2.2em; }
    .services-grid, .hours-grid, .form-grid-2 { grid-template-columns: 1fr; }
    
    .btn { width: 100%; }
    .contact-buttons-at-bottom { padding: 15px; }
}

@media (max-width: 480px) {
    h1 { font-size: 2em; }
    h2 { font-size: 1.8em; }
    .content-section { padding: 50px 3%; }
}


.language-option-btn {
    width: 100%;
    display: block; /* Nimmt ganze Zeile ein */
    text-align: center;
    padding: 15px;
    margin-bottom: 15px; /* Erzwingt Abstand nach unten */
    border: 2px solid var(--accent-color);
    background-color: transparent;
    color: var(--text-light);
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-option-btn:hover {
    background-color: var(--accent-color);
}

.language-option-btn:last-child {
    margin-bottom: 0; /* Letzter Button braucht keinen Abstand unten */
}

/* WICHTIG: Die aktive Sprache wird GRÜN angezeigt */
.language-option-btn.active-lang {
    background-color: #4CAF50 !important; /* Grün */
    border-color: #4CAF50 !important;
    pointer-events: none; /* Nicht klickbar, da schon aktiv */
    box-shadow: inset 0 3px 5px rgba(0,0,0,0.2);
}

/* --- STYLING FÜR RECHTSTEXTE (Impressum, Datenschutz, Cookie) & KARRIERE --- */

/* Container */
.static-content-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px;
    background-color: var(--primary-dark); /* Schwarzer Hintergrund */
    border-radius: 8px;
    /* Optional: Leichter roter Schatten für den Look */
    box-shadow: 0 0 20px rgba(230, 0, 35, 0.1); 
    text-align: left;
    color: #eeeeee;
}

/* Überschriften in den Texten */
.static-content-wrapper h2 {
    color: var(--accent-color); /* Rot */
    text-align: center;
    margin-top: 0;
    margin-bottom: 40px;
    font-size: 2.5em;
    text-shadow: 0 0 10px rgba(230, 0, 35, 0.4);
}

.static-content-wrapper h3 {
    color: var(--accent-color); /* Rot */
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.5em;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

/* Fließtext */
.static-content-wrapper p {
    font-size: 1.1em;
    line-height: 1.8;
    color: #cccccc;
    margin-bottom: 20px;
}

/* Links in den Texten (E-Mail, Telefon, externe Links) */
.static-content-wrapper a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
    border-bottom: 1px dotted var(--accent-color);
    transition: all 0.3s ease;
}

/* WICHTIG: Keine Unterstreichung für Social-Media-Bilder */
.social-icons a {
    border-bottom: none !important;
}

.static-content-wrapper a:hover {
    color: #fff;
    background-color: var(--accent-color);
    border-bottom: 1px solid transparent;
    padding: 0 5px;
    border-radius: 3px;
}

/* Listen (falls im Datenschutz vorhanden) */
.static-content-wrapper ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.static-content-wrapper li {
    margin-bottom: 10px;
    color: #cccccc;
}

/* Speziell für Cookie-Popup Text */
.cookie-modal p, .cookie-settings-modal p {
    color: #cccccc;
    font-size: 1em;
    line-height: 1.6;
}

.cookie-modal a, .cookie-settings-modal a {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Speziell für Karriere-Inhalte */
#career-content-area div {
    font-size: 1.2em; /* Etwas größerer Text für Karriere */
    line-height: 1.8;
    margin-bottom: 30px;
}

#career-content-area div:first-child {
    font-weight: bold; /* Erster Absatz (Intro) fett */
    color: #ffffff;
}
/* --- TAG-INPUT STYLING --- */
.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: #000;
    min-height: 50px;
    cursor: text;
}
.tag-item {
    display: flex;
    align-items: center;
    background-color: #333; /* Dunkelgrau */
    color: #eee;
    padding: 5px 10px;
    border-radius: 4px;
}
.tag-item .remove-tag {
    margin-left: 8px;
    cursor: pointer;
    font-weight: bold;
}
.tag-item .remove-tag:hover {
    color: var(--accent-color);
}
.tag-input {
    flex-grow: 1;
    border: none;
    background: none;
    outline: none;
    color: #fff;
    padding: 5px;
    min-width: 150px;
}


/* --- RECHNUNGS SPALTEN KONFIGURATOR --- */
.cols-selection-area {
    border: 1px solid #444;
    background: #1a1a1a;
    padding: 15px;
    border-radius: 8px;
    min-height: 60px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.col-tag {
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.9em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: transform 0.2s;
    user-select: none;
}
.col-tag:hover { transform: scale(1.05); }

/* Aktive Spalten (Gelb wie im Screenshot) */
.col-tag.active {
    background-color: #e4c056; 
    color: #000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}
.col-tag.active::after {
    content: '×';
    margin-left: 8px;
    font-size: 1.2em;
    line-height: 0.8;
    color: #000;
}

/* Verfügbare Spalten (Dunkelgrau) */
.col-tag.available {
    background-color: #333;
    color: #bbb;
    border: 1px solid #555;
}
.col-tag.available:hover {
    background-color: #444;
    color: #fff;
    border-color: #777;
}

.cols-label {
    font-size: 0.9em;
    color: #888;
    margin-bottom: 5px;
    display: block;
}

/* Sekundäre Buttons (Grau, für Abbrechen etc.) */
.btn-secondary {
    background-color: #333;
    color: #fff;
    padding: 10px 20px;
    border: 1px solid #555;
    border-radius: 5px;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.btn-secondary:hover {
    background-color: #444;
    border-color: #666;
}
/* LADE SPINNER */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent-color);
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.stats-sub-tabs button:hover {
    color: #fff;
}
/* --- MODERN DASHBOARD INPUTS (Global) --- */
/* Dies stylt ALLE Eingabefelder im Dashboard einheitlich (Suche, Formulare, Öffnungszeiten) */
.dashboard-container input[type="text"],
.dashboard-container input[type="password"],
.dashboard-container input[type="date"],
.dashboard-container input[type="number"],
.dashboard-container input[type="email"],
.dashboard-container input[type="tel"],
.dashboard-container textarea,
.dashboard-container select {
    background-color: #000; /* Schwarz statt Weiß */
    border: 1px solid #333; /* Dezenter Rand */
    color: #fff; /* Weisse Schrift */
    padding: 12px 15px; /* Mehr Platz innen */
    border-radius: 6px; /* Abgerundete Ecken */
    font-size: 1rem;
    width: 100%; /* Immer volle Breite im Container */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 10px; /* Abstand nach unten */
}

/* Fokus-Effekt (Wenn man reinklickt) */
.dashboard-container input:focus,
.dashboard-container textarea:focus,
.dashboard-container select:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 5px rgba(230, 0, 35, 0.3);
}

/* Speziell für die Suchleisten Container */
.filter-container, .stats-filter {
    margin-bottom: 20px;
}

/* Öffnungszeiten Grid schöner machen */
.hours-row {
    display: grid;
    grid-template-columns: 100px 1fr 1fr 1fr; /* Tag | DE | EN | TR */
    gap: 15px;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #222;
}

.hours-row label {
    font-weight: bold;
    color: var(--accent-color);
    text-transform: uppercase;
    font-size: 0.9em;
}

/* Responsive Anpassung für Öffnungszeiten auf Handy */
@media (max-width: 768px) {
    .hours-row {
        grid-template-columns: 1fr; /* Untereinander */
        gap: 5px;
    }
}
/* --- BUTTON FARBEN & LAYOUT FIX --- */
/* Neue Button Klassen */
.btn-save { background-color: #27ae60; } /* Grün */
.btn-save:hover { background-color: #229954; }
.btn-pdf { background-color: #3498db; } /* Blau */
.btn-pdf:hover { background-color: #2980b9; }

/* Alle Buttons im Modal-Footer gleich groß machen */
.form-actions button, .form-actions div button {
    flex: 1; /* Sorgt dafür, dass sie sich den Platz teilen */
    min-width: 150px;
}
/* --- STATS TAB STYLING (FIX) --- */
.stats-sub-tabs .btn-link {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #888;
    font-weight: bold;
    cursor: pointer;
    padding-bottom: 5px;
    transition: color 0.3s, border-color 0.3s;
}
.stats-sub-tabs .btn-link:hover {
    color: #fff;
}
.stats-sub-tabs .btn-link.active {
    color: #fff;
    border-bottom-color: var(--accent-color);
}
/* --- MOBILE RESPONSIVE OPTIMIERUNGEN --- */

/* 1. Dashboard Tabs: Horizontal Scrollbar auf Handy */
@media (max-width: 768px) {
    .dashboard-tabs {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
    }
}
/* 2. Allgemeine Mobile Anpassungen */
@media (max-width: 768px) {
    
    /* Container Abstände verringern */
    .dashboard-container {
        padding: 15px;
    }

    /* Formulare: Alles untereinander statt nebeneinander */
    .form-grid-2 {
        grid-template-columns: 1fr !important; /* Zwingt 1 Spalte */
        gap: 15px;
    }

    /* Modals: Volle Breite auf Handy */
    .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        padding: 20px;
        margin: 10px auto;
        max-height: 85vh; /* Damit Tastatur Platz hat */
    }

    /* Listen (Rechnungen, Kunden) wischbar machen */
    /* Da wir feste Spalten im JS haben, müssen wir scrollen erlauben */
    .dashboard-list, #invoices-list, #customers-list, #users-container, #services-list {
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    /* Damit die Einträge nicht gequetscht werden, geben wir ihnen eine Mindestbreite */
    .dashboard-list-item, #invoices-header {
        min-width: 600px; /* Erzwingt Scrollen, wenn Bildschirm kleiner als 600px */
    }

    /* Statistiken: Kacheln untereinander */
    #stats-content-area > div:first-child { /* Das Grid der KPI Kacheln */
        grid-template-columns: 1fr !important; /* Eine Kachel pro Zeile */
    }
    
    /* Die große Grafik */
    #mainChart {
        height: 250px !important; /* Etwas niedriger auf Handy */
    }

    /* Header Anpassung */
    .header-logo-text {
        font-size: 1.5em; /* Kleineres Logo damit Hamburger passt */
    }
}

/* --- MOBILE FIX  (Getrennte Medienabfrage) --- */
@media (max-width: 768px) {
    .dashboard-tabs {
        flex-wrap: nowrap !important; /* Keinen Umbruch auf Handy */
        overflow-x: auto !important; /* Scrollen erzwingen */
        
        /* Optional: Scrollbar ausblenden */
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .dashboard-tabs::-webkit-scrollbar {
        display: none;
    }

    .tab-link {
        flex: 0 0 auto; /* Verhindert, dass Buttons schrumpfen */
    }
}

/* --- FORCE MOBILE TABS SCROLL (HARD FIX) --- */
@media screen and (max-width: 992px) { /* Greift jetzt auch bei Tablets */
    
    /* 1. Container zwingen, nicht umzubrechen */
    .dashboard-container .dashboard-tabs {
        display: flex !important;
        flex-wrap: nowrap !important;       /* Verbietet Umbruch strikt */
        overflow-x: auto !important;        /* Erlaubt seitliches Scrollen */
        white-space: nowrap !important;     /* Text darf nicht umbrechen */
        justify-content: flex-start !important; /* Startet links (wichtig fürs Scrollen) */
        width: 100% !important;
        max-width: 100vw !important;
        gap: 10px !important;
        padding-bottom: 10px !important;
        
        /* Für weiches Scrollen auf iPhone */
        -webkit-overflow-scrolling: touch; 
        
        /* Scrollbar ausblenden (optional) */
        scrollbar-width: none; 
        -ms-overflow-style: none;
    }

    .dashboard-container .dashboard-tabs::-webkit-scrollbar {
        display: none;
    }

    /* 2. Buttons zwingen, ihre Breite zu behalten */
    .dashboard-container .dashboard-tabs .tab-link {
        flex: 0 0 auto !important;   /* Darf nicht schrumpfen (0), nicht wachsen (0), Basis auto */
        width: auto !important;      /* Nimmt sich den Platz, den der Text braucht */
        display: inline-block !important; /* Fallback */
        white-space: nowrap !important; /* Text im Button darf nicht umbrechen */
    }
}

/* --- MOBILE OPTIMIERUNGEN TEIL 2 (FIXES) --- */
@media screen and (max-width: 992px) {

    /* 1. STATISTIK FILTER (Scrollbar wie oben) */
    .stats-filter {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        gap: 8px !important;
        padding-bottom: 10px;
        width: 100%;
        -webkit-overflow-scrolling: touch;
    }
    /* Scrollbar verstecken */
    .stats-filter::-webkit-scrollbar { display: none; }

    /* 2. RECHNUNGEN HEADER (Muss mitscrollen) */
    /* Wir zwingen den Header auf dieselbe Mindestbreite wie die Zeilen */
    #invoices-header {
        min-width: 600px !important; /* Damit Spalten übereinstimmen */
        padding-right: 10px; /* Etwas Platz rechts */
    }
    /* Der gesamte Tab-Container wird scrollbar gemacht */
    #tab-invoices {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* 3. PRODUKTE "HINZUFÜGEN" FORMULAR (Umbau zu untereinander) */
    /* Wir greifen das erste Div im Settings-Products Container, 
       das per JS als Grid definiert wurde */
    #settings-content-products > div:first-of-type {
        display: flex !important;       /* Grid überschreiben */
        flex-direction: column !important; /* Alles untereinander */
        gap: 15px !important;
    }
    
    /* Den Button schön breit machen */
    #btn-add-prod {
        width: 100% !important;
        margin-top: 5px !important;
        height: 50px !important; /* Besser klickbar */
    }

    /* 4. BENUTZER LISTE (Zu breit) */
    /* Hier entfernen wir die erzwungene Breite, die für Rechnungen nötig ist */
    #users-container .dashboard-list-item {
        min-width: auto !important; /* Reset der 600px */
        width: 100% !important;     /* Soll genau in den Bildschirm passen */
        display: flex !important;
        justify-content: space-between !important;
    }
    
    /* Falls der Button im Benutzer-Bereich zu weit rechts klebt */
    #users-container .list-item-actions {
        margin-left: auto !important;
    }

    /* 5. CHARTS (Grafiken) FIX */
    /* Verhindert, dass Canvas das Layout sprengt */
    #stats-content-area canvas {
        max-width: 100% !important;
        height: auto !important;
    }
    #stats-content-area .card > div {
        width: 100% !important;
        overflow: hidden !important; /* Abschneiden falls zu groß */
    }
    /* Die Hauptgrafik etwas kleiner auf Handy */
    #mainChart {
        max-height: 250px !important;
    }
}
/* --- MOBILE CHARTS SCROLL FIX --- */
@media screen and (max-width: 992px) {
    
    /* 1. Das Grid auflösen, damit Boxen untereinander rutschen */
    /* Wir suchen das Div im Stats-Bereich, das das Grid definiert */
    #stats-content-area > div[style*="grid-template-columns"] {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 20px !important;
    }

    /* 2. Die Karten Container (Rahmen) auf Bildschirmbreite begrenzen */
    #stats-content-area .card,
    #stats-content-area div[style*="border:1px solid"] {
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px !important; /* Weniger Rand auf Handy */
        box-sizing: border-box !important;
        
        /* WICHTIG: Damit der Inhalt scrollen kann */
        overflow-x: auto !important; 
        -webkit-overflow-scrolling: touch;
    }

    /* 3. Den Wrapper um das Canvas scrollbar machen */
    #stats-content-area div[style*="height: 300px"],
    #stats-content-area div[style*="height: 350px"] {
        width: 100% !important;
        overflow-x: auto !important;
        position: relative !important;
    }

    /* 4. Die Grafik selbst BREIT zwingen -> Erzeugt den Scrollbalken */
    #stats-content-area canvas {
        min-width: 600px !important; /* Grafik ist breiter als Handy -> Scrollbar */
        max-width: none !important;  /* Darf über den Rand gehen */
        width: 600px !important;     /* Fixe Breite für sauberes Rendering */
        height: 250px !important;    /* Fixe Höhe */
    }
}

/* --- MOBILE CARD VIEW (KARTEN-ANSICHT) --- */
@media screen and (max-width: 992px) {

    /* 1. Reset der Container */
    .dashboard-container {
        width: 100% !important;
        overflow-x: hidden !important;
        padding: 10px !important;
    }

    /* 2. Tabellen-Header ausblenden (Wir nutzen Labels in der Karte) */
    #invoices-header,
    #customers-list > div:first-child { /* Der Header im Kundenbereich */
        display: none !important;
    }

    /* 3. Listen-Layout auflösen */
    #invoices-list, #customers-list {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        min-width: 0 !important; /* Reset der 800px */
        gap: 15px !important;
    }

    /* 4. Die Karte (Der einzelne Eintrag) */
    .dashboard-list-item {
        display: flex !important;        /* Grid überschreiben */
        flex-direction: column !important; /* Elemente untereinander */
        background-color: #1a1a1a !important; /* Dunkler Karten-Hintergrund */
        border: 1px solid #333 !important;
        border-radius: 8px !important;
        padding: 15px !important;
        width: 100% !important;
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
        margin-bottom: 0 !important;
        height: auto !important;
    }

    /* 5. Die Inhalte innerhalb der Karte */
    .dashboard-list-item > span, 
    .dashboard-list-item > small {
        display: flex !important;
        justify-content: space-between; /* Label links, Wert rechts */
        align-items: center;
        width: 100% !important;
        padding: 8px 0 !important;
        border-bottom: 1px solid #333;
        text-align: right !important; /* Wert rechtsbündig */
        font-size: 0.95em;
    }
    
    /* Letztes Element ohne Strich */
    .dashboard-list-item > div:last-child {
        border-bottom: none;
        padding-top: 10px;
        justify-content: flex-end !important; /* Buttons rechts */
        width: 100%;
        display: flex;
    }

    /* 6. BESCHRIFTUNGEN HINZUFÜGEN (Labels) */
    /* Hier fügen wir den Text "Kunde:", "Datum:" usw. davor ein */
    .dashboard-list-item > span::before,
    .dashboard-list-item > small::before {
        content: attr(data-label); /* Fallback */
        font-weight: bold;
        color: #888;
        float: left;
        text-transform: uppercase;
        font-size: 0.8em;
        margin-right: 10px;
    }

    /* --- RECHNUNGEN LABELS (Standard Reihenfolge) --- */
    /* 1. Spalte: Nr */
    #invoices-list .dashboard-list-item > span:nth-of-type(1)::before { content: "Nr.:"; }
    /* 2. Spalte: Kunde */
    #invoices-list .dashboard-list-item > span:nth-of-type(2)::before { content: "Kunde:"; }
    /* 3. Spalte: Datum */
    #invoices-list .dashboard-list-item > span:nth-of-type(3)::before { content: "Datum:"; }
    /* 4. Spalte: Brutto */
    #invoices-list .dashboard-list-item > span:nth-of-type(4)::before { content: "Brutto:"; }

    /* --- KUNDEN LABELS (Standard Reihenfolge) --- */
    /* 1. Spalte: Nr */
    #customers-list .dashboard-list-item > span:nth-of-type(1)::before { content: "Nr.:"; }
    /* 2. Spalte: Name */
    #customers-list .dashboard-list-item > span:nth-of-type(2)::before { content: "Name:"; }
    /* 3. Spalte: Ort */
    #customers-list .dashboard-list-item > span:nth-of-type(3)::before { content: "Ort:"; }
    /* 4. Spalte: Kontakt (Hier ist es ein <small> Tag im JS) */
    #customers-list .dashboard-list-item > small:nth-of-type(1)::before { content: "Kontakt:"; }

    /* Buttons Styling in der Karte */
    .list-item-actions {
        margin-top: 10px;
        border-top: 1px solid #333;
        padding-top: 10px;
    }
}

/* --- MOBILE CARD VIEW FIX (NO SCROLLING) --- */
@media screen and (max-width: 992px) {

    /* 1. Scrollen auf Container-Ebene VERBIETEN */
    /* Da wir Karten haben, brauchen wir keinen seitlichen Scrollbalken mehr */
    .dashboard-container,
    #tab-invoices.active, 
    #tab-customers.active {
        overflow-x: hidden !important; /* Scrollbalken weg! */
        width: 100% !important;
        max-width: 100vw !important;
        padding-left: 5px !important;
        padding-right: 5px !important;
        box-sizing: border-box !important; /* WICHTIG: Padding zählt zur Breite */
    }

    /* 2. Die Liste und die Items dürfen NICHT breiter sein als der Bildschirm */
    #invoices-list, 
    #customers-list,
    .dashboard-list-item {
        width: 100% !important;
        min-width: 0 !important; /* Die alte 800px Regel töten */
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* 3. Inhalt in der Karte darf nicht rausdrücken */
    /* Falls eine E-Mail oder Text zu lang ist -> Umbrechen! */
    .dashboard-list-item > span,
    .dashboard-list-item > small {
        white-space: normal !important; /* Textumbruch erlauben */
        word-break: break-word !important; /* Lange Wörter trennen */
        overflow-wrap: break-word !important;
        overflow: hidden !important; /* Zur Sicherheit */
    }

    /* 4. Korrektur für die Labels (Damit sie links bündig sind) */
    .dashboard-list-item > span, 
    .dashboard-list-item > small {
        text-align: right !important; /* Wert rechts */
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* Label links floatend */
    .dashboard-list-item > span::before,
    .dashboard-list-item > small::before {
        float: left;
    }
}

/* --- FIX: ZENTRIERTE LISTEN (Leistungen, Mitarbeiter, Benutzer) --- */
@media screen and (max-width: 992px) {

    /* 1. TEXT ZENTRIEREN & LINIEN ENTFERNEN */
    /* Wir sprechen gezielt die Container an, um die Standard-Regeln zu überschreiben */
    #services-list .dashboard-list-item > span,
    #team-list .dashboard-list-item > span,
    #users-container .dashboard-list-item > span {
        display: block !important;          /* Kein Flexbox mehr (verhindert links/rechts Aufteilung) */
        text-align: center !important;      /* Text ab in die Mitte */
        border-bottom: none !important;     /* WEG MIT DEN LINIEN */
        padding: 10px 0 !important;
        width: 100% !important;
        font-size: 1.2em !important;        /* Größere Schrift */
        font-weight: bold !important;
    }

    /* 2. DIE LABELS VERSTECKEN */
    /* Verhindert, dass unsichtbare "Vor-Texte" das Layout verschieben */
    #services-list .dashboard-list-item > span::before,
    #team-list .dashboard-list-item > span::before,
    #users-container .dashboard-list-item > span::before {
        content: none !important;
        display: none !important;
    }

    /* 3. BUTTONS ZENTRIEREN */
    /* Die Buttons unten drunter schön mittig */
    #services-list .list-item-actions,
    #team-list .list-item-actions,
    #users-container .list-item-actions {
        display: flex !important;
        justify-content: center !important; /* Mittig */
        border-top: 1px solid #333 !important; /* Eine feine Linie ÜBER den Buttons */
        margin-top: 5px !important;
        padding-top: 10px !important;
        width: 100% !important;
        gap: 15px !important;
    }

    /* Spezialfall Benutzer-Liste: Container Reset */
    #users-container .dashboard-list-item {
        flex-direction: column !important;
        align-items: center !important;
    }
}

/* --- MOBILE RECHNUNGSERSTELLUNG (KARTEN-STYLE) --- */
@media screen and (max-width: 992px) {

    /* 1. Tabelle zerlegen */
    /* Wir machen aus der Tabelle reine Block-Elemente */
    #invoice-items-table, 
    #invoice-items-table tbody, 
    #invoice-items-table tr, 
    #invoice-items-table td {
        display: block !important;
        width: 100% !important;
    }

    /* 2. Kopfzeile ausblenden (Platzverschwendung auf Handy) */
    #invoice-items-table thead {
        display: none !important;
    }

    /* 3. Die Zeile zur "Karte" machen */
    #invoice-items-table tr {
        background: #1a1a1a !important; /* Dunkler Hintergrund */
        border: 1px solid #333 !important; /* Rahmen */
        border-radius: 8px !important;
        margin-bottom: 20px !important; /* Abstand zur nächsten Position */
        padding: 15px !important;
        position: relative !important; /* Für absolute Positionierung des X-Buttons */
    }

    /* 4. Zellen-Abstände und Rahmen entfernen */
    #invoice-items-table td {
        padding: 5px 0 !important;
        border: none !important;
        text-align: left !important;
    }

    /* 5. LABELS HINZUFÜGEN (Da die Kopfzeile weg ist) */
    /* Wir schreiben über jedes Feld, was es ist */
    
    /* Beschreibung */
    #invoice-items-table td:nth-child(2)::before { content: "Beschreibung:"; display: block; color: #888; font-size: 0.8em; margin-bottom: 2px;}
    /* Menge */
    #invoice-items-table td:nth-child(3)::before { content: "Menge:"; display: block; color: #888; font-size: 0.8em; margin-bottom: 2px;}
    /* Einzelpreis */
    #invoice-items-table td:nth-child(4)::before { content: "Einzelpreis:"; display: block; color: #888; font-size: 0.8em; margin-bottom: 2px;}
    /* Gesamt */
    #invoice-items-table td:nth-child(5)::before { content: "Gesamt:"; display: block; color: #888; font-size: 0.8em; margin-bottom: 2px;}

    /* 6. Eingabefelder stylen */
    #invoice-items-table input {
        width: 100% !important; /* Volle Breite */
        background-color: #000 !important;
        border: 1px solid #444 !important;
        padding: 12px !important;
        border-radius: 4px !important;
        font-size: 16px !important; /* Verhindert Zoom auf iPhone */
        height: auto !important;
    }

    /* 7. Position (Nr. 1, 2...) klein oben links oder verstecken */
    #invoice-items-table td:nth-child(1) {
        font-weight: bold;
        color: var(--accent-color);
        margin-bottom: 5px;
        border-bottom: 1px solid #333 !important;
        padding-bottom: 5px !important;
    }
    #invoice-items-table td:nth-child(1)::before {
        content: "Position ";
    }

    /* 8. Der LÖSCHEN Button (X) */
    /* Den machen wir groß und rot ganz unten an der Karte */
    #invoice-items-table td:last-child {
        margin-top: 10px;
        text-align: right !important;
    }
    #invoice-items-table td:last-child button {
        width: 100% !important; /* Volle Breite */
        background-color: #333 !important;
        color: #ff4444 !important;
        border: 1px solid #ff4444 !important;
        padding: 10px !important;
        border-radius: 4px;
    }
    
    /* 9. Gesamtpreis hervorheben */
    #invoice-items-table td:nth-child(5) {
        font-weight: bold;
        font-size: 1.1em;
        text-align: right !important;
        color: #fff;
        padding-top: 10px !important;
    }
}
/* --- LOGIN PASSWORT AUGE FIX (FINAL) --- */

/* 1. Der Wrapper muss der Bezugspunkt sein */
.password-wrapper {
    position: relative !important;
    display: block !important;
    width: 100% !important;
}

/* 2. Das Auge (Span) absolut ins Feld setzen */
.password-toggle {
    position: absolute !important;
    top: 50% !important;            /* Vertikal in die Mitte */
    right: 15px !important;         /* Rechts an den Rand */
    transform: translateY(-50%) !important; /* Exakt zentrieren */
    cursor: pointer !important;
    z-index: 100 !important;        /* Über den Text legen */
    color: #666 !important;         /* Farbe (Grau) */
    display: flex !important;       /* Damit das Icon zentriert ist */
    align-items: center;
    height: auto !important;
    padding: 5px;                   /* Klickbereich vergrößern */
}

/* 3. Platz im Eingabefeld schaffen, damit Text nicht unters Auge rutscht */
#loginPassword, 
.password-wrapper input {
    padding-right: 45px !important;
}