:root {
    --primary: rgb(29, 92, 171);
    --primary-2: rgb(24, 78, 146);
    --primary-light: rgb(29, 92, 171);
    --accent: rgb(29, 92, 171);
    --danger: #dc2626;
    --success: #16a34a;

    --bg: #f4f6f9;
    --card-bg: #ffffff;

    --border: rgb(200, 200, 200);
    --border-2: rgb(200, 200, 200);

    --text: #111827;
    --muted: #6b7280;

    --radius: 10px;
    --shadow: 0 8px 22px rgba(17, 24, 39, 0.08);

    --focus: 0 0 0 3px rgba(29, 92, 171, 0.22);

    --space-1: 8px;
    --space-2: 12px;
    --space-3: 16px;
    --space-4: 20px;

    --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Layout */
.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 16px;
}

@media (min-width: 640px) {
    .container {
        padding: 24px;
    }
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

@media (min-width: 640px) {
    .card {
        padding: 20px;
    }
}

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 16px 0;
}

/* Typography */
h1, h2, h3 {
    margin: 0 0 12px 0;
    font-weight: 700;
    letter-spacing: -0.01em;
}

h1 { font-size: 20px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }

@media (min-width: 640px) {
    h1 { font-size: 22px; }
    h2 { font-size: 19px; }
}

p {
    margin: 0 0 12px 0;
}

.muted {
    color: var(--muted);
    font-size: 14px;
}

/* Forms */
.form-group {
    margin-bottom: 14px;
}

label {
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
    color: var(--text);
    font-size: 14px;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="search"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 8px 15px 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-2);
    font-family: var(--font);
    font-size: 18px;
    font-weight: 600;
    background: #fff;
    color: #222222;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
    -webkit-appearance: none;
    appearance: none;
}

input[type="checkbox"],
input[type="radio"] {
    -webkit-appearance: auto;
    appearance: auto;
    width: 20px;
    height: 20px;
    padding: 0;
    margin: 0;
    accent-color: var(--primary);
    cursor: pointer;
}

textarea {
    min-height: 160px;
    resize: vertical;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 17px;
    line-height: 1.4;
}

input:focus, select:focus, textarea:focus {
    border-color: rgba(37, 99, 235, 0.8);
    box-shadow: var(--focus);
}

input::placeholder, textarea::placeholder {
    color: #9ca3af;
    font-weight: 500;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    border: 1px solid var(--border-2);
    border-radius: 10px;

    padding: 11px 14px;
    font-weight: 700;
    font-size: 16px;

    cursor: pointer;
    user-select: none;
    text-decoration: none;

    transition: transform .02s ease, background-color .15s ease, border-color .15s ease;
    width: 100%;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--border-2);
}

.btn-primary:hover {
    background: var(--primary-2);
}

.btn-secondary {
    background: #ffffff;
    color: var(--text);
    border-color: var(--border-2);
}

.btn-secondary:hover {
    background: #f9fafb;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--border-2);
}

.btn-danger:hover {
    filter: brightness(0.95);
}

/* Button groups / menu */
.menu {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

@media (min-width: 520px) {
    .menu {
        grid-template-columns: 1fr 1fr;
    }
    .menu .btn-danger {
        grid-column: 1 / -1; /* Abmelden unten über volle Breite */
    }
}

/* Alerts */
.alert {
    border-radius: 10px;
    padding: 10px 12px;
    margin: 12px 0;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid transparent;
}

.alert-success {
    color: #065f46;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.alert-danger {
    color: #7f1d1d;
    background: #fef2f2;
    border-color: #fecaca;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.table th,
.table td {
    border-bottom: 1px solid var(--border);
    padding: 10px 10px;
    text-align: left;
    font-size: 14px;
    vertical-align: top;
}

.table th {
    background: #f8fafc;
    font-weight: 800;
}

.table tr:last-child td {
    border-bottom: 0;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    background: rgba(37, 99, 235, 0.12);
    color: var(--accent);
    border: 1px solid rgba(37, 99, 235, 0.25);
}

/* Links */
a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

a:hover {
    text-decoration: underline;
}

/* Small utility */
.hidden {
    display: none !important;
}

/* --- Login / Allgemeine Meldungen: Ergänzungen --- */

/* Ein Info-Alert, passend zum Stil von alert-success/alert-danger */
.alert-info {
    color: #0f3d66;
    background: #e0f2fe;        /* hellblau */
    border-color: #bae6fd;
}

/* Einheitliche Abstände, falls Alerts direkt nach Text/Überschrift kommen */
.card .alert:first-child,
.card h1 + .alert,
.card .muted + .alert {
    margin-top: 12px;
}

/* Alerts sollen nie "zusammenkleben" */
.alert + .alert {
    margin-top: 10px;
}

/* Optional: Block für ein Logo/Bild im Login (statt Inline-Style) */
.hero-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius);
}

/* Optional: wenn du Links als Buttons verwendest, sollen sie nicht unterstrichen werden */
a.btn:hover {
    text-decoration: none;
}

/* --- Hamburger / Topbar --- */
.topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.topbar-title h1 {
    margin: 0;
}

.hamburger-btn {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-2);
    border-radius: 10px;
    background: var(--card-bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    cursor: pointer;
}

.hamburger-btn:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.hamburger-icon {
    width: 18px;
    height: 2px;
    background: var(--text);
    position: relative;
    display: block;
}

.hamburger-icon::before,
.hamburger-icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: var(--text);
}

.hamburger-icon::before { top: -6px; }
.hamburger-icon::after  { top: 6px; }

.hamburger-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 40;
}

.hamburger-panel {
    position: fixed;
    top: 12px;
    right: 12px;
    left: 12px;
    max-width: 520px;
    margin-left: auto;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
    z-index: 50;
    overflow: hidden;
}

.hamburger-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
}

.hamburger-title {
    font-weight: 700;
}

.hamburger-close {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-2);
    border-radius: 10px;
    background: var(--card-bg);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.hamburger-list {
    display: flex;
    flex-direction: column;
    padding: 8px;
}

.hamburger-link {
    display: block;
    padding: 12px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
}

.hamburger-link:hover {
    background: var(--bg);
}

/* --- Choice list (Art der Erfassung) --- */
.choice-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 14px 0 18px;
}

.choice-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card-bg);
    cursor: pointer;
}

.choice-item input[type="radio"] {
    margin-top: 4px;
}

.choice-title {
    font-weight: 700;
    margin-bottom: 2px;
}

/* --- Formular: Artikel-Lookup / manuelle Bezeichnung --- */
/* --- Formular: Artikel-Lookup / manuelle Bezeichnung --- */

.card-form {
    max-width: 680px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.form-row-compact {
    max-width: 320px;
}

@media (min-width: 640px) {
    .form-row-compact {
        max-width: 320px;
    }
}

.form-group-qty {
    max-width: 320px;
}

.form-group-qty input {
    text-align: left;
}

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

.form-hint {
    margin-top: 6px;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.4;
}

.input-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14);
    background: #fffafa;
}

.article-result {
    display: none;
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.4;
    border: 1px solid transparent;
}

.article-result.is-visible {
    display: block;
}

.article-result.is-found {
    color: #065f46;
    background: #ecfdf5;
    border-color: #a7f3d0;
    font-weight: 600;
}

