/* Schriftarten einbinden */
@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined&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;
}

/* Login-Seite: Navigationslinks ausblenden */
.login-page a[href*="dashboard.php"],
.login-page a[href*="invoices/index.php"],
.login-page a[href*="ticket_erstellen.php"],
.login-page a[href*="profile.php"],
.login-page a[href*="invoices/2fa_settings.php"],
.login-page a[href*="logout.php"] {
    display: none !important;
}


/* Kunden-Login – kompaktes Panel im Darkmode */
body.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--surface);
    font-family: 'Ubuntu', sans-serif;
    font-weight: 300;
}

body.login-page .logo-container {
    margin-top: 32px;
    margin-bottom: 24px;
}

body.login-page .logo-container img {
    height: 90px;
    filter: drop-shadow(0 10px 24px rgba(0, 199, 255, 0.35));
}

body.login-page .container {
    max-width: 540px;
    margin: 0 auto 60px;
    padding: 36px 40px 42px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01)), var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

body.login-page .auth-card {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

body.login-page .auth-card h1 {
    margin: 0 0 12px;
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
    text-shadow: var(--glow-blue);
}

body.login-page .auth-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

body.login-page .auth-card__intro {
    margin-bottom: 8px;
}

body.login-page .auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

body.login-page .auth-form label {
    display: block;
    font-weight: 300;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(230, 231, 238, 0.85);
}

body.login-page .auth-form .required {
    color: var(--neon-yellow);
    margin-right: 6px;
}

body.login-page .auth-form input[type="text"],
body.login-page .auth-form input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    background: rgba(13, 15, 20, 0.9);
    border: 1px solid rgba(0, 199, 255, 0.35);
    border-radius: 10px;
    color: var(--text);
    font-size: 1rem;
    font-family: 'Ubuntu', sans-serif;
    font-weight: 300;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.45);
}

body.login-page .auth-form input[type="text"]:focus,
body.login-page .auth-form input[type="password"]:focus {
    outline: none;
    border-color: rgba(255, 209, 102, 0.8);
    box-shadow: 0 0 18px rgba(255, 209, 102, 0.25), inset 0 0 0 1px rgba(255, 209, 102, 0.35);
}

body.login-page .auth-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

body.login-page .auth-actions--paired {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: space-between;
    margin-top: 18px;
}

body.login-page .auth-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 999px;
    border: none;
    margin: 0;
    cursor: pointer;
    font-family: 'Ubuntu', sans-serif;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.login-page .auth-button .material-symbols-outlined {
    font-size: 1.4rem;
}

body.login-page .auth-button--primary {
    background: linear-gradient(90deg, var(--neon-blue), var(--uv));
    color: #050608;
    box-shadow: 0 20px 44px rgba(0, 199, 255, 0.25);
}

body.login-page .auth-button--primary:hover,
body.login-page .auth-button--primary:focus {
    transform: translateY(-2px);
    box-shadow: 0 26px 60px rgba(0, 199, 255, 0.32);
}

body.login-page .auth-button--ghost {
    background: transparent;
    color: var(--neon-blue);
    border: 1px solid rgba(0, 199, 255, 0.45);
    box-shadow: 0 0 22px rgba(0, 199, 255, 0.15);
}

body.login-page .auth-button--ghost:hover,
body.login-page .auth-button--ghost:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(0, 199, 255, 0.22);
}

body.login-page .auth-button--accent {
    background: linear-gradient(90deg, #ff8b3d, #ffb347);
    color: #120f1b;
    box-shadow: 0 20px 48px rgba(255, 140, 61, 0.32);
}

body.login-page .auth-button--accent:hover,
body.login-page .auth-button--accent:focus {
    transform: translateY(-2px);
    box-shadow: 0 28px 64px rgba(255, 140, 61, 0.42);
}

.secure-check {
    max-width: 560px;
    margin: 40px auto 60px;
    padding: 36px 40px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)), var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    gap: 18px;
    font-family: 'Ubuntu', sans-serif;
    font-weight: 300;
}

.secure-check__title {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
    text-shadow: var(--glow-blue);
}

