/* =========================================================
   Bildungsdirektion Anderer Weg
========================================================= */

.bd-button-sekundaer {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 42px !important;
    padding: 10px 16px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    background: white !important;
    color: #334155 !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all .16s ease !important;
}

    .bd-button-sekundaer:hover {
        background: #eff6ff !important;
        border-color: #60a5fa !important;
        color: #1d4ed8 !important;
    }

.bd-button-export {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 42px !important;
    padding: 10px 16px !important;
    border: none !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg,#2563eb,#1d4ed8) !important;
    color: white !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    box-shadow: 0 6px 14px rgba(37,99,235,.2) !important;
}

    .bd-button-export:hover {
        background: linear-gradient(135deg,#1d4ed8,#1e40af) !important;
    }

.bd-button-speichern {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 42px !important;
    padding: 10px 18px !important;
    border: none !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg,#f59e0b,#d97706) !important;
    color: white !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    cursor: pointer !important;
    box-shadow: 0 6px 14px rgba(217,119,6,.22) !important;
}

    .bd-button-speichern:hover {
        background: linear-gradient(135deg,#d97706,#b45309) !important;
    }

/* =========================================================
   Bildungsdirektion - Anderer Weg
   Moderne Tabelle und sichere Einzelauswahl
========================================================= */

/* Gesamter Tabellenbereich */
.bd-tabellen-container {
    width: 100% !important;
    overflow-x: auto !important;
    margin-top: 14px !important;
    border: 1px solid #dbe3ee !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.06) !important;
}

/* Tabelle */
.bd-datentabelle {
    width: 100% !important;
    min-width: 1050px !important;
    margin: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: #ffffff !important;
    color: #1f2937 !important;
}

    /* Tabellenkopf */
    .bd-datentabelle thead th {
        padding: 13px 12px !important;
        background: #e9eef5 !important;
        border: none !important;
        border-right: 1px solid #cbd5e1 !important;
        border-bottom: 1px solid #cbd5e1 !important;
        color: #111827 !important;
        font-size: 13px !important;
        font-weight: 900 !important;
        line-height: 1.3 !important;
        text-align: left !important;
        vertical-align: middle !important;
        white-space: nowrap !important;
    }

        .bd-datentabelle thead th:last-child {
            border-right: none !important;
        }

    /* Tabellenzellen */
    .bd-datentabelle tbody td {
        padding: 11px 12px !important;
        border: none !important;
        border-right: 1px solid #e2e8f0 !important;
        border-bottom: 1px solid #dbe3ee !important;
        background: #ffffff !important;
        color: #1f2937 !important;
        font-size: 13px !important;
        line-height: 1.4 !important;
        vertical-align: middle !important;
    }

        .bd-datentabelle tbody td:last-child {
            border-right: none !important;
        }

    /* Abwechselnde Zeilenfarben */
    .bd-datentabelle tbody tr:nth-child(even) td {
        background: #f1f5f9 !important;
    }

    /* Markierung beim Darüberfahren */
    .bd-datentabelle tbody tr:hover td {
        background: #eaf2ff !important;
    }

    /* Letzte Tabellenzeile ohne untere Linie */
    .bd-datentabelle tbody tr:last-child td {
        border-bottom: none !important;
    }

    /* Herkunftsschule hervorheben */
    .bd-datentabelle tbody td strong {
        color: #111827 !important;
        font-weight: 800 !important;
    }

/* Statusanzeige */
.bd-status-anderer-weg {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 5px 10px !important;
    border: 1px solid #ddd6fe !important;
    border-radius: 999px !important;
    background: #ede9fe !important;
    color: #6d28d9 !important;
    font-size: 12px !important;
    font-weight: 850 !important;
    white-space: nowrap !important;
}

/* Checkbox-Spalte */
.bd-checkbox-spalte {
    width: 155px !important;
    min-width: 155px !important;
    text-align: center !important;
    white-space: normal !important;
}

/* Checkbox */
.doch-kein-anderer-weg-checkbox {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 21px !important;
    height: 21px !important;
    margin: 0 !important;
    border: 2px solid #94a3b8 !important;
    border-radius: 6px !important;
    background: #ffffff !important;
    cursor: pointer !important;
    vertical-align: middle !important;
    transition: all 0.15s ease !important;
}

    .doch-kein-anderer-weg-checkbox:hover {
        border-color: #2563eb !important;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
    }

    .doch-kein-anderer-weg-checkbox:checked {
        border-color: #2563eb !important;
        background-color: #2563eb !important;
        background-image: linear-gradient( 45deg, transparent 42%, #ffffff 42%, #ffffff 56%, transparent 56% ), linear-gradient( -45deg, transparent 47%, #ffffff 47%, #ffffff 59%, transparent 59% ) !important;
        background-position: 3px 9px, 8px 6px !important;
        background-size: 7px 4px, 10px 7px !important;
        background-repeat: no-repeat !important;
    }

    .doch-kein-anderer-weg-checkbox:focus {
        outline: none !important;
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18) !important;
    }

/* Hinweis oberhalb der Tabelle */
.bd-ruecksetzen-hinweis {
    padding: 16px 18px !important;
    margin: 6px 0 16px 0 !important;
    border: 1px solid #fed7aa !important;
    border-left: 6px solid #f59e0b !important;
    border-radius: 13px !important;
    background: #fff7ed !important;
}

    .bd-ruecksetzen-hinweis h3 {
        margin: 0 0 7px 0 !important;
        color: #9a3412 !important;
        font-size: 19px !important;
        font-weight: 900 !important;
    }

    .bd-ruecksetzen-hinweis p {
        margin: 0 !important;
        color: #7c2d12 !important;
        font-size: 14px !important;
        line-height: 1.5 !important;
    }

/* Speicherbereich unter der Tabelle */
.bd-speichern-unten {
    display: flex !important;
    justify-content: flex-end !important;
    margin-top: 16px !important;
}

/* Hauptbutton zum Zurücksetzen */
.bd-button-speichern {
    appearance: none !important;
    -webkit-appearance: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    min-height: 44px !important;
    padding: 11px 20px !important;
    border: none !important;
    border-radius: 11px !important;
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #ffffff !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    cursor: pointer !important;
    box-shadow: 0 7px 16px rgba(217, 119, 6, 0.23) !important;
    transition: all 0.16s ease !important;
}

    .bd-button-speichern::before {
        content: "↩" !important;
        font-size: 17px !important;
        font-weight: 900 !important;
    }

    .bd-button-speichern:hover {
        background: linear-gradient(135deg, #d97706, #b45309) !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 9px 20px rgba(217, 119, 6, 0.29) !important;
    }

    .bd-button-speichern:active {
        transform: translateY(0) !important;
        box-shadow: 0 4px 10px rgba(217, 119, 6, 0.20) !important;
    }

    .bd-button-speichern:focus {
        outline: none !important;
        box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.20), 0 7px 16px rgba(217, 119, 6, 0.23) !important;
    }

/* Excel-Button */
.bd-button-export {
    appearance: none !important;
    -webkit-appearance: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 43px !important;
    padding: 10px 17px !important;
    border: none !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 850 !important;
    cursor: pointer !important;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.20) !important;
    transition: all 0.16s ease !important;
}

    .bd-button-export:hover {
        background: linear-gradient(135deg, #1d4ed8, #1e40af) !important;
        transform: translateY(-1px) !important;
    }

    .bd-button-export:disabled {
        cursor: not-allowed !important;
        opacity: 0.55 !important;
        transform: none !important;
        box-shadow: none !important;
    }

/* Erfolg und Fehler */
.bd-meldung {
    padding: 14px 16px !important;
    margin-bottom: 18px !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    font-weight: 800 !important;
}

.bd-meldung-erfolg {
    background: #ecfdf5 !important;
    border: 1px solid #86efac !important;
    border-left: 6px solid #16a34a !important;
    color: #14532d !important;
}

.bd-meldung-fehler {
    background: #fef2f2 !important;
    border: 1px solid #fca5a5 !important;
    border-left: 6px solid #dc2626 !important;
    color: #991b1b !important;
}

/* Responsive */
@media (max-width: 700px) {
    .bd-tabellen-container {
        border-radius: 10px !important;
    }

    .bd-speichern-unten {
        justify-content: stretch !important;
    }

    .bd-button-speichern,
    .bd-button-export {
        width: 100% !important;
    }
}