.article-result.is-not-found {
    color: #92400e;
    background: #fffbeb;
    border-color: #fcd34d;
    font-weight: 600;
}

.resolved-kbez {
    display: none;
    margin-top: 4px;
    padding: 2px 0 0;
    font-size: 17px;
    line-height: 1.4;
    font-weight: 600;
    color: var(--primary);
}

.resolved-kbez.is-visible {
    display: block;
}

.customer-line {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
    margin: 0 0 12px 0;
}

.customer-for {
    margin: 0;
}

.customer-display {
    margin: 0;
    font-size: 15px;
}

.qty-inline {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: nowrap;
    width: 100%;
}

.qty-inline input,
.qty-inline input[type="text"] {
    width: 96px !important;
    min-width: 96px;
    max-width: 96px;
    flex: 0 0 96px;
    margin: 0;
}

.qty-unit {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    font-size: 15px;
    color: var(--text);
    line-height: 1.2;
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
}

/* --- Auswahlfenster f&uuml;r aktuellere Kundenartikelnummer --- */

.choice-dialog-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 90;
}

.choice-dialog-panel {
    position: fixed;
    top: 12px;
    right: 12px;
    left: 12px;
    max-width: 520px;
    height: min( calc(100dvh - 24px), 760px );
    margin-left: auto;
    margin-right: auto;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
    z-index: 100;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overscroll-behavior: contain;
}

.choice-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
}

.choice-dialog-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
}

.choice-dialog-body {
    padding: 14px;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.choice-dialog-text {
    margin: 0 0 14px 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.choice-dialog-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.choice-dialog-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card-bg);
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.choice-dialog-option:hover {
    background: #f9fafb;
}

.choice-dialog-option input[type="radio"] {
    width: 20px;
    min-width: 20px;
    max-width: 20px;
    margin: 2px 0 0 0;
    padding: 0;
    flex: 0 0 20px;
    box-shadow: none;
}

.choice-dialog-option-text {
    min-width: 0;
    flex: 1 1 auto;
}

.choice-dialog-option-title {
    display: block;
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
}

.choice-dialog-option-value {
    display: block;
    margin-top: 2px;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.4;
    word-break: break-word;
}

.choice-dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 14px;
    border-top: 1px solid var(--border);
    background: #fcfcfd;
    position: relative;
    z-index: 1;
}

@media (max-width: 420px) {
    .choice-dialog-actions {
        grid-template-columns: 1fr;
    }
}

html.dialog-open,
body.dialog-open {
    overflow: hidden;
    overscroll-behavior: none;
}

body.dialog-open {
    position: fixed;
    inset: 0;
    width: 100%;
}

.text-intro {
    font-size: 1.25em;
    margin-bottom: 12px;
    line-height: 1.5;
}

.text-intro p {
    font-size: 1em;
    margin: 0 0 0.6em 0;
    font-size: inherit;
}

.text-intro p:last-child {
    margin-bottom: 0;
}

/* === FOOTER === */
.footer {
    text-align: center;
    margin-top: 0px;
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--primary);
}

.footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    margin: 0 4px;
}

.footer a:hover {
    text-decoration: underline;
}

/* === Aus PHP-Seiten konsolidierte Formatierungen === */
.headerbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: nowrap;
    width: 100%;
    margin-bottom: 10px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.brand img {
    display: block;
    height: 38px;
    width: auto;
    max-width: min(100%, 260px);
    object-fit: contain;
}

.hamburger-btn {
    width: 48px;
    min-width: 48px;
    max-width: 48px;
    height: 48px;
    border: 1px solid var(--border-2);
    border-radius: 10px;
    background: var(--card-bg);
    box-shadow: var(--shadow);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
}

.hamburger-btn:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.hamburger-icon {
    width: 22px;
    height: 2px;
    background: var(--text);
    position: relative;
    display: block;
    border-radius: 2px;
}

.hamburger-icon::before,
.hamburger-icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
}

.hamburger-icon::before {
    top: -7px;
}

.hamburger-icon::after {
    top: 7px;
}

.menu-backdrop {
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 999;
    display: none;
}

.menu-panel {
    position: fixed;
    top: 70px;
    right: 12px;
    width: min(92vw, 420px);
    background: var(--card-bg);
    border: 1px solid var(--border-2);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
    z-index: 1000;
    display: none;
    overflow: hidden;
    padding: 14px;
}

.menu-panel-section + .menu-panel-section {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.menu-panel-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    color: rgba(0,0,0,0.78);
}

.capture-choice-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.capture-choice-label {
    display: block;
    cursor: pointer;
}

.capture-choice-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.capture-choice-btn {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
    border: 1px solid rgb(200, 200, 200);
    border-radius: 10px;
    background: #ffffff;
    padding: 12px 14px;
    cursor: pointer;
}

.capture-choice-label:active .capture-choice-btn {
    background: rgba(0,0,0,0.04);
}

.capture-choice-input:checked + .capture-choice-btn {
    border-color: rgb(29, 92, 171);
    box-shadow: inset 0 0 0 1px rgb(29, 92, 171);
}

.capture-choice-radio {
    position: relative;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    border: 2px solid rgb(29, 92, 171);
    border-radius: 50%;
    background: #ffffff;
}

.capture-choice-input:checked + .capture-choice-btn .capture-choice-radio::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgb(29, 92, 171);
    transform: translate(-50%, -50%);
}

.capture-choice-content {
    display: block;
    min-width: 0;
    flex: 1 1 auto;
}

.capture-choice-head {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: rgb(29, 92, 171);
    margin-bottom: 4px;
}

.capture-choice-text {
    display: block;
    font-size: 14px;
    line-height: 1.35;
    color: rgba(0,0,0,0.72);
}

.capture-choice-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

.capture-choice-actions .btn {
    width: calc(50% - 5px);
    min-height: 44px;
}

.capture-choice-label.is-disabled {
    cursor: default;
}

.capture-choice-label.is-disabled .capture-choice-btn {
    background: #f3f4f6;
    color: rgba(0,0,0,0.55);
    cursor: default;
}

.capture-choice-label.is-disabled .capture-choice-head,
.capture-choice-label.is-disabled .capture-choice-text {
    color: rgba(0,0,0,0.5);
}

.capture-choice-label.is-disabled .capture-choice-radio {
    border-color: rgba(0,0,0,0.28);
    background: #f9fafb;
}

.capture-choice-note-error {
    display: block;
    margin-top: 4px;
    color: #dc2626;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 600;
}

.menu-link-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-link-item {
    display: block;
    min-height: 44px;
    padding: 12px 14px;
    text-decoration: none;
    color: rgba(0,0,0,0.78);
    border: 1px solid rgb(200, 200, 200);
    border-radius: 10px;
    background: #ffffff;
}

.menu-link-item:active {
    background: rgba(0,0,0,0.04);
}

body.menu-open .menu-backdrop {
    display: block;
}

body.menu-open .menu-panel {
    display: block;
}

.card-form {
    padding-top: 14px;
}

