:root {
    --schmidt-red: #E2000A;
    --schmidt-coral: #ED6B5B;
    --schmidt-orange: #F39100;
    --schmidt-yellow: #FFDC00;
    --schmidt-blue: #0094DA;
    --schmidt-cyan: #5AC5F1;
    --schmidt-green: #75B726;
    --schmidt-lime: #AECA00;
    --schmidt-gray: #575756;
    --schmidt-dark: #3A3835;
    --schmidt-white: #FFFFFF;
}

html,
body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--schmidt-white);
    color: var(--schmidt-dark);
}

.schmidt-header {
    background: var(--schmidt-white);
    color: var(--schmidt-dark);
    border-bottom: 6px solid var(--schmidt-blue);
    position: relative;
}

.schmidt-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 6px;
    background: linear-gradient(
        90deg,
        var(--schmidt-red),
        var(--schmidt-coral),
        var(--schmidt-green),
        var(--schmidt-yellow),
        var(--schmidt-blue),
        var(--schmidt-cyan),
        var(--schmidt-green),
        var(--schmidt-lime),
        var(--schmidt-gray)
    );
}

.schmidt-brand-row {
    display: flex;
    align-items: center;
    gap: 18px;
}

.schmidt-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    display: block;
}

.schmidt-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--schmidt-dark);
}

.schmidt-subtitle {
    margin: 4px 0 0;
    color: var(--schmidt-gray);
    font-size: 14px;
}

.btn-primary {
    background-color: var(--schmidt-blue);
    border-color: var(--schmidt-blue);
    font-weight: 700;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #007db8;
    border-color: #007db8;
}

.btn-secondary {
    background-color: var(--schmidt-gray);
    border-color: var(--schmidt-gray);
    font-weight: 700;
}

.btn-outline-primary {
    color: var(--schmidt-blue);
    border-color: var(--schmidt-blue);
    font-weight: 700;
}

.btn-outline-primary:hover {
    background-color: var(--schmidt-blue);
    border-color: var(--schmidt-blue);
}

.btn-outline-danger {
    color: var(--schmidt-red);
    border-color: var(--schmidt-red);
    font-weight: 700;
}

.btn-outline-danger:hover {
    background-color: var(--schmidt-red);
    border-color: var(--schmidt-red);
}

.card,
.alert,
.form-control,
.form-select,
.table,
.dienstplan-wrapper {
    border-radius: 10px;
}

.form-control,
.form-select {
    border: 2px solid var(--schmidt-gray);
}

.table th {
    background: var(--schmidt-blue);
    color: var(--schmidt-white);
    border-color: var(--schmidt-gray);
}

.table td {
    border-color: var(--schmidt-gray);
}

.badge.bg-primary {
    background-color: var(--schmidt-blue) !important;
}

.badge.bg-danger {
    background-color: var(--schmidt-red) !important;
}

.badge.bg-secondary {
    background-color: var(--schmidt-gray) !important;
}

/* Dienstplan-Tabelle im SCHMIDT-Stil */
.dienstplan-wrapper {
    border: 2px solid var(--schmidt-gray) !important;
    border-radius: 14px !important;
    background: var(--schmidt-white) !important;
}

.dienstplan-table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.dienstplan-table thead th {
    background: var(--schmidt-blue) !important;
    color: var(--schmidt-white) !important;
    border-color: var(--schmidt-gray) !important;
    font-weight: 700 !important;
    vertical-align: middle !important;
    box-shadow: none !important;
}

.dienstplan-table thead th:first-child {
    background: var(--schmidt-blue) !important;
    color: var(--schmidt-white) !important;
}

.dienstplan-table thead th .text-muted,
.dienstplan-table thead th .small {
    color: rgba(255, 255, 255, 0.9) !important;
}

.dienstplan-table tbody td {
    border-color: #d0d0d0 !important;
}

.dienstplan-table tbody td:first-child {
    border-color: #d0d0d0 !important;
}

.dienstplan-table input.form-control {
    border: 2px solid var(--schmidt-gray) !important;
    border-radius: 8px !important;
    background-clip: padding-box !important;
}

.dienstplan-table input.form-control:focus {
    border-color: var(--schmidt-blue) !important;
    box-shadow: 0 0 0 0.15rem rgba(0, 148, 218, 0.25) !important;
}

.dienstplan-table .aktive-zelle {
    outline: 3px solid var(--schmidt-blue) !important;
    outline-offset: 1px !important;
}

/* Dienstplan-Tabelle kompakter */
.dienstplan-wrapper {
    max-height: calc(100vh - 230px) !important;
}

