:root {
    --ds-page-side-gap: 8px;
    --ds-section-gap: 0.375rem;
    --ds-page-heading-size: 1.2rem;
    --ds-section-heading-size: 1rem;
    --ds-button-height: 40px;
    --ds-icon-button-width: 56px;
    /* Aktuelle Aktionsbuttons der Startseite (pages/main.php). */
    --ds-button-border: #8b4513;
    --ds-overview-tile-height: 5rem;
    --ds-overview-container-radius: 0.6rem;
    --ds-overview-container-background: #f2f3f5;
}

/* Weiße Inhaltsflächen mit schmalen Seitenabständen. */
.ds-content-panel,
.ds-page-intro,
.ds-panel-legend {
    background-color: #ffffff;
    border: 1px solid var(--ds-button-border);
    border-radius: 0.6rem;
    padding: 0.5rem;
}
.ds-content-panel {
    width: 100%;
}
.ds-page-intro {
    margin-block-end: var(--ds-section-gap);
}
:is(.ds-page-intro, .ds-page-intro + .ds-content-panel.ds-actions) .btn:where(:not(:hover, :focus-visible, :active)) {
    background-color: #fff !important;
    color: var(--ds-intro-button-color, #000) !important;
}
:is(.ds-page-intro, .ds-page-intro + .ds-content-panel.ds-actions) .btn:is(.btn-success, .btn-outline-success, .ds-gruen) {
    --ds-intro-button-color: #407c64;
}
:is(.ds-page-intro, .ds-page-intro + .ds-content-panel.ds-actions) .btn:is(.btn-danger, .btn-outline-danger, .ds-rot) {
    --ds-intro-button-color: #be461e;
}
:is(.ds-page-intro, .ds-page-intro + .ds-content-panel.ds-actions) .btn:where(:not(:hover, :focus-visible, :active)) .bi {
    color: inherit !important;
}
.ds-section-gap,
.ds-page-content > :is(.ds-content-panel, .ds-panel-legend) {
    margin-block: 0 var(--ds-section-gap) !important;
}

/* Kartenzeilen bleiben außen bündig; die Abstände liegen zwischen den Karten. */
.row.ds-section-gap.mx-0:has(> * > .ds-content-panel) {
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
    --ds-panel-columns: 1;
    display: grid;
    grid-template-columns: repeat(var(--ds-panel-columns), minmax(0, 1fr));
    gap: var(--ds-section-gap) 0.5rem;
}
.row.ds-section-gap.mx-0:has(> * > .ds-content-panel) > * {
    width: auto;
    min-width: 0;
}
@media (min-width: 768px) {
    .row.ds-section-gap.mx-0:has(> .col-md-6 > .ds-content-panel) {
        --ds-panel-columns: 2;
    }
}
@media (min-width: 992px) {
    .row.ds-section-gap.mx-0:has(> .col-lg-6 > .ds-content-panel) {
        --ds-panel-columns: 2;
    }
}
@media (min-width: 1200px) {
    .row.ds-section-gap.mx-0:has(> .col-xl-4 > .ds-content-panel) {
        --ds-panel-columns: 3;
    }
}
.ds-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.ds-actions > :is(.btn, .button, .ds-btn-action, .ds-btn-cancel, .send-button) {
    margin: 0 !important;
}
.ds-nav-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--ds-button-height);
}
:is(.ds-nav-action, .ds-overview-nav .btn) {
    gap: 0.5rem;
}
:is(.ds-nav-action, .ds-overview-nav .btn) > :is(.bi, .ds-icon-svg) {
    flex-shrink: 0;
    margin: 0 !important;
}
.ds-nav-action.ds-icon-action:where(:not(.ds-btn-edit, table [title="Bearbeiten"], .btn-sm[title="Bearbeiten"])) {
    box-sizing: border-box;
    flex: 0 0 auto;
    width: var(--ds-icon-button-width);
    min-width: var(--ds-icon-button-width);
    height: var(--ds-button-height) !important;
    min-height: var(--ds-button-height) !important;
    max-height: var(--ds-button-height) !important;
    padding: 0 !important;
    gap: 0;
}
html:root body .ds-content-panel :is(.card, .card-header, .modal-content, .ds-weather-card, .tools-panel, .unassigned-card, .accordion-item) {
    border-color: var(--ds-button-border) !important;
}
html:root body .ds-content-panel .card-header {
    background-color: #ffffff !important;
}
html:root body .ds-content-panel :is(h1, h2, h3, h4, h5, h6),
.ds-page-intro :is(h1, h2, h3, h4, h5, h6) {
    text-align: left;
    font-size: var(--ds-page-heading-size);
    font-weight: 700;
    color: rgba(58, 29, 11, 0.69);
}
html:root body .ds-content-panel :is(h2, h3, h4, h5, h6):where(:not(.ds-page-intro *)) {
    font-size: var(--ds-section-heading-size);
}
.ds-panel-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    overflow-wrap: anywhere;
}
.ds-panel-heading > .bi {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    margin: 0 !important;
    font-size: 32px;
}
.ds-panel-legend {
    border-radius: 0.5rem;
}
html:root body .ds-fa-panel :is(.ds-fa-button, .button, .btn) {
    border: 1px solid var(--ds-button-border) !important;
}
/* Gemeinsamer Seitenhintergrund für Overviews und Hilfe. */
html:root body:has(:is(.ds-overview, .box-font-help)),
html:root body > :is(.container-xl, .container-fluid):has(.box-font-help),
html:root body .box-font-help {
    background-color: var(--ds-overview-container-background) !important;
}
html:root body .ds-staff-help .accordion-button {
    background-color: #fff !important;
    color: #000 !important;
}
html:root body .ds-staff-help .accordion-button::after { filter: brightness(0) !important; }
.ds-staff-help .accordion-item {
    border: 1px solid var(--ds-button-border);
    scroll-margin-top: 80px;
}
.ds-staff-help .accordion-button,
.ds-staff-help .accordion-button:not(.collapsed) {
    min-height: var(--ds-button-height);
    gap: 0.5rem;
    padding: 0.5rem;
    text-align: left;
    background-color: #fff;
    color: rgba(58, 29, 11, 0.69);
    font-size: 1rem;
    font-weight: 500;
    box-shadow: none;
}
.ds-staff-help .accordion-button > .bi {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
}
.ds-staff-help .accordion-button:focus-visible {
    outline: 2px solid var(--ds-button-border);
    outline-offset: -3px;
}
.ds-staff-help .accordion-body {
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.ds-staff-help .accordion-body h3 {
    margin: 1rem 0 0.5rem;
    text-align: left;
    font-size: 1rem;
    font-weight: 700;
    color: rgba(58, 29, 11, 0.69);
}
.ds-staff-help .accordion-body :is(ul, ol) {
    padding-left: 1.4rem;
}
.ds-staff-help .accordion-body li + li {
    margin-top: 0.5rem;
}
.ds-staff-help .accordion-body [id] {
    scroll-margin-top: 80px;
}
/* Gemeinsamer Rahmenfarbton; semantische Button-Füllungen bleiben erhalten. */
html:root body :is(button, input[type="button"], input[type="submit"], input[type="reset"], .btn, .button, .ds-btn-edit, .ds-btn-tile, .ds-btn-action, .ds-btn-cancel, .send-button, .navbar-toggler, .abteilung) {
    border-color: var(--ds-button-border) !important;
}

/* Ein gemeinsamer Standard für alle Overview-Seiten. */
.ds-overview-panel > .row { --bs-gutter-x: 0; }
.ds-overview-panel > :is(.ds-page-intro, .accordion, .card, .row) {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin-inline: 0;
}
html:root body .ds-overview-panel .border { border-color: var(--ds-button-border) !important; }
html:root body .ds-overview-panel :is(button, .btn, .button, .ds-overview-tile, .list-group-item-action):not(.admin-section-toggle) {
    border: 1px solid var(--ds-button-border) !important;
}
.ds-overview-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
}
.ds-overview-nav .btn:where(:not(.ds-icon-action)) {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    height: auto;
    padding: 0.35rem 0.45rem;
    font-size: 1rem;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
}
html:root body .ds-overview :is(.accordion-item, .card) {
    border-radius: var(--ds-overview-container-radius) !important;
    background-color: #fff !important;
    overflow: hidden;
}
.ds-overview.accordion > .accordion-item {
    border: 1px solid var(--ds-button-border);
    scroll-margin-top: 80px;
}
html:root body .ds-overview :is(.accordion-body, .card-body, .card-header, .admin-section-description) {
    background-color: #fff !important;
}
.ds-overview .admin-section-toggle {
    position: relative;
    align-items: stretch !important;
    overflow: hidden;
    min-height: var(--ds-button-height);
    border-radius: var(--ds-overview-container-radius);
    box-shadow: none;
}
.ds-overview .admin-section-toggle:not(:disabled, .disabled, [aria-disabled="true"]):focus-visible {
    outline: 2px solid #000;
    outline-offset: -2px;
}
.ds-overview .admin-section-toggle::after {
    position: absolute;
    top: 0.9rem;
    right: 1.25rem;
    filter: brightness(0) invert(1);
}
.ds-overview .admin-section-toggle:has(:is(.admin-section-title--orange, .admin-section-title--facilities, .admin-section-title--supervisor))::after {
    filter: brightness(0);
}
.ds-overview :is(.admin-section-title, .admin-section-description) {
    display: block;
    width: 100%;
    padding: 0.5rem 3.25rem 0.5rem 0.5rem;
    text-align: left;
}
html:root body .ds-overview .admin-section-title {
    background-color: var(--ds-section-color, #6c757d);
    color: var(--ds-section-text, #fff) !important;
    font-weight: 700;
}
html:root body .ds-overview .admin-section-toggle:not(:disabled, .disabled, [aria-disabled="true"]):is(:hover, :focus-visible) .admin-section-title {
    background-color: var(--ds-button-border);
    color: #fff !important;
}
.ds-overview .admin-section-toggle:not(:disabled, .disabled, [aria-disabled="true"]):is(:hover, :focus-visible)::after {
    filter: brightness(0) invert(1);
}
html:root body .ds-overview .admin-section-description { color: #000 !important; font-weight: 400; }
.ds-overview :is(.accordion-button, .admin-section-title, .admin-section-description) {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
}
.ds-overview :is(.admin-section-title--balance, .admin-section-title--green) { --ds-section-color: #198754; }
.ds-overview :is(.admin-section-title--tax, .admin-section-title--print) { --ds-section-color: #6f42c1; }
.ds-overview :is(.admin-section-title--goods, .admin-section-title--primary) { --ds-section-color: #0d6efd; }
.ds-overview :is(.admin-section-title--events, .admin-section-title--red) { --ds-section-color: #be461e; }
.ds-overview :is(.admin-section-title--facilities, .admin-section-title--orange) { --ds-section-color: #d17635; --ds-section-text: #000; }
.ds-overview .admin-section-title--time { --ds-section-color: #4a5568; }
.ds-overview .admin-section-title--personnel { --ds-section-color: #1a4f8b; }
.ds-overview .admin-section-title--calendar { --ds-section-color: #2b6cb0; }
.ds-overview .admin-section-title--export { --ds-section-color: #704214; }
.ds-overview .admin-section-title--supervisor { --ds-section-color: burlywood; --ds-section-text: #000; }
.ds-overview .admin-section-title--legal { --ds-section-color: #633c5b; }
.ds-overview .list-group.list-group-flush,
.wp-admin-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 0;
}
html:root body :is(.ds-overview .list-group.list-group-flush .list-group-item-action, .ds-overview .ds-overview-tile, .wp-admin-links .list-group-item-action) {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: var(--ds-overview-tile-height);
    height: 100%;
    padding: 0.375rem 0.5rem;
    gap: 0.375rem;
    border: 1px solid var(--ds-button-border) !important;
    border-radius: var(--ds-overview-container-radius);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
    background-color: #fff !important;
    color: #000 !important;
}
html:root body :is(.ds-overview .list-group-item-action, .ds-overview .ds-overview-tile, .wp-admin-links .list-group-item-action) .bi {
    font-size: 1.5rem;
    line-height: 1;
    margin: 0 !important;
}
html:root body :is(.ds-overview .list-group-item-action, .ds-overview .ds-overview-tile, .wp-admin-links .list-group-item-action) img {
    width: 1.5rem;
    height: 1.5rem;
    margin: 0 !important;
    object-fit: contain;
}
.ds-overview .list-group.list-group-flush > .list-group-item:not(.list-group-item-action) {
    grid-column: 1 / -1;
    padding: 0.35rem 0.5rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 600;
}
@media (min-width: 992px) {
    .ds-overview .list-group.list-group-flush, .wp-admin-links { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

body {
    --bs-link-color: #000000;
    --bs-link-color-rgb: 0, 0, 0;
    --bs-link-hover-color: #407c64;
    --bs-link-hover-color-rgb: 64, 124, 100;
    font-family: Verdana, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f2f3f5 !important; /* Hintergrundfarbe */
    font-size: 1.0rem;
    line-height: 1.2rem;
}

/* Ergänzung zu Bootstrap 24.06.03 hvh */
.container, .container-xl, .container-xxl {
    background-color: #ffffff;
    border-radius: 10px;
    margin: 0 auto;
    padding: 0 0.5rem;
}

/* Seitenfläche und Führanlagenzeile wie die Kopfzeile in pages/main.php. */
html:root body .ds-page-shell,
html:root body .ds-page-content,
html:root body .ds-status-bar,
html:root body .ds-status-navigation {
    background-color: #f2f3f5 !important;
}

/* Gemeinsame kompakte Abstände für Kopf- und Statusbereich. */
html:root body .ds-page-shell {
    margin-top: 0 !important;
    padding-top: 0 !important;
    padding-inline: var(--ds-page-side-gap) !important;
}
html:root body .ds-status-bar {
    width: 100%;
    max-width: none;
    margin: 0 !important;
    padding: 0 !important;
}

html:root body .ds-page-content {
    display: flow-root;
    margin-top: 0 !important;
    padding: 0 !important;
}

/* Ein Inhaltsabstand für alle Seiten, auch bei vorangestellten Inline-Assets. */
html:root body .ds-page-content > :nth-child(1 of :not(style, script, link, meta, template, [hidden])) {
    margin-block-start: var(--ds-section-gap) !important;
}

html:root body .ds-main-navbar {
    min-height: var(--ds-button-height);
    padding: 0.5rem 0 !important;
    background-color: #f2f3f5 !important;
}

html:root body .ds-main-navbar,
html:root body .ds-status-navigation {
    font-family: Verdana, Arial, sans-serif !important;
    font-size: 1rem !important;
    line-height: 1.2rem !important;
}

html:root body .ds-status-navigation {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    margin: 0 !important;
    padding: 0 0 0.25rem !important;
}

/* Navbar Anpassungen für bessere Zentrierung */
.navbar-collapse {
    justify-content: center;
}

.navbar-toggler {
    width: var(--ds-icon-button-width);
    min-height: var(--ds-button-height);
    justify-content: center;
    border: 1px solid var(--ds-button-border) !important;
    border-radius: 0.5rem;
    padding: 0;
    background-color: #fff;
    transition: background-color 0.2s ease;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-nav {
    width: 100%;
    text-align: center;
}

.navbar-nav .nav-item {
    width: 100%;
}

@media (min-width: 992px) {
    html:root body .ds-main-navbar { padding: 0 !important; }
    .ds-main-navbar .navbar-nav > .nav-item > .nav-link {
        min-height: var(--ds-button-height);
        display: flex;
        align-items: center;
    }
    .navbar-nav {
        width: auto;
    }
    .navbar-nav .nav-item {
        width: auto;
    }
}

.navbar-brand {
    font-size: 1.15rem !important;
    font-weight: 500;
    letter-spacing: 0.015em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.abteilung {
    width: 2.4rem;
    height: 2.0rem;
    font-size: 0.8rem;
    font-weight: bold;
    border: 1px solid grey;
    border-radius: 0.5rem; /* halbe Höhe */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0; /* Verhindert das Schrumpfen */
}

html:root body .ds-status-navigation .abteilung {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    line-height: 1.2rem;
}

.ds-status-slots,
.ds-status-history {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.ds-status-slots {
    gap: 0.25rem;
}

.ds-status-history {
    gap: 12px;
}

html:root body .ds-status-history .abteilung {
    color: #ffffff;
    font-weight: 500;
    font-size: 1.05rem !important;
    background-color: #407c64;
    border-color: var(--ds-button-border);
}

.ds-status-slots .abteilung {
    border-color: #8b4513;
}

.ds-status-slots .abteilung.grau {
    background-color: #ffffff;
    border-color: #8b4513;
    color: #000000;
}

.ds-status-slots > a:hover > .abteilung,
.ds-status-slots > a:focus-visible > .abteilung,
.ds-status-history > a:hover > .abteilung,
.ds-status-history > a:focus-visible > .abteilung {
    background-color: #8b4513;
    border-color: #8b4513;
    color: #ffffff;
}

@media (min-width: 375px) {
    .ds-status-slots {
        gap: 0.5rem;
    }
}

/* Formulare und Datumsfelder. */
:is(.form-control, .form-select) {
    min-width: 0;
    min-height: var(--ds-button-height);
}
.ds-date-range > :first-child { padding-inline-start: 0; }
.ds-date-range > :last-child { padding-inline-end: 0; }
.ds-date-range .form-control[type="date"] {
    padding-inline: .375rem;
}
.ds-date-range-no-icon input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0;
}

/* Einheitliche braune Feldrahmen in allen Formularen, auch bei Fokus. */
html:root body :is(.form-control, .form-select, textarea, select,
    input:not([type="hidden"], [type="submit"], [type="button"], [type="reset"], [type="image"], [type="range"])) {
    border-color: #8b4513 !important;
}

.container-xl.ds-page-footer {
    background-color: #f2f3f5 !important;
}

.ds-page-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 0.5rem 1rem;
    margin-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    text-align: left;
}

.ds-page-footer > a {
    min-width: 0;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.ds-page-footer > a:hover,
.ds-page-footer > a:focus {
    text-decoration: none;
}

.gap-small {
    gap: 0.25rem;
}


.abteilung.grau {
    background-color: lightgrey;
    color: #282522;
}

.abteilung i {
    font-size: 1.05rem;
    font-weight: bold;
    -webkit-text-stroke: 0.9px currentColor;
}
.abteilung.rot {
    background-color: #e44813;
}

.abteilung.gruen {
    background-color: #407c64;
}

.abteilung.orange {
    background-color: #d17635;
}

/* Kalender Badges */
.badge-orange { background-color: #d17635 !important; color: white !important; border: none !important; font-weight: normal; }
.badge-rot { background-color: #cc0000 !important; color: white !important; border: none !important; font-weight: normal; }
.badge-blau { background-color: #007bff !important; color: white !important; border: none !important; font-weight: normal; }
.badge-gruen { background-color: #407c64 !important; color: white !important; border: none !important; font-weight: normal; }
.badge-hellgruen { background-color: #98d044 !important; color: white !important; border: none !important; font-weight: normal; }
.badge-hellblau { background-color: #abeafd !important; color: white !important; border: none !important; font-weight: normal; }
.badge-lila { background-color: #6f42c1 !important; color: white !important; border: none !important; font-weight: normal; }
.badge-braun { background-color: #8b4513 !important; color: white !important; border: none !important; font-weight: normal; }
.badge-rosa { background-color: #e83e8c !important; color: white !important; border: none !important; font-weight: normal; }
.badge-gelb { background-color: #fff3cd !important; color: #856404 !important; border: 1px solid #ffeeba !important; font-weight: normal; }
.badge { font-weight: bold !important; font-size: 0.95rem !important; padding: 0.4em 0.6em !important; }

.logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    top: 0;
}

.logo img {
    margin: auto;
}

img.ds-push-icon, img.ds-sound-icon {
    height: 3.0rem;
    width: auto;
    max-width: 100%;
    vertical-align: middle;
    object-fit: contain;
}

i.ds-push-icon, i.ds-sound-icon {
    height: auto;
    width: auto;
}

label {
    display: block;
    margin-bottom: 5px;
}

a:hover {
    color: #407c64;
}

h4 {
    color: rgba(58, 29, 11, 0.69);
    font-size: 1.2rem;
    font-weight: bold;
}

h3 {
    color: rgba(58, 29, 11, 0.69);
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
}

/* =========================================================
   BUTTONS & AKTIONSELEMENTE (ZENTRALE HARMONISIERUNG)
   ========================================================= */

.btn.ds-btn-edit,
.btn.btn-sm[title="Bearbeiten"],
table .btn[title="Bearbeiten"] {
    background-color: burlywood !important;
    color: #000 !important;
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    flex: 0 0 auto;
    align-self: flex-start;
    height: auto !important;
    min-height: 0 !important;
    max-height: var(--ds-button-height) !important;
    padding: 0.125rem 0.375rem !important;
    border: 1px solid var(--ds-button-border) !important;
    border-radius: 0.25rem !important;
    box-shadow: none !important;
    font-size: 18px;
    line-height: 1;
}
.btn > .bi-funnel,
.ds-icon-action > .bi-printer,
.ds-print-action > .bi-printer {
    display: inline-flex;
    align-items: center;
    font-size: 1.5rem;
    line-height: 1;
}

/* Basis für alle Bootstrap Buttons. button.btn erhält die bisherige Selektor-Spezifität. */
:is(.btn, .button, .ds-btn-edit, .ds-btn-action, .ds-btn-cancel, .send-button, button.btn) {
    min-height: var(--ds-button-height) !important;
}
@media (max-width: 575.98px) {
    .btn.ds-print-action {
        flex: 0 0 auto;
        width: var(--ds-icon-button-width);
        min-width: var(--ds-icon-button-width);
        padding-inline: 0;
        gap: 0;
    }
    .ds-print-action > .ds-button-label { display: none; }
}

.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Standard Bootstrap-Buttons in burlywood gemäß AGENTS.md */
.btn-primary, 
.btn-outline-primary, 
.btn-secondary, 
.btn-outline-secondary, 
.btn-info, 
.btn-outline-info {
    background-color: burlywood !important;
    color: #000000 !important;
}

/* Kompakter Standard-Button für Listen (z. B. '▶') */
.btn-sm, .btn-group-sm > .btn, .ds-btn-edit {
    padding: 0.25rem 0.55rem;
    font-size: 0.875rem;
    line-height: 1.2;
    border-radius: 0.5rem !important;
    font-weight: 500;
    min-width: 2rem;
    height: auto;
}

/* Standard-Aktions-Buttons & Absende-Buttons in Formularen */
.send-button, 
.ds-btn-action,
.ds-btn-cancel {
    background-color: burlywood;
    color: #000000;
    border: 1px solid var(--ds-button-border);
    border-radius: 0.6rem !important;
    width: 80%;
    max-width: 28rem;
    height: var(--ds-button-height); 
    margin: 0.5rem auto !important;
    text-align: center;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: background-color 0.2s ease, border-color 0.2s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.ds-btn-cancel {
    background-color: transparent !important;
    color: #495057 !important;
}

/* Gemeinsame Abstände und Bedienflächen für Bootstrap-Dialoge. */
.modal {
    --bs-modal-padding: 0.5rem;
    --bs-modal-header-padding: 0.5rem;
    --bs-modal-footer-gap: 0px;
    --bs-modal-border-color: var(--ds-button-border);
    --bs-modal-border-radius: 0.6rem;
}
dialog {
    box-sizing: border-box;
    width: min(100% - 2 * var(--ds-page-side-gap), 500px);
    max-width: none;
    max-height: calc(100% - 2 * var(--ds-page-side-gap));
    overflow: auto;
    background-color: #fff;
    border: 1px solid var(--ds-button-border);
    border-radius: 0.6rem;
    padding: 0.5rem;
}
dialog::backdrop {
    background-color: rgb(0 0 0 / 50%);
}
:is(.modal .modal-content, dialog) {
    overflow-wrap: anywhere;
}
.modal :is(.modal-title, .modal-body) {
    min-width: 0;
}
.modal .modal-title {
    font-size: var(--ds-page-heading-size);
}
.modal .modal-header {
    gap: 0.5rem;
}
.modal .modal-header .btn-close {
    box-sizing: border-box;
    flex: 0 0 auto;
    width: var(--ds-icon-button-width);
    height: var(--ds-button-height);
    padding: 0;
    margin: 0 0 0 auto;
}
.modal .modal-footer {
    gap: 0.5rem;
}
:is(.modal .modal-footer, dialog .ds-actions) > .btn {
    flex: 0 1 auto;
    width: auto !important;
    min-width: 0;
    max-width: 100%;
    height: auto;
    margin: 0 !important;
    padding: 0.375rem 0.5rem;
    text-align: center;
    white-space: normal;
}
@media (max-width: 575.98px) {
    .modal {
        --bs-modal-margin: var(--ds-page-side-gap);
    }
}

/* Semantische Status-Buttons */
.btn-success, .btn-outline-success {
    background-color: #407c64 !important;
    color: #ffffff !important;
}
.btn-warning, .btn-outline-warning {
    background-color: #d17635 !important;
    color: #ffffff !important;
}
.btn-danger, .btn-outline-danger {
    background-color: #be461e !important;
    color: #ffffff !important;
}
/* Buttons auf der Startseite */
.button, .ds-btn-tile {
    background-color: #f2f3f5;
    color: #000000;
    border: 1px solid var(--ds-button-border);
    border-radius: 0.6rem;
    height: var(--ds-button-height); 
    padding: 0 0.5rem;
    margin: 0.05rem auto !important;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.0rem;
    box-shadow: 0px 0px 2px 2px rgba(58, 29, 11, 0.69);
    vertical-align: middle;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Farbklassen - Unabhängig von der Basisklasse */
.ds-orange {
    background-color: #d17635 !important;
    color: #ffffff !important;
}

.ds-orange-text {
    color: #d17635 !important;
}

.ds-gruen {
    background-color: #407c64 !important;
    color: #ffffff !important;
}

.ds-gruen-text {
    color: #407c64 !important;
}

.ds-dunkelblau {
    background-color: #1a4f8b !important;
    color: #ffffff !important;
}

.ds-dunkelblau-text {
    color: #1a4f8b !important;
}

.ds-arbeit-text {
    color: #000000 !important;
    font-weight: 700 !important;
}

.ds-pause-text {
    color: #ffffff !important;
    font-weight: normal !important;
}

.ds-rot {
    background-color:#be461e !important;
    color: #ffffff !important;
}

.ds-grau {
    background-color: #cbc9c9 !important;
    color: #000000 !important;
}

.ds-braun {
    background-color: #8b4513 !important;
    color: #ffffff !important;
}

/* Interaktionszustände für Navigation, Aktionen und klickbare Kacheln. */
html:root body :is(
    .btn, .button, .navbar-toggler, .ds-btn-tile, .ds-nav-action, .ds-fa-button,
    .send-button, .ds-btn-action, .ds-btn-cancel,
    .ds-overview .ds-overview-tile, .ds-overview .list-group-item-action, .wp-admin-links .list-group-item-action
):not(:disabled, .disabled, [aria-disabled="true"]):is(:hover, :focus-visible, :active) {
    background-color: var(--ds-button-border) !important;
    color: #fff !important;
}
html:root body :is(
    .btn, .button, .navbar-toggler, .ds-btn-tile, .ds-nav-action, .ds-fa-button,
    .send-button, .ds-btn-action, .ds-btn-cancel,
    .ds-overview .ds-overview-tile, .ds-overview .list-group-item-action, .wp-admin-links .list-group-item-action
):not(:disabled, .disabled, [aria-disabled="true"]):focus-visible {
    outline: 2px solid var(--ds-button-border);
    outline-offset: 2px;
}
html:root body :is(
    .btn, .button, .navbar-toggler, .ds-btn-tile, .ds-nav-action, .ds-fa-button, .admin-section-toggle,
    .send-button, .ds-btn-action, .ds-btn-cancel,
    .ds-overview .ds-overview-tile, .ds-overview .list-group-item-action, .wp-admin-links .list-group-item-action
):is(:disabled, .disabled, [aria-disabled="true"]) {
    opacity: var(--bs-btn-disabled-opacity, 0.65);
    pointer-events: none;
}
html:root body :is(.btn, .button, .ds-nav-action, .ds-overview .ds-overview-tile, .list-group-item-action):not(:disabled, .disabled, [aria-disabled="true"]):is(:hover, :focus-visible, :active) .bi {
    color: #fff !important;
}
html:root body :is(.ds-overview .ds-overview-tile, .ds-overview .list-group-item-action, .wp-admin-links .list-group-item-action):not(:disabled, .disabled, [aria-disabled="true"]):is(:hover, :focus-visible, :active) img,
.navbar-toggler:not(:disabled, .disabled, [aria-disabled="true"]):is(:hover, :focus-visible, :active) .navbar-toggler-icon {
    filter: brightness(0) invert(1);
}

.btn-fb-round {
    width: 32px;
    height: 32px;
    padding: 2px 0 0 0;
    font-size: 0.75rem;
    line-height: 28px;
    text-align: center;
}

.ds-hellblau {
    background-color: #abeafd !important;
    color: #ffffff !important;
}

.ds-hellblau:hover {
    background-color: brown !important;
    color: #ffffff !important;
}

.ds-hellgrau {
    background-color: #f2f3f5 !important;
    color: #000000 !important;
}

.ds-weiss {
    box-shadow: 0px 0px 2px 2px rgba(169, 169, 169, 0.54),
    inset 0px 0px 0px 1px rgba(150, 150, 150, 0.75),
    inset 0px 0px 0px 5px rgba(200, 200, 200, 0.5) !important;
    color: #000000 !important;
    background-color: #ffffff !important;
}

/* =========================================================
   GLOBALE LISTEN & TABELLEN
   ========================================================= */

table, .table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--ds-button-border) !important;
    border-radius: 0.6rem;
    overflow: hidden;
    background-color: #ffffff;
    margin-bottom: 1rem;
    --bs-table-border-color: var(--ds-button-border);
}

th, .table th {
    background-color: burlywood !important;
    color: #282522 !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 0.65rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--ds-button-border) !important;
    border-top: none !important;
}

td, .table td {
    padding: 0.5rem 0.65rem;
    vertical-align: top;
    font-size: 0.95rem;
    color: #282522;
    border-top: 1px solid var(--ds-button-border) !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
}

.ds-table-wrap :is(th, td),
.ds-page-content :is(.list-group-item, .ds-wrap-list) {
    overflow-wrap: anywhere;
}
.ds-wrap-list {
    min-width: 0;
}
.ds-table-compact-content {
    contain: inline-size;
}
.ds-table-wrap .ds-table-edit-cell {
    width: 1%;
}
.ds-table-cell-label {
    display: none;
}

@media screen and (max-width: 575.98px) {
    .ds-table-wrap :is(th, td) {
        padding-inline: .25rem;
    }
    .ds-table-compact-mobile :is(th, td) {
        padding: .4rem .2rem;
        font-size: .8125rem;
    }
    .ds-table-wrap .text-nowrap {
        white-space: normal !important;
    }
    .ds-table-stack,
    .ds-table-stack :is(tbody, tfoot) {
        display: block;
    }
    .ds-table-stack thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
    .ds-table-stack tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
        padding: .5rem;
    }
    .ds-table-stack tr:has(> .ds-table-edit-cell) {
        grid-template-columns: 32px minmax(0, 1fr);
        column-gap: .5rem;
    }
    .ds-table-stack tr + tr {
        border-block-start: 1px solid burlywood;
    }
    .ds-table-stack :is(tbody, tfoot) td {
        grid-column: 1;
        min-width: 0;
        width: auto;
        padding: .125rem 0;
        border: 0 !important;
    }
    .ds-table-stack :is(tbody, tfoot) :where(tr:has(> .ds-table-edit-cell)) > td {
        grid-column: 2;
    }
    .ds-table-stack tbody .ds-table-edit-cell {
        grid-column: 1;
        grid-row: 1;
        width: auto;
        text-align: start;
    }
    .ds-table-stack tbody td:empty {
        padding-block: 0;
    }
    .ds-table-stack :is(tbody, tfoot) td[colspan] {
        grid-column: 1 / -1;
    }
    .ds-table-stack .ds-table-cell-label {
        display: inline;
        font-weight: 600;
        margin-inline-end: .5rem;
    }
}

table.align-top td,
.table.align-top td,
table.align-top th,
.table.align-top th,
table tr.align-top td,
.table tr.align-top td,
tr.align-top td,
td.align-top,
th.align-top,
tr.align-top th {
    vertical-align: top !important;
}

tr, .table tr {
    background-color: #ffffff;
    transition: background-color 0.15s ease;
}

/* Grobe 2px-Burlywood-Kante entfernen */
tr + tr {
    border-top: none;
}

/* Dezenter Hover-Effekt bei Tabellenzeilen */
table tbody tr:hover, .table tbody tr:hover {
    background-color: #faf9f7;
}

/* Summen- und Fußzeilen */
table tfoot tr td, table .summary-row td {
    background-color: #f8f7f5;
    font-weight: 600;
    border-top: 1px solid var(--ds-button-border) !important;
}

/* =========================================================
   GLOBALE TRENNLINIEN & RAHMEN (BRAUN)
   ========================================================= */

/* Bootstrap Cards & Header */
.card {
    border: 1px solid var(--ds-button-border) !important;
    border-radius: 0.85rem !important;
    overflow: hidden;
    background-color: #ffffff;
}

.card-header {
    border-bottom: 1px solid var(--ds-button-border) !important;
}

.card-footer {
    border-top: 1px solid var(--ds-button-border) !important;
}

/* List-Groups (z. B. in Übersichten) */
.list-group-item {
    border-color: var(--ds-button-border) !important;
    color: #282522;
}

.list-group-flush > .list-group-item {
    border-width: 0 0 1px !important;
}

.list-group-flush > .list-group-item:last-child {
    border-bottom-width: 0 !important;
}

/* Horizontale Trennlinien (<hr>) */
hr {
    border-top: 1px solid var(--ds-button-border) !important;
    opacity: 0.85 !important;
}


#spinner {
    display: none;
    width: 80px;
    height: 80px;
    border: 6px solid rgba(0, 0, 0, .1);
    border-radius: 50%;
    border-top-color: #407c64;
    animation: spin 1s ease-in-out infinite;
    -webkit-animation: spin 1s ease-in-out infinite;
    position: fixed;
    left: calc(50% - 40px);
    top: calc(50% - 40px);
    z-index: 9999;
}

/* =========================================================
   FULLSCREEN LOADING & SPERR-OVERLAY (Ausgrauen bei Aktionen)
   ========================================================= */
#ds-loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(35, 33, 30, 0.72);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 100000;
    cursor: wait;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: all;
    justify-content: center;
    align-items: center;
}

.ds-loading-box {
    background: #ffffff;
    border: 2px solid var(--ds-button-border);
    border-radius: 14px;
    padding: 24px 28px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    text-align: center;
    max-width: 90%;
    min-width: 270px;
    animation: dsFadeIn 0.2s ease-out;
}

.ds-loading-spinner {
    width: var(--ds-button-height);
    height: var(--ds-button-height);
    margin: 0 auto 16px auto;
    border: 5px solid rgba(64, 124, 100, 0.2);
    border-radius: 50%;
    border-top-color: #407c64;
    animation: spin 0.85s linear infinite;
    -webkit-animation: spin 0.85s linear infinite;
}

.ds-loading-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #282522;
    margin-bottom: 6px;
    line-height: 1.3;
}

.ds-loading-subtitle {
    font-size: 0.9rem;
    color: #555555;
    line-height: 1.3;
}

@keyframes dsFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@-webkit-keyframes spin {
    to { -webkit-transform: rotate(360deg); }
}

@page ds-print-list {
    size: A4 portrait;
    margin: 10mm;
}

@media print {
    .no-print { display: none !important; }
    body, html { width: 100%; margin: 0; padding: 0; }

    /* Das Druckdokument und sein Papierformat bestimmen die Seitenränder. */
    body:has(.ds-print-document) {
        background: #fff !important;
    }
    html:root body .ds-page-shell:has(.ds-print-document) {
        max-width: none;
        padding-inline: 0 !important;
        background: #fff !important;
    }
    html:root body .ds-page-content:has(.ds-print-document) {
        display: block;
        background: #fff !important;
    }
    html:root body .ds-page-content:has(> .ds-print-document) > .ds-print-document {
        margin-block: 0 !important;
    }
    body:has(.ds-print-document) .ds-page-footer {
        display: none !important;
    }

    .ds-print-list {
        page: ds-print-list;
        color: #000;
        font-size: 10pt;
    }
    .ds-print-list > header {
        margin-block: 0 3mm;
    }
    .ds-print-list :is(.table-responsive, .table) {
        overflow: visible;
    }
    .ds-print-list .table {
        border-collapse: collapse;
        border-radius: 0;
        margin-block-end: 0;
    }
    .ds-print-list thead {
        display: table-header-group;
    }
    .ds-print-list tr {
        break-inside: avoid;
    }
    .ds-print-list :is(th, td) {
        color: #000;
        font-size: inherit;
        padding: 1.2mm 1.5mm;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .ds-print-list a {
        color: inherit;
    }
}

/* =========================================================
   DIGISTABLE STARTSEITE
   ========================================================= */

.ds-main-group {
    width: 100%;
    margin: .65rem auto 0 auto;
    padding: .35rem .25rem .35rem 0;

    background: #ffffff;
    border: 1px solid var(--ds-button-border);
    border-radius: .9rem;
}

.ds-main-group:last-of-type {
    margin-bottom: 1.5rem;
}


/* etwas Luft zwischen den Spalten */
.ds-main-group .row {
    --bs-gutter-x: .45rem;
    margin-left: 0;
    margin-right: 0;
    flex-wrap: nowrap;
}


/* linke Bereichsbeschriftung */
.ds-main-label {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 20% !important;
    max-width: 20% !important;
    flex: 0 0 20% !important;

    padding: 0 .35rem 0 .55rem !important;
    margin: -.35rem 0;
    margin-right: .35rem;

    background: #f2f3f5;
    border-radius: .85rem 0 0 .85rem;
    border-right: 1px solid var(--ds-button-border);

    color: #282522;
    font-size: .95rem;
    font-weight: normal;
    line-height: 1.05;
    text-align: left;
    flex-shrink: 0;
    cursor: pointer;
}


/* alle Bedienbuttons */
.ds-main-group .button {
    background-color: #d6cfc5;
    color: #282522;
    width: 100%;
    min-height: 3.7rem;

    padding: .55rem .35rem !important;

    border: 1px solid var(--ds-button-border) !important;
    border-radius: .7rem !important;

    box-shadow: 0 2px 5px rgba(0,0,0,.12) !important;

    font-size: 1.05rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.015em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    white-space: nowrap;
}


/* Bootstrap Icons & SVG Icons */
.ds-main-group .button .bi,
.ds-main-group .button .ds-icon-svg {
    margin-left: .35rem;
    font-size: 1.35em;
    vertical-align: -.12em;
}

.ds-icon-svg {
    width: 1.45em;
    height: 1.45em;
    vertical-align: -0.18em;
    display: inline-block;
    object-fit: contain;
}

/* Auf dunklem/farbigem Button-Hintergrund Icons weiß darstellen */
.ds-main-group .button.ds-gruen .bi,
.ds-main-group .button.ds-rot .bi,
.ds-main-group .button.ds-orange .bi,
.ds-main-group .button.ds-braun .bi,
.btn-success .bi,
.btn-danger .bi,
.btn-warning .bi {
    color: #ffffff !important;
}

.ds-main-group .button.ds-gruen .ds-icon-svg,
.ds-main-group .button.ds-rot .ds-icon-svg,
.ds-main-group .button.ds-orange .ds-icon-svg,
.ds-main-group .button.ds-braun .ds-icon-svg,
.ds-main-group .button:not(:disabled, .disabled, [aria-disabled="true"]):is(:hover, :focus-visible, :active) .ds-icon-svg {
    filter: brightness(0) invert(1);
}


/* Info: Abstand zwischen den beiden Buttonzeilen */
.ds-main-group .row + .row {
    margin-top: .35rem;
}


/* auf dem Handy */
@media (max-width: 576px) {

    .container, .container-xl, .container-xxl {
        padding: 0 0.35rem;
    }

    .ds-main-group {
        width: 100%;
        margin-top: .55rem;
        padding: .3rem .2rem .3rem 0;
    }

    .ds-main-group:last-of-type {
        margin-bottom: 1.25rem;
    }

    .ds-main-group .row {
        --bs-gutter-x: .3rem;
        margin-left: 0;
        margin-right: 0;
        flex-wrap: nowrap;
    }

    .ds-main-group .row + .row {
        margin-top: .25rem;
    }

    .ds-main-label {
        width: 20% !important;
        max-width: 20% !important;
        flex: 0 0 20% !important;
        padding: 0 .2rem 0 .35rem !important;
        margin: -.3rem 0;
        margin-right: .25rem;
        font-size: .85rem;
        text-align: left;
    }

    .ds-main-group .button {
        min-height: var(--ds-button-height);
        font-size: .85rem !important;
        padding: .4rem .15rem !important;
        white-space: nowrap;
    }

    .ds-main-group .button .bi,
    .ds-main-group .button .ds-icon-svg {
        margin-left: .2rem;
        font-size: 1.25em;
    }
}


/* Spritzen-Icon (Impfungen) - einfärbbar über currentColor */
.ds-icon-spritze {
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    vertical-align: -0.3em;
    flex: 0 0 auto;
    background-color: currentColor;
    -webkit-mask: url("../img/svg/spritze.svg") center / contain no-repeat;
    mask: url("../img/svg/spritze.svg") center / contain no-repeat;
}
