#mainContainer {
    min-height: calc(100vh - 5rem);
    height: auto;
    max-width: 1400px;
}

@media (max-width: 767.98px) {
    #mainContainer {
        min-height: auto;
    }
}

.app-navbar {
    z-index: 1030;
    border-bottom: 1px solid #dee2e6;
}

:root {
    --app-page-max-width: 1400px;
    --app-page-inline-padding: clamp(0.6rem, 1.2vw, 1rem);
    --admin-bg: #f7fafc;
    --admin-card-bg: #ffffff;
    --admin-border: #dbe4ea;
    --admin-muted: #5f6c7a;
    --admin-accent: #0d6efd;
}

.app-page-shell {
    max-width: var(--app-page-max-width);
    margin: 1rem auto 2rem;
    padding-left: var(--app-page-inline-padding);
    padding-right: var(--app-page-inline-padding);
}

@media (max-width: 767.98px) {
    .app-page-shell {
        margin-top: 0.75rem;
        margin-bottom: 1rem;
    }
}

.admin-page {
    background: linear-gradient(180deg, #f8fbff 0%, #f4f8fb 100%);
    border: 1px solid #e6eef5;
    border-radius: 14px;
    padding: 1.1rem;
}

.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.admin-title {
    font-weight: 700;
    letter-spacing: 0.01em;
    margin: 0;
}

.admin-info {
    border: 1px solid #d6e6f8;
    background: #edf5ff;
    color: #2b435b;
    border-radius: 10px;
    padding: 0.8rem 0.95rem;
    margin-bottom: 0.9rem;
}

.admin-card {
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--admin-card-bg);
}

.admin-card .card-header {
    background: #eef4f9;
    border-bottom: 1px solid var(--admin-border);
    font-weight: 600;
}

.admin-form {
    border: 1px solid var(--admin-border);
    background: var(--admin-card-bg);
    border-radius: 12px;
    padding: 1rem;
}

.admin-form .form-label {
    font-weight: 600;
    color: #2b3947;
    margin-bottom: 0.35rem;
}

.admin-form .form-control,
.admin-form .form-select {
    border-color: #ced9e4;
}

.admin-form .form-control:focus,
.admin-form .form-select:focus {
    border-color: #8bb4f7;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.admin-table thead th {
    background: #f2f7fb;
    border-bottom: 1px solid var(--admin-border);
    color: #324252;
}

.admin-table tbody td {
    vertical-align: middle;
}

.admin-actions .btn {
    min-width: 2.1rem;
}

.admin-muted {
    color: var(--admin-muted);
}