.dienstplan-table {
    font-size: 0.85rem !important;
}

.dienstplan-table thead th {
    padding: 0.25rem 0.3rem !important;
    font-size: 0.82rem !important;
    line-height: 1.15 !important;
}

.dienstplan-table th,
.dienstplan-table td {
    padding: 0.22rem 0.25rem !important;
    vertical-align: middle !important;
}

.dienstplan-table .small {
    font-size: 0.68rem !important;
    line-height: 1.1 !important;
}

.dienstplan-table input.form-control {
    min-height: 28px !important;
    height: 28px !important;
    padding: 0.12rem 0.35rem !important;
    font-size: 0.84rem !important;
    line-height: 1.1 !important;
    border-width: 2px !important;
    border-radius: 7px !important;
}

.dienstplan-table th:first-child,
.dienstplan-table td:first-child {
    width: 140px !important;
    min-width: 140px !important;
    max-width: 140px !important;
}

.dienstplan-table th:not(:first-child):not(:nth-last-child(2)):not(:nth-last-child(1)),
.dienstplan-table td:not(:first-child):not(:nth-last-child(2)):not(:nth-last-child(1)) {
    width: 92px !important;
    min-width: 92px !important;
    max-width: 92px !important;
}

.dienstplan-table th:nth-last-child(2),
.dienstplan-table th:nth-last-child(1),
.dienstplan-table td:nth-last-child(2),
.dienstplan-table td:nth-last-child(1) {
    width: 82px !important;
    min-width: 82px !important;
    max-width: 82px !important;
}

.dienstplan-table .aktive-zelle {
    outline-width: 2px !important;
}

/* Kopfbereich wieder etwas größer */
.schmidt-title {
    font-size: 28px !important;
    line-height: 1.1 !important;
}

.schmidt-subtitle {
    font-size: 16px !important;
}

.schmidt-logo {
    width: 82px !important;
    height: 82px !important;
}

/* Dienstplan-Seitenkopf */
.container-fluid h1 {
    font-size: 30px !important;
    font-weight: 700 !important;
}

.container-fluid h2 {
    font-size: 24px !important;
    font-weight: 700 !important;
}

/* Jahr und KW-Auswahl schmaler */
form input[name="Jahr"] {
    max-width: 110px !important;
}

form select[name="KW"] {
    max-width: 160px !important;
}

/* Die Auswahlzeile kompakter wirken lassen */
form .row.mb-3 > .col-md-2 {
    width: auto !important;
    flex: 0 0 auto !important;
}

form .row.mb-3 > .col-md-3 {
    width: auto !important;
    flex: 0 0 auto !important;
}

/* Dienstplan-Tabelle: Zeilenlinien deutlicher + Kopf größer */
.dienstplan-table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.dienstplan-table thead th {
    font-size: 0.98rem !important;
    line-height: 1.2 !important;
    padding: 0.38rem 0.35rem !important;
}

.dienstplan-table thead th .small {
    font-size: 0.78rem !important;
    line-height: 1.15 !important;
}

.dienstplan-table tbody td {
    border-top: 1px solid #b8b8b8 !important;
    border-bottom: 1px solid #b8b8b8 !important;
}

.dienstplan-table tbody tr {
    border-bottom: 1px solid #b8b8b8 !important;
}

.dienstplan-table tbody tr:nth-child(even) td {
    background-clip: padding-box !important;
}

.dienstplan-table td:first-child {
    border-top: 1px solid #9f9f9f !important;
    border-bottom: 1px solid #9f9f9f !important;
}

/* Finaler Feinschliff: Dienstplan-Zellen etwas schmaler */
.dienstplan-table th:first-child,
.dienstplan-table td:first-child {
    width: 132px !important;
    min-width: 132px !important;
    max-width: 132px !important;
}

.dienstplan-table th:not(:first-child):not(:nth-last-child(2)):not(:nth-last-child(1)),
.dienstplan-table td:not(:first-child):not(:nth-last-child(2)):not(:nth-last-child(1)) {
    width: 82px !important;
    min-width: 82px !important;
    max-width: 82px !important;
}

.dienstplan-table th:nth-last-child(2),
.dienstplan-table th:nth-last-child(1),
.dienstplan-table td:nth-last-child(2),
.dienstplan-table td:nth-last-child(1) {
    width: 76px !important;
    min-width: 76px !important;
    max-width: 76px !important;
}

.dienstplan-table input.form-control {
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
}