.menu-stack {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-green {
    background: #2f7d4a !important;
    border-color: rgb(200, 200, 200) !important;
    color: #ffffff !important;
}
.btn-green:hover,
.btn-green:focus {
    background: #25663d !important;
}

.btn-disabled {
    pointer-events: none;
    opacity: 0.45;
    filter: grayscale(0.15);
}

.hidden {
    display: none !important;
}

body.dialog-open {
    overflow: hidden;
    touch-action: none;
}

.discard-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.discard-warning {
    margin: 0 0 12px 0;
    font-weight: 600;
}

.discard-list {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 15px;
    line-height: 1.35;
}

.discard-list li + li {
    margin-top: 6px;
}

.discard-danger-btn {
    background: #dc2626 !important;
    border-color: rgb(200, 200, 200) !important;
    color: #ffffff !important;
}

#discardDialog .article-number {
    color: var(--primary);
    font-weight: 600;
}

@media (max-width: 420px) {
    .menu-panel {
        top: 78px;
    }

    .brand img {
        height: 34px;
    }
}

/* === Bestellung pruefen: konsolidierte Formatierungen === */
body.review-page {
    font-size: 18px;
}
body.review-page h1 {
    font-size: 26px;
    margin-bottom: 14px;
}
body.review-page .customer-line {
    margin-bottom: 14px;
}
body.review-page label {
    font-size: 16px;
}
body.review-page input,

body.review-page textarea,

body.review-page select {
    font-size: 17px;
}
body.review-page .btn {
    font-size: 17px;
}
body.review-page .alert {
    font-size: 15px;
}
body.review-page .review-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
}
body.review-page .review-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    background: var(--card-bg);
    box-shadow: var(--shadow);
}
body.review-page .review-line1 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}
body.review-page .review-item-id {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text);
    word-break: break-word;
    min-width: 0;
}
body.review-page .review-item-id,

body.review-page .review-item-id a {
    -webkit-touch-callout: none;
    text-decoration: none;
    color: var(--text);
    pointer-events: none;
}
body.review-page .review-photos {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}
body.review-page .review-photo-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 1px solid rgb(200, 200, 200);
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
    cursor: pointer;
    padding: 0;
}
body.review-page .review-photo-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #f3f4f6;
}
body.review-page .image-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(0, 0, 0, 0.92);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 12px;
}
body.review-page .image-overlay.is-visible {
    display: flex;
}
body.review-page .image-stage {
    width: min(92vw, 760px);
    max-width: 72vh;
    aspect-ratio: 1 / 1;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
body.review-page .image-stage-placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
    opacity: 0;
    transition: opacity 0.18s ease;
    pointer-events: none;
}
body.review-page .image-stage.is-loading .image-stage-placeholder {
    opacity: 1;
}
body.review-page .image-stage img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
    opacity: 1;
    transition: opacity 0.18s ease;
    position: relative;
    z-index: 1;
}
body.review-page .image-stage.is-loading img {
    opacity: 0;
}
body.review-page .btn-hidden {
    display: none !important;
}
body.review-page .image-actions {
    width: min(92vw, 560px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}
body.review-page .image-actions .btn {
    min-height: 54px;
}
body.review-page .review-bestellen-top {
    justify-self: end;
    flex: 0 0 auto;
}
body.review-page .review-bestellen-top form {
    margin: 0;
}
body.review-page .review-bestellen-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    font-size: 16px;
}
body.review-page .review-bestellen-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    flex: 0 0 auto;
}
body.review-page .review-line2 {
    margin-top: 8px;
    font-size: 17px;
    line-height: 1.45;
    color: var(--primary);
    word-break: break-word;
    min-height: 22px;
    font-weight: 600;
    white-space: normal;
}
body.review-page .review-line2-main,

body.review-page .review-line2-lbez,

body.review-page .review-line2-customer-label {
    display: block;
}
body.review-page .review-line2-customer-label {
    white-space: pre-line;
}
body.review-page .review-line2-lbez {
    color: #000000;
    font-weight: 400;
    font-size: 0.85em;
}
body.review-page .review-item-form {
    margin-top: 10px;
}
body.review-page .review-line3 {
    display: grid;
    grid-template-columns: 88px auto auto 1fr auto;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
body.review-page .review-qty-input {
    width: 88px;
    min-width: 88px;
    max-width: 88px;
    text-align: center;
    padding-left: 6px;
    padding-right: 6px;
}
body.review-page .review-stueck {
    white-space: nowrap;
}
body.review-page .review-ok-btn {
    min-width: 56px;
    padding-left: 12px;
    padding-right: 12px;
}
body.review-page .review-delete-btn {
    min-width: 44px;
    padding-left: 12px;
    padding-right: 12px;
    background: #dc2626;
    border-color: rgb(200, 200, 200);
    color: #fff;
    justify-self: end;
}
.review-delete-btn:hover,
body.review-page .review-delete-btn:focus {
    background: #b91c1c;
    border-color: rgb(200, 200, 200);
    color: #fff;
}
body.review-page .review-empty {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card-bg);
}
body.review-page .debug-box {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #f8fafc;
}
body.review-page .debug-box-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}
body.review-page .debug-box pre {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
    color: #111827;
}
body.review-page .danger-zone {
    margin-top: 13px;
    padding-top: 13px;
    border-top: 1px solid var(--border);
}
body.review-page .bottom-actions {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 18px;
}
body.review-page .bottom-actions .btn {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}
body.review-page .send-divider {
    margin: 13px 0;
    border: 0;
    border-top: 1px solid var(--border);
}
body.review-page .bottom-actions > .btn + .send-divider {
    margin-top: 13px;
    margin-bottom: 13px;
}
body.review-page .bottom-actions > .btn + .btn {
    margin-top: 10px;
}
body.review-page .danger-zone + .btn {
    margin-top: 10px;
}
body.review-page .btn-send {
    background: #2f7d4a;
    border-color: rgb(200, 200, 200);
    color: #fff;
}
.btn-send:hover,
body.review-page .btn-send:focus {
    background: #27683d;
    border-color: rgb(200, 200, 200);
    color: #fff;
}
body.review-page .btn-danger {
    background: #dc2626;
    border-color: rgb(200, 200, 200);
    color: #fff;
}
.btn-danger:hover,
body.review-page .btn-danger:focus {
    background: #b91c1c;
    border-color: rgb(200, 200, 200);
    color: #fff;
}
body.review-page .focus-sentinel {
    position: fixed;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    border: 0;
    padding: 0;
    margin: 0;
}
@media (max-width: 380px) {
    body.review-page .review-line1 {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
    }
    body.review-page .review-item-id {
        font-size: 19px;
    }
    body.review-page .review-bestellen-label {
        font-size: 15px;
        gap: 6px;
    }
    body.review-page .review-line3 {
        grid-template-columns: 82px auto auto 1fr auto;
        gap: 6px;
    }
    body.review-page .review-qty-input {
        width: 82px;
        min-width: 82px;
        max-width: 82px;
    }
    body.review-page .review-ok-btn {
        min-width: 52px;
    }
    body.review-page .review-delete-btn {
        min-width: 40px;
    }
}

/* === Desktop-Erweiterungen === */
.customer-hint {
    margin-top: 6px;
    font-size: 14px;
}

