/* Herren Wileroltigen – Bestellverwaltung: gemeinsames Design */

:root {
    --hw-bg: #f3f4f0;
    --hw-surface: #ffffff;
    --hw-surface-alt: #fafbf9;
    --hw-border: #e2e5de;
    --hw-text: #1f2a24;
    --hw-muted: #6b746e;
    --hw-primary: #2f6b4f;
    --hw-primary-dark: #24533d;
    --hw-primary-soft: #e5efe9;
    --hw-yolk: #e9a227;
    --hw-yolk-soft: #fcf1dc;
    --hw-yolk-text: #5c4410;
    --hw-info: #2f5f8a;
    --hw-info-soft: #e5edf5;
    --hw-neutral: #c7ccc4;
    --hw-radius: 14px;
    --hw-shadow: 0 1px 2px rgba(31, 42, 36, .05), 0 2px 8px rgba(31, 42, 36, .04);
}

body {
    background: var(--hw-bg);
    color: var(--hw-text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: .95rem;
    padding-bottom: 6rem;
}
.tabular {
    font-variant-numeric: tabular-nums;
}
.min-w-0 {
    min-width: 0;
}

/* Bootstrap-Akzentfarbe an Betriebsfarbe anpassen */
.btn-primary {
    --bs-btn-bg: var(--hw-primary);
    --bs-btn-border-color: var(--hw-primary);
    --bs-btn-hover-bg: var(--hw-primary-dark);
    --bs-btn-hover-border-color: var(--hw-primary-dark);
    --bs-btn-active-bg: var(--hw-primary-dark);
    --bs-btn-active-border-color: var(--hw-primary-dark);
    --bs-btn-disabled-bg: var(--hw-primary);
    --bs-btn-disabled-border-color: var(--hw-primary);
}
.btn-outline-primary {
    --bs-btn-color: var(--hw-primary);
    --bs-btn-border-color: var(--hw-primary);
    --bs-btn-hover-bg: var(--hw-primary);
    --bs-btn-hover-border-color: var(--hw-primary);
    --bs-btn-active-bg: var(--hw-primary);
    --bs-btn-active-border-color: var(--hw-primary);
}
.dropdown-item:active {
    background-color: var(--hw-primary);
}
.form-check-input:checked {
    background-color: var(--hw-primary);
    border-color: var(--hw-primary);
}
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: #8fb8a3;
    box-shadow: 0 0 0 .2rem rgba(47, 107, 79, .18);
}
.btn-block {
    display: block;
    width: 100%;
}
.btn-wrapper {
    position: relative;
    min-width: 180px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.modal-content {
    border-radius: var(--hw-radius);
}

/* Seitenkopf */
.page-head {
    padding: 2rem 0 1.25rem;
}
.page-head h1 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -.01em;
    margin: 0;
}
.page-head .subtitle {
    color: var(--hw-muted);
    margin: .25rem 0 0;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .85rem;
    color: var(--hw-muted);
    text-decoration: none;
    margin-bottom: .4rem;
}
.back-link:hover {
    color: var(--hw-primary);
}

/* Flash-Meldungen: im Seitenfluss unter der Navigation, damit sie nichts überdecken */
.flash-wrap {
    width: min(520px, calc(100% - 2rem));
    margin: 1rem auto 0;
}
.flash-wrap:empty,
.flash-wrap:not(:has(.alert:not(.d-none))) {
    display: none;
}
.flash-wrap .alert {
    box-shadow: 0 8px 24px rgba(31, 42, 36, .15);
    border-radius: var(--hw-radius);
}

/* Panels */
.panel {
    background: var(--hw-surface);
    border: 1px solid var(--hw-border);
    border-radius: var(--hw-radius);
    box-shadow: var(--hw-shadow);
}
.panel-title {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--hw-muted);
    margin-bottom: .75rem;
}
.summary {
    position: sticky;
    top: 1rem;
}
.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}
.stat {
    padding: .9rem 1rem;
    border-radius: 10px;
    background: var(--hw-bg);
}
.stat.wide {
    grid-column: 1 / -1;
}
.stat-label {
    font-size: .8rem;
    color: var(--hw-muted);
}
.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

