* {
    box-sizing: border-box;
}

:root {
    font-family: Arial, Helvetica, sans-serif;
    color: #172033;
    background: #f4f6f8;
}

body {
    margin: 0;
    background: #f4f6f8;
}

a {
    color: inherit;
}

.site-header {
    background: #172033;
    color: #ffffff;
}

.site-header__inner,
.page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header__inner {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    font-weight: 700;
    text-decoration: none;
}

.header-actions {
    display: flex;
    gap: 18px;
}

.header-actions a {
    text-decoration: none;
}

.page {
    padding-top: 28px;
    padding-bottom: 50px;
}

.card,
.stat-card,
.stop-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    margin: 0 0 20px 0;
}

.admin-head,
.tour-head,
.toolbar,
.inline-form,
.stop-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.admin-head { justify-content: space-between;}

.admin-grid,
.stat-grid,
.form-grid {
    display: grid;
    gap: 18px;
}

.admin-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 20px;
}

.stat-card strong {
    display: block;
    font-size: 28px;
}

.stat-card span,
.text-muted {
    color: #6b7280;
}

.form-stack {
    display: grid;
    gap: 16px;
}

.form-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.form-field {
    display: grid;
    gap: 7px;
}

.form-field--grow {
    flex: 1;
}

input,
select,
textarea,
button {
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cbd2da;
    border-radius: 8px;
    background: #ffffff;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 15px;
    border: 0;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
}

.button--primary,
.button--maps {
    background: #172033;
    color: #ffffff;
}

.button--secondary {
    background: #e7ebef;
    color: #172033;
}

.button--success {
    background: #24734c;
    color: #ffffff;
}

.button--large {
    min-height: 50px;
}

.button--small {
    min-height: 34px;
    padding: 6px 10px;
}

.flash {
    padding: 14px 16px;
    margin-bottom: 18px;
    border-radius: 8px;
}

.flash--success {
    background: #e6f4ec;
}

.flash--error {
    background: #fde8e8;
}

.auth-shell {
    max-width: 440px;
    margin: 50px auto;
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

.note {
    margin: 10px 0;
    padding: 10px 12px;
    background: #f4f6f8;
    border-radius: 8px;
}

.eyebrow {
    margin-bottom: 5px;
    color: #6b7280;
    font-size: 13px;
    text-transform: uppercase;
}

.tour-list {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}

.stop-card {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 14px;
}

.stop-card--completed {
    opacity: 0.6;
}

.stop-card__number {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #172033;
    color: #ffffff;
    font-weight: 700;
}

.stop-card address {
    margin-bottom: 14px;
    font-style: normal;
}

.section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.delivery-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 0;
    border-top: 1px solid #e5e7eb;
}

.delivery-card p {
    margin: 5px 0 0;
}

.app-modal {
    width: min(560px, calc(100% - 30px));
    padding: 0;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.app-modal--wide {
    width: min(980px, calc(100% - 30px));
}

.app-modal::backdrop {
    background: rgba(23, 32, 51, 0.55);
}

.app-modal > form {
    padding: 24px;
}

.modal-head,
.modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.modal-close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #e7ebef;
    cursor: pointer;
    font-size: 24px;
}

.modal-actions {
    justify-content: flex-end;
}

.matrix-wrap {
    overflow-x: auto;
}

.order-matrix {
    width: 100%;
    border-collapse: collapse;
}

.order-matrix th,
.order-matrix td {
    padding: 7px;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
}

.order-matrix th:first-child {
    min-width: 130px;
    text-align: left;
}

.order-matrix input {
    min-width: 65px;
    text-align: center;
}

@media (max-width: 700px) {
    .delivery-card {
        align-items: stretch;
        flex-direction: column;
    }

    .app-modal > form {
        padding: 18px;
    }
}


@media (max-width: 640px) {
    .site-header__inner,
    .page {
        width: min(100% - 20px, 1180px);
    }

    .stop-card {
        grid-template-columns: 38px 1fr;
        padding: 16px;
    }

    .stop-card__number {
        width: 34px;
        height: 34px;
    }

    .stop-actions {
        align-items: stretch;
    }

    .stop-actions > * {
        flex: 1;
    }
}

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-field input {
    width: auto;
}