@media (min-width: 980px) {
    .container {
        max-width: 1120px;
    }

    .menu-page .container,
    .menu-page .card-form {
        max-width: 720px;
    }

    .review-page .container {
        max-width: 1180px;
        padding-left: 24px;
        padding-right: 24px;
    }

    .review-page .card-form {
        max-width: none;
        margin-left: auto;
        margin-right: auto;
    }

    .review-page .customer-line,
    .review-page .customer-hint,
    .review-page .alert,
    .review-page .review-empty {
        max-width: 720px;
    }

    .review-page .review-item {
        display: grid;
        grid-template-columns: 150px minmax(380px, 1fr) auto auto;
        grid-template-areas:
            "id description qty bestellen"
            ". photos photos photos";
        align-items: center;
        gap: 10px 14px;
    }

    .review-page .review-line1 {
        display: contents;
    }

    .review-page .review-item-id {
        grid-area: id;
        word-break: normal;
        overflow-wrap: anywhere;
    }

    .review-page .review-line2 {
        grid-area: description;
        margin-top: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-height: 0;
    }

    .review-page .review-line2-main,
    .review-page .review-line2-lbez,
    .review-page .review-line2-customer-label {
        display: inline;
    }

    .review-page .review-line2-lbez::before {
        content: " ";
    }

    .review-page .review-photos {
        grid-area: photos;
        grid-template-columns: repeat(6, 84px);
        justify-content: start;
        margin-top: 2px;
    }

    .review-page .review-photo-thumb {
        width: 84px;
        height: 84px;
        aspect-ratio: auto;
    }

    .review-page .review-item-form {
        grid-area: qty;
        margin-top: 0;
    }

    .review-page .review-line3 {
        grid-template-columns: 88px auto auto auto;
        width: auto;
    }

    .review-page .review-delete-btn {
        justify-self: start;
    }

    .review-page .review-bestellen-top {
        grid-area: bestellen;
        justify-self: end;
    }

    .review-page .bottom-actions {
        max-width: 720px;
    }
}

@media (min-width: 1220px) {
    .review-page .container {
        max-width: 1320px;
    }

    .review-page .review-item {
        grid-template-columns: 160px minmax(520px, 1fr) auto auto;
    }
}

/* === Eingabeseiten: gemeinsame konsolidierte Formatierung === */
body.input-camera-page,
body.input-barcode-page {
    font-size: 18px;
    padding-bottom: 96px;
    -webkit-text-size-adjust: 100%;
}

body.input-camera-page h1,
body.input-barcode-page h1 {
    font-size: 24px;
    margin-bottom: 14px;
}

body.input-camera-page .customer-line,
body.input-barcode-page .customer-line {
    margin-bottom: 14px;
}

body.input-camera-page label,
body.input-barcode-page label {
    font-size: 16px;
}

body.input-camera-page input,
body.input-camera-page textarea,
body.input-camera-page select,
body.input-barcode-page input,
body.input-barcode-page textarea,
body.input-barcode-page select {
    font-size: 17px;
}

body.input-camera-page .btn,
body.input-barcode-page .btn {
    font-size: 17px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

body.input-camera-page .resolved-kbez,
body.input-barcode-page .resolved-kbez {
    color: var(--primary);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
    word-break: break-word;
    min-height: 1.5em;
    padding-top: 8px;
}

body.input-camera-page .qty-unit,
body.input-barcode-page .qty-unit {
    font-size: 17px;
}

body.input-camera-page .input-invalid,
body.input-barcode-page .input-invalid {
    border: 2px solid #dc2626 !important;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.16) !important;
    background: #fff1f2 !important;
}

body.input-camera-page .bottom-success-toast,
body.input-barcode-page .bottom-success-toast {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 120;
    background: #2f7d4a;
    color: #ffffff;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity .2s ease, transform .2s ease;
}

body.input-camera-page .bottom-success-toast.is-visible,
body.input-barcode-page .bottom-success-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

body.input-camera-page input.hidden,
body.input-camera-page .form-group.hidden,
body.input-camera-page .form-row.hidden,
body.input-barcode-page input.hidden,
body.input-barcode-page .form-group.hidden,
body.input-barcode-page .form-row.hidden {
    display: none !important;
}

body.input-camera-page a.btn.btn-disabled,
body.input-camera-page a.btn[aria-disabled="true"],
body.input-barcode-page .btn-disabled-temporary,
body.input-barcode-page .btn-disabled-temporary:hover,
body.input-barcode-page .btn-disabled-temporary:focus {
    pointer-events: none;
    opacity: 0.55;
    cursor: default;
}

body.input-camera-page.dialog-open,
body.input-barcode-page.dialog-open {
    overflow: hidden;
}

@media (min-width: 640px) {
    body.input-camera-page .bottom-success-toast,
    body.input-barcode-page .bottom-success-toast {
        max-width: 720px;
        margin: 0 auto;
    }
}

/* === Manuelle Eingabe / Fotoerfassung === */
body.input-camera-page .manual-entry-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

body.input-camera-page .photos-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 8px;
}

body.input-camera-page .form-group-photos {
    margin-bottom: 6px;
}

body.input-camera-page .photo-tile,
body.input-camera-page .photo-add-tile {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgb(200, 200, 200);
    background: #ffffff;
}

body.input-camera-page .photo-tile img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #f3f4f6;
    cursor: pointer;
}

body.input-camera-page .photo-add-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgb(29, 92, 171);
    color: #ffffff;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    font-size: 44px;
    font-weight: 700;
}

body.input-camera-page .photo-add-tile.is-hidden-during-upload {
    display: none;
}

body.input-camera-page .photo-placeholder-tile {
    display: block;
    border: 1px solid rgb(200, 200, 200);
    border-radius: 12px;
    background: #f3f4f6;
}

body.input-camera-page .photo-placeholder-tile.is-loading {
    animation: photoPlaceholderPulse 1.2s ease-in-out infinite alternate;
}

body.input-camera-page .photo-placeholder-tile img {
    opacity: 0;
    transition: opacity .18s ease;
    pointer-events: none;
}

body.input-camera-page .photo-placeholder-tile.is-loaded img {
    opacity: 1;
    pointer-events: auto;
}

