/* Schriftart „Ubuntu“ global einbinden */
@import url('https://fonts.googleapis.com/css2?family=Ubuntu&display=swap');

/* Globale Grundeinstellungen */
body, html {
    margin: 0;
    padding: 0;
    background-color: #121212; /* Dunkler Hintergrund für Dark Mode */
    color: #f0f0f0; /* Helle Standardschriftfarbe */
    font-family: 'Ubuntu', sans-serif; /* Schriftart auf Ubuntu setzen */
    height: 100%; /* Für Full-Height Layouts */
    display: flex;
    flex-direction: column;
}

/* Überschriften-Stil */
h1, h2 {
    color: #ffffff;
    margin-bottom: 20px;
}

/* Link-Stil */
a {
    color: #4aa3ff; /* Helle Blautöne */
    font-weight: bold;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
    color: #6cb8ff; /* Hellere Farbe beim Hover */
}

/* Spezifische Anpassung für den Login-Container */
.login-container { /* Wird für index.php und admin/login.php verwendet */
    max-width: 800px; /* Hier die gewünschte Breite von 800px */
    margin: 80px auto; /* Zentrierung und Standard-Vertikalabstand, wie du ihn zuvor hattest */
    padding: 20px; /* Etwas weniger Padding */
    background-color: #1e1e1e;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

/* Gemeinsamer Haupt-Layout-Container (für Dashboard, etc.) */
.container {
    max-width: 1300px; /* Maximale Breite, zuletzt auf diesen Wert gesetzt */
    margin: 40px auto; /* Zentrierung vertikal und horizontal, etwas weniger top-margin */
    background-color: #1e1e1e; /* Kartenhintergrund */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.4); /* Leichter Schatten für Tiefe */
    flex-grow: 1; /* Lässt den Container den verfügbaren Platz ausfüllen */
}

/* Logo zentrieren und Abstand definieren */
.logo-container {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 10px;
}
.logo-container img {
    max-width: 300px;
    height: auto;
}

/* Beschriftungen für Formulare */
label {
    display: block;
    margin: 15px 0 5px;
    color: #e0e0e0;
}

/* Eingabefelder und Auswahlmenüs */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 10px;
    background: #2a2a2a;
    color: #ffffff;
    border: 1px solid #444;
    border-radius: 5px;
    box-sizing: border-box; /* Stellt sicher, dass Padding nicht die Breite erhöht */
}

/* Speziell für input[type="file"] */
input[type="file"] {
    background-color: #2a2a2a;
    border: 1px solid #444;
    color: #f0f0f0;
    padding: 10px;
    border-radius: 5px;
    margin-top: 5px;
}

/* Button-Stil */
button, a.button { /* a.button hinzugefügt, um Konsistenz zu gewährleisten */
    background-color: #4a90e2;
    color: white;
    border: none;
    padding: 10px 20px;
    margin-top: 20px; /* Standard-Abstand nach oben */
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none; /* Für Links, die wie Buttons aussehen */
    display: inline-block; /* Für Links, um nebeneinander zu sein */
    text-align: center; /* Textzentrierung im Button */
}
button:hover, a.button:hover {
    background-color: #5aa0f0;
    text-decoration: none;
}

/* Fehlermeldungen */
.error {
    color: #ff6b6b;
    background-color: #3a1e1e;
    border: 1px solid #ff6b6b;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    margin-bottom: 15px;
}

/* Erfolgsmeldungen */
.success {
    color: #6eff6e;
    background-color: #1e3a1e;
    border: 1px solid #6eff6e;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    margin-bottom: 15px;
}

/* Tabellenstil */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 25px;
    font-size: 15px;
}

/* Tabellenzellen */
th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #333;
    color: #f0f0f0;
}

/* Tabellenkopf */
th {
    background-color: #2c2c2c;
    font-size: 16px;
    color: #ffffff;
}

/* Status-Indikator-Kreise (allgemein, aber spezifische Historie-Stile überschreiben diese) */
.status-indikator {
    height: 12px;
    width: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
    vertical-align: middle; /* Hinzugefügt für bessere Ausrichtung */
}
.status-offen {
    background-color: #ff4d4d; /* Rot */
}
.status-in_bearbeitung {
    background-color: #ffd11a; /* Gelb */
}
.status-geschlossen {
    background-color: #33cc33; /* Grün */
}
/* *** NEUE REGEL HIER HINZUGEFÜGT FÜR geschlossene_kunde *** */
.status-geschlossen_kunde {
    background-color: #33cc33; /* Grün, wie status-geschlossen */
}

/* Für Buttons am oberen Rand des Containers (z.B. Dashboard) */
.header-buttons, .top-buttons {
    text-align: right;
    margin-bottom: 20px;
    margin-top: 10px;
}

.header-buttons .button, .top-buttons .button {
    margin-left: 10px;
    margin-top: 0; /* Überschreibt den generellen button margin-top */
}

/* Anpassung für Aktionen in Tabellenzeilen */
td.actions {
    white-space: nowrap; /* Verhindert Umbruch bei Action-Buttons */
}
td.actions .button {
    margin-top: 0; /* Keine doppelten margins */
    margin-left: 5px; /* Abstand zwischen den Action-Buttons */
    padding: 6px 12px; /* Kleinere Buttons in der Tabelle */
    font-size: 0.9em;
}