/* Finaler Feinschliff 2: Mitarbeiter + Stunden-Spalten deutlich schmaler */
.dienstplan-table th:first-child,
.dienstplan-table td:first-child {
    width: 118px !important;
    min-width: 118px !important;
    max-width: 118px !important;
}

.dienstplan-table th:nth-last-child(2),
.dienstplan-table th:nth-last-child(1),
.dienstplan-table td:nth-last-child(2),
.dienstplan-table td:nth-last-child(1) {
    width: 62px !important;
    min-width: 62px !important;
    max-width: 62px !important;
    font-size: 0.78rem !important;
}

.dienstplan-table th:nth-last-child(2),
.dienstplan-table th:nth-last-child(1) {
    font-size: 0.75rem !important;
    line-height: 1.05 !important;
    padding-left: 0.15rem !important;
    padding-right: 0.15rem !important;
}

.dienstplan-table td:nth-last-child(2),
.dienstplan-table td:nth-last-child(1) {
    padding-left: 0.18rem !important;
    padding-right: 0.18rem !important;
}

.dienstplan-table td:first-child {
    font-size: 0.82rem !important;
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
}

/* Korrektur: Schriftgrößen wieder normal, nur Zellenbreiten schmaler */
.dienstplan-table th:first-child,
.dienstplan-table td:first-child {
    width: 118px !important;
    min-width: 118px !important;
    max-width: 118px !important;
}

/* Tageszellen schmaler */
.dienstplan-table th:not(:first-child):not(:nth-last-child(2)):not(:nth-last-child(1)),
.dienstplan-table td:not(:first-child):not(:nth-last-child(2)):not(:nth-last-child(1)) {
    width: 78px !important;
    min-width: 78px !important;
    max-width: 78px !important;
}

/* Wochenstunden und Stunden +/- schmaler, aber Schriftgröße bleibt wie vorher */
.dienstplan-table th:nth-last-child(2),
.dienstplan-table th:nth-last-child(1),
.dienstplan-table td:nth-last-child(2),
.dienstplan-table td:nth-last-child(1) {
    width: 62px !important;
    min-width: 62px !important;
    max-width: 62px !important;
}

/* Schriftgrößen aus dem letzten Schritt zurücknehmen */
.dienstplan-table td:first-child {
    font-size: 0.85rem !important;
}

.dienstplan-table th:nth-last-child(2),
.dienstplan-table th:nth-last-child(1) {
    font-size: 0.98rem !important;
    line-height: 1.2 !important;
}

.dienstplan-table td:nth-last-child(2),
.dienstplan-table td:nth-last-child(1) {
    font-size: 0.85rem !important;
}

/* Finaler Feinschliff 3: Zellen noch schmaler + Mitarbeiternamen fett */
.dienstplan-table th:first-child,
.dienstplan-table td:first-child {
    width: 108px !important;
    min-width: 108px !important;
    max-width: 108px !important;
}

.dienstplan-table td:first-child {
    font-weight: 700 !important;
}

/* Tageszellen noch schmaler */
.dienstplan-table th:not(:first-child):not(:nth-last-child(2)):not(:nth-last-child(1)),
.dienstplan-table td:not(:first-child):not(:nth-last-child(2)):not(:nth-last-child(1)) {
    width: 70px !important;
    min-width: 70px !important;
    max-width: 70px !important;
}

/* Wochenstunden und Stunden +/- noch schmaler */
.dienstplan-table th:nth-last-child(2),
.dienstplan-table th:nth-last-child(1),
.dienstplan-table td:nth-last-child(2),
.dienstplan-table td:nth-last-child(1) {
    width: 54px !important;
    min-width: 54px !important;
    max-width: 54px !important;
}

/* Eingabefelder passend enger */
.dienstplan-table input.form-control {
    padding-left: 0.18rem !important;
    padding-right: 0.18rem !important;
}

/* Breitenfix: Dienstplan-Tabelle wirklich auf ca. 66 Prozent schmaler */
.dienstplan-table {
    min-width: 620px !important;
    width: auto !important;
    table-layout: fixed !important;
}

/* Mitarbeiter-Spalte: vorher ca. 108px -> 72px */
.dienstplan-table th:first-child,
.dienstplan-table td:first-child {
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    font-weight: 700 !important;
}

/* Montag bis Samstag: vorher ca. 70px -> 46px */
.dienstplan-table th:not(:first-child):not(:nth-last-child(2)):not(:nth-last-child(1)),
.dienstplan-table td:not(:first-child):not(:nth-last-child(2)):not(:nth-last-child(1)) {
    width: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
}

