/* Lagertool – Business-Theme (Blau/Grau) auf Basis von Bootstrap 5 */

:root {
    --lt-navy: #0f2744;
    --lt-navy-2: #16345a;
    --lt-primary: #1f5fae;
    --lt-primary-dark: #184d8f;
    --lt-primary-soft: #e8f0fb;
    --lt-bg: #f3f5f8;
    --lt-surface: #ffffff;
    --lt-border: #e2e7ee;
    --lt-text: #1d2733;
    --lt-muted: #6b7686;
    --lt-sidebar-w: 248px;
    --lt-radius: .625rem;

    --bs-body-bg: var(--lt-bg);
    --bs-body-color: var(--lt-text);
    --bs-body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --bs-body-font-size: .9375rem;
    --bs-primary: var(--lt-primary);
    --bs-primary-rgb: 31, 95, 174;
    --bs-link-color: var(--lt-primary);
    --bs-link-color-rgb: 31, 95, 174;
    --bs-link-hover-color: var(--lt-primary-dark);
    --bs-border-color: var(--lt-border);
    --bs-secondary-color: var(--lt-muted);
    --bs-border-radius: .5rem;
    --bs-focus-ring-color: rgba(31, 95, 174, .25);
}

[x-cloak] { display: none !important; }

body { -webkit-font-smoothing: antialiased; }