/* Eiermengen */
.egg-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.egg-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .7rem 0;
    border-top: 1px solid var(--hw-border);
}
.egg-row:first-child {
    border-top: 0;
    padding-top: 0;
}
.egg-dot {
    flex: none;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--hw-yolk-soft);
    color: var(--hw-yolk);
    display: grid;
    place-items: center;
    font-size: 1.1rem;
}
.egg-name {
    font-weight: 600;
}
.egg-pieces {
    font-size: .8rem;
    color: var(--hw-muted);
}
.egg-trays {
    margin-left: auto;
    text-align: right;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.1;
}
.egg-trays small {
    display: block;
    font-size: .72rem;
    font-weight: 500;
    color: var(--hw-muted);
}

/* Filter (Segmente) */
.segmented {
    display: inline-flex;
    padding: 3px;
    gap: 2px;
    border-radius: 10px;
    background: #e7e9e3;
}
.segmented a,
.segmented button {
    border: 0;
    background: transparent;
    color: var(--hw-muted);
    font-size: .85rem;
    font-weight: 600;
    padding: .35rem .8rem;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
}
.segmented .active,
.segmented .btn-check:checked + label {
    background: var(--hw-surface);
    color: var(--hw-text);
    box-shadow: 0 1px 2px rgba(31, 42, 36, .12);
}
/* Segmente aus Radio-Buttons (btn-check + label) */
.segmented label {
    margin: 0;
    color: var(--hw-muted);
    font-size: .85rem;
    font-weight: 600;
    padding: .35rem .9rem;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    text-align: center;
}
.segmented .btn-check:focus-visible + label {
    outline: 2px solid var(--hw-primary);
}

/* Auswahl-Chips (z.B. Preisstufen) */
.choice-group {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}
.choice-group label {
    margin: 0;
    padding: .45rem .8rem;
    border: 1px solid var(--hw-border);
    border-radius: 999px;
    background: var(--hw-surface);
    font-size: .88rem;
    font-weight: 500;
    cursor: pointer;
    font-variant-numeric: tabular-nums;
}
.choice-group .btn-check:checked + label {
    background: var(--hw-primary);
    border-color: var(--hw-primary);
    color: #fff;
}
.choice-group .btn-check:focus-visible + label {
    outline: 2px solid var(--hw-primary);
    outline-offset: 2px;
}

/* Einfache Listenzeilen (Preise, Kunden …) */
.list-rows {
    margin: 0 -1.25rem -1.1rem;
}
.list-row {
    padding: .9rem 1.25rem;
    border-top: 1px solid var(--hw-border);
}
.list-row:last-child {
    border-radius: 0 0 var(--hw-radius) var(--hw-radius);
}
/* Ganze Zeile antippbar (Checkbox-Listen) */
.check-row {
    display: flex;
    align-items: center;
    gap: .9rem;
    cursor: pointer;
    margin: 0;
}
.check-row .form-check-input {
    flex: none;
    width: 1.35rem;
    height: 1.35rem;
    margin: 0;
}
.check-row:has(.form-check-input:checked) {
    background: #f6faf7;
    box-shadow: inset 3px 0 0 var(--hw-primary);
}
.flex-none {
    flex: none;
}

/* Tagesgruppen */
.day {
    margin-bottom: 1.5rem;
}
.day-head {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .6rem 0;
    background: var(--hw-bg);
}
.day-title {
    font-weight: 700;
    font-size: 1.05rem;
}
.day-badge {
    font-size: .72rem;
    font-weight: 600;
    padding: .2rem .55rem;
    border-radius: 999px;
    background: var(--hw-surface);
    color: var(--hw-muted);
    border: 1px solid var(--hw-border);
}
.day-badge.tone-today {
    background: var(--hw-yolk);
    border-color: var(--hw-yolk);
    color: #3a2a06;
}
.day-badge.tone-soon {
    background: var(--hw-yolk-soft);
    border-color: var(--hw-yolk-soft);
    color: #7a5410;
}
.day-count {
    margin-left: auto;
    font-size: .8rem;
    color: var(--hw-muted);
}