/* Wochenstunden und Stunden +/-: vorher ca. 54px -> 36px */
.dienstplan-table th:nth-last-child(2),
.dienstplan-table th:nth-last-child(1),
.dienstplan-table td:nth-last-child(2),
.dienstplan-table td:nth-last-child(1) {
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
}

/* Eingabefelder extrem kompakt */
.dienstplan-table input.form-control {
    padding-left: 0.08rem !important;
    padding-right: 0.08rem !important;
    text-align: center !important;
}

/* Kopfzellen kompakt halten */
.dienstplan-table thead th {
    padding-left: 0.08rem !important;
    padding-right: 0.08rem !important;
}

/* Feste Dienstplan-Breiten: Mitarbeiter 90px, alle anderen 70px */
.dienstplan-table {
    min-width: auto !important;
    width: auto !important;
    table-layout: fixed !important;
}

/* Mitarbeiter-Spalte */
.dienstplan-table th:first-child,
.dienstplan-table td:first-child {
    width: 90px !important;
    min-width: 90px !important;
    max-width: 90px !important;
    font-weight: 700 !important;
}

/* Alle Tageszellen Montag bis Samstag */
.dienstplan-table th:not(:first-child):not(:nth-last-child(2)):not(:nth-last-child(1)),
.dienstplan-table td:not(:first-child):not(:nth-last-child(2)):not(:nth-last-child(1)) {
    width: 70px !important;
    min-width: 70px !important;
    max-width: 70px !important;
}

/* Wochenstunden und Stunden +/- ebenfalls 70px */
.dienstplan-table th:nth-last-child(2),
.dienstplan-table th:nth-last-child(1),
.dienstplan-table td:nth-last-child(2),
.dienstplan-table td:nth-last-child(1) {
    width: 70px !important;
    min-width: 70px !important;
    max-width: 70px !important;
}

/* Eingaben passend zentriert */
.dienstplan-table input.form-control {
    text-align: center !important;
    padding-left: 0.18rem !important;
    padding-right: 0.18rem !important;
}

/* Einheitliche Dienstplan-Breiten: alle Spalten 100px */
.dienstplan-table {
    min-width: auto !important;
    width: auto !important;
    table-layout: fixed !important;
}

/* Mitarbeiter-Spalte ebenfalls 100px */
.dienstplan-table th:first-child,
.dienstplan-table td:first-child {
    width: 100px !important;
    min-width: 100px !important;
    max-width: 100px !important;
    font-weight: 700 !important;
}

/* Montag bis Samstag */
.dienstplan-table th:not(:first-child):not(:nth-last-child(2)):not(:nth-last-child(1)),
.dienstplan-table td:not(:first-child):not(:nth-last-child(2)):not(:nth-last-child(1)) {
    width: 100px !important;
    min-width: 100px !important;
    max-width: 100px !important;
}

/* Wochenstunden und Stunden +/- */
.dienstplan-table th:nth-last-child(2),
.dienstplan-table th:nth-last-child(1),
.dienstplan-table td:nth-last-child(2),
.dienstplan-table td:nth-last-child(1) {
    width: 100px !important;
    min-width: 100px !important;
    max-width: 100px !important;
}

/* Eingaben mittig und sauber */
.dienstplan-table input.form-control {
    text-align: center !important;
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
}

/* Final: Mitarbeiter 100px, alle anderen Spalten 114px, Box passend */
.dienstplan-wrapper {
    width: fit-content !important;
    max-width: 100% !important;
    overflow: auto !important;
}

.dienstplan-table {
    table-layout: fixed !important;
    width: 1012px !important;
    min-width: 1012px !important;
    max-width: 1012px !important;
}

/* Mitarbeiter-Spalte */
.dienstplan-table th:first-child,
.dienstplan-table td:first-child {
    width: 100px !important;
    min-width: 100px !important;
    max-width: 100px !important;
    font-weight: 700 !important;
}

/* Montag bis Samstag */
.dienstplan-table th:not(:first-child):not(:nth-last-child(2)):not(:nth-last-child(1)),
.dienstplan-table td:not(:first-child):not(:nth-last-child(2)):not(:nth-last-child(1)) {
    width: 114px !important;
    min-width: 114px !important;
    max-width: 114px !important;
}

/* Wochenstunden und Stunden +/- */
.dienstplan-table th:nth-last-child(2),
.dienstplan-table th:nth-last-child(1),
.dienstplan-table td:nth-last-child(2),
.dienstplan-table td:nth-last-child(1) {
    width: 114px !important;
    min-width: 114px !important;
    max-width: 114px !important;
}