.tour-stop-count {
    padding: 7px 11px;
    border-radius: 999px;
    background: #e7ebef;
    font-size: 14px;
}

.tour-sort-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.tour-sort-item {
    display: grid;
    grid-template-columns: 36px 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
}

.tour-sort-item--dragging {
    opacity: 0.45;
}

.drag-handle {
    display: grid;
    place-items: center;
    min-height: 38px;
    border-radius: 8px;
    background: #f4f6f8;
    cursor: grab;
    font-size: 24px;
    user-select: none;
}

.drag-handle:active {
    cursor: grabbing;
}

.tour-sort-number {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #172033;
    color: #ffffff;
    font-weight: 700;
}

.tour-sort-content {
    display: grid;
    gap: 3px;
}

.tour-save-status {
    min-height: 20px;
    margin-bottom: 0;
}

@media (max-width: 700px) {
    .tour-sort-item {
        grid-template-columns: 32px 34px minmax(0, 1fr);
    }

    .tour-sort-item form {
        grid-column: 3;
    }
}

.tour-overview-sort-list {
    display: grid;
    gap: 10px;
}

.tour-overview-sort-item {
    display: grid;
    grid-template-columns: 36px 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
}

.tour-overview-sort-item--dragging {
    opacity: 0.45;
}

.tour-overview-content {
    display: grid;
    gap: 6px;
}

.tour-overview-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    color: #6b7280;
    font-size: 14px;
}

@media (max-width: 700px) {
    .tour-overview-sort-item {
        grid-template-columns: 32px 34px minmax(0, 1fr);
    }

    .tour-overview-sort-item > .button {
        grid-column: 3;
        justify-self: start;
    }
}

.driver-page {
    width: min(900px, calc(100% - 24px));
    margin: 0 auto;
    padding: 18px 0 40px;
}

.driver-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.driver-header h1 {
    margin: 0;
}

.driver-date {
    margin: 5px 0 0;
    color: #6b7280;
}

.driver-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}

.driver-summary > div {
    display: grid;
    gap: 2px;
    padding: 14px;
    border-radius: 12px;
    background: #172033;
    color: #ffffff;
    text-align: center;
}

.driver-summary strong {
    font-size: 25px;
}

.driver-summary span {
    font-size: 13px;
    opacity: 0.8;
}

.driver-stops {
    display: grid;
    gap: 14px;
}

.driver-stop {
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
}

.driver-stop--done {
    opacity: 0.58;
}