@keyframes photoPlaceholderPulse {
    0% { background: #f3f4f6; }
    100% { background: #d1d5db; }
}

body.input-camera-page .upload-status {
    margin-top: 4px;
    min-height: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
}

body.input-camera-page .upload-status.is-error {
    color: #b91c1c;
}

body.input-camera-page .camera-overlay,
body.input-camera-page .image-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(0, 0, 0, 0.92);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 12px;
}

body.input-camera-page .camera-overlay.is-visible,
body.input-camera-page .image-overlay.is-visible {
    display: flex;
}

body.input-camera-page .camera-switch-row {
    width: min(92vw, 560px);
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

body.input-camera-page .camera-stage {
    width: min(92vw, 560px);
    aspect-ratio: 1 / 1;
    background: #000000;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
}

body.input-camera-page .camera-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #000000;
}

body.input-camera-page .camera-switch-btn {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgb(200, 200, 200);
    border-radius: 12px;
    background: rgb(29, 92, 171);
    cursor: pointer;
    padding: 0;
}

body.input-camera-page .camera-switch-btn img {
    width: 28px;
    height: 28px;
    display: block;
    filter: brightness(0) invert(1);
    pointer-events: none;
}

body.input-camera-page .camera-actions,
body.input-camera-page .image-actions {
    width: min(92vw, 560px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}

body.input-camera-page .camera-actions .btn,
body.input-camera-page .image-actions .btn {
    min-height: 54px;
}

body.input-camera-page .image-stage {
    width: min(92vw, 760px);
    aspect-ratio: 1 / 1;
    background: #000000;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.input-camera-page .image-stage img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

/* === Barcode-Eingabe / Scanner === */
body.input-barcode-page #readerWrap {
    width: 100%;
    max-width: 520px;
    margin: 0 auto 10px auto;
}

body.input-barcode-page #reader {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgb(200, 200, 200);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

body.input-barcode-page #reader video,
body.input-barcode-page #reader canvas {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

body.input-barcode-page .scan-form-block {
    display: none;
    margin-top: 12px;
}

body.input-barcode-page .qty-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

body.input-barcode-page .qty-label {
    margin: 0;
    white-space: nowrap;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    flex: 0 0 auto;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}

body.input-barcode-page .qty-inline {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
}

body.input-barcode-page .qty-unit {
    white-space: nowrap;
    flex: 0 0 auto;
}

body.input-barcode-page #qty_proxy {
    background: #f3f4f6;
    width: 84px;
    text-align: center;
    pointer-events: none;
    user-select: none;
    margin: 0;
}

body.input-barcode-page #qty_proxy[readonly] {
    cursor: default;
}

body.input-barcode-page #numPadWrap {
    display: none;
    margin-top: 14px;
    margin-bottom: 14px;
    border: 1px solid rgb(200, 200, 200);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
    padding: 12px;
}

body.input-barcode-page #numPadWrap.input-invalid {
    border: 2px solid #dc2626 !important;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.16) !important;
    background: #fff1f2 !important;
}

body.input-barcode-page #numPad {
    max-width: 300px;
    margin: 0 auto;
}

body.input-barcode-page .keyRow {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

body.input-barcode-page .keyRow:last-child {
    margin-bottom: 0;
}

body.input-barcode-page #numPad button {
    flex: 1 1 0;
    min-height: 48px;
    border: 1px solid rgb(200, 200, 200);
    border-radius: 12px;
    background: linear-gradient(180deg, #fafbfd 0%, #eef2f6 100%);
    color: #1f2937;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.08);
    transition: transform .06s ease, box-shadow .12s ease, background .12s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

body.input-barcode-page #numPad button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(15, 23, 42, 0.10);
}

body.input-barcode-page #numPad button.back {
    background: linear-gradient(180deg, #b7c0cc 0%, #99a4b2 100%);
    color: #ffffff;
    border-color: rgb(200, 200, 200);
}

body.input-barcode-page #numPad button.ok {
    background: rgb(29, 92, 171);
    color: #ffffff;
    border-color: rgb(200, 200, 200);
}

body.input-barcode-page .scanner-actions {
    display: none;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

body.input-barcode-page .scanner-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

/* === Eingabeseiten: Dialoge mit seitenspezifischer Stapelung === */
body.input-camera-page .choice-dialog-backdrop,
body.input-barcode-page .choice-dialog-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.52);
}

body.input-camera-page .choice-dialog-backdrop {
    z-index: 410;
    background: rgba(0, 0, 0, 0.38);
}

body.input-barcode-page .choice-dialog-backdrop {
    z-index: 200;
}

body.input-camera-page .choice-dialog-panel,
body.input-barcode-page .choice-dialog-panel {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #ffffff;
    border: 1px solid rgb(200, 200, 200);
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
    max-width: 720px;
    margin: 0 auto;
    overflow: hidden;
}

body.input-camera-page .choice-dialog-panel {
    z-index: 420;
}

body.input-barcode-page .choice-dialog-panel {
    z-index: 210;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

body.input-camera-page .choice-dialog-header,
body.input-camera-page .choice-dialog-body,
body.input-camera-page .choice-dialog-actions,
body.input-barcode-page .choice-dialog-header,
body.input-barcode-page .choice-dialog-body,
body.input-barcode-page .choice-dialog-actions {
    padding: 16px;
}

body.input-camera-page .choice-dialog-header {
    padding-bottom: 8px;
}

body.input-camera-page .choice-dialog-body {
    padding-top: 8px;
}

body.input-camera-page .choice-dialog-title,
body.input-barcode-page .choice-dialog-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
}

body.input-barcode-page .choice-dialog-title {
    font-size: 21px;
}

body.input-camera-page .choice-dialog-text,
body.input-barcode-page .choice-dialog-text {
    margin: 0 0 14px 0;
    font-size: 15px;
    line-height: 1.4;
}

body.input-camera-page .choice-dialog-options,
body.input-barcode-page .choice-dialog-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

body.input-camera-page .choice-dialog-option,
body.input-barcode-page .choice-dialog-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgb(200, 200, 200);
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
}

body.input-camera-page .choice-dialog-option {
    gap: 10px;
    padding: 10px 12px;
}

body.input-camera-page .choice-dialog-option input,
body.input-barcode-page .choice-dialog-option input[type="radio"] {
    margin-top: 2px;
    flex: 0 0 auto;
}

body.input-barcode-page .choice-dialog-option input[type="radio"] {
    margin-top: 3px;
}

body.input-camera-page .choice-dialog-option-text,
body.input-barcode-page .choice-dialog-option-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

body.input-camera-page .choice-dialog-option-text {
    gap: 4px;
}

body.input-camera-page .choice-dialog-option-title,
body.input-barcode-page .choice-dialog-option-title {
    font-weight: 700;
    color: #111827;
}

body.input-camera-page .choice-dialog-option-title {
    color: rgb(29, 92, 171);
}

body.input-camera-page .choice-dialog-option-value,
body.input-barcode-page .choice-dialog-option-value {
    color: #4b5563;
    line-height: 1.35;
    word-break: break-word;
}

body.input-camera-page .choice-dialog-actions,
body.input-barcode-page .choice-dialog-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    border-top: 1px solid rgb(200, 200, 200);
}

body.input-camera-page .choice-dialog-actions {
    padding-top: 0;
    border-top: 0;
}


/* --- Versand / Versand-Ergebnis --- */
.page-send,
.page-send-result {
    font-size: 18px;
}

.headerbar {
    display: block;
    margin-bottom: 10px;
}

.brand {
    display: block;
}

.brand img {
    display: block;
    height: 38px;
    width: auto;
    max-width: 100%;
}

.page-send h1,
.page-send-result h1 {
    font-size: 26px;
    margin-bottom: 14px;
}

.page-send .customer-line,
.page-send-result .customer-line {
    margin-bottom: 14px;
}

.send-summary {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card-bg);
    box-shadow: var(--shadow);
    padding: 14px;
    margin-top: 14px;
}

.send-summary-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.send-summary-list li + li {
    margin-top: 10px;
}

.send-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 18px;
    line-height: 1.35;
}

.page-send-result .send-summary-row {
    align-items: flex-start;
}

.send-summary-label {
    color: rgba(0, 0, 0, 0.78);
}

.page-send-result .send-summary-label {
    flex: 1 1 auto;
}

.send-summary-value {
    font-weight: 700;
    color: rgb(29, 92, 171);
    white-space: nowrap;
}