/* Eingaben sauber zentriert */
.dienstplan-table input.form-control {
    text-align: center !important;
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
}

/* Final: alle Dienstplan-Spalten 120px, Box passend, Tabellenkopf mittig */
.dienstplan-wrapper {
    width: fit-content !important;
    max-width: 100% !important;
    overflow: auto !important;
}

.dienstplan-table {
    table-layout: fixed !important;
    width: 1080px !important;
    min-width: 1080px !important;
    max-width: 1080px !important;
}

/* Alle Spalten einheitlich 120px */
.dienstplan-table th,
.dienstplan-table td {
    width: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
}

/* Mitarbeiter-Spalte bleibt fett */
.dienstplan-table th:first-child,
.dienstplan-table td:first-child {
    width: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
    font-weight: 700 !important;
}

/* Tabellenkopf komplett mittig */
.dienstplan-table thead th {
    text-align: center !important;
    vertical-align: middle !important;
}

/* Wochentag, Datum und Feiertag im Kopf mittig */
.dienstplan-table thead th div {
    text-align: center !important;
    width: 100% !important;
}

/* Wochenstunden und Stunden +/- ebenfalls mittig im Kopf */
.dienstplan-table thead th.text-end {
    text-align: center !important;
}

/* Zahlenwerte unten weiterhin rechtsbündig */
.dienstplan-table tbody td.text-end {
    text-align: right !important;
}

/* Eingaben sauber mittig */
.dienstplan-table input.form-control {
    text-align: center !important;
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
}

/* Final: alle Dienstplan-Spalten 130px, Box passend */
.dienstplan-wrapper {
    width: fit-content !important;
    max-width: 100% !important;
    overflow: auto !important;
}

.dienstplan-table {
    table-layout: fixed !important;
    width: 1170px !important;
    min-width: 1170px !important;
    max-width: 1170px !important;
}

/* Alle Spalten einheitlich 130px */
.dienstplan-table th,
.dienstplan-table td {
    width: 130px !important;
    min-width: 130px !important;
    max-width: 130px !important;
}

/* Mitarbeiter-Spalte fett */
.dienstplan-table th:first-child,
.dienstplan-table td:first-child {
    width: 130px !important;
    min-width: 130px !important;
    max-width: 130px !important;
    font-weight: 700 !important;
}

/* Kopf mittig */
.dienstplan-table thead th,
.dienstplan-table thead th div,
.dienstplan-table thead th.text-end {
    text-align: center !important;
    vertical-align: middle !important;
}

/* Werte unten: Eingaben mittig, Stunden weiterhin rechts */
.dienstplan-table input.form-control {
    text-align: center !important;
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
}

.dienstplan-table tbody td.text-end {
    text-align: right !important;
}

/* Final: Wochenstunden und Stunden +/- zentrieren */
.dienstplan-table tbody td:nth-last-child(2),
.dienstplan-table tbody td:nth-last-child(1) {
    text-align: center !important;
}

/* Header: Schmidule links, SCHMIDT-Logo rechts */
.schmidule-logo {
    height: 125px;
    width: auto;
    object-fit: contain;
    display: block;
}

.schmidt-original-logo {
    height: 74px;
    width: auto;
    object-fit: contain;
    display: block;
}

.schmidt-header .navbar .container-fluid {
    display: flex;
    align-items: center;
    gap: 24px;
}

.schmidt-header .navbar-brand {
    min-width: 460px;
}