.driver-stop-head {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.driver-stop-head h2 {
    margin: 0;
    font-size: 21px;
}

.driver-stop-head p {
    margin: 4px 0 0;
    color: #6b7280;
}

.driver-stop-number {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #172033;
    color: #ffffff;
    font-weight: 700;
    font-size: 18px;
}

.driver-deliveries {
    display: grid;
    gap: 10px;
    margin-top: 15px;
}

.driver-delivery {
    padding: 12px;
    border-radius: 10px;
    background: #f5f7f9;
}

.driver-delivery h3 {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 9px;
    font-size: 16px;
}

.driver-delivery h3 span {
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
}

.driver-food-list {
    display: grid;
    gap: 6px;
}

.driver-food {
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 5px;
    align-items: baseline;
}

.driver-food strong {
    font-size: 18px;
}

.driver-food small {
    grid-column: 2;
    color: #8a4b00;
}

.driver-note {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 9px;
    background: #fff7dd;
}

.driver-no-food {
    margin: 14px 0 0;
    color: #6b7280;
}

.driver-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

.button--maps,
.button--done {
    min-height: 48px;
    justify-content: center;
    font-size: 16px;
}

.button--maps {
    background: #ffffff;
    border: 1px solid #cfd5dc;
    color: #172033;
}

.button--done {
    background: #172033;
    color: #ffffff;
}

.driver-stop--done .button--done {
    background: #e7ebef;
    color: #172033;
}

.driver-empty {
    padding: 30px;
    border-radius: 14px;
    background: #ffffff;
    text-align: center;
}

@media (max-width: 600px) {
    .driver-page {
        width: min(100% - 16px, 900px);
        padding-top: 8px;
    }

    .driver-header {
        align-items: stretch;
        flex-direction: column;
    }

    .driver-actions {
        grid-template-columns: 1fr;
    }

    .driver-stop {
        padding: 14px;
    }
}


/* Update 005a – Fahreransicht */
.driver-page--modern{width:min(1180px,calc(100% - 32px));margin:0 auto;padding:30px 0 50px}
.driver-tour-card,.driver-stop--modern,.driver-tour-footer{border:1px solid #dde3ea;border-radius:16px;background:#fff;box-shadow:0 4px 18px rgba(23,32,51,.07)}
.driver-tour-card{padding:26px;margin-bottom:30px}
.driver-tour-top{display:flex;align-items:flex-start;justify-content:space-between;gap:24px}
.driver-tour-title-row{display:flex;align-items:center;flex-wrap:wrap;gap:12px}
.driver-tour-title-row h1{margin:0;color:#172033;font-size:clamp(25px,3vw,34px)}
.driver-today-badge{padding:5px 10px;border-radius:7px;background:#e9f7ed;color:#16833a;font-size:12px;font-weight:700;text-transform:uppercase}
.driver-tour-meta{display:flex;gap:10px;margin-top:10px;color:#566174;font-size:16px}
.driver-logout-button{border:1px solid #d8e0e9;background:#f8fafc;color:#172033}
.driver-summary--modern{display:grid;grid-template-columns:repeat(4,1fr);margin:24px 0 0;border:1px solid #e2e7ed;border-radius:13px;background:#fafbfd;overflow:hidden}
.driver-summary--modern>.driver-stat{position:relative;display:grid;gap:3px;padding:20px 24px;background:transparent;color:#172033;text-align:left}
.driver-summary--modern>.driver-stat:not(:last-child)::after{content:"";position:absolute;top:20%;right:0;width:1px;height:60%;background:#dfe4ea}
.driver-stat strong{font-size:25px}.driver-stat span{color:#647084;font-size:14px}
.driver-list-head{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:0 4px 14px;color:#4c586b;text-transform:uppercase;font-size:13px;letter-spacing:.04em}
.driver-list-head>span{padding:7px 11px;border-radius:8px;background:#edf2f8;color:#344055;text-transform:none;letter-spacing:0}
.driver-stops--modern{display:grid;gap:14px}
.driver-stop--modern{padding:20px 24px;transition:opacity .2s ease,box-shadow .2s ease,border-color .2s ease}
.driver-stop--current{border-left:4px solid #20a84b;box-shadow:0 5px 22px rgba(23,32,51,.10)}
.driver-stop--muted{background:#fbfcfd;box-shadow:none;opacity:.58}.driver-stop--done{opacity:.48}
.driver-stop-main{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:24px}
.driver-stop-head{display:grid;grid-template-columns:46px minmax(0,1fr);align-items:start;gap:15px}
.driver-stop-number{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:#cbd3de;color:#fff;font-weight:700;font-size:18px}
.driver-stop--current .driver-stop-number{background:#168c38}
.driver-stop-info h2{margin:1px 0 5px;color:#172033;font-size:21px}
.driver-address,.driver-muted-note{margin:0;color:#657084}.driver-muted-note{margin-top:7px}
.driver-info-box{display:inline-block;margin-top:14px;padding:11px 14px;border:1px solid #cfe0f6;border-radius:9px;background:#f4f8fd;color:#243247}
.driver-deliveries{display:grid;gap:10px;margin-top:14px}.driver-delivery{padding:12px 14px;border-radius:9px;background:#f5f7f9}
.driver-delivery h3{display:flex;justify-content:space-between;gap:10px;margin:0 0 8px}
.driver-food-list{display:grid;gap:5px}.driver-food{display:grid;grid-template-columns:48px minmax(0,1fr);gap:5px}.driver-food small{grid-column:2}
.driver-note{margin-top:12px;padding:10px 13px;border-radius:9px;background:#fff7dd}
.driver-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin:0}
.driver-actions .button{min-height:48px;white-space:nowrap}
.driver-stop--current .button--maps{border-color:#172033;background:#172033;color:#fff}
.driver-stop--current .button--done{border-color:#20a84b;background:#20a84b;color:#fff}
.driver-stop--muted .button{border:1px solid #d5dce5;background:transparent;color:#536074}
.driver-tour-footer{display:flex;justify-content:space-between;gap:20px;margin-top:18px;padding:17px 24px;color:#4f5b6e;box-shadow:none}
.driver-tour-footer strong{color:#172033}
@media(max-width:800px){.driver-page--modern{width:min(100% - 18px,1180px);padding-top:12px}.driver-tour-card{padding:18px}.driver-tour-top{flex-direction:column}.driver-summary--modern{grid-template-columns:repeat(2,1fr)}.driver-summary--modern>.driver-stat:nth-child(2)::after{display:none}.driver-stop-main{grid-template-columns:1fr}.driver-actions{justify-content:stretch;padding-left:61px}.driver-actions .button{flex:1;justify-content:center}}
@media(max-width:520px){.driver-tour-meta{flex-wrap:wrap}.driver-summary--modern>.driver-stat{padding:15px}.driver-stop--modern{padding:15px}.driver-stop-head{grid-template-columns:40px minmax(0,1fr);gap:10px}.driver-stop-number{width:38px;height:38px}.driver-actions{display:grid;grid-template-columns:1fr;padding-left:50px}.driver-tour-footer{flex-direction:column;gap:7px}}

/* Update 005b – kompakte Tagesdisposition */

.order-toolbar-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: end;
    gap: 28px;
}

.order-date-form {
    display: flex;
    align-items: end;
    gap: 10px;
}

.order-date-form .form-field {
    min-width: 170px;
}

.order-day-summary {
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    gap: 8px;
    overflow-x: auto;
}

.order-day-summary > div {
    min-width: 92px;
    padding: 10px 12px;
    border: 1px solid #e3e8ee;
    border-radius: 10px;
    background: #f8fafc;
}

.order-day-summary strong,
.order-day-summary span {
    display: block;
}

.order-day-summary strong {
    color: #172033;
    font-size: 20px;
}

.order-day-summary span {
    margin-top: 2px;
    color: #667085;
    font-size: 12px;
    white-space: nowrap;
}

.order-entry-card {
    padding-top: 18px;
    padding-bottom: 18px;
}

.order-entry-card--edit {
    border-left: 4px solid #d39b22;
}

.order-entry-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 14px;
}

.order-entry-head h2 {
    margin: 2px 0 0;
    font-size: 19px;
}

.order-entry-head .eyebrow {
    margin: 0;
}

.order-compact-form {
    display: grid;
    gap: 12px;
}

.order-main-fields {
    display: grid;
    grid-template-columns: 1.4fr 1.4fr .9fr;
    gap: 10px;
}

.order-amount-row {
    display: grid;
    grid-template-columns: repeat(7, minmax(75px, 1fr));
    gap: 8px;
    transition: opacity .2s ease;
}

.order-amount-row--disabled {
    opacity: .35;
}

.order-amount-field {
    display: grid;
    gap: 4px;
}

.order-amount-field span {
    overflow: hidden;
    color: #4f5b6d;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-amount-field input {
    width: 100%;
    min-width: 0;
    padding: 9px 10px;
    text-align: center;
}

.order-bottom-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
}

.order-note-field {
    margin: 0;
}

.order-save-button {
    min-height: 42px;
}

.order-disposition {
    display: grid;
    gap: 12px;
    margin-top: 26px;
}

.order-section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    padding: 0 2px 4px;
}

.order-section-head h2 {
    margin: 2px 0 0;
}

.tour-order-card {
    overflow: hidden;
    border: 1px solid #dfe5eb;
    border-radius: 13px;
    background: #ffffff;
}

.tour-order-card > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 18px;
    cursor: pointer;
    list-style: none;
}

.tour-order-card > summary::-webkit-details-marker {
    display: none;
}

.tour-order-card > summary::after {
    content: "▾";
    margin-left: 8px;
    color: #788395;
    font-size: 15px;
}

.tour-order-card:not([open]) > summary::after {
    content: "›";
}

.tour-order-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tour-order-number,
.order-stop-number {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: #e8edf3;
    color: #354154;
    font-weight: 700;
}

.tour-order-number {
    width: 34px;
    height: 34px;
}

.tour-order-title strong,
.tour-order-title small {
    display: block;
}

.tour-order-title small {
    margin-top: 2px;
    color: #788395;
}

.tour-order-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.tour-order-summary > strong {
    white-space: nowrap;
}

.tour-order-stops {
    border-top: 1px solid #edf0f3;
}

.order-stop {
    padding: 13px 18px;
}

.order-stop + .order-stop {
    border-top: 1px solid #edf0f3;
}

.order-stop--changed {
    background: #fffdf7;
}

.order-stop-head {
    display: grid;
    grid-template-columns: 32px minmax(180px, 1fr) auto auto;
    align-items: center;
    gap: 10px;
}

.order-stop-number {
    width: 28px;
    height: 28px;
    font-size: 12px;
}

.order-stop-name strong,
.order-stop-name small {
    display: block;
}

.order-stop-name small {
    margin-top: 1px;
    color: #7b8493;
}

.order-stop-total {
    min-width: 72px;
    text-align: right;
    white-space: nowrap;
}

.order-delivery-list {
    display: grid;
    gap: 7px;
    margin: 9px 0 0 42px;
}

.order-delivery-row {
    display: grid;
    grid-template-columns: minmax(130px, .7fr) minmax(300px, 2fr) auto;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f7f9fb;
}

.order-delivery-name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.order-food-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.order-food-chip {
    padding: 4px 7px;
    border: 1px solid #dfe5eb;
    border-radius: 6px;
    background: #ffffff;
    color: #394557;
    font-size: 12px;
    white-space: nowrap;
}

.order-food-chip--zero {
    color: #8a4750;
}

.order-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.order-badge--changed {
    background: #fff0c9;
    color: #8a5b00;
}

.order-badge--cancelled {
    background: #fde8e8;
    color: #a13333;
}

.order-entry-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 5px;
}

.order-entry-action {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 7px;
    border-left: 1px solid #dfe5eb;
    font-size: 11px;
}

.order-entry-action > span {
    color: #7b8493;
}

.order-entry-action a,
.order-entry-action button {
    border: 0;
    background: transparent;
    color: #25354b;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.order-entry-action button {
    padding: 0;
    color: #a33a3a;
}

.order-no-delivery {
    margin: 8px 0 0 42px;
    color: #8791a0;
    font-size: 13px;
}

.tour-order-card--warning {
    border-color: #e5bd63;
}

@media (max-width: 1050px) {
    .order-toolbar-card {
        grid-template-columns: 1fr;
    }

    .order-day-summary {
        justify-content: flex-start;
    }

    .order-amount-row {
        grid-template-columns: repeat(4, 1fr);
    }

    .order-delivery-row {
        grid-template-columns: 1fr;
    }

    .order-entry-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 700px) {
    .order-main-fields,
    .order-bottom-row {
        grid-template-columns: 1fr;
    }

    .order-amount-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .order-section-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .tour-order-card > summary {
        align-items: flex-start;
    }

    .tour-order-summary {
        align-items: flex-end;
        flex-direction: column;
    }

    .order-stop-head {
        grid-template-columns: 30px minmax(0, 1fr) auto;
    }

    .order-stop-head > .order-badge {
        grid-column: 2;
        justify-self: start;
    }

    .order-stop-total {
        grid-column: 3;
        grid-row: 1;
    }

    .order-delivery-list,
    .order-no-delivery {
        margin-left: 40px;
    }
}


/* Update 005c – Tagesnavigation */
.order-date-navigation{display:grid;grid-template-columns:38px minmax(145px,1fr) 38px;align-items:stretch;gap:5px}
.order-date-navigation input{width:100%;min-width:0}
.order-date-arrow{display:grid;place-items:center;min-height:40px;border:1px solid #cfd7e2;border-radius:7px;background:#f8fafc;color:#172033;font-size:25px;font-weight:600;line-height:1;text-decoration:none;transition:background .15s ease,border-color .15s ease}
.order-date-arrow:hover{border-color:#aeb9c7;background:#eef2f6}
.order-date-form .form-field{min-width:240px}

/* Update 006a – Kundenliste, Suche und Archiv */
.customer-list-tools{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:24px;margin-bottom:18px}
.customer-search-form,.customer-search-field{margin:0}.customer-search-input-row{display:flex;gap:8px}.customer-search-input-row input{min-width:320px}
.customer-status-tabs{display:flex;align-items:center;gap:5px;padding:4px;border-radius:9px;background:#f1f4f7}
.customer-status-tabs a{display:flex;align-items:center;gap:6px;padding:8px 11px;border-radius:7px;color:#5b6677;font-size:13px;font-weight:700;text-decoration:none;white-space:nowrap}
.customer-status-tabs a span{display:grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:#e1e6ec;font-size:11px}
.customer-status-tabs a.is-active{background:#fff;color:#172033;box-shadow:0 1px 4px rgba(23,32,51,.1)}
.customer-table-card{padding:0;overflow-x:auto}.customer-table{min-width:920px}.customer-table td{vertical-align:middle}
.customer-subline{display:block;margin-top:3px;color:#7b8493;font-size:12px}.customer-row--archived{background:#fafbfc;color:#737d8c}.customer-row--archived>td{opacity:.78}
.customer-status{display:inline-flex;padding:4px 8px;border-radius:999px;font-size:11px;font-weight:700}.customer-status--active{background:#e8f6ec;color:#26763c}.customer-status--archived{background:#eceff3;color:#687384}
.customer-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;white-space:nowrap}.customer-actions form{margin:0}
.button--danger{border-color:#d9a3a3;background:#fff;color:#a33636}.button--danger:hover{border-color:#bd7373;background:#fff5f5}
.customer-empty-state{padding:34px;text-align:center}.customer-empty-state p{margin:6px 0 0}
@media(max-width:900px){.customer-list-tools{grid-template-columns:1fr}.customer-status-tabs{justify-self:start}.customer-search-input-row{flex-wrap:wrap}.customer-search-input-row input{min-width:min(100%,320px);flex:1 1 300px}}

/* Update 006b – Kundenstatus nur im Kundenformular */

.customer-status-card {
    margin-top: 24px;
}

.customer-status-actions {
    display: grid;
    gap: 18px;
    margin-top: 18px;
}

.customer-danger-zone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-top: 18px;
    border-top: 1px solid #eadede;
}

.customer-danger-zone strong {
    color: #8f2f2f;
}

.customer-danger-zone p {
    margin: 4px 0 0;
}

.customer-delete-button {
    border: 1px solid #d8aaaa;
    background: #fff7f7;
    color: #9b3030;
}

.customer-delete-button:hover {
    background: #fceaea;
}

@media (max-width: 700px) {
    .customer-danger-zone {
        align-items: stretch;
        flex-direction: column;
    }
}

/* Update 007 – strukturierte Kundendaten */

.customer-person-grid {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
}

.customer-name-help {
    margin-top: -6px;
    font-size: 13px;
}

.customer-group-filter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e7ebef;
}

.customer-group-filter a {
    padding: 6px 10px;
    border: 1px solid #dce2e8;
    border-radius: 999px;
    background: #ffffff;
    color: #4d596a;
    font-size: 13px;
    text-decoration: none;
}

.customer-group-filter a.is-active {
    border-color: #172033;
    background: #172033;
    color: #ffffff;
}

.customer-group-badge {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef2f6;
    color: #455164;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .customer-person-grid {
        grid-template-columns: 1fr;
    }
}

/* Update 008 – Menüfreigaben in der Kundenverwaltung */
.customer-menu-card{margin-top:24px}
.customer-menu-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:16px}
.customer-menu-option{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;border:1px solid #dfe5eb;border-radius:10px;background:#f8fafc;cursor:pointer}
.customer-menu-option:hover{border-color:#bcc6d2;background:#f3f6f9}
.customer-menu-option input{width:18px;height:18px;margin-top:2px}
.customer-menu-option strong,.customer-menu-option small{display:block}
.customer-menu-option small{margin-top:2px;color:#788395}
.customer-menu-actions{display:flex;justify-content:flex-end;margin-top:16px}
@media(max-width:900px){.customer-menu-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.customer-menu-grid{grid-template-columns:1fr}}

/* Update 008a – Menüverwaltung & Adminstruktur */

.admin-dashboard-section + .admin-dashboard-section {
    margin-top: 34px;
}

.admin-section-title {
    margin-bottom: 14px;
}

.admin-section-title h2 {
    margin: 2px 0 0;
}

.admin-dashboard-section--settings {
    padding-top: 24px;
    border-top: 1px solid #dfe5eb;
}

.admin-grid--settings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-card {
    background: #f8fafc;
}

.menu-admin-form-card {
    margin-bottom: 20px;
}

.menu-admin-form {
    display: grid;
    grid-template-columns: .8fr 1.6fr 110px auto auto;
    align-items: end;
    gap: 10px;
}

.menu-active-field {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    white-space: nowrap;
}

.menu-admin-list {
    display: grid;
    gap: 10px;
}

.menu-admin-item {
    padding: 0;
    overflow: hidden;
}

.menu-admin-item > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 18px;
    cursor: pointer;
    list-style: none;
}

.menu-admin-item > summary::-webkit-details-marker {
    display: none;
}

.menu-admin-item > summary::after {
    content: "›";
    color: #788395;
    font-size: 20px;
}

.menu-admin-item[open] > summary::after {
    content: "⌄";
}

.menu-admin-main {
    display: flex;
    align-items: center;
    gap: 11px;
}

.menu-admin-main strong,
.menu-admin-main small {
    display: block;
}

.menu-admin-main small {
    margin-top: 2px;
    color: #788395;
}

.menu-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.menu-status-dot--active {
    background: #48a46d;
}

.menu-status-dot--inactive {
    background: #a7afb9;
}

.menu-admin-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.menu-admin-meta span {
    color: #788395;
    font-size: 13px;
}

.menu-admin-details {
    padding: 16px 18px 20px;
    border-top: 1px solid #edf0f3;
    background: #fbfcfd;
}

.menu-admin-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.menu-customer-overview h3 {
    margin: 0 0 14px;
}

.menu-customer-overview h4 {
    margin: 17px 0 8px;
    color: #667085;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.menu-customer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.menu-customer {
    display: block;
    padding: 9px 11px;
    border: 1px solid #e0e5eb;
    border-radius: 8px;
    background: #fff;
    color: #263346;
    text-decoration: none;
}

.menu-customer:hover {
    border-color: #bac5d1;
}

.menu-customer strong,
.menu-customer small {
    display: block;
}

.menu-customer small {
    margin-top: 2px;
    color: #7b8493;
}

@media (max-width: 1000px) {
    .menu-admin-form {
        grid-template-columns: repeat(2, 1fr);
    }

    .menu-customer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .admin-grid--settings,
    .menu-admin-form,
    .menu-customer-grid {
        grid-template-columns: 1fr;
    }

    .menu-admin-item > summary {
        align-items: flex-start;
    }

    .menu-admin-meta {
        align-items: flex-end;
        flex-direction: column;
        gap: 2px;
    }
}

