:root {
    --primary: #2D401F;
    --white: #ffffff;
}

body {
    margin: 0;
    padding: 0;
    display: block; /* Verhindert, dass Header und Content nebeneinander stehen */
    background-color: #ffffff;
}

.main-header {
    background: url('../images/bgpattern_jungle_sand_1011x400px.png') center center / cover no-repeat;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.header-inner {
    text-align: center;
}

.header-logo {
    max-height: 200px;
    width: auto;
    height: auto;
}

.container.dashboard {
    margin: 40px auto; /* Zentriert das Dashboard mit Abstand zum Header */
    max-width: 1200px;
    width: 90%;
    float: none; /* Sicherung gegen alte Floats */
}

.container {
    background: var(--primary);
    color: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border-radius: 10px;
    border: none;
    box-sizing: border-box;
}

button {
    background: var(--white);
    color: var(--primary);
    border: none;
    padding: 12px 24px;
    border-radius: 20px;
    text-transform: uppercase;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
}

.dashboard {
    max-width: 900px;
    width: 90%;
}

nav {
    margin-bottom: 20px;
    text-align: right;
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 0.8rem;
    border: 1px solid white;
    padding: 5px 10px;
    border-radius: 10px;
}

.grid-nav {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 20px; 
    margin-top: 30px;
}

.card {
    background: rgba(255,255,255,0.1); 
    padding: 20px; 
    border-radius: 15px; 
    border: 1px solid rgba(255,255,255,0.2);
}

.wide {
    max-width: 1200px;
    width: 95%;
}

.page-title {
    text-align: left;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.back-link {
    color: var(--white);
    text-decoration: none;
    font-size: 0.8rem;
    border: 1px solid var(--white);
    padding: 5px 12px;
    border-radius: 10px;
    display: inline-block;
}

.table-responsive {
    overflow-x: auto;
    margin-top: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--white);
    text-align: left;
}

.data-table th, .data-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.data-table th {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    opacity: 0.7;
}

.status-pill {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status-1 {
    background: #83A14B;
}

.status-0 {
    background: #d9534f;
}

.btn-delete {
    background: #d9534f;
    color: var(--white);
    border: none;
    padding: 6px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.7rem;
    transition: opacity 0.2s;
}

.btn-delete:hover {
    opacity: 0.8;
}

.alert {
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    text-align: left;
}

.alert-delete {
    background: rgba(217, 83, 79, 0.2);
    border: 1px solid #d9534f;
}

.editor-container { 
    max-width: 1000px; 
    margin: 40px auto; 
    background: #2D401F; 
    padding: 30px; 
    border-radius: 20px; 
    color: white; 
}
        
.back-link { 
    color: white; 
    text-decoration: none; 
    margin-bottom: 20px; display: 
    inline-block; font-size: 0.8rem; 
    border: 1px solid white; 
    padding: 5px 10px; 
    border-radius: 10px; 
}
    
.table-actions {
    text-align: left;
    margin-bottom: 15px;
}

.btn-primary {
    background: #83A14B;
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 15px;
    text-transform: uppercase;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.8rem;
}

.btn-primary:hover {
    background: #6d853e;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #83A14B;
}

.data-table td input[type="checkbox"] {
    margin: 0;
    vertical-align: middle;
}

/* 2. FILTER BAR: Festes Grid für eine Zeile ohne Umbruch */
.filter-form {
    display: grid;
    /* 3 Spalten für Filter (flexibel), 2 Spalten für Buttons (fest) */
    grid-template-columns: 1fr 1fr 1fr auto auto;
    gap: 15px;
    align-items: center; /* Zentriert alles vertikal in der Zeile */
}

.filter-group {
    display: grid;
    grid-template-columns: auto 1fr; /* Label und Feld nebeneinander */
    gap: 10px;
    align-items: center;
}

.filter-group label {
    font-size: 0.75rem;
    text-transform: uppercase;
    opacity: 0.7;
    height: auto; /* Auf 'auto' gesetzt für Grid-Zentrierung */
    white-space: nowrap;
}

/* 1. Der Container braucht eine feste Höhe, damit er überhaupt scrollt */
.table-wrapper {
    max-height: 500px; /* Hier stellst du ein, wie viel man sieht, bevor man scrollen muss */
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* 2. Den Tabellenkopf fixieren */
.data-table thead th {
    position: sticky;
    top: 0;
    background-color: #2D401F; /* Deine Wonderland-Primärfarbe */
    z-index: 10;
    opacity: 1 !important; /* Verhindert, dass der Header beim Scrollen durchsichtig wird */
    border-bottom: 2px solid #1a2612;
}

/* 3. Wichtig: collapse auf separate stellen, damit sticky im Browser sauber greift */
.data-table {
    width: 100%;
    border-collapse: separate; 
    border-spacing: 0;
}

/* 4. OPTIONAL: Schmalere Buttons für die Filterzeile */
.btn-filter, .btn-reset {
    width: auto; 
    padding: 0 20px;
}

.filter-group select, 
.filter-group input[type="date"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: var(--white);
    color: var(--primary);
    border: none;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    height: 40px;
    line-height: 40px;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
}

.btn-filter, 
.btn-reset {
    height: 40px;
    border-radius: 10px;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin: 0;
    border: none;
}

.btn-filter {
    background: #83A14B;
    color: var(--white);
}

.btn-reset {
    background: rgba(255,255,255,0.1);
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.3);
}

.pagination {
    margin-top: 25px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.pagination a {
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.pagination a.active {
    background: #83A14B;
    font-weight: bold;
}

.pagination a:hover:not(.active) {
    background: rgba(255, 255, 255, 0.2);
}

.alert-info {
    background: rgba(131, 161, 75, 0.3);
    border: 1px solid #83A14B;
    color: var(--white);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.success-screen-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #ffffff;
}

.success-screen-card {
    background: #2D401F;
    color: #ffffff;
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    max-width: 500px;
    width: 90%;
}

.success-screen-card h1 {
    text-transform: uppercase;
    margin-bottom: 30px;
}

.btn-white-action {
    background: #ffffff;
    color: #2D401F;
    padding: 12px 24px;
    border-radius: 20px;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: bold;
    display: inline-block;
}