/* Responsive Grundlayout für Tablet und Smartphone */
@media (max-width: 991.98px) {
    .schmidt-header .navbar {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }

    .schmidt-header .navbar .container-fluid {
        gap: 12px;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .schmidt-header .navbar-brand {
        min-width: 0 !important;
        max-width: calc(100% - 58px);
    }

    .schmidule-logo {
        height: 82px !important;
        max-width: 100%;
    }

    .schmidt-original-logo {
        height: 52px !important;
    }

    main {
        overflow-x: hidden;
    }

    .container-fluid {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .container-fluid.mt-4 {
        margin-top: 1rem !important;
    }

    .container-fluid h1 {
        font-size: 1.45rem !important;
    }

    .container-fluid h2 {
        font-size: 1.25rem !important;
    }

    form .row.mb-3 {
        align-items: stretch !important;
    }

    form .row.mb-3 > .col-auto,
    form .row.mb-3 > .col-md-2,
    form .row.mb-3 > .col-md-3 {
        width: auto !important;
        flex: 0 0 auto !important;
    }

    form .row.mb-3 .btn {
        white-space: nowrap;
    }

    .dienstplan-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        max-height: calc(100vh - 280px) !important;
    }

    .dienstplan-table {
        width: 1170px !important;
        min-width: 1170px !important;
        max-width: 1170px !important;
    }

    .dienstplan-table input.form-control {
        min-height: 34px !important;
        height: 34px !important;
        font-size: 1rem !important;
    }

    .footer {
        font-size: 0.82rem;
        line-height: 1.3;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
}

/* Smartphone: Kopf und Bedienleisten kompakter */
@media (max-width: 575.98px) {
    .schmidule-logo {
        height: 64px !important;
    }

    .schmidt-original-logo {
        display: none !important;
    }

    .navbar-toggler {
        padding: 0.25rem 0.45rem;
    }

    .navbar-collapse {
        margin-top: 0.75rem;
    }

    .navbar-nav {
        gap: 0 !important;
    }

    .navbar-nav .nav-link {
        padding-top: 0.45rem;
        padding-bottom: 0.45rem;
    }

    .container-fluid.mt-4 > .d-flex.justify-content-between {
        flex-direction: column !important;
        gap: 0.75rem;
    }

    .container-fluid.mt-4 > .d-flex.justify-content-between > .d-flex {
        width: 100%;
        flex-wrap: wrap;
    }

    .container-fluid.mt-4 > .d-flex.justify-content-between .btn {
        flex: 1 1 auto;
        min-width: 135px;
    }

    form .row.mb-3 > .col-auto,
    form .row.mb-3 > .col-md-2,
    form .row.mb-3 > .col-md-3 {
        width: 100% !important;
        flex: 0 0 100% !important;
    }

    form input[name="Jahr"],
    form select[name="KW"],
    form select[name="AktuelleFilialeID"] {
        max-width: none !important;
        width: 100% !important;
    }

    form .row.mb-3 .btn {
        width: 100%;
    }

    .dienstplan-wrapper {
        border-radius: 10px !important;
        max-height: calc(100vh - 330px) !important;
    }

    .dienstplan-table {
        width: 1080px !important;
        min-width: 1080px !important;
        max-width: 1080px !important;
    }

    .dienstplan-table th,
    .dienstplan-table td {
        width: 120px !important;
        min-width: 120px !important;
        max-width: 120px !important;
    }

    .dienstplan-table input.form-control {
        min-height: 38px !important;
        height: 38px !important;
        font-size: 1rem !important;
    }
}

/* Responsivity Schritt 3: Smartphone-Tabelle kompakt */
@media (max-width: 575.98px) {
    .dienstplan-table {
        table-layout: fixed !important;
        width: 618px !important;
        min-width: 618px !important;
        max-width: 618px !important;
    }

    .dienstplan-table th:first-child,
    .dienstplan-table td:first-child {
        width: 74px !important;
        min-width: 74px !important;
        max-width: 74px !important;
        font-size: 0.72rem !important;
        padding-left: 0.12rem !important;
        padding-right: 0.12rem !important;
        word-break: break-word;
    }

    .dienstplan-table th:not(:first-child),
    .dienstplan-table td:not(:first-child) {
        width: 68px !important;
        min-width: 68px !important;
        max-width: 68px !important;
    }

    .dienstplan-table thead th {
        font-size: 0.66rem !important;
        line-height: 1.05 !important;
        padding: 0.18rem 0.08rem !important;
    }

    .dienstplan-table thead th .small {
        font-size: 0.56rem !important;
        line-height: 1.05 !important;
    }

    .dienstplan-table th,
    .dienstplan-table td {
        padding-left: 0.08rem !important;
        padding-right: 0.08rem !important;
    }

    .dienstplan-table input.form-control {
        min-height: 34px !important;
        height: 34px !important;
        font-size: 0.86rem !important;
        padding-left: 0.05rem !important;
        padding-right: 0.05rem !important;
        text-align: center !important;
    }

    .dienstplan-table tbody td:nth-last-child(2),
    .dienstplan-table tbody td:nth-last-child(1) {
        font-size: 0.72rem !important;
        text-align: center !important;
    }

    .dienstplan-wrapper {
        max-height: calc(100vh - 330px) !important;
    }
}

/* SCHMIDULE_HEUTE_HIGHLIGHT_CSS */
.dienstplan-table thead th.heute-spalte {
    background: #d9f7c7 !important;
    color: var(--schmidt-dark) !important;
    box-shadow:
        inset 0 -3px 0 var(--schmidt-green),
        inset 0 0 0 2px var(--schmidt-green) !important;
}

.dienstplan-table thead th.heute-spalte .text-muted,
.dienstplan-table thead th.heute-spalte .small {
    color: var(--schmidt-dark) !important;
}

.dienstplan-table tbody td.heute-spalte {
    background: #eefbe8 !important;
    box-shadow: inset 0 0 0 2px rgba(117, 183, 38, 0.75) !important;
}

.dienstplan-table tbody td.heute-spalte input.form-control {
    border-color: var(--schmidt-green) !important;
    box-shadow: 0 0 0 0.12rem rgba(117, 183, 38, 0.22) !important;
}

/* SCHMIDULE_SCHLUESSELRUNDE_CSS */
.dienstplan-table tbody td.schluesselrunde-zelle {
    position: relative !important;
    background-image: none !important;
    box-shadow:
        inset 0 0 0 2px #009fe3,
        inset 5px 0 0 #009fe3 !important;
}

.dienstplan-table tbody td.schluesselrunde-zelle input.form-control {
    position: relative !important;
    z-index: 2 !important;
    border-color: #009fe3 !important;
    box-shadow: none !important;
    background-color: transparent !important;
    background-image: none !important;
}

/* SCHMIDULE_GEBURTSTAGE_CSS */
.dienstplan-table tbody td.geburtstag-zelle {
    position: relative !important;
    background-image: none !important;
    box-shadow:
        inset 0 0 0 2px #d4af37,
        inset 5px 0 0 #d4af37 !important;
}

.dienstplan-table tbody td.geburtstag-zelle input.form-control {
    position: relative !important;
    z-index: 2 !important;
    border-color: #d4af37 !important;
    box-shadow: none !important;
    background-color: transparent !important;
    background-image: none !important;
}

/* SCHMIDULE_ZELLFARBE_SYMBOL_FIX_FINAL */
/* Ebenen:
   0 = Zellfarbe auf td
   1 = Symbol
   2 = Eingabetext/Input
   3 = Rahmen
*/

.schluesselrunde-symbol,
.geburtstag-symbol {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 1 !important;
    line-height: 1 !important;
    font-size: 1.15rem !important;
    opacity: 0.95 !important;
    filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.75));
    pointer-events: none !important;
}