/* Bestellkarte */
.order {
    --status: var(--hw-neutral);
    background: var(--hw-surface);
    border: 1px solid var(--hw-border);
    border-left: 4px solid var(--status);
    border-radius: var(--hw-radius);
    box-shadow: var(--hw-shadow);
    margin-bottom: .75rem;
}
.order[data-status="doc"] {
    --status: var(--hw-info);
}
.order[data-status="done"] {
    --status: var(--hw-primary);
}
.order-head {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .85rem 1rem .6rem;
}
.order-name {
    font-weight: 700;
    font-size: 1.02rem;
    line-height: 1.3;
    word-break: break-word;
}
.order-customer {
    font-weight: 400;
    color: var(--hw-muted);
    font-style: italic;
}
.order-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .35rem;
}
.tag {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .72rem;
    font-weight: 600;
    padding: .15rem .5rem;
    border-radius: 6px;
    background: var(--hw-bg);
    color: var(--hw-muted);
}
.tag-done {
    background: var(--hw-primary-soft);
    color: var(--hw-primary-dark);
}
.tag-doc {
    background: var(--hw-info-soft);
    color: var(--hw-info);
}
.tag-open {
    background: var(--hw-yolk-soft);
    color: var(--hw-yolk-text);
}
.order-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: .35rem;
    flex: none;
}
.order-actions .btn {
    --bs-btn-padding-y: .3rem;
    --bs-btn-padding-x: .6rem;
    --bs-btn-font-size: .82rem;
    --bs-btn-border-radius: 8px;
}
.btn-icon {
    width: 2.1rem;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
.order-actions .dropdown-menu {
    --bs-dropdown-font-size: .9rem;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(31, 42, 36, .12);
}
.order-actions .dropdown-item .bi {
    width: 1.4rem;
    display: inline-block;
    color: var(--hw-muted);
}
.order-actions .dropdown-item.text-danger .bi {
    color: inherit;
}
.order-message {
    margin: 0 1rem .6rem;
    padding: .5rem .75rem;
    border-radius: 8px;
    background: var(--hw-yolk-soft);
    color: var(--hw-yolk-text);
    font-size: .88rem;
}
.order-notes {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem 1rem;
    margin: 0 1rem .6rem;
    font-size: .85rem;
    color: var(--hw-muted);
}
.order-notes .bi {
    margin-right: .3rem;
}
.order-items {
    list-style: none;
    margin: 0;
    padding: 0;
}
.order-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 8rem 6rem 6rem;
    gap: .5rem;
    align-items: baseline;
    padding: .45rem 1rem;
    border-top: 1px dashed var(--hw-border);
}
.order-items.no-price .order-item {
    grid-template-columns: minmax(0, 1fr) 8rem 6rem;
}
.order-item.head {
    border-top: 1px solid var(--hw-border);
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--hw-muted);
    padding-top: .4rem;
    padding-bottom: .3rem;
}
.order-item .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.order-item .muted {
    color: var(--hw-muted);
}
.order-items:last-child .order-item:last-child {
    border-radius: 0 0 var(--hw-radius) var(--hw-radius);
}
.order-foot {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: .6rem 1rem;
    border-top: 1px solid var(--hw-border);
    background: var(--hw-surface-alt);
    border-radius: 0 0 var(--hw-radius) var(--hw-radius);
    font-size: .85rem;
    color: var(--hw-muted);
}
.order-foot strong {
    color: var(--hw-text);
    font-size: 1rem;
}

/* Datiergerät */
.date-tiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}
.date-tile {
    padding: .8rem 1rem;
    border-radius: 10px;
}
.date-tile.lay {
    background: var(--hw-primary-soft);
    color: var(--hw-primary-dark);
}
.date-tile.best {
    background: var(--hw-info-soft);
    color: var(--hw-info);
}
.date-tile .stat-label {
    color: inherit;
    opacity: .8;
}
.date-tile .stat-value {
    font-size: 1.2rem;
}

/* Formulare (edit.php) */
.form-panel {
    padding: 1.1rem 1.25rem;
}
.form-panel + .form-panel {
    margin-top: 1rem;
}
.form-label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--hw-muted);
    margin-bottom: .3rem;
}
.product-list {
    margin: 0 -1.25rem -1.1rem;
}
.product-row {
    display: grid;
    grid-template-columns: 4rem minmax(0, 1fr) 8rem 10.5rem;
    gap: .9rem;
    align-items: center;
    padding: .8rem 1.25rem;
    border-top: 1px solid var(--hw-border);
}
.product-row.has-qty {
    background: #f6faf7;
    box-shadow: inset 3px 0 0 var(--hw-primary);
}
.product-row:last-child {
    border-radius: 0 0 var(--hw-radius) var(--hw-radius);
}
.product-thumb {
    width: 4rem;
    height: 4rem;
    object-fit: cover;
    border-radius: 10px;
    background: var(--hw-bg);
}
.product-name {
    font-weight: 600;
    line-height: 1.3;
}
.product-desc {
    font-size: .82rem;
    color: var(--hw-muted);
    margin-top: .15rem;
}
.product-field {
    align-self: start;
}
.product-row > .product-thumb,
.product-row > .product-info {
    align-self: center;
}
.product-field .form-label {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .2rem;
}
.product-field .input-group-text {
    font-size: .78rem;
    color: var(--hw-muted);
    background: var(--hw-surface-alt);
}
.product-field input {
    font-variant-numeric: tabular-nums;
}
.empty-products {
    padding: 1.5rem 1.25rem;
    text-align: center;
    color: var(--hw-muted);
    border-top: 1px solid var(--hw-border);
}
.save-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
    background: var(--hw-surface);
    border-top: 1px solid var(--hw-border);
    box-shadow: 0 -4px 16px rgba(31, 42, 36, .08);
}
.save-bar .save-total {
    font-size: .8rem;
    color: var(--hw-muted);
    line-height: 1.2;
}
.save-bar .save-total strong {
    display: block;
    font-size: 1.05rem;
    color: var(--hw-text);
}

