/* Grunddesign */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #eef2f5;
    color: #333;
    margin: 40px 20px;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 850px;
    margin: 0 auto;
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    transition: background-color 0.3s;
}

/* NEU: Flexbox für Überschrift und Button */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #edf2f7;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

h1 {
    color: #1a365d;
    margin: 0;
    font-size: 28px;
}

/* Suchfeld Design */
.search-container {
    margin-bottom: 20px;
}

.search-bar {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.2s, background-color 0.3s, color 0.3s;
}

.search-bar:focus {
    border-color: #3182ce;
    outline: none;
}

.hidden-by-search {
    display: none !important;
}

/* Tabellen-Design */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

th, td {
    border-bottom: 1px solid #e2e8f0;
    padding: 15px 10px;
    text-align: left;
    transition: border-color 0.3s;
}

th {
    background-color: #f7fafc;
    color: #4a5568;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    transition: background-color 0.3s, color 0.3s;
}

tr:hover {
    background-color: #f8fafc;
}

input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 15px;
    background-color: transparent;
    transition: all 0.2s;
    box-sizing: border-box;
    color: inherit;
}

input[type="text"]:hover, input[type="text"]:focus {
    border: 1px solid #cbd5e0;
    background-color: #fff;
    outline: none;
}

/* Buttons */
.actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 20px;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: transform 0.1s, opacity 0.2s, background-color 0.3s, color 0.3s;
}

button:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: #3182ce;
    color: white;
    box-shadow: 0 4px 6px rgba(49, 130, 206, 0.3);
}

.btn-primary:hover {
    background-color: #2b6cb0;
}

.btn-secondary {
    background-color: #edf2f7;
    color: #4a5568;
}

.btn-secondary:hover {
    background-color: #e2e8f0;
}

/* --- NEU: Dark Mode Design --- */
body.dark-mode {
    background-color: #1a202c;
    color: #e2e8f0;
}

body.dark-mode .container {
    background-color: #2d3748;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

body.dark-mode .header-top {
    border-bottom-color: #4a5568;
}

body.dark-mode h1 {
    color: #e2e8f0;
}

body.dark-mode th {
    background-color: #4a5568;
    color: #e2e8f0;
}

body.dark-mode th, body.dark-mode td {
    border-bottom-color: #4a5568;
}

body.dark-mode tr:hover {
    background-color: #2a4365;
}

body.dark-mode .search-bar {
    background-color: #4a5568;
    color: #e2e8f0;
    border-color: #718096;
}

body.dark-mode input[type="text"]:hover, body.dark-mode input[type="text"]:focus {
    background-color: #4a5568;
    border-color: #a0aec0;
}

body.dark-mode .btn-secondary {
    background-color: #4a5568;
    color: #e2e8f0;
}

body.dark-mode .btn-secondary:hover {
    background-color: #718096;
}
/* ------------------------------- */

/* Druck- und PDF-Einstellungen */
@media print {
    body, body.dark-mode {
        background-color: white !important;
        color: black !important;
        margin: 0;
    }
    .container, body.dark-mode .container {
        box-shadow: none;
        padding: 0;
        width: 100%;
        background-color: white !important;
    }
    h1, body.dark-mode h1 {
        color: black !important;
    }
    th, body.dark-mode th {
        background-color: transparent !important;
        color: black !important;
    }
    th, td, body.dark-mode th, body.dark-mode td {
        border-bottom-color: #ddd !important;
    }
    input[type="text"] {
        border: none !important; 
        background: transparent !important;
        padding: 0;
        color: black !important;
    }
    .no-print {
        display: none !important; 
    }
    .hide-row-on-print {
        display: none !important;
    }
}