.schluesselrunde-symbol {
    right: 0.45rem !important;
}

.geburtstag-symbol {
    left: 0.45rem !important;
}

/* Unsichtbare Klickfläche für Schlüssel, damit das Symbol selbst hinter dem Text bleiben kann */
.schluesselrunde-clickzone {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 2.2rem !important;
    height: 100% !important;
    z-index: 4 !important;
    cursor: pointer !important;
    background: transparent !important;
}


/* SCHMIDULE_INFO_PAGES_CI_BEGIN */

/* Zusatzseiten im Schmidule/SCHMIDT-CI */
.schmidule-info-page {
    max-width: 1180px;
    margin: 0 auto;
}

.schmidule-hero {
    position: relative;
    overflow: hidden;
    background: var(--schmidt-white);
    border: 2px solid var(--schmidt-gray);
    border-radius: 18px;
    padding: 24px 28px;
    margin-bottom: 22px;
    box-shadow: 0 8px 22px rgba(58, 56, 53, 0.10);
}

.schmidule-hero::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 10px;
    background: linear-gradient(
        180deg,
        var(--schmidt-red),
        var(--schmidt-orange),
        var(--schmidt-yellow),
        var(--schmidt-blue),
        var(--schmidt-green)
    );
}

.schmidule-hero::after {
    content: "";
    position: absolute;
    right: -55px;
    top: -55px;
    width: 160px;
    height: 160px;
    border-radius: 999px;
    background: linear-gradient(
        135deg,
        rgba(0, 148, 218, 0.16),
        rgba(117, 183, 38, 0.12)
    );
}

.schmidule-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 18px;
}

.schmidule-hero-logo {
    width: 92px;
    height: 92px;
    object-fit: contain;
    flex: 0 0 auto;
}

.schmidule-hero-title {
    margin: 0;
    color: var(--schmidt-dark);
    font-size: 30px;
    line-height: 1.1;
    font-weight: 800;
}

.schmidule-hero-subtitle {
    margin: 8px 0 0;
    color: var(--schmidt-gray);
    font-size: 16px;
    max-width: 850px;
}

.schmidule-section-card {
    background: var(--schmidt-white);
    border: 2px solid var(--schmidt-gray);
    border-radius: 16px;
    margin: 18px 0;
    overflow: hidden;
    box-shadow: 0 5px 14px rgba(58, 56, 53, 0.08);
}

