/* Globaler Reset und Variablen */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #082744;   /* Primärfarbe: Blau */
    --accent-color:  #C2150C;    /* Akzentfarbe: Rot */
    --background-color: #fff;    /* Hintergrundfarbe: Weiß */
    --text-color: #333;
    --font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Basis-Styles für den Body */
body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: var(--font-family);
    line-height: 1.6;
}

/* Header & Navigation */
header {
    background-color: var(--primary-color);
    width: 100%;
    /* Keine inneren Abstände, damit der Header komplett am Bildschirmrand ist */
    padding: 0;
}

header .container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
}

/* Logo im Header (auch für Loginbereich nutzbar) */
header .logo,
.login-logo {
    max-width: 150px;
    height: auto;
    border-radius: 10px;  /* Abgerundete Ecken */
}

/* Navigation innerhalb des Headers */
nav {
    flex-grow: 1;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: var(--background-color);
    text-decoration: none;
    font-weight: bold;
    padding: 10px 5px;
    transition: color 0.3s, border-bottom 0.3s;
}

nav ul li a:hover {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
}

/* Hauptbereich */
.main-content {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

/* Karten/Panel-Design */
.card {
    background-color: var(--background-color);
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.card h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* Formulare (z.B. Login) */
form {
    background-color: var(--background-color);
    padding: 20px;
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    margin: 20px auto;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--primary-color);
}

form input[type="text"],
form input[type="password"],
form input[type="email"],
form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    font-size: 14px;
}

.ticket-filter-form {
    width: 100%;
    max-width: 100%;
}

/* Buttons */
button,
.btn {
    background-color: var(--primary-color);
    color: var(--background-color);
    border: none;
    padding: 8px 15px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover,
.btn:hover {
    background-color: #104377;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--background-color);
    text-align: center;
    padding: 15px 20px;
    margin-top: 20px;
}

/* Überschriften & Texte */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

p {
    margin-bottom: 15px;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--accent-color);
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        align-items: center;
    }

    nav ul {
        flex-direction: column;
    }

    nav ul li {
        margin: 5px 0;
    }

    .main-content {
        padding: 0 10px;
    }
}

.login-logo {
    display: block;            /* Damit margin: 0 auto; funktioniert */
    max-width: 150px;          /* Maximale Breite, z.B. 150px */
    width: 100%;               /* Damit es responsiv kleiner werden kann */
    height: auto;              /* Erhält Seitenverhältnis */
    margin: 0 auto 20px auto;  /* Zentriert das Bild und fügt unteren Abstand ein */
    border-radius: 10px;       /* Abgerundete Ecken */
}

.tk-navbar {
    background-color: #082744; /* Hintergrund blau */
}

.navbar-dark.tk-navbar .navbar-nav .nav-link,
.navbar-dark.tk-navbar .navbar-brand,
.navbar-dark.tk-navbar .navbar-text {
    color: #fff; /* Text weiß */
}

.navbar-dark.tk-navbar .navbar-nav .nav-link:hover,
.navbar-dark.tk-navbar .navbar-brand:hover {
    color: #C2150C; /* Hover-Effekt in Rot */
}

.tk-modal-header {
    background-color: #082744;  /* Blau als Hintergrund */
    color: #fff;                /* Weißer Text */
    padding: 15px;              /* Angemessener Innenabstand */
}

.tk-modal-header h5 {
    color: #fff;  /* Weißer Text für die Überschrift */
    margin: 0;    /* Optional: Margin anpassen */
}

/* Falls du den Close-Button im Modal Header anpassen möchtest */
.tk-modal-header .close {
    color: #fff;
    opacity: 1;
}

#ticketsResults table {
    width: 98vw;
    margin: 0 auto;
}

.last-comment-cell {
    font-size: 0.85rem;
}

.last-comment-bubble {
    border-radius: 8px;
    padding: 4px 8px;
    display: inline-block;
    max-width: 300px;
    line-height: 1.2;
}
.last-comment-bubble.self {
    background-color: #dcf8c6; /* WhatsApp-like green */
    margin-left: auto;
}
.last-comment-bubble.other {
    background-color: #e5e5ea;
    margin-right: auto;
}
.last-comment-bubble .last-comment-author {
    font-weight: bold;
}
.last-comment-bubble .last-comment-time {
    font-size: 0.8rem;
    color: #888;
    text-align: right;
}

.history-row {
    display: flex;
    width: 100%;
    margin-bottom: 6px;
}
.history-row.self {
    justify-content: flex-end;
}
.history-row.other {
    justify-content: flex-start;
}
.history-bubble {
    border-radius: 8px;
    padding: 4px 8px;
    display: inline-block;
    max-width: 75%;
    line-height: 1.2;
}
.history-bubble.self {
    background-color: #dcf8c6;
}
.history-bubble.other {
    background-color: #e5e5ea;
}
.history-bubble .history-author {
    font-weight: bold;
}
.history-bubble .history-time {
    font-size: 0.8rem;
    color: #888;
    text-align: right;
}
.history-system {
    text-align: center;
    background-color: #eef5ff;
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 0.75rem;
    color: #555;
    margin: 6px auto;
    display: inline-block;
}
.history-system .history-time {
    font-size: 0.7rem;
    color: #888;
    text-align: center;
}