/* Bestellformular: mobil Kunde → Produkte → Lieferung, Desktop Produkte links */
.order-form {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "customer" "products" "details";
}
.order-form .area-customer { grid-area: customer; }
.order-form .area-products { grid-area: products; }
.order-form .area-details { grid-area: details; }
@media (min-width: 992px) {
    .order-form {
        gap: 1.5rem;
        grid-template-columns: minmax(0, 1fr) 360px;
        grid-template-rows: auto 1fr;
        grid-template-areas: "products customer" "products details";
        align-items: start;
    }
}

/* Einspaltiges Formular (Coop, Kühlschrank) */
.single-form {
    max-width: 560px;
    margin: 0 auto;
}

/* Mengen-Stepper */
.qty-stepper .btn {
    width: 2.5rem;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-color: var(--hw-border);
    background: var(--hw-surface-alt);
    color: var(--hw-text);
    font-size: 1.1rem;
}
.qty-stepper .btn:hover,
.qty-stepper .btn:active {
    background: var(--hw-primary-soft);
    color: var(--hw-primary-dark);
}
.qty-stepper input {
    text-align: center;
    font-weight: 600;
    -moz-appearance: textfield;
}
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.qty-unit {
    display: block;
    margin-top: .2rem;
    font-size: .75rem;
    color: var(--hw-muted);
    text-align: center;
}
.qty-stepper.qty-lg .btn {
    width: 3.5rem;
    font-size: 1.5rem;
}
.qty-stepper.qty-lg input {
    font-size: 1.75rem;
    height: 3.5rem;
}

/* Optionen im Bestell-Modal als antippbare Karten */
.option-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .8rem 1rem .8rem 2.9rem;
    margin-bottom: .5rem;
    border: 1px solid var(--hw-border);
    border-radius: 10px;
    background: var(--hw-surface);
}
.option-card .form-check-input {
    position: absolute;
    left: 1rem;
    top: 50%;
    margin: 0;
    transform: translateY(-50%);
    width: 1.2rem;
    height: 1.2rem;
}
.option-card .form-check-label {
    flex: 1;
    cursor: pointer;
}
.option-card .form-check-label::after {
    /* ganze Karte klickbar */
    content: "";
    position: absolute;
    inset: 0;
}
.option-card:has(.form-check-input:checked) {
    border-color: var(--hw-primary);
    background: var(--hw-primary-soft);
}
.option-card .option-hint {
    display: block;
    font-size: .8rem;
    color: var(--hw-muted);
}