.schmidule-section-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: linear-gradient(
        90deg,
        var(--schmidt-blue),
        #007db8
    );
    color: var(--schmidt-white);
}

.schmidule-section-head.red {
    background: linear-gradient(90deg, var(--schmidt-red), var(--schmidt-coral));
}

.schmidule-section-head.orange {
    background: linear-gradient(90deg, var(--schmidt-orange), #d87800);
}

.schmidule-section-head.green {
    background: linear-gradient(90deg, var(--schmidt-green), #5f941f);
}

.schmidule-section-head.gray {
    background: linear-gradient(90deg, var(--schmidt-gray), var(--schmidt-dark));
}

.schmidule-section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    border-radius: 999px;
    background: var(--schmidt-white);
    color: var(--schmidt-blue);
    font-weight: 800;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
}

.schmidule-section-head.red .schmidule-section-number {
    color: var(--schmidt-red);
}

.schmidule-section-head.orange .schmidule-section-number {
    color: var(--schmidt-orange);
}

.schmidule-section-head.green .schmidule-section-number {
    color: var(--schmidt-green);
}

.schmidule-section-head.gray .schmidule-section-number {
    color: var(--schmidt-gray);
}

.schmidule-section-title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
}

.schmidule-section-body {
    padding: 18px;
}

.schmidule-section-body p:last-child,
.schmidule-section-body ul:last-child {
    margin-bottom: 0;
}

.schmidule-info-table {
    margin: 12px 0 4px;
    border: 2px solid var(--schmidt-gray);
    border-radius: 12px;
    overflow: hidden;
}

.schmidule-info-table table {
    margin-bottom: 0;
}

.schmidule-info-table th {
    background: var(--schmidt-blue) !important;
    color: var(--schmidt-white) !important;
    border-color: var(--schmidt-gray) !important;
    font-weight: 800;
}

.schmidule-info-table td {
    border-color: var(--schmidt-gray) !important;
    vertical-align: middle;
}

.schmidule-code,
.schmidule-info-page code {
    background: rgba(0, 148, 218, 0.10);
    color: var(--schmidt-dark);
    border: 1px solid rgba(87, 87, 86, 0.28);
    border-radius: 6px;
    padding: 2px 6px;
    font-weight: 700;
}

.schmidule-hint {
    border-left: 8px solid var(--schmidt-orange);
    background: rgba(243, 145, 0, 0.10);
    border-radius: 12px;
    padding: 12px 14px;
    margin-top: 14px;
}

.schmidule-hint.blue {
    border-left-color: var(--schmidt-blue);
    background: rgba(0, 148, 218, 0.10);
}

.schmidule-hint.green {
    border-left-color: var(--schmidt-green);
    background: rgba(117, 183, 38, 0.11);
}

.schmidule-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.schmidule-mini-card {
    border: 2px solid var(--schmidt-gray);
    border-radius: 14px;
    padding: 14px;
    background: var(--schmidt-white);
}

.schmidule-mini-card strong {
    display: block;
    margin-bottom: 6px;
    color: var(--schmidt-blue);
    font-size: 17px;
}

.schmidule-admin-help {
    position: relative;
    overflow: hidden;
    border: 2px solid var(--schmidt-gray);
    border-radius: 16px;
    background: var(--schmidt-white);
    padding: 18px 20px 18px 24px;
    margin: 16px 0 22px;
    box-shadow: 0 5px 14px rgba(58, 56, 53, 0.08);
}

.schmidule-admin-help::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 9px;
    background: linear-gradient(
        180deg,
        var(--schmidt-blue),
        var(--schmidt-green)
    );
}

.schmidule-admin-help h2 {
    margin: 0 0 8px;
    color: var(--schmidt-dark);
    font-size: 22px;
    font-weight: 800;
}

.schmidule-admin-help p {
    color: var(--schmidt-gray);
}

.schmidule-admin-help ul {
    margin-bottom: 0;
}

.schmidule-admin-help li {
    margin-bottom: 4px;
}

@media (max-width: 768px) {
    .schmidule-hero {
        padding: 20px;
    }

    .schmidule-hero-inner {
        align-items: flex-start;
    }

    .schmidule-hero-logo {
        width: 68px;
        height: 68px;
    }

    .schmidule-hero-title {
        font-size: 24px;
    }

    .schmidule-mini-grid {
        grid-template-columns: 1fr;
    }

    .schmidule-section-body {
        padding: 14px;
    }
}

/* SCHMIDULE_INFO_PAGES_CI_END */