.card-header.is-collapsible {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.card-collapse-indicator {
    font-size: 0.85rem;
    color: #6c757d;
    transition: transform 0.2s ease;
    user-select: none;
}

.card-header.is-collapsible[aria-expanded="false"] .card-collapse-indicator {
    transform: rotate(-90deg);
}

button[aria-expanded="false"] .card-collapse-indicator {
    transform: rotate(-90deg);
}

.sortable-ghost {
    opacity: 0.4;
}

tr.is-dragging {
    opacity: 0.55;
}

.app-splash-container .app-splash {
    margin-bottom: 0.5rem;
}

.dashboard-card-slot {
    position: relative;
}

.dashboard-card-slot.is-dragging {
    opacity: 0.55;
}

.dashboard-drag-handle {
    margin-left: auto;
    cursor: grab;
    font-size: 0.9rem;
    color: #6c757d;
    user-select: none;
}

.layout-drag-handle {
    margin-left: 0;
    margin-right: 0.5rem;
    cursor: grab;
    font-size: 0.9rem;
    color: #6c757d;
    user-select: none;
}

.krem-card-slot.is-dragging {
    opacity: 0.55;
}

.krem-layout-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.krem-layout-grid>.krem-card-slot {
    min-width: 0;
}

.krem-layout-stack>.krem-card-slot {
    margin-bottom: 0.9rem;
}

.krem-layout-stack>.krem-card-slot:last-child {
    margin-bottom: 0;
}

.btn-rechnungsadresse-toggle {
    font-size: 0.75rem;
    line-height: 1.1;
    padding: 0.18rem 0.5rem;
}

input.form-control[data-auto-expand-ready="1"],
textarea.form-control[data-auto-expand-ready="1"] {
    transition: width 0.18s ease, min-height 0.18s ease, box-shadow 0.18s ease;
}

input.form-control.is-auto-expanded,
textarea.form-control.is-auto-expanded {
    position: relative;
    z-index: 20;
}

textarea.form-control.is-auto-expanded {
    overflow-y: hidden;
    resize: vertical;
}

.krem-layout-grid>.krem-card-slot.krem-span-1 {
    grid-column: span 1;
}

.krem-layout-grid>.krem-card-slot.krem-span-2 {
    grid-column: span 2;
}

.krem-layout-grid>.krem-card-slot.krem-span-3 {
    grid-column: span 3;
}

@media (max-width: 991.98px) {
    .krem-layout-grid {
        grid-template-columns: 1fr;
    }

    .krem-layout-grid>.krem-card-slot.krem-span-1,
    .krem-layout-grid>.krem-card-slot.krem-span-2,
    .krem-layout-grid>.krem-card-slot.krem-span-3 {
        grid-column: span 1;
    }
}

.customer-config-prototype {
    border: 1px solid #dce9f8;
    overflow: hidden;
}

.customer-config-prototype>.card-header {
    background: linear-gradient(90deg, #f4f9ff 0%, #eef5ff 100%);
    border-bottom: 1px solid #d8e6f7;
    font-weight: 700;
}

.customer-config-intro {
    background: linear-gradient(135deg, #f9fbff 0%, #f2f7ff 100%);
    border: 1px solid #dde9f7;
    border-radius: 12px;
    padding: 0.9rem 1rem;
}

.customer-config-panel {
    border: 1px solid #e0e8f1;
    border-radius: 14px;
    background: #ffffff;
}

.customer-product-hero {
    position: relative;
    border: 1px solid #dce8f6;
    border-radius: 12px;
    min-height: 240px;
    background: radial-gradient(circle at 25% 20%, #f3f8ff 0%, #edf4ff 45%, #eef3fa 100%);
    overflow: hidden;
}

.customer-product-image {
    width: 100%;
    height: clamp(240px, 34vh, 360px);
    object-fit: contain;
    display: block;
    padding: 0.75rem;
}

.customer-product-overlay {
    position: absolute;
    left: 0.7rem;
    top: 0.7rem;
}

.customer-product-placeholder {
    height: clamp(240px, 34vh, 360px);
    display: grid;
    place-content: center;
    text-align: center;
    padding: 1rem;
}

.customer-product-placeholder-title {
    font-weight: 700;
    color: #2e4963;
    margin-bottom: 0.35rem;
}

.customer-qty-group .form-control {
    font-weight: 600;
}

.customer-option-group {
    border: 1px solid #e6edf5;
    border-radius: 12px;
    padding: 0.9rem;
    margin: 0;
}

.customer-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.65rem;
}

.customer-choice-card {
    display: block;
    border: 1px solid #d9e4ef;
    border-radius: 11px;
    background: #fcfdff;
    padding: 0.65rem 0.75rem;
    cursor: pointer;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.customer-choice-card:hover {
    border-color: #9fc1ec;
    box-shadow: 0 6px 16px rgba(56, 97, 146, 0.08);
    transform: translateY(-1px);
}

.customer-choice-card:has(.customer-choice-input:checked) {
    border-color: #0d6efd;
    background: #f1f7ff;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.12);
}

.customer-choice-input {
    margin-bottom: 0.45rem;
}

.customer-choice-content {
    display: grid;
    gap: 0.2rem;
}

.customer-choice-name {
    font-weight: 600;
    color: #22364a;
}

.customer-choice-meta {
    font-size: 0.79rem;
    color: #6c7b88;
}

.customer-choice-price {
    font-size: 0.82rem;
    font-weight: 700;
}

.customer-choice-price.is-positive {
    color: #157347;
}

.customer-choice-price.is-negative {
    color: #b02a37;
}

.customer-summary-panel {
    border: 1px solid #d8e6f7;
    border-radius: 14px;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 34%);
    position: sticky;
    top: 5.3rem;
}

.customer-summary-panel h6 {
    font-weight: 700;
    color: #1b3551;
}

.customer-total-box {
    border: 1px dashed #a9c5ea;
    border-radius: 10px;
    background: #f2f8ff;
    padding: 0.7rem 0.8rem;
}

.customer-total-amount {
    font-size: 1.3rem;
    line-height: 1.25;
    font-weight: 800;
    color: #163a63;
}

.customer-buy-box {
    border: 1px solid #d7e8da;
    border-radius: 10px;
    background: #f7fcf8;
    padding: 0.75rem;
}

.customer-delivery-note {
    color: #365245;
}

.customer-selected-list .list-group-item {
    background: transparent;
    border-color: #e4edf7;
}

@media (max-width: 1199.98px) {
    .customer-summary-panel {
        position: static;
        top: auto;
    }
}