/* Horizontal scrollbare Leiste (z.B. viele Filter auf dem Handy) */
.scroll-x {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.scroll-x::-webkit-scrollbar {
    display: none;
}
.scroll-x .segmented {
    width: max-content;
    min-width: 100%;
}

/* Datentabellen (DataTables und einfache Tabellen) */
.data-table,
table.dataTable.dt-cards {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0;
    margin: 0 !important;
}
.data-table thead th,
table.dataTable.dt-cards thead th {
    background: var(--hw-surface-alt);
    color: var(--hw-muted);
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    border-bottom: 1px solid var(--hw-border) !important;
    padding: .55rem .6rem !important;
    white-space: nowrap;
}
.data-table td,
table.dataTable.dt-cards tbody td,
table.dataTable.dt-cards tfoot td {
    padding: .55rem .6rem !important;
    border-top: 1px solid var(--hw-border) !important;
    vertical-align: middle;
}
table.dataTable.dt-cards tfoot td {
    font-weight: 700;
    background: var(--hw-surface-alt);
}
table.dataTable.dt-cards.no-footer,
table.dataTable.dt-cards thead th,
table.dataTable.dt-cards thead td {
    border-bottom-color: var(--hw-border) !important;
}
table.dataTable.dt-cards tbody tr:hover {
    background: #f6faf7;
}
table.dataTable.dt-cards .dt-filter-row th {
    padding: .35rem .3rem !important;
    background: var(--hw-surface);
}
table.dataTable.dt-cards .dt-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
table.dataTable.dt-cards a {
    color: var(--hw-text);
    font-weight: 600;
    text-decoration: none;
}
table.dataTable.dt-cards a:hover {
    color: var(--hw-primary);
}
.dt-badges .badge {
    font-size: .65rem;
    padding: .3em .4em;
}
.dataTables_wrapper .dataTables_info {
    color: var(--hw-muted);
    font-size: .82rem;
    padding-top: .5rem !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 8px !important;
    border: 1px solid var(--hw-border) !important;
    background: var(--hw-surface) !important;
    color: var(--hw-text) !important;
    margin-left: .25rem;
    padding: .35rem .8rem !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--hw-primary) !important;
    border-color: var(--hw-primary) !important;
    color: #fff !important;
}
.dataTables_wrapper .dataTables_processing {
    background: var(--hw-surface);
    border: 1px solid var(--hw-border);
    border-radius: 10px;
    box-shadow: var(--hw-shadow);
    height: auto;
    padding: .75rem;
}

/* Handy: Tabellenzeilen als Karten */
@media (max-width: 767.98px) {
    table.dt-cards thead,
    table.dt-cards tfoot {
        display: none;
    }
    table.dt-cards,
    table.dt-cards tbody {
        display: block;
        width: 100% !important;
        border: 0 !important;
    }
    table.dt-cards tbody tr,
    table.dataTable.dt-cards tbody tr {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: .35rem .75rem;
        padding: .75rem .9rem;
        margin-bottom: .6rem;
        background: var(--hw-surface) !important;
        border: 1px solid var(--hw-border);
        border-radius: 12px;
    }
    table.dt-cards tbody td,
    table.dataTable.dt-cards tbody td {
        display: block;
        border: 0 !important;
        padding: 0 !important;
        font-size: .88rem;
        white-space: normal !important;
        text-align: left !important;
        width: auto !important;
        min-width: 0;
    }
    table.dt-cards tbody td::before {
        content: attr(data-label);
        display: block;
        font-size: .66rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: .05em;
        color: var(--hw-muted);
    }
    table.dt-cards tbody td.dt-name {
        grid-column: 1 / -1;
        order: -2;
        font-size: 1rem;
    }
    table.dt-cards tbody td.dt-message {
        grid-column: 1 / -1;
        order: -1;
        color: var(--hw-muted);
    }
    table.dt-cards tbody td.dt-message:empty,
    table.dt-cards tbody td.dt-name::before,
    table.dt-cards tbody td.dt-message::before {
        display: none;
    }
    table.dt-cards tbody td.dataTables_empty {
        grid-column: 1 / -1;
        text-align: center !important;
    }
    table.dt-cards tbody td.dataTables_empty::before {
        display: none;
    }
    .dataTables_wrapper .dataTables_paginate {
        text-align: center !important;
        float: none !important;
        margin-top: .5rem;
    }
    .dataTables_wrapper .dataTables_info {
        text-align: center;
    }
}

/* select2 / datepicker an Design angleichen */
.select2-container--bootstrap-5 .select2-selection {
    border-radius: .375rem;
}
.datepicker {
    font-size: .9rem;
}
/* Inline-Kalender unter dem Datumsfeld, volle Breite */
.inline-date .datepicker-inline {
    width: 100%;
    margin-top: .5rem;
    padding: .4rem;
    border: 1px solid var(--hw-border);
    border-radius: 10px;
    background: var(--hw-surface-alt);
}
.inline-date .datepicker-inline table {
    width: 100%;
}
.inline-date .datepicker table tr td,
.inline-date .datepicker table tr th {
    height: 2.1rem;
    border-radius: 8px;
}
.datepicker table tr td.today {
    background: var(--hw-yolk-soft) !important;
}
.datepicker table tr td.active,
.datepicker table tr td.active:hover {
    background: var(--hw-primary) !important;
    color: #fff !important;
}