.btn-primary {
    --bs-btn-bg: var(--lt-primary);
    --bs-btn-border-color: var(--lt-primary);
    --bs-btn-hover-bg: var(--lt-primary-dark);
    --bs-btn-hover-border-color: var(--lt-primary-dark);
    --bs-btn-active-bg: var(--lt-primary-dark);
    --bs-btn-active-border-color: var(--lt-primary-dark);
    --bs-btn-disabled-bg: var(--lt-primary);
    --bs-btn-disabled-border-color: var(--lt-primary);
}
.btn-outline-primary {
    --bs-btn-color: var(--lt-primary);
    --bs-btn-border-color: var(--lt-primary);
    --bs-btn-hover-bg: var(--lt-primary);
    --bs-btn-hover-border-color: var(--lt-primary);
    --bs-btn-active-bg: var(--lt-primary);
    --bs-btn-active-border-color: var(--lt-primary);
}
.btn-light { --bs-btn-bg: #eef1f5; --bs-btn-border-color: #eef1f5; --bs-btn-hover-bg: #e3e7ee; }
.btn .bi { margin-right: .15rem; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: #8fb0d9; box-shadow: 0 0 0 .2rem var(--bs-focus-ring-color); }
.form-check-input:checked { background-color: var(--lt-primary); border-color: var(--lt-primary); }
.form-label { font-weight: 500; font-size: .875rem; margin-bottom: .35rem; }
.req { color: #c0392b; }

/* ------------------------------------------------------------------ Shell */

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--lt-sidebar-w);
    background: var(--lt-navy); color: #c9d4e3;
    flex-direction: column; z-index: 1030;
}
.sidebar-brand {
    display: flex; align-items: center; gap: .6rem;
    padding: 1.25rem 1.25rem 1rem; color: #fff; font-weight: 650; font-size: 1.1rem;
    text-decoration: none; letter-spacing: .01em;
}
.sidebar-brand:hover { color: #fff; }
.brand-mark {
    display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: .5rem;
    background: linear-gradient(135deg, #3b82d6, var(--lt-primary)); color: #fff; font-size: 1rem;
}
.sidebar-nav { flex: 1; overflow-y: auto; padding: .25rem .75rem; }
.nav-section {
    font-size: .6875rem; text-transform: uppercase; letter-spacing: .08em;
    color: #7f93ad; padding: 1rem .75rem .4rem; font-weight: 600;
}
.sidebar .nav-link, .sidebar-offcanvas .nav-link {
    display: flex; align-items: center; gap: .75rem;
    padding: .55rem .75rem; border-radius: .45rem; color: #c9d4e3;
    font-size: .9rem; border: 0; background: none; text-decoration: none;
}
.sidebar .nav-link .bi, .sidebar-offcanvas .nav-link .bi { font-size: 1.05rem; opacity: .85; }
.sidebar .nav-link:hover, .sidebar-offcanvas .nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidebar .nav-link.active, .sidebar-offcanvas .nav-link.active {
    background: var(--lt-primary); color: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}
.sidebar-footer { padding: .75rem; border-top: 1px solid rgba(255, 255, 255, .08); }

.sidebar-offcanvas { background: var(--lt-navy); color: #c9d4e3; --bs-offcanvas-width: 280px; }
.sidebar-offcanvas .offcanvas-header { color: #fff; font-weight: 650; }
.sidebar-offcanvas .sidebar-brand { display: flex; }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
@media (min-width: 992px) { .app-main { margin-left: var(--lt-sidebar-w); } }

.topbar {
    position: sticky; top: 0; z-index: 1020;
    display: flex; align-items: center; justify-content: space-between;
    padding: .6rem 1rem; padding-top: calc(.6rem + env(safe-area-inset-top));
    background: var(--lt-navy); color: #fff;
}
.topbar-brand { display: flex; align-items: center; gap: .55rem; color: #fff; font-weight: 650; text-decoration: none; }
.topbar-brand .brand-mark { width: 1.75rem; height: 1.75rem; font-size: .9rem; }
.btn-icon { color: #fff; font-size: 1.5rem; line-height: 1; padding: .25rem .4rem; }
.btn-icon:hover { color: #fff; }

.content { padding: 1.75rem 2rem 3rem; max-width: 1400px; width: 100%; }
@media (max-width: 991.98px) {
    .content { padding: 1rem 1rem calc(5.5rem + env(safe-area-inset-bottom)); }
}

.bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
    display: grid; grid-template-columns: repeat(5, 1fr);
    background: var(--lt-surface); border-top: 1px solid var(--lt-border);
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 10px rgba(15, 39, 68, .06);
}
.bottom-nav a {
    display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: .1rem;
    padding: .5rem 0 .45rem; font-size: .6875rem; color: var(--lt-muted); text-decoration: none;
}
.bottom-nav a .bi { font-size: 1.3rem; }
.bottom-nav a.active { color: var(--lt-primary); font-weight: 600; }

/* ------------------------------------------------------------------ Seitenkopf */

.page-header {
    display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
    gap: 1rem; margin-bottom: 1.5rem;
}
.page-title { font-size: 1.5rem; font-weight: 650; margin: 0; letter-spacing: -.01em; }
.page-subtitle { color: var(--lt-muted); margin: .25rem 0 0; }
.page-back { display: inline-block; font-size: .8125rem; color: var(--lt-muted); text-decoration: none; margin-bottom: .35rem; }
.page-back:hover { color: var(--lt-primary); }
.page-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 575.98px) {
    .page-title { font-size: 1.3rem; }
    .page-actions { width: 100%; }
    .page-actions .btn { flex: 1; }
}

/* ------------------------------------------------------------------ Karten */

.card {
    --bs-card-border-color: var(--lt-border);
    --bs-card-border-radius: var(--lt-radius);
    --bs-card-cap-bg: transparent;
    box-shadow: 0 1px 2px rgba(15, 39, 68, .04);
}
.card-header {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    padding: .9rem 1.25rem;
}
.card-title { font-size: 1rem; font-weight: 600; margin: 0; display: flex; align-items: center; gap: .5rem; }
.card-body { padding: 1.25rem; }
.card-footer { background: #fafbfc; padding: .75rem 1.25rem; }

.card-attention { border-color: #f1c6c0; }
.card-attention .card-header { background: #fdf3f2; border-bottom-color: #f5d7d3; }
.card-attention .card-title { color: #9b2c22; }
.card-ok { border-color: #cfe8d8; background: #f5fbf7; }

.step {
    display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%;
    background: var(--lt-primary-soft); color: var(--lt-primary); font-size: .8rem; font-weight: 700;
}

/* ------------------------------------------------------------------ Warnliste */

.alert-list { list-style: none; margin: 0; padding: 0; }
.alert-list li {
    display: flex; align-items: center; gap: 1rem; padding: .85rem 1.25rem;
    border-top: 1px solid var(--lt-border);
}
.alert-list li:first-child { border-top: 0; }
.alert-body { flex: 1; min-width: 0; }
.alert-title { font-weight: 600; }
.alert-meta { font-size: .8125rem; color: var(--lt-muted); }
.alert-icon {
    flex-shrink: 0; display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem;
    border-radius: .5rem; font-size: 1.1rem;
}
.alert-icon.warning { background: #fff4e0; color: #b86e00; }
.alert-icon.danger { background: #fde8e6; color: #c0392b; }
.alert-icon.success { background: #e3f4ea; color: #1e874b; }

/* ------------------------------------------------------------------ KPIs & Schnellzugriff */

.kpi {
    background: var(--lt-surface); border: 1px solid var(--lt-border); border-radius: var(--lt-radius);
    padding: 1rem 1.25rem; height: 100%; box-shadow: 0 1px 2px rgba(15, 39, 68, .04);
}
.kpi-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--lt-muted); font-weight: 600; }
.kpi-value { font-size: 1.75rem; font-weight: 650; line-height: 1.2; margin-top: .25rem; font-variant-numeric: tabular-nums; }
.kpi-meta { font-size: .8125rem; color: var(--lt-muted); }
.kpi-danger .kpi-value { color: #c0392b; }

.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
@media (max-width: 767.98px) { .quick-actions { grid-template-columns: repeat(2, 1fr); } }
.quick-action {
    display: flex; align-items: center; gap: .75rem; padding: .9rem 1rem;
    background: var(--lt-surface); border: 1px solid var(--lt-border); border-radius: var(--lt-radius);
    color: var(--lt-text); text-decoration: none; font-weight: 550;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.quick-action .bi {
    display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: .5rem;
    background: var(--lt-primary-soft); color: var(--lt-primary); font-size: 1.1rem; flex-shrink: 0;
}
.quick-action:hover { border-color: #b9cce6; box-shadow: 0 4px 12px rgba(15, 39, 68, .08); color: var(--lt-text); transform: translateY(-1px); }

/* ------------------------------------------------------------------ Tabellen */

.table-app { --bs-table-bg: transparent; margin: 0; }
.table-app > thead th {
    font-size: .6875rem; text-transform: uppercase; letter-spacing: .06em; color: var(--lt-muted);
    font-weight: 600; background: #f8f9fb; border-bottom: 1px solid var(--lt-border);
    padding: .65rem 1rem; white-space: nowrap;
}
.table-app > tbody > tr > td, .table-app > tbody > tr > th { padding: .75rem 1rem; vertical-align: middle; border-color: var(--lt-border); }
.table-app > tbody:last-child > tr:last-child > td { border-bottom: 0; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-link { cursor: pointer; }
.is-inactive td { opacity: .55; }

.table-stock .row-toggle { cursor: pointer; }
.table-stock .row-toggle.no-slots { cursor: default; }
.table-stock .row-toggle:hover { background: #f8fafc; }
.toggle-icon { transition: transform .2s; display: inline-block; }
.row-toggle[aria-expanded="true"] .toggle-icon { transform: rotate(90deg); }
.table-stock .slot-row > td { border-bottom: 0; }
.table-stock tbody:has(.collapse.show) .row-toggle > td { border-bottom-color: transparent; }
.slot-panel { background: #f8fafc; padding: .25rem 1rem .75rem 3rem; border-bottom: 1px solid var(--lt-border); }
.slot-panel .table { --bs-table-bg: transparent; font-size: .875rem; }
.slot-panel th { font-size: .6875rem; text-transform: uppercase; letter-spacing: .05em; color: var(--lt-muted); font-weight: 600; }
@media (max-width: 575.98px) { .slot-panel { padding-left: 1rem; } }

.table-count .row-changed { background: #fffbeb; }

/* ------------------------------------------------------------------ Badges */

.badge { font-weight: 600; font-size: .72rem; padding: .35em .6em; border-radius: .4rem; }
.badge .bi { font-size: .7rem; }
.badge-soft-success { background: #e3f4ea; color: #1e6b41; }
.badge-soft-warning { background: #fff1d6; color: #8a5300; }
.badge-soft-danger { background: #fde8e6; color: #a8322a; }
.badge-soft-primary { background: var(--lt-primary-soft); color: var(--lt-primary-dark); }
.badge-soft-info { background: #e2f3f8; color: #1b6b82; }
.badge-soft-secondary { background: #edf0f4; color: #4d5968; }

/* ------------------------------------------------------------------ Segmented Tabs & Suche */

.nav-segmented { display: inline-flex; flex-wrap: wrap; max-width: 100%; list-style: none; margin: 0; padding: .2rem; background: #eef1f5; border-radius: .5rem; }
.nav-segmented a {
    display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .85rem; border-radius: .4rem;
    color: var(--lt-muted); text-decoration: none; font-weight: 550; font-size: .875rem;
}
.nav-segmented a.active { background: #fff; color: var(--lt-text); box-shadow: 0 1px 2px rgba(15, 39, 68, .12); }
.nav-segmented .count { font-size: .72rem; background: rgba(15, 39, 68, .08); border-radius: 1rem; padding: 0 .45rem; }

.search-input { position: relative; }
.search-input .bi { position: absolute; left: .65rem; top: 50%; transform: translateY(-50%); color: var(--lt-muted); font-size: .8rem; }
.search-input input { padding-left: 1.9rem; min-width: 12rem; }

/* ------------------------------------------------------------------ Buchungsliste */

.tx-list { list-style: none; margin: 0; padding: 0; }
.tx-item { padding: .85rem 1.25rem; border-top: 1px solid var(--lt-border); }
.tx-item:first-child { border-top: 0; }
.tx-item.is-reversed { opacity: .6; }
.tx-head { display: flex; align-items: center; gap: .4rem; margin-bottom: .35rem; }
.tx-time { margin-left: auto; font-size: .78rem; color: var(--lt-muted); white-space: nowrap; }
.tx-line { display: flex; gap: .5rem; font-size: .85rem; align-items: baseline; }
.tx-line .qty { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 5.5rem; white-space: nowrap; }
.tx-line .qty.pos { color: #1e874b; }
.tx-line .qty.neg { color: #c0392b; }
.tx-line .name { flex: 1; min-width: 0; }
.tx-line .meta { color: var(--lt-muted); font-size: .78rem; white-space: nowrap; }
.tx-more, .tx-note { font-size: .78rem; color: var(--lt-muted); margin-top: .25rem; }
@media (max-width: 575.98px) {
    .tx-line { flex-wrap: wrap; row-gap: 0; margin-bottom: .2rem; }
    .tx-line .qty { min-width: 4.75rem; }
    .tx-line .meta { flex-basis: 100%; padding-left: 5.25rem; white-space: normal; }
}

/* ------------------------------------------------------------------ Formulare */

.form-layout { display: flex; flex-direction: column; gap: 1.25rem; max-width: 960px; }
.form-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; align-items: center; }
@media (max-width: 991.98px) {
    .sticky-actions {
        position: sticky; bottom: calc(4.25rem + env(safe-area-inset-bottom)); z-index: 5;
        background: rgba(243, 245, 248, .92); backdrop-filter: blur(6px);
        padding: .75rem 0; margin: 0 -1rem; padding-inline: 1rem;
    }
    .sticky-actions .btn-primary { flex: 1; }
}

.empty-state { text-align: center; padding: 2.5rem 1.25rem; color: var(--lt-muted); }
.empty-state > .bi { font-size: 2rem; display: block; margin-bottom: .5rem; color: #a9b4c3; }
.empty-state p { margin-bottom: 1rem; }

/* ------------------------------------------------------------------ Login */

.auth-body { background: linear-gradient(160deg, var(--lt-navy) 0%, var(--lt-navy-2) 55%, #1f4c80 100%); min-height: 100vh; }
.auth-wrap { max-width: 400px; margin: 0 auto; padding: 12vh 1rem 2rem; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: .6rem; color: #fff; font-weight: 650; font-size: 1.35rem; margin-bottom: 1.5rem; }
.auth-brand .brand-mark { width: 2.4rem; height: 2.4rem; font-size: 1.2rem; }
.auth-card { border: 0; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.auth-card .card-body { padding: 2rem; }

/* ------------------------------------------------------------------ Produktion / Verkauf */

.form-wide { max-width: 1100px; }
.card-info { border-color: #bfd9ee; }
.card-info .card-header { background: #f0f7fd; border-bottom-color: #d5e7f5; }

.steps { display: flex; align-items: center; gap: .6rem; font-size: .875rem; color: var(--lt-muted); flex-wrap: wrap; }
.steps > span, .steps > a { display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; color: inherit; }
.steps .active { color: var(--lt-text); font-weight: 600; }
.steps > span:not(.active) .step, .steps > a .step { background: #e7ebf0; color: var(--lt-muted); }
.steps > .bi { font-size: .75rem; }

.cart-rows { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.cart-row { display: grid; grid-template-columns: 1fr 11rem auto; gap: .75rem; align-items: start; width: 100%; }
.cart-remove { padding-top: 1.75rem; }
@media (max-width: 575.98px) {
    .cart-row { grid-template-columns: 1fr auto; padding-bottom: 1rem; border-bottom: 1px solid var(--lt-border); }
    .cart-product { grid-column: 1 / -1; }
    .cart-remove { padding-top: 1.75rem; }
}

.recipe-row { display: grid; grid-template-columns: 1fr 10rem 5.5rem auto; gap: .5rem; align-items: center; margin-bottom: .6rem; }
.recipe-cost { text-align: right; font-size: .8125rem; color: var(--lt-muted); }
@media (max-width: 575.98px) {
    .recipe-row { grid-template-columns: 1fr auto; }
    .recipe-row select { grid-column: 1 / -1; }
    .recipe-cost { display: none; }
}

.pick-body { display: flex; flex-direction: column; gap: 1rem; }
.pick-group { border: 1px solid var(--lt-border); border-radius: .5rem; overflow: hidden; }
.pick-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .7rem 1rem; background: #f8f9fb; border-bottom: 1px solid var(--lt-border); }
.pick-name { font-weight: 600; }
.pick-meta { font-size: .8125rem; color: var(--lt-muted); }
.pick-table { --bs-table-bg: transparent; font-size: .875rem; }
.pick-table th { font-size: .6875rem; text-transform: uppercase; letter-spacing: .05em; color: var(--lt-muted); font-weight: 600; padding: .5rem 1rem; }
.pick-table td { padding: .45rem 1rem; vertical-align: middle; }
.pick-table tr.is-picked td { background: #f3f8fe; }
.pick-table tr:last-child td { border-bottom: 0; }
.pick-missing, .pick-warning { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .6rem 1rem; font-size: .8125rem; }
.pick-missing { background: #fdf3f2; color: #9b2c22; border-bottom: 1px solid #f5d7d3; }
.pick-warning { background: #fff8e6; color: #8a5300; border-top: 1px solid #f7e2b0; }
.pick-empty { padding: .75rem 1rem; color: var(--lt-muted); font-size: .875rem; }
.pick-input-col { width: 9.5rem; }
@media (max-width: 575.98px) {
    .pick-table th, .pick-table td { padding-left: .6rem; padding-right: .6rem; }
    .pick-input-col { width: 7.5rem; }
    .pick-head { flex-wrap: wrap; }
}

/* ------------------------------------------------------------------ Historie */

.tx-item { position: relative; }
.tx-link { position: absolute; inset: 0; z-index: 1; }
.tx-item:has(.tx-link):hover { background: #f8fafc; }
.detail-list { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1rem; margin: 0; padding: 1rem 1.25rem; font-size: .875rem; }
.detail-list dt { color: var(--lt-muted); font-weight: 500; }
.detail-list dd { margin: 0; word-break: break-word; }

/* ------------------------------------------------------------------ Auswertung */

.margin-bar { display: flex; align-items: center; gap: .5rem; font-size: .8125rem; }
.margin-track { flex: 1; height: .45rem; background: #edf0f4; border-radius: 1rem; overflow: hidden; }
.margin-fill { height: 100%; background: var(--lt-primary); border-radius: 1rem; }
.margin-fill.neg { background: #c0392b; }
.margin-bar .num { min-width: 2.75rem; text-align: right; color: var(--lt-muted); }
.table-app tfoot .table-total td { font-weight: 650; background: #f8f9fb; border-top: 1px solid var(--lt-border); padding: .75rem 1rem; }

/* ------------------------------------------------------------------ Scannen */

.bottom-nav a.nav-scan .bi {
    display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; margin-top: -1.1rem;
    border-radius: 50%; background: var(--lt-primary); color: #fff; font-size: 1.3rem;
    box-shadow: 0 4px 12px rgba(31, 95, 174, .35); border: 3px solid var(--lt-surface);
}
.bottom-nav a.nav-scan.active { color: var(--lt-primary); }

.scan-modal .modal-body { display: flex; flex-direction: column; gap: .75rem; }
.scan-hint { color: var(--lt-muted); font-size: .875rem; margin: 0; }
.scan-stage { position: relative; background: #0b1726; border-radius: .6rem; overflow: hidden; aspect-ratio: 1 / 1; max-height: 60vh; width: 100%; }
.scan-reader { width: 100%; height: 100%; }
.scan-reader video { width: 100% !important; height: 100% !important; object-fit: cover; }
.scan-overlay {
    position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .75rem; color: #c9d4e3; text-align: center; padding: 1.5rem; font-size: .9rem;
}
.scan-overlay .bi { font-size: 2rem; }
.scan-log { list-style: none; margin: 0; padding: 0; max-height: 8rem; overflow-y: auto; font-size: .875rem; }
.scan-log li { padding: .3rem 0; border-bottom: 1px solid var(--lt-border); }
.scan-log li:first-child { animation: scan-flash .6s ease-out; }
@keyframes scan-flash { from { background: #e3f4ea; } to { background: transparent; } }

.scan-button { padding-inline: 1.5rem; }
.location-chip {
    display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .5rem .4rem .8rem; border-radius: 2rem;
    background: var(--lt-primary-soft); color: var(--lt-primary-dark); font-size: .875rem;
}
.btn-close-sm { width: .6rem; height: .6rem; background-size: .6rem; }
.scan-icon { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: .45rem; background: var(--lt-primary-soft); color: var(--lt-primary); }
.scan-slots { list-style: none; margin: 0; padding: 0; }
.scan-slots li { display: flex; gap: .4rem; align-items: baseline; padding: .4rem 0; border-bottom: 1px solid var(--lt-border); font-size: .9rem; }
.scan-slots li:last-child { border-bottom: 0; }
.scan-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 575.98px) { .scan-actions .btn { flex: 1 1 100%; } .scan-button { width: 100%; } }

/* ------------------------------------------------------------------ Etiketten */

.label-picker { max-height: 26rem; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 1rem 1.5rem; }
.label-group-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .35rem; font-size: .875rem; }
.label-group .form-check { font-size: .875rem; margin-bottom: .2rem; }

.label-sheets { overflow-x: auto; padding-bottom: 1rem; }
.label-page {
    background: #fff; box-shadow: 0 2px 12px rgba(15, 39, 68, .15); margin: 0 auto 1.5rem;
    width: 210mm; height: 297mm; display: grid; align-content: start; box-sizing: border-box;
}
.fmt-a4-24 .label-page { grid-template-columns: repeat(3, 70mm); grid-auto-rows: 37.125mm; }
.fmt-a4-40 .label-page { grid-template-columns: repeat(4, 52.5mm); grid-auto-rows: 29.7mm; }
.fmt-a4-65 .label-page { grid-template-columns: repeat(5, 38mm); grid-auto-rows: 21.2mm; column-gap: 2.5mm; padding: 10.7mm 4.75mm; }
.fmt-roll-62 .label-page { width: 62mm; height: 29mm; grid-template-columns: 1fr; grid-auto-rows: 29mm; }

.label { overflow: hidden; padding: 2.5mm 3mm; outline: 1px dashed #d4dae3; outline-offset: -1px; color: #000; }
.label.is-blank { background: repeating-linear-gradient(45deg, #fafbfc, #fafbfc 6px, #f1f3f6 6px, #f1f3f6 12px); }
.label-inner { display: flex; align-items: center; gap: 2.5mm; height: 100%; }
.label-qr { height: 100%; aspect-ratio: 1 / 1; flex-shrink: 0; }
.label-qr svg { width: 100%; height: 100%; display: block; }
.label-text { min-width: 0; line-height: 1.2; }
.label-name { font-weight: 700; font-size: 11pt; overflow-wrap: anywhere; }
.label-sub { font-size: 7.5pt; color: #333; margin-top: .6mm; }
.label-code { font-family: ui-monospace, Consolas, monospace; font-size: 6.5pt; color: #555; margin-top: .8mm; }
.fmt-a4-40 .label-name { font-size: 9.5pt; }
.fmt-a4-65 .label { padding: 1.5mm; }
.fmt-a4-65 .label-inner { gap: 1.5mm; }
.fmt-a4-65 .label-name { font-size: 7pt; }
.fmt-a4-65 .label-sub, .fmt-a4-65 .label-code { display: none; }

@media print {
    body { background: #fff !important; }
    .sidebar, .topbar, .bottom-nav, .alert, .modal, .d-print-none { display: none !important; }
    .app-main { margin: 0 !important; }
    .content { padding: 0 !important; max-width: none !important; }
    .label-sheets { overflow: visible; padding: 0; }
    .label-page { box-shadow: none; margin: 0; break-after: page; page-break-after: always; }
    .label { outline: none; }
    .label.is-blank { background: none; }
}

/* ------------------------------------------------------------------ Shop-Anbindung */

.copy-field { display: flex; align-items: center; gap: .6rem; padding: .45rem .5rem .45rem .8rem; background: #f6f8fa; border: 1px solid var(--lt-border); border-radius: .45rem; }
.copy-field .copy-label { font-size: .75rem; color: var(--lt-muted); white-space: nowrap; min-width: 7.5rem; }
.copy-field code { flex: 1; min-width: 0; overflow-wrap: anywhere; color: var(--lt-text); font-size: .8rem; }
@media (max-width: 575.98px) { .copy-field { flex-wrap: wrap; } .copy-field .copy-label { min-width: 0; width: 100%; } }

.alert { border-radius: var(--lt-radius); }
.min-w-0 { min-width: 0; }