.page-send-result .send-summary-value {
    white-space: normal;
    text-align: right;
    word-break: break-word;
}

.send-summary-value-ok {
    color: rgb(29, 92, 171);
}

.send-summary-value-error {
    color: #a12a2a;
}

.send-double-divider {
    margin: 14px 0 12px 0;
    border: 0;
    border-top: 3px double var(--border);
}

.send-empty {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card-bg);
}

.bottom-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 18px;
}

.bottom-actions form {
    margin: 0;
}

.btn-green {
    background: #2f7d4a !important;
    border-color: rgb(200, 200, 200) !important;
    color: #ffffff !important;
}

.btn-green:hover,
.btn-green:focus {
    background: #25663d !important;
}

.status-badge {
    display: inline-block;
    margin: 0 0 14px 0;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
}

.status-ok,
.status-badge:not(.status-error) {
    background: #e7f6ec;
    color: #1f6b3a;
}

.status-error {
    background: #fdecec;
    color: #a12a2a;
}

.result-message {
    margin: 0 0 4px 0;
    font-size: 18px;
    line-height: 1.45;
}

.summary-text {
    font-size: 18px;
    line-height: 1.5;
    white-space: normal;
    word-break: break-word;
}

.summary-doc-list {
    margin: 6px 0 0 0;
    padding-left: 20px;
}

.summary-doc-list li {
    margin: 4px 0;
}

/* === Desktop-Korrektur Bestelluebersicht: Fotos / Mengenzeile / Bestellen === */
@media (min-width: 980px) {
    body.review-page .review-item {
        grid-template-columns: 156px minmax(360px, 1fr) 190px 120px !important;
        grid-template-areas:
            "id description qty bestellen"
            ". photos photos photos" !important;
        align-items: center;
        gap: 10px 14px;
        padding-left: 12px;
    }

    body.review-page .review-line2 {
        min-width: 0;
    }

    body.review-page .review-photos {
        grid-area: photos;
        display: grid !important;
        grid-template-columns: repeat(8, 1fr) !important;
        gap: 8px;
        width: 100%;
        justify-content: stretch;
        margin-top: 2px;
        max-width: none;
    }

    body.review-page .review-photo-thumb {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1 !important;
    }

    body.review-page .review-photo-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    body.review-page .review-item-form {
        grid-area: qty;
        margin-top: 0;
        justify-self: start;
        width: 190px;
    }

    body.review-page .review-line3 {
        display: grid;
        grid-template-columns: 88px 46px 46px !important;
        align-items: center;
        gap: 8px;
        width: 190px;
    }

    body.review-page .review-ok-btn {
        display: none !important;
    }

    body.review-page .review-line3 > span:empty {
        display: none !important;
    }

    body.review-page .review-delete-btn {
        justify-self: start;
    }

    body.review-page .review-bestellen-top {
        grid-area: bestellen;
        align-self: center;
        justify-self: start;
        white-space: nowrap;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        width: 120px;
    }

    body.review-page .bottom-actions,
    body.review-page .send-divider {
        width: 50%;
        max-width: 50%;
        margin-left: auto;
        margin-right: auto;
    }

    body.review-page .bottom-actions .btn {
        width: 100%;
    }
}

@media (min-width: 1220px) {
    body.review-page .review-item {
        grid-template-columns: 166px minmax(520px, 1fr) 190px 120px !important;
    }
}

/* === Login / Passwortseiten: konsolidierte Seitenformatierung === */
.auth-page .auth-container {
    max-width: 720px;
}

.auth-card {
    overflow: hidden;
}

.auth-logo-wrap {
    margin-bottom: 20px;
}

.auth-logo {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
}

.auth-link-row {
    margin-top: 12px;
    text-align: center;
}

.auth-link {
    font-size: 0.92em;
}

.auth-menu {
    margin-top: 16px;
}

@media (min-width: 1024px) {
    .auth-page .auth-container {
        max-width: 720px;
    }
}

/* === Bestelluebersicht: Desktop-Tabellenansicht === */
body.review-page .review-cell {
    min-width: 0;
}

body.review-page .review-item-form {
    display: contents;
}

body.review-page .review-col-pos,
body.review-page .review-col-desc,
body.review-page .review-col-unit {
    text-align: left;
}

body.review-page .review-col-qty,
body.review-page .review-col-delete,
body.review-page .review-col-bestellen {
    text-align: center;
}

body.review-page .review-col-qty.review-line3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

body.review-page .review-col-delete {
    margin-top: 8px;
}

body.review-page .review-col-bestellen {
    margin-top: 10px;
}

