:root {
    --main: #6699cc;
    --main-dark: #336699;
    --main-light: #99cccc;
    --accent: #ffcc66;
}

/* Grundlayout */
body {
    font-family: Arial, sans-serif;
    margin: 10px;
    background: #f7f9fc;
}

/* Überschriften */
h1 {
    color: var(--main-dark);
    margin-bottom: 10px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 14px;
    background: var(--main);
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: 0.2s;
    border: 1px solid var(--main-dark);
}

.btn:hover {
    background: var(--main-dark);
}

.btn-accent {
    background: var(--accent);
    color: black;
    border-color: #d4a843;
}

.btn-accent:hover {
    background: #e6b85c;
}

/* Filterbereich */
form.filterbar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

form.filterbar label {
    font-weight: bold;
    color: var(--main-dark);
}

form.filterbar input[type="text"],
form.filterbar select {
    padding: 6px;
    border: 1px solid var(--main-dark);
    border-radius: 4px;
}

/* Tabellen */
table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #999;
    background: white;
}

th,
td {
    padding: 10px;
    border: 1px solid #ccc;
}

th {
    background: var(--main-light);
    color: #003355;
    cursor: pointer;
    font-weight: bold;
}

tr:hover {
    background: #eef6ff;
}

/* Paging */
.paging {
    margin-top: 20px;
    text-align: center;
}

.paging a {
    margin: 0 5px;
}

/* Mobile */
@media (max-width: 800px) {
    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    thead {
        display: none;
    }

    tr {
        margin-bottom: 15px;
        border: 1px solid #ccc;
        padding: 10px;
        border-radius: 6px;
        background: white;
    }

    td {
        border: none;
        padding: 6px 0;
    }

    td::before {
        content: attr(data-label);
        font-weight: bold;
        color: var(--main-dark);
        display: block;
    }
}

/* Feste Breite für die letzten beiden Spalten */
.autorenliste th:nth-last-child(2),
.autorenliste td:nth-last-child(2) {
    width: 10ch; /* Spalte "Anzahl Bücher" */
    text-align: center;
}

.autorenliste th:last-child,
.autorenliste td:last-child {
    width: 5ch; /* Spalte "Bearbeiten" */
    text-align: center;
}

/* Container für Tabelle + Paging der Autorenliste */
.autoren-container {
    width: 100%;
}

/* Auf großen Desktops: nur linke Hälfte nutzen */
@media (min-width: 1200px) {
    .autoren-container {
        width: 50vw; /* halbe Bildschirmbreite */
        max-width: 50vw;
    }
}