.secure-check__intro {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.secure-check__form,
.secure-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.secure-check__label,
.secure-form .input-group span,
.secure-form label {
    font-weight: 300;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(230, 231, 238, 0.85);
}

.secure-check__required {
    color: var(--neon-yellow);
    margin-right: 6px;
}

.secure-check__form input[type="email"],
.secure-check__form input[type="text"],
.secure-form input[type="email"],
.secure-form input[type="text"],
.secure-form input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    background: rgba(13, 15, 20, 0.9);
    border: 1px solid rgba(0, 199, 255, 0.35);
    border-radius: 10px;
    color: var(--text);
    font-size: 1rem;
    font-family: 'Ubuntu', sans-serif;
    font-weight: 300;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.secure-check__form input[type="email"]:focus,
.secure-check__form input[type="text"]:focus,
.secure-form input[type="email"]:focus,
.secure-form input[type="text"]:focus,
.secure-form input[type="password"]:focus {
    outline: none;
    border-color: rgba(255, 165, 0, 0.8);
    box-shadow: 0 0 18px rgba(255, 165, 0, 0.25), inset 0 0 0 1px rgba(255, 165, 0, 0.35);
}

.secure-check__form input:disabled,
.secure-form input:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.secure-check__submit,
.secure-form__actions button,
.secure-check__footer .secure-check__back-link {
    margin-top: 8px;
    padding: 14px 20px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--neon-green), #66ffcc);
    color: #04130b;
    font-family: 'Ubuntu', sans-serif;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 22px 50px rgba(41, 231, 107, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.secure-check__submit:hover,
.secure-check__submit:focus,
.secure-form__actions button:hover,
.secure-form__actions button:focus,
.secure-check__footer .secure-check__back-link:hover,
.secure-check__footer .secure-check__back-link:focus {
    transform: translateY(-2px);
    background: linear-gradient(90deg, #ffb347, #ff6a00);
    color: #0b0500;
    box-shadow: 0 26px 60px rgba(255, 153, 0, 0.35);
}

.secure-check__submit:disabled,
.secure-form__actions button:disabled {
    box-shadow: none;
}

.secure-check__footer {
    display: flex;
    justify-content: center;
}

.secure-check__message {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
}

.secure-check__message--success {
    background: rgba(41, 231, 107, 0.12);
    border: 1px solid rgba(41, 231, 107, 0.5);
    color: var(--text);
    text-shadow: var(--glow-green);
}

.secure-check__message--error {
    background: rgba(255, 59, 92, 0.12);
    border: 1px solid rgba(255, 59, 92, 0.5);
    color: var(--text);
    text-shadow: var(--glow-red);
}

.secure-check__hint {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(230, 231, 238, 0.6);
}

body.login-page .auth-card__hints {
    background: rgba(13, 15, 20, 0.75);
    border: 1px solid rgba(0, 199, 255, 0.18);
    border-radius: 10px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

body.login-page .auth-card__hints p {
    color: rgba(230, 231, 238, 0.75);
    font-size: 0.95rem;
}

body.login-page .info {
    color: #9b5cff;
    background: rgba(155, 92, 255, 0.1);
    border: 1px solid rgba(155, 92, 255, 0.4);
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 0.95rem;
}

body.login-page .error {
    border-radius: 8px;
    border: 1px solid rgba(255, 59, 92, 0.45);
    background: rgba(255, 59, 92, 0.12);
    color: #ffb3c1;
    box-shadow: 0 12px 28px rgba(255, 59, 92, 0.18);
}

body.login-page .auth-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (max-width: 640px) {
    body.login-page .container {
        margin: 0 16px 48px;
        padding: 28px 24px 32px;
    }

    body.login-page .auth-button {
        letter-spacing: 0.08em;
    }
}


/* Ü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 klassischen Login-Container (z.B. Admin-Login) */
.login-container { /* Wird für 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 */
}

body.cloud-server-page .container {
    max-width: none;
    width: min(100%, max-content);
    background: transparent;
    box-shadow: none;
}

@supports not (width: min(100%, max-content)) {
    body.cloud-server-page .container {
        width: 100%;
        background: transparent;
        box-shadow: none;
    }
}

/* Admin Login – abgestimmt auf das Dashboard-Look & Feel */
.admin-login-page .container {
    max-width: 540px;
    margin: 80px auto;
    padding: 40px 48px;
    border-radius: 22px;
    background: radial-gradient(circle at 20% -10%, rgba(255, 213, 102, 0.22), transparent 55%),
                radial-gradient(circle at 85% 0%, rgba(102, 204, 255, 0.18), transparent 45%),
                rgba(15, 16, 28, 0.92);
    border: 1px solid rgba(255, 213, 102, 0.28);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55);
}

.admin-login-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

.admin-heading--login {
    color: #ffe47a;
    text-shadow: 0 0 14px rgba(255, 216, 125, 0.85), 0 0 30px rgba(255, 170, 0, 0.55);
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.admin-login__card {
    width: 100%;
    padding: 36px 34px;
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(18, 20, 38, 0.88), rgba(8, 9, 22, 0.94));
    border: 1px solid rgba(255, 213, 102, 0.22);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02), 0 25px 45px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.admin-login__card::before {
    content: "";
    position: absolute;
    inset: -30% -35% auto;
    height: 240px;
    background: radial-gradient(circle, rgba(255, 215, 120, 0.18) 0%, transparent 70%);
    z-index: 0;
}

.admin-login__card > * {
    position: relative;
    z-index: 1;
}

.admin-login__intro {
    margin: 0 0 20px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 240, 205, 0.85);
}

.form-message {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    font-weight: 600;
    letter-spacing: 0.04em;
}

.form-message--error {
    color: var(--neon-red);
    border-color: rgba(255, 77, 109, 0.35);
    box-shadow: 0 12px 22px rgba(255, 77, 109, 0.18);
}

.form-message .material-symbols-outlined {
    font-size: 1.4rem;
}

.admin-login__form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.admin-login__form label {
    color: rgba(255, 240, 205, 0.88);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 225, 160, 0.45);
}

.admin-login__input-group {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-radius: 14px;
    border: 1px solid rgba(255, 215, 120, 0.28);
    background: rgba(12, 14, 26, 0.85);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-login__input-group:focus-within {
    border-color: rgba(255, 219, 120, 0.8);
    box-shadow: 0 0 22px rgba(255, 219, 120, 0.28);
}

.admin-login__input-group .material-symbols-outlined {
    color: rgba(255, 222, 125, 0.8);
    font-size: 1.5rem;
}

.admin-login__input-group input {
    flex: 1;
    background: transparent;
    border: 0 !important;
    padding: 6px 0;
    color: #f6f8ff;
    font-size: 1rem;
    font-weight: 500;
    box-shadow: none !important;
}

.admin-login__input-group input:focus {
    outline: none;
}

.admin-login__submit {
    margin-top: 6px;
    align-self: flex-end;
    padding: 12px 32px;
    border-radius: 999px;
    border: 1px solid rgba(255, 225, 140, 0.6);
    background: radial-gradient(circle at 50% 120%, rgba(255, 214, 102, 0.22), transparent 65%);
    color: #ffe47a;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    text-shadow: 0 0 18px rgba(255, 226, 140, 0.75);
    box-shadow: 0 18px 30px rgba(255, 214, 102, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.admin-login__submit:hover,
.admin-login__submit:focus {
    border-color: rgba(255, 234, 160, 0.9);
    box-shadow: 0 24px 42px rgba(255, 222, 140, 0.28);
}

@media (max-width: 640px) {
    .admin-login-page .container {
        margin: 40px 16px;
        padding: 32px 26px;
    }

    .admin-login__card {
        padding: 28px 24px;
    }

    .admin-heading--login {
        text-align: center;
        letter-spacing: 0.18em;
    }

    .admin-login__submit {
        align-self: center;
        width: 100%;
        justify-content: center;
    }
}

/* Logo zentrieren und Abstand definieren */
.logo-container {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 10px;
}
.logo-container img {
    max-width: 100%;
    height: 80px;
    width: auto;
}
/* Beschriftungen für Formulare */
label {
    display: block;
    margin: 15px 0 5px;
    color: #ff00ff; /* Neon-Magenta Beschriftungen */
    text-shadow: 0 0 5px #ff00ff;
}

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

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    border-color: #ff00ff;
    box-shadow: 0 0 8px #ff00ff;
    outline: none;
}

/* 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 */
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    margin-top: 20px; /* Standard-Abstand nach oben */
    border-radius: 8px;
    border: 1px solid rgba(102, 204, 255, 0.35);
    background: rgba(15, 15, 30, 0.85);
    color: #66ccff;
    font-family: 'Ubuntu', sans-serif;
    font-weight: 400;
    text-decoration: none; /* Für Links, die wie Buttons aussehen */
    text-align: center; /* Textzentrierung im Button */
    box-shadow: 0 0 12px rgba(102, 204, 255, 0.18);
    cursor: pointer;
    transition: color 0.3s ease, text-shadow 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

button .material-symbols-outlined,
a.button .material-symbols-outlined {
    font-size: 1.2em;
}

button[style*="background-color"],
a.button[style*="background-color"] {
    color: #ffffff;
}

button:hover,
a.button:hover {
    color: #ffa500;
    text-shadow: 0 0 8px #ff9900, 0 0 16px #ff6600;
    box-shadow: 0 0 18px rgba(255, 153, 0, 0.3);
    text-decoration: none;
    transform: translateY(-1px);
}

/* 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;
}

.cloud-label {
    color: #cbd5f5;
}

.cloud-server-login-form {
    display: grid;
    gap: 14px;
    max-width: 420px;
    margin-top: 10px;
}

.cloud-server-login-form input[type="text"],
.cloud-server-login-form input[type="password"] {
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.7);
    color: #e2e8f0;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cloud-server-login-form input[type="text"]:focus,
.cloud-server-login-form input[type="password"]:focus {
    border-color: rgba(129, 140, 248, 0.7);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.22);
    outline: none;
}

.cloud-server-forward-button {
    margin-top: 10px;
    padding: 12px 22px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #38bdf8, #6366f1);
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cloud-server-forward-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(99, 102, 241, 0.4);
}

.cloud-server-hint {
    margin-top: 24px;
    font-size: 0.95rem;
    color: rgba(148, 163, 184, 0.75);
}

/* 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, .header-buttons .btn, .top-buttons .btn {
    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;
    color: #ffffff;
}
.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 */
}

/* === Cyberpunk / Neon Theme – Add-On =============================== */
/* Font */

:root{
  --surface:#0d0f14;
  --panel:#12141b;
  --line:#1d2230;
  --text:#e6e7ee;
  --muted:#a7adbd;

  --uv:#9b5cff;
  --neon-blue:#00c7ff;
  --neon-red:#ff3b5c;
  --neon-yellow:#ffd166;
  --neon-green:#29e76b;

  --glow-uv: 0 0 10px rgba(155,92,255,.6), 0 0 22px rgba(155,92,255,.35);
  --glow-blue: 0 0 10px rgba(0,199,255,.55), 0 0 20px rgba(0,199,255,.28);
  --glow-red: 0 0 10px rgba(255,59,92,.5), 0 0 20px rgba(255,59,92,.25);
  --glow-yellow: 0 0 10px rgba(255,209,102,.45), 0 0 18px rgba(255,209,102,.22);
  --glow-green: 0 0 10px rgba(41,231,107,.5), 0 0 20px rgba(41,231,107,.25);

  --radius: 14px;
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

.neon-icon,
.icon-outline-neon {
  color: inherit;
  text-shadow: inherit;
  vertical-align: middle;
  font-size: 1.2em;
}

html,body{
  background:
    radial-gradient(1200px 800px at 80% -10%, rgba(155,92,255,.08), transparent 60%),
    radial-gradient(900px 600px at 10% 110%, rgba(0,199,255,.06), transparent 60%),
    linear-gradient(180deg, #0a0c11 0%, #0d0f14 100%);
  color:var(--text);
  font-family: Ubuntu, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Subtiles Grid */
body::before{
  content:"";
  position:fixed; inset:0;
  pointer-events:none;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(0deg,  rgba(255,255,255,0.03) 0 1px, transparent 1px 64px);
  mask: linear-gradient(0deg, transparent, #000 15% 85%, transparent);
}

/* Headings & Links */
h1,h2,h3{
  color:var(--uv);
  text-shadow: var(--glow-uv);
  letter-spacing:.3px;
}
a{
  color:var(--neon-blue);
  text-decoration:none;
  transition: all .15s ease;
}
a:hover, a:focus{
  text-shadow: var(--glow-blue);
  outline:none;
}

/* Panels / Tables */
.container, .form-wrapper, .table-panel{
  background:linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01)) , var(--panel);
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

table{
  width:100%;
  border-collapse:collapse;
}
th, td{
  padding:14px 16px;
  border-bottom:1px solid rgba(255,255,255,.06);
}
th{
  color:#d6d8e5;
  font-weight:600;
  border-bottom: 1px solid rgba(0,199,255,.25);
}

/* Neon Buttons – text-only with icon */
.btn{
  display:inline-flex; align-items:center; gap:.55rem;
  padding:0; margin:0;
  background:transparent; border:none;
  color:var(--text);
  font-weight:600;
  cursor:pointer;
  text-decoration:none;
}
.btn svg, .btn i{ font-style:normal; }
.btn:hover{ transform:translateY(-1px); }

.btn--edit{ color:var(--neon-blue); text-shadow:var(--glow-blue); }
.btn--edit:hover{ filter:brightness(1.15); }

.btn--delete{ color:var(--neon-red); text-shadow:var(--glow-red); }
.btn--delete:hover{ filter:brightness(1.15); }

.btn--success{ color:var(--neon-green); text-shadow:var(--glow-green); }
.btn--success:hover{ filter:brightness(1.15); }

.btn--danger{ color:var(--neon-red); text-shadow:var(--glow-red); }
.btn--ghost{ color:var(--muted); }
.btn--ghost:hover{ color:var(--neon-blue); text-shadow:var(--glow-blue); }

.actions .sep{ color:rgba(255,255,255,.25); padding:0 .35rem; }


.dashboard-title {
  font-family: 'Ubuntu', sans-serif;
  font-size: 3rem;
  font-weight: 300;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 20px;
  background: linear-gradient(
    90deg,
    #ff0000,
    #ff7f00,
    #ffff00,
    #00ff00,
    #0000ff,
    #8b00ff,
    #ff0000);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: rainbowShift 12s linear infinite;
  text-shadow: 0 0 8px rgba(255,255,255,0.8), 0 0 16px rgba(255,255,255,0.5);
}

.dashboard-title .dashboard-icon {
  font-size: 1.4em;
}

.admin-heading {
  font-family: 'Ubuntu', sans-serif;
  font-weight: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 20px;
  text-transform: none;
  color: #ff66cc;
  text-shadow: 0 0 8px rgba(255, 102, 204, 0.8), 0 0 16px rgba(255, 102, 204, 0.5);
}

.admin-heading .material-symbols-outlined {
  font-size: 1.4em;
}

.admin-heading.dashboard {
  color: #ff66cc;
  text-shadow: 0 0 8px rgba(255, 102, 204, 0.8), 0 0 16px rgba(255, 102, 204, 0.5);
}

.admin-heading.billing {
  color: #ffcc33;
  text-shadow: 0 0 8px rgba(255, 204, 51, 0.8), 0 0 16px rgba(255, 165, 0, 0.6);
}

.admin-heading.ticket-create {
  color: #66ccff;
  text-shadow: 0 0 8px rgba(102, 204, 255, 0.8), 0 0 16px rgba(51, 153, 255, 0.5);
}

.customer-heading {
  font-family: 'Ubuntu', sans-serif;
  font-weight: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 20px;
  text-transform: none;
  color: #66ccff;
  text-shadow: 0 0 8px rgba(102, 204, 255, 0.8), 0 0 16px rgba(51, 153, 255, 0.5);
}

.customer-heading .material-symbols-outlined {
  font-size: 1.4em;
}

.customer-heading.dashboard {
  color: #ff66cc;
  text-shadow: 0 0 8px rgba(255, 102, 204, 0.8), 0 0 16px rgba(255, 102, 204, 0.5);
}

.customer-heading.ticket-create {
  color: #66ccff;
  text-shadow: 0 0 8px rgba(102, 204, 255, 0.8), 0 0 16px rgba(51, 153, 255, 0.5);
}

.customer-heading.cloud {
  color: #7ef9ff;
  text-shadow: 0 0 10px rgba(126, 249, 255, 0.8), 0 0 20px rgba(64, 224, 208, 0.5);
}

.cloud-server-card {
  background: rgba(12, 12, 38, 0.82);
  box-shadow: 0 0 24px rgba(102, 204, 255, 0.15);
  border: 1px solid rgba(102, 204, 255, 0.25);
}

.cloud-server-card .customer-heading {
  color: #7ef9ff;
}

.cloud-server-description {
  color: #e6f7ff;
}

.cloud-server-table-wrapper {
  background: rgba(8, 8, 28, 0.65);
  border-radius: 16px;
  padding: 4px;
  box-shadow: inset 0 0 12px rgba(102, 204, 255, 0.18);
}

.cloud-server-table {
  background: rgba(6, 6, 22, 0.88);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(102, 204, 255, 0.2);
  color: #dbefff;
}

.cloud-server-table thead th {
  background: linear-gradient(90deg, rgba(14, 54, 94, 0.9), rgba(22, 70, 118, 0.8));
  color: #c3ecff;
}

.cloud-server-table tbody tr:nth-child(odd) {
  background: rgba(14, 18, 46, 0.75);
}

.cloud-server-table tbody tr:nth-child(even) {
  background: rgba(10, 14, 40, 0.78);
}

.cloud-server-table tbody tr:hover {
  box-shadow: 0 0 12px rgba(102, 204, 255, 0.25);
}

.table-meta {
  display: block;
  font-size: 0.8rem;
  color: #9fb0c8;
}

.cloud-network-block {
  margin-bottom: 32px;
}

.cloud-network-block:last-of-type {
  margin-bottom: 0;
}

.cloud-network-block .neon-table-wrapper {
  margin-bottom: 16px;
}

.cloud-network-block .neon-table-wrapper:last-of-type {
  margin-bottom: 0;
}

.cloud-server-table td,
.cloud-server-table th {
  border-bottom: 1px solid rgba(102, 204, 255, 0.12);
}

.cloud-server-table tr:last-child td {
  border-bottom: none;
}

.status-badge {
  border: 1px solid rgba(126, 249, 255, 0.35);
  background: rgba(126, 249, 255, 0.08);
  color: #9ff7ff;
  box-shadow: 0 0 10px rgba(126, 249, 255, 0.2);
}

.status-badge--running,
.status-badge--active {
  border-color: rgba(113, 242, 154, 0.4);
  background: rgba(113, 242, 154, 0.12);
  color: #7df2a0;
  box-shadow: 0 0 10px rgba(113, 242, 154, 0.22);
}

.status-badge--initializing,
.status-badge--starting,
.status-badge--stopping {
  border-color: rgba(255, 214, 102, 0.45);
  background: rgba(255, 214, 102, 0.12);
  color: #ffd672;
  box-shadow: 0 0 10px rgba(255, 214, 102, 0.24);
}

.status-badge--off,
.status-badge--unknown {
  border-color: rgba(154, 160, 198, 0.35);
  background: rgba(154, 160, 198, 0.12);
  color: #b9bfdc;
  box-shadow: 0 0 10px rgba(154, 160, 198, 0.2);
}

@media (max-width: 720px) {
  .cloud-server-table tr {
    background: rgba(10, 14, 40, 0.85);
    border: 1px solid rgba(102, 204, 255, 0.22);
  }

  .cloud-server-table td {
    border-bottom: 1px solid rgba(102, 204, 255, 0.15);
  }

  .cloud-server-table td:last-child {
    border-bottom: none;
  }
}

.kpi-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 20px 0;
}

.kpi-card {
  display: block;
  text-align: center;
  padding: 16px;
  border-radius: 12px;
  background: rgba(20, 20, 20, 0.8);
  font-family: 'Ubuntu', sans-serif;
  font-weight: 300;
  box-shadow: 0 0 10px rgba(255, 165, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.kpi-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 20px rgba(255, 165, 0, 0.6);
}

.kpi-card .material-symbols-outlined {
  font-size: 2.2em;
  display: block;
  margin-bottom: 8px;
}

.kpi-card h2 {
  margin: 10px 0 5px;
  font-size: 1.1em;
}

.kpi-card p {
  font-size: 1.6em;
  margin: 0;
}

.kpi-card.tickets {
  color: #ff4d4d;
}

.kpi-card.kunden {
  color: #66ccff;
}

.kpi-card.rechnung {
  color: #b266ff;
}
.kpi-card.imap {
  color: #66ff66;
}

@media (max-width: 1100px) {
  .kpi-container {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@keyframes rainbowShift {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

.admin-dashboard table {
  margin-top: 15px;
}

.admin-table-card {
  position: relative;
  margin-top: 24px;
  border-radius: 20px;
  background: linear-gradient(140deg, rgba(13, 18, 35, 0.92), rgba(6, 9, 22, 0.88));
  border: 1px solid rgba(0, 199, 255, 0.12);
  box-shadow: 0 26px 48px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.admin-table-card::before {
  content: "";
  position: absolute;
  inset: -25% -20% auto;
  height: 220px;
  background: radial-gradient(circle, rgba(0, 199, 255, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table thead {
  background: linear-gradient(90deg, rgba(0, 199, 255, 0.08), rgba(164, 122, 255, 0.08));
}

.admin-table thead th {
  position: relative;
  padding: 18px 22px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: rgba(178, 225, 255, 0.85);
  border-bottom: 1px solid rgba(0, 199, 255, 0.22);
}

.admin-table thead th:first-child {
  padding-left: 28px;
}

.admin-table thead th:last-child {
  padding-right: 28px;
}

.admin-table thead th::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 199, 255, 0), rgba(0, 199, 255, 0.45), rgba(164, 122, 255, 0));
}

.admin-table tbody tr {
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-table tbody tr:nth-child(odd) {
  background: rgba(10, 18, 34, 0.86);
}

.admin-table tbody tr:nth-child(even) {
  background: rgba(7, 13, 26, 0.9);
}

.admin-table tbody tr:hover {
  background: rgba(36, 58, 94, 0.88);
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.4);
}

.admin-table td {
  padding: 18px 22px;
  border-bottom: 1px solid rgba(0, 199, 255, 0.08);
  color: #f4f8ff;
}

.admin-table td:first-child {
  padding-left: 28px;
  font-weight: 600;
  color: rgba(144, 216, 255, 0.9);
}

.admin-table td:last-child {
  padding-right: 28px;
}

.admin-table__subject {
  max-width: 320px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.admin-table td.actions {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.admin-table td.actions .sep {
  color: rgba(180, 220, 255, 0.3);
}

.admin-table td[data-label="Status"] {
  min-width: 150px;
}

@media (max-width: 1100px) {
  .admin-table__subject {
    max-width: 220px;
  }
}

@media (max-width: 900px) {
  .admin-table-card {
    border-radius: 18px;
  }

  .admin-table thead {
    display: none;
  }

  .admin-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 18px 22px;
  }

  .admin-table td,
  .admin-table td:first-child,
  .admin-table td:last-child {
    padding: 0;
    border: 0;
  }

  .admin-table tbody td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(0, 199, 255, 0.08);
  }

  .admin-table tbody td:last-child {
    border-bottom: 0;
  }

  .admin-table tbody td::before {
    content: attr(data-label);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(166, 216, 255, 0.65);
  }

  .admin-table td.actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .admin-table td.actions .sep {
    display: none;
  }
}

/* Status – text badges (keine Balken) */
.status{
  font-weight:300;
  text-transform:lowercase;
  letter-spacing:.2px;
}
.status--offen{ color:var(--neon-red); text-shadow:var(--glow-red); }
.status--inbearbeitung{ color:var(--neon-yellow); text-shadow:var(--glow-yellow); }
.status--erledigt, .status--geschlossen{ color:var(--neon-green); text-shadow:var(--glow-green); }

/* Forms */
label{ color:#d1d5e6; font-weight:600; }
input[type="text"], input[type="email"], input[type="password"], select, textarea{
  width:100%;
  color:var(--text);
  background:#0f1219;
  border:1px solid #1f2432;
  border-radius:10px;
  padding:12px 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus{
  outline:none;
  border-color: rgba(0,199,255,.55);
  box-shadow: 0 0 0 3px rgba(0,199,255,.12);
}

/* Row hover */
tbody tr:hover{ background: rgba(255,255,255,.02); }

/* Utility */
.glow{ text-shadow: var(--glow-uv); }

/* Rechnungsverwaltung Tabelle */
.rechnungstabelle {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.rechnungstabelle th,
.rechnungstabelle td {
  padding: 12px 20px;
  line-height: 1.6;
}

.rechnungstabelle th:nth-child(1),
.rechnungstabelle td:nth-child(1) {
  width: 60%;
}

.rechnungstabelle th:nth-child(2),
.rechnungstabelle td:nth-child(2) {
  width: 20%;
  text-align: right;
}

.rechnungstabelle th:nth-child(3),
.rechnungstabelle td:nth-child(3) {
  width: 20%;
  text-align: right;
}

/* Zusatzklassen für Rechnungsverwaltung */
.rechnungen-actions {
  margin-bottom: 15px;
}

.rechnungstabelle td.file {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.rechnungstabelle td.date {
  text-align: right;
}

.rechnungstabelle td.actions {
  text-align: right;
  white-space: nowrap;
}