@media (min-width: 980px) {
    body.review-page .review-list {
        display: table !important;
        width: 100%;
        table-layout: fixed;
        border-collapse: collapse;
        border-spacing: 0;
        margin-top: 14px;
    }

    body.review-page .review-item {
        display: table-row !important;
        border: 0 !important;
        border-radius: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    body.review-page .review-cell {
        display: table-cell !important;
        vertical-align: middle;
        padding: 9px 10px;
        border: 0 !important;
        background: transparent;
    }

    body.review-page .review-col-pos {
        width: 166px;
        padding-left: 0;
        text-align: left;
    }

    body.review-page .review-col-desc {
        width: auto;
        text-align: left;
    }

    body.review-page .review-col-qty {
        width: 104px;
        text-align: center;
    }

    body.review-page .review-col-unit {
        width: 72px;
        text-align: left;
        white-space: nowrap;
    }

    body.review-page .review-col-delete {
        width: 58px;
        text-align: center;
    }

    body.review-page .review-col-bestellen {
        width: 124px;
        text-align: center;
        padding-right: 0;
    }

    body.review-page .review-col-qty.review-line3 {
        display: table-cell !important;
        margin-top: 0 !important;
        width: 104px !important;
    }

    body.review-page .review-col-delete,
    body.review-page .review-col-bestellen {
        margin-top: 0 !important;
    }

    body.review-page .review-item-id {
        font-size: 18px;
        line-height: 1.3;
        word-break: normal;
        overflow-wrap: anywhere;
    }

    body.review-page .review-line2 {
        margin-top: 0 !important;
        min-height: 0;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
    }

    body.review-page .review-line2-main,
    body.review-page .review-line2-lbez,
    body.review-page .review-line2-customer-label {
        display: block !important;
    }

    body.review-page .review-line2-lbez::before {
        content: none !important;
    }

    body.review-page .review-photos {
        display: grid !important;
        grid-template-columns: repeat(8, 52px) !important;
        gap: 6px;
        width: auto;
        max-width: none;
        justify-content: start;
        margin-top: 7px;
    }

    body.review-page .review-photo-thumb {
        width: 52px !important;
        height: 52px !important;
        aspect-ratio: auto !important;
    }

    body.review-page .review-qty-input {
        width: 86px !important;
        min-width: 86px !important;
        max-width: 86px !important;
        text-align: center;
    }

    body.review-page .review-ok-btn {
        display: none !important;
    }

    body.review-page .review-delete-btn {
        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        justify-self: auto !important;
    }

    body.review-page .review-bestellen-top {
        width: auto !important;
        justify-self: auto !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
    }

    body.review-page .review-bestellen-label {
        justify-content: center;
    }
}

@media (min-width: 1220px) {
    body.review-page .review-col-pos {
        width: 178px;
    }

    body.review-page .review-col-desc {
        width: auto;
    }
}

/* === Bestelluebersicht: getrennte Mobile-/Desktop-Ausgabe === */
body.review-page .review-table-wrap {
    display: none;
}

body.review-page .review-item-mobile {
    display: block;
}

body.review-page .review-item-desktop {
    display: none;
}

body.review-page .review-delete-form {
    margin: 0;
}

@media (max-width: 979px) {
    body.review-page .review-list-mobile {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: 14px;
    }

    body.review-page .review-table-wrap {
        display: none !important;
    }

    body.review-page .review-item-desktop {
        display: none !important;
    }

    body.review-page .review-item-mobile {
        display: block;
    }
}

@media (min-width: 980px) {
    body.review-page .review-list-mobile {
        display: none !important;
    }

    body.review-page .review-table-wrap {
        display: block;
        margin-top: 14px;
        width: 100%;
        overflow-x: auto;
    }

    body.review-page .review-table-wrap[hidden] {
        display: none !important;
    }

    body.review-page .review-table {
        width: 100%;
        table-layout: fixed;
        border-collapse: collapse;
        border-spacing: 0;
        background: transparent;
    }

    body.review-page .review-table .review-item-desktop {
        display: table-row !important;
        border: 0 !important;
        border-radius: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    body.review-page .review-table .review-cell {
        border: 0;
        border-bottom: 1px solid rgba(200, 200, 200, 0.55);
        padding: 8px 8px;
        vertical-align: middle;
        background: transparent;
    }

    body.review-page .review-table .review-item-desktop:last-child .review-cell {
        border-bottom: 0;
    }

    body.review-page .review-table .review-col-pos {
        width: 166px;
        text-align: left;
        vertical-align: top;
        padding-top: 8px;
    }

    body.review-page .review-table .review-col-desc {
        width: auto;
        text-align: left;
    }

    body.review-page .review-table .review-col-qty {
        width: 104px;
        text-align: center;
    }

    body.review-page .review-table .review-col-unit {
        width: 76px;
        text-align: left;
    }

    body.review-page .review-table .review-col-delete {
        width: 58px;
        text-align: center;
    }

    body.review-page .review-table .review-col-bestellen {
        width: 124px;
        text-align: left;
    }

    body.review-page .review-table .review-item-id {
        font-size: 20px;
        font-weight: 700;
        line-height: 1.35;
        color: var(--text);
        word-break: normal;
        overflow-wrap: anywhere;
    }

    body.review-page .review-table .review-line2 {
        margin-top: 0;
        color: var(--primary);
        font-size: 17px;
        font-weight: 600;
        line-height: 1.35;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        min-height: 0;
    }

    body.review-page .review-table .review-line2-main,
    body.review-page .review-table .review-line2-lbez,
    body.review-page .review-table .review-line2-customer-label {
        display: block;
    }

    body.review-page .review-table .review-line2-lbez {
        color: #000000;
        font-weight: 400;
        font-size: 0.85em;
    }

    body.review-page .review-table .review-line2-lbez::before {
        content: none !important;
    }

    body.review-page .review-table .review-photos {
        display: grid !important;
        grid-template-columns: repeat(8, minmax(44px, 72px)) !important;
        gap: 8px;
        width: auto;
        justify-content: start;
        margin-top: 8px;
    }

    body.review-page .review-table .review-photo-thumb {
        width: 72px !important;
        height: 72px !important;
        aspect-ratio: 1 / 1 !important;
    }

    body.review-page .review-table .review-item-form,
    body.review-page .review-table .review-delete-form,
    body.review-page .review-table .js-bestellen-form {
        margin: 0;
    }

    body.review-page .review-table .review-line3 {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0;
        width: auto;
    }

    body.review-page .review-table .review-qty-input {
        width: 88px;
        min-width: 88px;
        max-width: 88px;
        text-align: center;
        padding-left: 6px;
        padding-right: 6px;
    }

    body.review-page .review-table .review-ok-btn {
        display: none !important;
    }

    body.review-page .review-table .review-stueck {
        white-space: nowrap;
        font-size: 17px;
    }

    body.review-page .review-table .review-delete-btn {
        width: 44px;
        min-width: 44px;
        max-width: 44px;
        justify-self: center;
        padding-left: 0;
        padding-right: 0;
    }

    body.review-page .review-table .review-bestellen-top {
        width: auto;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        white-space: nowrap;
    }

    body.review-page .review-table .review-bestellen-label {
        justify-content: flex-start;
        font-size: 16px;
    }
}

@media (min-width: 1220px) {
    body.review-page .review-table .review-col-pos {
        width: 176px;
    }

    body.review-page .review-table .review-col-qty {
        width: 112px;
    }

    body.review-page .review-table .review-col-unit {
        width: 82px;
    }

    body.review-page .review-table .review-col-bestellen {
        width: 132px;
    }
}

/* === Bestelluebersicht: Korrektur Desktop-Trennlinien und Mobile-Fotoposition === */
@media (max-width: 979px) {
    body.review-page .review-item-mobile .review-photos {
        margin-top: 10px;
    }
}

@media (min-width: 980px) {
    body.review-page .review-table {
        border-collapse: separate !important;
        border-spacing: 0 !important;
    }

    body.review-page .review-table .review-cell {
        border-bottom: 1px solid rgb(200, 200, 200) !important;
        box-shadow: inset 0 -1px 0 rgba(200, 200, 200, 0.55);
    }

    body.review-page .review-table .review-item-desktop:last-child .review-cell {
        border-bottom: 0 !important;
        box-shadow: none;
    }

    body.review-page .review-table .review-col-pos {
        vertical-align: top !important;
        padding-top: 8px !important;
    }

    body.review-page .review-table .review-col-qty,
    body.review-page .review-table .review-col-unit,
    body.review-page .review-table .review-col-delete,
    body.review-page .review-table .review-col-bestellen {
        vertical-align: top !important;
        padding-top: 4px !important;
    }

    body.review-page .review-table .review-line3,
    body.review-page .review-table .review-delete-form,
    body.review-page .review-table .review-bestellen-top,
    body.review-page .review-table .review-col-unit {
        min-height: 44px;
        align-items: center;
    }

    body.review-page .review-table .review-col-unit {
        display: table-cell !important;
        line-height: 44px;
    }

    body.review-page .review-table .review-stueck {
        display: inline-block;
        line-height: 1.2;
        vertical-align: middle;
    }

    body.review-page .review-table .review-bestellen-label {
        min-height: 44px;
        align-items: center;
    }
}

/* === Bestelluebersicht: Feinkorrektur Mobile-Abstaende / Desktop-Linien / Desktop-Fotos === */
@media (max-width: 979px) {
    body.review-page .review-item-mobile .review-item-form {
        margin-top: 14px;
        margin-bottom: 14px;
    }

    body.review-page .review-item-mobile .review-photos {
        margin-top: 0;
    }
}

@media (min-width: 980px) {
    body.review-page .review-table .review-cell {
        border-bottom: 1px solid var(--border-2) !important;
        box-shadow: none !important;
    }

    body.review-page .review-table .review-item-desktop:last-child .review-cell {
        border-bottom: 0 !important;
    }

    body.review-page .review-table .review-col-pos,
    body.review-page .review-table .review-col-desc {
        padding-top: 8px !important;
    }

    body.review-page .review-table .review-col-qty,
    body.review-page .review-table .review-col-unit,
    body.review-page .review-table .review-col-delete,
    body.review-page .review-table .review-col-bestellen {
        vertical-align: top !important;
        padding-top: 0 !important;
    }

    body.review-page .review-table .review-line3,
    body.review-page .review-table .review-delete-form,
    body.review-page .review-table .review-bestellen-top,
    body.review-page .review-table .review-bestellen-label {
        min-height: 44px;
        align-items: center;
    }

    body.review-page .review-table .review-col-unit {
        line-height: 44px;
    }
}

@media (min-width: 980px) and (max-width: 1599px) {
    body.review-page .review-table .review-photos {
        grid-template-columns: repeat(8, 52px) !important;
        gap: 6px !important;
        max-width: 458px;
    }

    body.review-page .review-table .review-photo-thumb {
        width: 52px !important;
        height: 52px !important;
    }
}

/* === Bestelluebersicht: Feinkorrektur 2026-05-05 === */
@media (max-width: 979px) {
    body.review-page .review-item-mobile .review-item-form {
        margin-top: 8px !important;
        margin-bottom: 9px !important;
    }

    body.review-page .review-item-mobile .review-photos {
        margin-top: 0 !important;
    }
}

@media (min-width: 980px) {
    body.review-page .review-table .review-cell {
        border-bottom: 1px solid var(--border-2) !important;
    }

    body.review-page .review-table .review-item-desktop:last-child .review-cell {
        border-bottom: 0 !important;
    }

    body.review-page .review-table .review-col-pos,
    body.review-page .review-table .review-col-desc {
        padding-top: 8px !important;
        vertical-align: top !important;
    }

    body.review-page .review-table .review-col-qty,
    body.review-page .review-table .review-col-unit,
    body.review-page .review-table .review-col-delete,
    body.review-page .review-table .review-col-bestellen {
        padding-top: 3px !important;
        vertical-align: top !important;
    }

    body.review-page .review-table .review-line3,
    body.review-page .review-table .review-delete-form,
    body.review-page .review-table .review-bestellen-top,
    body.review-page .review-table .review-bestellen-label {
        min-height: 44px;
        align-items: center;
    }

    body.review-page .review-table .review-col-unit {
        line-height: 44px;
    }
}

/* === Bestelluebersicht: wirksame Kaskaden-Korrektur Mobile/Desktop ===
   Ursache: .review-item-form war global auf display: contents gesetzt; dadurch greifen
   margin-top/margin-bottom in der Mobile-Ansicht nicht. Desktop bleibt separat geregelt. */
@media (max-width: 979px) {
    body.review-page .review-item-mobile .review-item-form {
        display: block !important;
        margin-top: 8px !important;
        margin-bottom: 9px !important;
    }

    body.review-page .review-item-mobile .review-line3 {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    body.review-page .review-item-mobile .review-photos {
        margin-top: 0 !important;
    }
}

@media (min-width: 980px) {
    body.review-page .review-table {
        border-collapse: separate !important;
        border-spacing: 0 !important;
    }

    body.review-page .review-table .review-cell {
        border-bottom: 1px solid var(--border-2) !important;
        box-shadow: none !important;
        background-image: none !important;
    }

    body.review-page .review-table .review-item-desktop:first-child .review-cell {
        border-top: 1px solid var(--border-2) !important;
    }

    body.review-page .review-table .review-item-desktop:last-child .review-cell {
        border-bottom: 1px solid var(--border-2) !important;
    }

    body.review-page .review-table .review-col-pos,
    body.review-page .review-table .review-col-desc {
        vertical-align: top !important;
        padding-top: 8px !important;
    }

    body.review-page .review-table .review-col-qty,
    body.review-page .review-table .review-col-unit,
    body.review-page .review-table .review-col-delete,
    body.review-page .review-table .review-col-bestellen {
        vertical-align: top !important;
        padding-top: 8px !important;
    }

    body.review-page .review-table .review-col-qty .review-line3,
    body.review-page .review-table .review-col-delete .review-delete-form,
    body.review-page .review-table .review-col-bestellen .review-bestellen-top,
    body.review-page .review-table .review-col-unit .review-stueck {
        position: relative !important;
        top: 3px !important;
    }

    body.review-page .review-table .review-col-unit {
        line-height: normal !important;
    }

    body.review-page .review-table .review-col-unit .review-stueck {
        display: inline-block !important;
        line-height: 1.2 !important;
    }

    body.review-page .review-table .review-bestellen-label {
        min-height: 0 !important;
    }
}

/* === Bestelluebersicht: Korrektur Mobile-Fotoabstand und Desktop-Trennlinien 2026-05-05 === */
@media (max-width: 979px) {
    body.review-page .review-item-mobile .review-item-form {
        display: block !important;
        margin-top: 8px !important;
        margin-bottom: 0 !important;
    }

    body.review-page .review-item-mobile.has-photos .review-item-form {
        margin-bottom: 9px !important;
    }

    body.review-page .review-item-mobile.has-no-photos .review-item-form {
        margin-bottom: 0 !important;
    }

    body.review-page .review-item-mobile .review-photos {
        margin-top: 0 !important;
    }
}

@media (min-width: 980px) {
    body.review-page .review-table .review-cell {
        border-bottom: 1px solid var(--border-2) !important;
    }

    body.review-page .review-table .review-item-desktop:first-child .review-cell {
        border-top: 1px solid var(--border-2) !important;
    }

    body.review-page .review-table .review-item-desktop:last-child .review-cell {
        border-bottom: 0 !important;
    }

    body.review-page .bottom-actions {
        width: 50%;
        max-width: 50%;
        margin-left: auto;
        margin-right: auto;
    }

    body.review-page .bottom-actions .send-divider {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-top: 1px solid var(--border) !important;
    }

    body.review-page .bottom-actions .danger-zone {
        width: 100%;
        border-top: 1px solid var(--border) !important;
    }
}

/* === Bestelluebersicht: Desktop-Ausrichtung Einheit / Checkbox 2026-05-05 === */
@media (min-width: 980px) {
    body.review-page .review-table .review-col-qty .review-line3,
    body.review-page .review-table .review-col-unit .review-stueck {
        position: relative !important;
        top: 0 !important;
    }

    body.review-page .review-table .review-col-unit .review-stueck {
        display: inline-flex !important;
        align-items: center !important;
        min-height: 44px !important;
        line-height: 1.2 !important;
        vertical-align: top !important;
    }

    body.review-page .review-table .review-col-bestellen {
        text-align: right !important;
    }

    body.review-page .review-table .review-col-bestellen .js-bestellen-form,
    body.review-page .review-table .review-col-bestellen .review-bestellen-top,
    body.review-page .review-table .review-col-bestellen .review-bestellen-label {
        width: 100% !important;
    }

    body.review-page .review-table .review-col-bestellen .review-bestellen-top,
    body.review-page .review-table .review-col-bestellen .review-bestellen-label {
        justify-content: flex-end !important;
    }
}


/* === Anpassung: Leerer Hinweis volle Breite === */
body.review-page .review-empty {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
}