/* Button Group (für Buttons nebeneinander am Ende von Formularen) */
.button-group {
    margin-top: 20px; /* Abstand zum oberen Element */
    display: flex; /* Buttons nebeneinander */
    gap: 15px; /* Abstand zwischen den Buttons */
    flex-wrap: wrap; /* Erlaubt Umbruch auf kleineren Bildschirmen */
}
.button-group button, .button-group a.button {
    margin-top: 0; /* Überschreibt den allgemeinen button margin-top */
}
/* Style für "Zurück" Buttons in Button Groups */
.button-group .button[style*="background-color: #555"] { /* Spezieller Selektor, um den Override zu treffen */
    background-color: #555 !important;
}
.button-group .button[style*="background-color: #555"]:hover {
    background-color: #777 !important;
}


/* --- Ticket-Historie Verbesserungen (admin/ticket_manage.php) --- */
/* Dies überschreibt die allgemeine ul/li Formatierung für die Ticket-Historie */
.ticket-historie {
    list-style: none; /* Entfernt die Standard-Aufzählungszeichen */
    padding: 0;
    margin: 20px 0;
    border-top: 1px solid #444; /* Trennlinie oben für die Historie */
}

.ticket-historie li {
    background-color: #2b2b2b; /* Leicht dunklerer Hintergrund für jeden Eintrag */
    border: 1px solid #3a3a3a; /* Dezenter Rahmen */
    margin-bottom: 15px; /* Mehr Abstand zwischen den Einträgen */
    padding: 15px;
    border-radius: 5px; /* Abgerundete Ecken */
    line-height: 1.6; /* Zeilenhöhe für bessere Lesbarkeit */
    word-wrap: break-word; /* Lange Wörter umbrechen */
}

.historie-zeitpunkt {
    font-size: 0.9em;
    color: #bbb; /* Hellerer Grauton für den Zeitstempel */
    margin-bottom: 5px;
    display: block; /* Zeitstempel in eigener Zeile */
}

.ticket-historie li strong {
    color: #e0e0e0; /* Hellerer Text für wichtige Hervorhebungen */
}

.ticket-historie li em {
    color: #aaa; /* Etwas dunklerer Text für kursive Notizen */
}

/* Status-Indikatoren: Kreis mit Farbe und Text (spezifisch für Historie) */
/* Die allgemeinen .status-indikator-Regeln oben sind weiterhin gültig,
   aber diese hier sind spezifischer für die Historie-Liste. */
.ticket-historie .status-offen {
    background-color: #dc3545; /* Rot */
}
.ticket-historie .status-in_bearbeitung {
    background-color: #ffc107; /* Gelb */
}
.ticket-historie .status-geschlossen {
    background-color: #28a745; /* Grün */
}
/* *** NEUE REGEL HIER HINZUGEFÜGT FÜR geschlossene_kunde IM HISTORIE-BEREICH *** */
.ticket-historie .status-geschlossen_kunde {
    background-color: #28a745; /* Grün */
}

/* Spezifische Formatierung für den Kommentar/Notiz im Log-Eintrag */
.ticket-historie li .kommentar-text {
    display: block; /* Kommentartext in eigener Zeile */
    margin-top: 8px; /* Abstand nach oben */
    padding-left: 10px; /* Einrückung */
    border-left: 3px solid #555; /* Vertikale Linie als Trenner */
    color: #ccc; /* Hellerer Text für den Kommentar */
}

/* Stil für den Kommentartyp (wenn nur Kommentar, kein Statuswechsel) */
.ticket-historie li.kommentar-only {
    /* Optional: Hintergrundfarbe leicht anpassen, wenn es nur ein Kommentar ist */
    /* background-color: #333; */
}

/* Optische Trennung zwischen den Event-Typen innerhalb eines Eintrags (optional) */
.ticket-historie li p {
    margin-bottom: 5px;
}
.ticket-historie li p:last-child {
    margin-bottom: 0;
}


/* Footer-Styling */
footer {
    text-align: center;
    padding: 20px;
    margin-top: 30px; /* Abstand zum Hauptinhalt */
    color: #888;
    font-size: 0.9em;
    background-color: #1e1e1e; /* Oder passend zum Hintergrund */
    border-top: 1px solid #2a2a2a;
}

/* Styling für den Lösch-Button (hinzugefügt für admin/dashboard.php) */
.delete-button {
    display: inline-flex; /* Macht es einfacher, das Symbol zu zentrieren */
    justify-content: center;
    align-items: center;
    width: 30px; /* Quadratisch */
    height: 30px; /* Quadratisch */
    background-color: #dc3545; /* Rot */
    color: white;
    border: none;
    border-radius: 4px; /* Leicht abgerundete Ecken */
    text-decoration: none; /* Keine Unterstreichung */
    font-size: 1.2em; /* Größe des Symbols */
    line-height: 1; /* Zeilenhöhe anpassen für bessere Zentrierung */
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.delete-button:hover {
    background-color: #c82333; /* Dunkleres Rot beim Hover */
}

/* Spezifischer Wrapper für Formularseiten (z.B. ticket_admin_erstellen.php) */
.form-wrapper {
    max-width: 700px; /* Die gewünschte Breite für das Formular */
    margin: 40px auto; /* Zentriert den Wrapper und gibt vertikalen Abstand */
    background-color: #1e1e1e; /* Hintergrundfarbe wie dein .container */
    padding: 30px; /* Polsterung innen */
    border-radius: 10px; /* Abgerundete Ecken */
    box-shadow: 0 0 15px rgba(0,0,0,0.4); /* Schatten */
    flex-grow: 1; /* Damit es den verfügbaren Platz ausfüllt */
}