/*
 * Basisstylesheet für die pax‑laut an Mitarbeiterverwaltung.
 *
 * Dieses Stylesheet definiert eine aufgeräumte, responsive Oberfläche
 * mit klarer Typografie und ausreichenden Abständen. Das Layout
 * orientiert sich an modernen Backend‑Interfaces. Tabellen und Formulare
 * werden für die mobile Ansicht gestapelt dargestellt. Farben und
 * Kontraste sind bewusst dezent gewählt, um im täglichen Einsatz nicht
 * zu ermüden.
 */

html, body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background-color: #f9f7fb;
    color: #2d2840;
    line-height: 1.5;
    min-height: 100vh;
}

/* Navigation bar */
.navbar {
    background-color: #4b275b;
    color: #fff;
    padding: 0.6em 1em;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8em;
}
.navbar a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 0.4em 0.6em;
    border-radius: 4px;
}
.navbar a:hover {
    background-color: rgba(255,255,255,0.2);
}
.navbar .spacer {
    flex: 1;
}

/* Page container */
.container {
    padding: 1.5em;
    max-width: 1200px;
    margin: 0 auto;
}

/* Messages */
.success-message {
    background-color: #d9f2d9;
    border-left: 4px solid #2e8b57;
    padding: 0.8em;
    margin-bottom: 1em;
}
.error-message {
    background-color: #ffe5e5;
    border-left: 4px solid #cc0000;
    padding: 0.8em;
    margin-bottom: 1em;
}

/* Info message for neutral information (e.g. generated edit links) */
.info-message {
    background-color: #e6f4f9;
    border-left: 4px solid #5bc0de;
    padding: 0.8em;
    margin-bottom: 1em;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5em 0.8em;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.95rem;
    cursor: pointer;
    background-color: #6d41c2;
    color: #fff;
    transition: background 0.2s;
}
.btn:hover {
    background-color: #5833a7;
}
.btn.secondary {
    background-color: #e6e2f0;
    color: #4b275b;
}
.btn.secondary:hover {
    background-color: #d4cbe4;
}
.btn.small {
    font-size: 0.85rem;
    padding: 0.35em 0.6em;
}
.btn.primary {
    background-color: #3ab54a;
}
.btn.primary:hover {
    background-color: #329a3f;
}

/* Danger button for destructive actions like Löschen */
.btn.danger {
    background-color: #d9534f;
    color: #fff;
}
.btn.danger:hover {
    background-color: #c9302c;
}

/* Forms */
form label {
    display: block;
    margin-bottom: 0.4em;
    font-weight: 600;
}
form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="date"],
form input[type="number"],
form select,
form textarea {
    width: 100%;
    padding: 0.45em;
    margin-bottom: 1em;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}
form textarea {
    min-height: 60px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.2em;
}
table th, table td {
    text-align: left;
    padding: 0.6em 0.5em;
    border-bottom: 1px solid #ddd;
}
table th {
    background-color: #f0eaf7;
    font-weight: 600;
}
table tr:hover {
    background-color: #f8f4fc;
}

/* Sortierbare Spaltenlinks im Tabellenkopf sollen wie normale Überschriften aussehen */
table th a {
    color: inherit;
    text-decoration: none;
}
table th a:hover {
    text-decoration: underline;
}

/* Responsive behaviour for tables */
@media (max-width: 700px) {
    table thead {
        display: none;
    }
    table, table tbody, table tr, table td {
        display: block;
        width: 100%;
    }
    table tr {
        margin-bottom: 1em;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        border-radius: 4px;
    }
    table td {
        position: relative;
        padding-left: 50%;
        border-bottom: none;
    }
    table td:before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 45%;
        padding-left: 0.5em;
        font-weight: 600;
        white-space: nowrap;
    }
}

/* Login page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f5f0fc;
}
.login-container {
    background-color: #fff;
    padding: 2em;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 350px;
}
.login-container h1 {
    margin-top: 0;
    color: #4b275b;
}
.login-container h2 {
    margin-bottom: 1em;
    font-size: 1.2rem;
    color: #6d41c2;
}

/* Custom pill style for backstage badges */
.pill {
    display: inline-block;
    padding: 0.3em 0.8em;
    border-radius: 16px;
    color: #fff;
    font-size: 0.85rem;
    margin-right: 0.3em;
}
.pill.black { background-color: #222; }
.pill.green { background-color: #3ab54a; }
.pill.violet { background-color: #6d41c2; }
.pill.blue { background-color: #2593e7; }

/* Section titles in edit/add forms */
.section-title {
    margin-top: 1.4em;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 2px solid #e0dcef;
    padding-bottom: 0.3em;
    color: #4b275b;
}