/* Handy: grössere Tippflächen, 16px in Feldern verhindert Zoom unter iOS */
@media (max-width: 991.98px) {
    .form-control,
    .form-select,
    .input-group-sm > .form-control,
    .select2-container--bootstrap-5 .select2-selection,
    .select2-container--bootstrap-5 .select2-search__field {
        font-size: 16px !important;
    }
    .input-group-sm > .form-control,
    .input-group-sm > .btn,
    .input-group-sm > .input-group-text {
        min-height: 2.6rem;
    }
    .segmented a,
    .segmented button,
    .segmented label {
        padding: .5rem .8rem;
    }
}

@media (max-width: 575.98px) {
    .page-head {
        padding-top: 1.25rem;
    }
    .page-head h1 {
        font-size: 1.4rem;
    }
    .segmented {
        display: flex;
        width: 100%;
    }
    .segmented a,
    .segmented button,
    .segmented label {
        flex: 1;
        text-align: center;
    }
    .order-item,
    .order-items.no-price .order-item {
        grid-template-columns: auto auto 1fr;
        row-gap: .1rem;
    }
    .order-item .name {
        grid-column: 1 / -1;
        font-weight: 500;
    }
    .order-item .num {
        text-align: left;
    }
    .order-item .num:last-child {
        text-align: right;
    }
    .order-item.head {
        display: none;
    }
    .btn-label {
        display: none;
    }
    /* 4 Spalten, damit Preis und Menge auf der zweiten Zeile gleich breit sind */
    .product-row {
        grid-template-columns: 3.25rem minmax(0, 1fr) 3.25rem minmax(0, 1fr);
        gap: .6rem .75rem;
    }
    .product-thumb {
        width: 3.25rem;
        height: 3.25rem;
    }
    .product-info {
        grid-column: 2 / 5;
    }
    .field-price {
        grid-column: 1 / 3;
    }
    .field-qty {
        grid-column: 3 / 5;
    }
}

/* Eierabo */
.abo-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: inherit;
    text-decoration: none;
}
.abo-row:hover {
    background: #f6faf7;
    color: inherit;
}
.abo-name {
    font-weight: 700;
    line-height: 1.3;
    word-break: break-word;
}
.abo-sub {
    font-size: .82rem;
    color: var(--hw-muted);
}
.abo-when {
    margin-left: auto;
    flex: none;
    text-align: right;
}
.abo-date {
    font-weight: 600;
    white-space: nowrap;
}
.abo-chevron {
    flex: none;
    color: var(--hw-muted);
}
.abo-section.expired .abo-name {
    color: var(--hw-muted);
}
.delivery-teaser {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: 1rem 1.25rem;
    color: inherit;
    text-decoration: none;
    border-left: 4px solid var(--hw-yolk);
}
.delivery-teaser:hover {
    color: inherit;
    background: #fffdf8;
}
.delivery-nr {
    flex: none;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--hw-bg);
    display: grid;
    place-items: center;
    font-size: .8rem;
    font-weight: 700;
    color: var(--hw-muted);
}
.abo-panel > summary {
    display: flex;
    align-items: center;
    gap: .75rem;
    list-style: none;
    cursor: pointer;
}
.abo-panel > summary::-webkit-details-marker,
.past-termine > summary::-webkit-details-marker {
    display: none;
}
.abo-panel > summary::after {
    content: "\F282"; /* bi-chevron-down */
    font-family: bootstrap-icons;
    color: var(--hw-muted);
    transition: transform .2s;
}
.abo-panel[open] > summary::after {
    transform: rotate(180deg);
}
.past-termine > summary {
    list-style: none;
    cursor: pointer;
}
.past-termine[open] > summary {
    background: var(--hw-surface-alt);
}
.termin-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .75rem;
}
.termin-row.past {
    background: var(--hw-surface-alt);
}
.termin-row.past input {
    color: var(--hw-muted);
}
.termin-form {
    display: flex;
    gap: .5rem;
}
.termin-form .form-control {
    width: 11rem;
}
.termin-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}
.termin-new {
    background: var(--hw-primary-soft);
}

/* Leerer Zustand */
.empty {
    text-align: center;
    padding: 3rem 1.5rem;
}
.empty > .bi {
    font-size: 2.5rem;
    color: var(--hw-yolk);
}

/* Schwebender Button */
.fab {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--hw-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 6px 18px rgba(36, 83, 61, .35);
    text-decoration: none;
    transition: background .2s, transform .2s;
    z-index: 1030;
}
.fab:hover,
.fab:focus {
    background: var(--hw-primary-dark);
    color: #fff;
    transform: translateY(-2px);
}
