:root {
    --bg: #f4f6f7;
    --surface: #ffffff;
    --surface-2: #eef2f3;
    --ink: #162027;
    --muted: #66737c;
    --line: #d8dfe3;
    --primary: #2c6e49;
    --primary-strong: #20583a;
    --danger: #a33a3a;
    --warning: #9a6b13;
    --success: #2c6e49;
    --radius: 18px;
    --shadow: 0 12px 30px rgba(21, 35, 43, .08);
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.45;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.topbar {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px clamp(16px, 4vw, 42px);
    background: #202b33;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 30;
    box-shadow: 0 8px 26px rgba(0,0,0,.12);
}
.brand { display:flex; align-items:center; gap:11px; text-decoration:none; }
.brand-mark { display:grid; place-items:center; width:42px; height:42px; border-radius:13px; background:#fff; color:#202b33; font-weight:900; font-size:1.3rem; }
.brand span:last-child { display:flex; flex-direction:column; line-height:1.05; }
.brand small, .identity small { color:#c3cbd0; margin-top:3px; }
.identity { display:flex; align-items:center; gap:12px; text-align:right; }
.identity span { display:flex; flex-direction:column; }


/* Rollenfarbe im Header */
.topbar.topbar-role-employee {
    background:#cbbf62;
    color:#252613;
}
.topbar.topbar-role-accounting {
    background:#b9ddf5;
    color:#163244;
}
.topbar.topbar-role-admin {
    background:#f2b7cc;
    color:#4a1830;
}
.topbar.topbar-role-employee .brand-mark { background:#fffce9; color:#5b541c; }
.topbar.topbar-role-accounting .brand-mark { background:#f7fcff; color:#24546b; }
.topbar.topbar-role-admin .brand-mark { background:#fff7fa; color:#7a2f50; }
.topbar.topbar-role-employee .brand small,
.topbar.topbar-role-employee .identity small { color:#4d4a20; }
.topbar.topbar-role-accounting .brand small,
.topbar.topbar-role-accounting .identity small { color:#365d72; }
.topbar.topbar-role-admin .brand small,
.topbar.topbar-role-admin .identity small { color:#71374f; }
.topbar.topbar-role-employee .button.ghost,
.topbar.topbar-role-accounting .button.ghost,
.topbar.topbar-role-admin .button.ghost {
    color:inherit;
    border-color:rgba(22,32,39,.30);
    background:rgba(255,255,255,.22);
}

.nav-tabs {
    display:flex;
    gap:4px;
    padding: 0 clamp(12px, 4vw, 42px);
    overflow-x:auto;
    background:#fff;
    border-bottom:1px solid var(--line);
    position:sticky;
    top:72px;
    z-index:20;
}
.nav-tabs a { padding:14px 16px; text-decoration:none; white-space:nowrap; font-weight:700; color:#3c4a53; }
.nav-tabs a:hover { color:var(--primary); }

.shell { width:min(1480px, calc(100% - 28px)); margin:26px auto 60px; }
.shell.narrow { width:min(860px, calc(100% - 28px)); }
.grid { display:grid; gap:16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
    background: var(--surface);
    border:1px solid var(--line);
    border-radius:var(--radius);
    box-shadow:var(--shadow);
    padding:20px;
}
.card.compact { padding:15px; }
.hero-card { padding:28px; background:linear-gradient(135deg,#fff,#edf3ef); }
.overview-hero-card{padding:18px 20px}.overview-hero-card h1{font-size:clamp(1.55rem,3vw,2.2rem);margin-bottom:6px}.overview-hero-card p{margin:4px 0}.overview-hero-card .order-card-head{gap:12px}
h1,h2,h3 { margin-top:0; line-height:1.15; }
h1 { font-size:clamp(1.7rem, 4vw, 2.65rem); margin-bottom:10px; }
h2 { font-size:1.28rem; }
h3 { font-size:1.05rem; }
p { margin:8px 0; }
.muted { color:var(--muted); }
.big-number { font-size:2rem; font-weight:900; }

.button {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    min-height:44px;
    padding:9px 15px;
    border:1px solid var(--line);
    border-radius:12px;
    background:#fff;
    color:var(--ink);
    text-decoration:none;
    font-weight:800;
}
.button:hover { transform:translateY(-1px); }
.button:focus-visible {
    outline:3px solid rgba(44,110,73,.24);
    outline-offset:2px;
    border-color:var(--primary);
}
.button:disabled,
.button[aria-disabled="true"] {
    cursor:not-allowed;
    opacity:.55;
    transform:none;
    box-shadow:none;
}
.button:disabled:hover,
.button[aria-disabled="true"]:hover { transform:none; }
.button.primary { background:var(--primary); color:#fff; border-color:var(--primary); }
.button.primary:hover { background:var(--primary-strong); }
.button.danger { background:var(--danger); color:#fff; border-color:var(--danger); }
.button.warning { background:#fff8e8; color:#72500e; border-color:#e7ca8d; }
.button.ghost { background:transparent; color:inherit; border-color:rgba(255,255,255,.28); }
.button.small { min-height:36px; padding:7px 11px; font-size:.9rem; }
.label-print-icon-button{width:42px;min-width:42px;height:40px;min-height:40px;padding:5px;display:inline-grid;place-items:center;line-height:1}
.label-print-icon-button.small{width:38px;min-width:38px;height:36px;min-height:36px;padding:4px}
.label-print-icon-button img{display:block;width:28px;height:28px;object-fit:contain}
.label-print-icon-button.small img{width:25px;height:25px}
.actions { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.actions > form { width:auto; margin:0; }
.actions > form > .button { width:auto; }

.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.form-grid .full { grid-column:1/-1; }
label { display:flex; flex-direction:column; gap:7px; font-weight:800; color:#334149; }
input, select, textarea {
    width:100%;
    border:1px solid #cdd6db;
    border-radius:12px;
    background:#fff;
    color:var(--ink);
    padding:12px 13px;
    min-height:46px;
    outline:none;
}
textarea { min-height:110px; resize:vertical; }
input:focus, select:focus, textarea:focus { border-color:var(--primary); box-shadow:0 0 0 3px rgba(44,110,73,.12); }
.check-row { flex-direction:row; align-items:flex-start; gap:10px; font-weight:700; }
.check-row input { width:22px; min-height:22px; height:22px; flex:0 0 auto; }
.facto-check, input.facto-check { width:15px; height:15px; min-height:15px; min-width:15px; padding:0; margin:0; vertical-align:middle; }
.hero-login-text { display:flex; flex-direction:column; justify-content:center; }
.file-button-row { display:grid; grid-template-columns:1fr auto; gap:8px; align-items:end; }
.file-button-row input[type="file"] { min-height:46px; }
@media (max-width: 720px) { .file-button-row { grid-template-columns:1fr; } }

.inline-form { display:flex; align-items:end; gap:10px; flex-wrap:wrap; }
.inline-form > label { flex:1 1 180px; }
.scanner-input { display:grid; grid-template-columns:1fr auto; gap:8px; }

.alert { border-radius:14px; padding:13px 15px; margin:14px 0; font-weight:700; border:1px solid; }
.alert.success { background:#edf7f0; border-color:#bdd9c5; color:#225f3c; }
.alert.danger { background:#fff0f0; border-color:#e7bcbc; color:#8a2f2f; }
.alert.warning { background:#fff8e8; border-color:#ead39b; color:#75540e; }

.badge { display:inline-flex; align-items:center; gap:5px; padding:5px 9px; border-radius:999px; background:var(--surface-2); font-size:.78rem; font-weight:900; }
.badge.active { background:#e7f5eb; color:#236440; }
.badge.paused { background:#fff3d8; color:#7b5810; }
.badge.planned { background:#eef3ff; color:#365a9e; }
.badge.done, .badge.workshop_done { background:#e8f0f5; color:#365867; }
.badge.waiting_parts { background:#fff4d8; color:#7a5912; }
.badge.customer_query { background:#f5eaff; color:#6b3f8a; }
.badge.facto_open { background:#fff0dc; color:#80531b; }
.badge.completed { background:#e8f7ec; color:#26633e; }
.badge.archived { background:#eceff1; color:#4f5d65; }
.badge.warning { background:#fff3d8; color:#7b5810; }

.active-order { border:2px solid #96c2a5; background:linear-gradient(135deg,#fff,#f1f8f3); }
.timer { font-variant-numeric:tabular-nums; font-size:clamp(2rem,8vw,4.5rem); font-weight:950; letter-spacing:-.04em; margin:8px 0 18px; }
.important { border-left:5px solid #b47b17; background:#fff8e8; padding:13px 15px; border-radius:10px; }

.table-wrap { overflow:auto; border:1px solid var(--line); border-radius:14px; background:#fff; }
table { width:100%; border-collapse:collapse; min-width:760px; }
th,td { padding:12px 13px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
th { background:#f1f4f5; font-size:.82rem; text-transform:uppercase; letter-spacing:.04em; color:#53616a; }
tr:last-child td { border-bottom:0; }
.status-checked { background:#f0f8f2; }

.order-card { display:grid; gap:12px; }
.order-card-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.order-number { font-size:1.3rem; font-weight:950; }
.todo-list { display:grid; gap:8px; }
.todo-item { display:flex; align-items:flex-start; gap:9px; padding:9px 0; border-bottom:1px dashed var(--line); }
.todo-item:last-child { border-bottom:0; }
.todo-item.done { color:var(--muted); text-decoration:line-through; }

.kpi { min-height:135px; display:flex; flex-direction:column; justify-content:space-between; }
.kpi small { color:var(--muted); font-weight:700; }
.kpi strong { font-size:2rem; }

.modal-backdrop { position:fixed; inset:0; z-index:100; background:rgba(9,16,20,.68); display:grid; place-items:center; padding:20px; }
.modal { width:min(620px,100%); max-height:90vh; overflow:auto; background:#fff; border-radius:20px; padding:24px; box-shadow:0 30px 80px rgba(0,0,0,.3); }
.hidden { display:none !important; }

.scan-panel { position:fixed; inset:0; z-index:110; background:#10171c; color:#fff; display:flex; flex-direction:column; }
.scan-panel header { display:flex; justify-content:space-between; gap:12px; padding:14px; }
.scan-panel video { width:100%; height:calc(100vh - 80px); object-fit:cover; background:#000; }

.audio-recorder { display:grid; gap:10px; }
.recording { color:#9b2f2f; font-weight:900; }
audio { width:100%; max-width:520px; }

.toast { position:fixed; right:18px; bottom:18px; max-width:420px; background:#202b33; color:#fff; padding:12px 15px; border-radius:12px; opacity:0; pointer-events:none; transform:translateY(10px); transition:.2s; z-index:200; }
.toast.show { opacity:1; transform:translateY(0); }

.setup-page { padding-top:20px; }

@media (max-width: 980px) {
    .grid.four { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .grid.three { grid-template-columns:1fr; }
}
@media (max-width: 720px) {
    .topbar { min-height:64px; padding:10px 14px; }
    .nav-tabs { top:64px; padding:0 8px; }
    .shell { width:min(100% - 18px,1480px); margin-top:16px; }
    .grid.two, .grid.four, .form-grid { grid-template-columns:1fr; }
    .form-grid .full { grid-column:auto; }
    .card { padding:16px; border-radius:15px; }
    .identity strong { max-width:145px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .identity small { display:none; }
    .brand span:last-child { display:none; }
    .button { min-height:48px; }
    .scanner-input { grid-template-columns:1fr; }
}


/* V10.2.2 – einheitliches Abstands-Raster für Seitenmodule */
.mt-8{margin-top:8px}.mt-12{margin-top:12px}.mt-16{margin-top:16px}.mt-24{margin-top:24px}
.mb-8{margin-bottom:8px}.mb-12{margin-bottom:12px}.mb-16{margin-bottom:16px}.mb-24{margin-bottom:24px}
.align-start{align-items:start}.centered-content{margin-left:auto;margin-right:auto}

/* ------------------------------------------------------------
   Auftragsübersicht / Live-Status
------------------------------------------------------------ */
.status-stack { display:flex; flex-wrap:wrap; gap:6px; }
.overview-important { color:#7b5810; font-weight:800; }
.overview-heading { align-items:center; }
.scan-panel header > div { display:flex; flex-direction:column; gap:3px; }
.scan-panel header small { color:#c3cbd0; }
.scan-video-wrap { position:relative; flex:1; min-height:0; overflow:hidden; }
.scan-video-wrap video { width:100%; height:100%; object-fit:cover; background:#000; }
.scan-guide { position:absolute; inset:18% 10%; border:2px solid rgba(255,255,255,.72); border-radius:18px; pointer-events:none; box-shadow:0 0 0 9999px rgba(0,0,0,.18); }
.scan-guide span { position:absolute; left:8%; right:8%; top:50%; height:2px; background:#fff; box-shadow:0 0 10px rgba(255,255,255,.8); }

@keyframes orderLivePulse {
    0%, 100% { background:#ffffff; }
    50% { background:#e2f3e8; }
}

.order-live-blink td {
    animation: orderLivePulse 2.8s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .order-live-blink td { animation:none; background:#eaf6ee; }
}

@media (max-width: 720px) {
    .overview-heading { align-items:flex-start; flex-direction:column; }
    .overview-table table { min-width:980px; }
}

/* Karten in der Verwaltungsübersicht ebenfalls langsam hervorheben. */
.order-live-blink:not(tr) {
    animation: orderLivePulse 2.8s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .order-live-blink:not(tr) { animation:none; background:#eaf6ee; }
}


/* ------------------------------------------------------------
   V3 - Responsive Fixes für Material und Sprachmemos
------------------------------------------------------------ */
/* CSS-Grid/Flex-Kinder dürfen ihren Container auf kleinen Displays nicht
   durch breite Tabellen, Audioelemente oder Dateifelder aufziehen. */
.grid > *,
.form-grid > *,
.inline-form > *,
.scanner-input > *,
.order-card-head > *,
.actions > *,
.card,
.capture-card,
.voice-upload-card,
.voice-memo-card {
    min-width: 0;
    max-width: 100%;
}

.card,
.capture-card,
.voice-upload-card,
.voice-memo-card,
.table-wrap,
.audio-recorder,
form {
    width: 100%;
}

.table-wrap {
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.material-table-wrap,
.material-table {
    width: 100%;
}

/* Die Materialliste hat nur drei Spalten und braucht mobil keine künstliche
   Mindestbreite von 760px. */
.material-table {
    min-width: 0;
    table-layout: auto;
}

.material-table th,
.material-table td {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.voice-card audio,
.voice-memo-card audio {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 10px;
}

/* Dateifelder sind auf mobilen Chromium-Browsern gern breiter als ihr Parent. */
input[type="file"] {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

@media (max-width: 720px) {
    .capture-card,
    .voice-upload-card,
    .voice-memo-card {
        overflow: hidden;
    }

    .material-table th,
    .material-table td {
        padding: 10px 8px;
        font-size: .9rem;
    }

    .voice-card .card.compact {
        padding: 14px;
    }
}

/* ------------------------------------------------------------
   V4 - Hilfe, Tooltips und HTML-Editor
------------------------------------------------------------ */
.help-emoji {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 12px;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 1.25rem;
    line-height: 1;
}
.help-emoji:hover,
.help-emoji:focus-visible {
    background: rgba(255,255,255,.16);
    outline: none;
}

.page-help-backdrop { z-index: 160; }
.help-modal { width: min(720px, 100%); }
.help-lead { color: var(--muted); margin-bottom: 16px; }
.help-tip-list { display: grid; gap: 11px; }
.help-tip {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f8faf9;
    padding: 13px 14px;
}
.help-tip strong { display: block; color: var(--primary-strong); margin-bottom: 4px; }
.help-tip p { margin: 0; }

.help-content { overflow-wrap: anywhere; }
.help-content h2 { margin-top: 30px; padding-top: 4px; }
.help-content h2:first-child { margin-top: 0; }
.help-content h3 { margin-top: 22px; margin-bottom: 8px; }
.help-content ul,
.help-content ol { padding-left: 24px; }
.help-content li { margin: 6px 0; }
.help-content a { color: var(--primary); font-weight: 800; }
.help-content hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.help-content code { padding: 2px 5px; background: var(--surface-2); border-radius: 6px; }

.html-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 10px;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
    background: #f3f6f5;
}
.html-editor-toolbar .button { min-height: 38px; }
.html-editor,
.html-editor-source {
    width: 100%;
    min-height: 480px;
    max-height: 70vh;
    overflow: auto;
    border: 1px solid #cdd6db;
    border-radius: 0 0 14px 14px;
    background: #fff;
    padding: 18px;
    outline: none;
}
.html-editor:focus,
.html-editor-source:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(44,110,73,.12); }
.html-editor h2 { margin-top: 26px; }
.html-editor h2:first-child { margin-top: 0; }
.html-editor a { color: var(--primary); }
.html-editor-source {
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: .9rem;
    resize: vertical;
}

@media (max-width: 720px) {
    .help-emoji { width: 40px; height: 40px; flex-basis: 40px; }
    .help-modal { padding: 18px; }
    .html-editor-toolbar { overflow-x: auto; flex-wrap: nowrap; }
    .html-editor-toolbar .button { flex: 0 0 auto; }
    .html-editor,
    .html-editor-source { min-height: 360px; padding: 14px; }
}

/* ------------------------------------------------------------
   V5 - Mehrnutzer, Fotos, Protokoll und neue Verwaltung
------------------------------------------------------------ */
.section-head {
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    flex-wrap:wrap;
}

.terminal-full-width {
    width:calc(100vw - 24px);
    max-width:none;
    margin-left:calc(50% - 50vw + 12px);
}
.terminal-hero { overflow:hidden; }
.terminal-search { display:block; max-width:520px; margin-top:18px; }
.terminal-grid {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(min(320px,100%),1fr));
    column-gap:16px;
    row-gap:8px;
    grid-auto-rows:8px;
    grid-auto-flow:dense;
    align-items:start;
}
.terminal-user-card { display:grid; gap:14px; min-width:0; margin-bottom:0; }
/* Freie Mitarbeiter stehen kompakt untereinander in der ersten Spalte.
   Die Karte ist etwa 10 % kleiner, ohne die Scanner-/Touch-Felder zu klein zu machen. */
.terminal-user-card-free {
    grid-column:1;
    width:90%;
    justify-self:start;
    padding:18px;
    gap:12px;
    font-size:.96rem;
}
.terminal-user-card-free .terminal-user-head h2 { font-size:1.16rem; margin-top:3px; }
.terminal-user-card-free .terminal-order-form { gap:9px; }
.terminal-user-card-free .terminal-main-button { min-height:52px; }
.terminal-user-card-free input,
.terminal-user-card-free select { min-height:44px; }
.terminal-user-head {
    display:flex;
    justify-content:space-between;
    gap:12px;
    align-items:flex-start;
}
.terminal-user-head h2 { margin:4px 0 0; }
.employee-number {
    display:inline-flex;
    font-weight:900;
    font-size:.82rem;
    letter-spacing:.04em;
    color:var(--primary-strong);
}
.terminal-active {
    padding:14px;
    border:1px solid #acd6bb;
    border-radius:16px;
    background:#eefaf2;
    display:grid;
    gap:4px;
}
.terminal-active.paused { border-color:#e2c477; background:#fff8e7; }
.terminal-active strong { font-size:1.28rem; }
.terminal-timer { font-size:1.55rem; font-weight:900; font-variant-numeric:tabular-nums; }

.terminal-scanner-primary input:focus {
    border-color:#1f6e45;
    box-shadow:0 0 0 4px rgba(44,110,73,.16);
}
.terminal-scanner-selected {
    outline:4px solid rgba(44,110,73,.28);
    outline-offset:2px;
}
.terminal-scanner-selected .terminal-manual-order:focus {
    border-color:#1f6e45;
    box-shadow:0 0 0 4px rgba(44,110,73,.20);
}
.terminal-status-panel {
    display:grid;
    gap:9px;
    margin-top:8px;
    padding:12px;
    border:1px solid var(--line);
    border-radius:15px;
    transition:background .15s ease,border-color .15s ease;
}
.terminal-status-title {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
}
.terminal-status-title span { font-weight:900; }
.terminal-status-bg-active { background:#e8f7ec; border-color:#9dcead; }
.terminal-status-bg-waiting_parts { background:#fff4d8; border-color:#e6c96f; }
.terminal-status-bg-customer_query { background:#fff0df; border-color:#e4b273; }
.terminal-status-bg-workshop_done { background:#f2e9fb; border-color:#c9a9e3; }
.terminal-status-buttons {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
}
.terminal-status-button {
    min-height:54px;
    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:8px;
    padding:9px 10px;
    border:2px solid transparent;
    border-radius:12px;
    color:#263037;
    font-weight:900;
    text-align:left;
    cursor:pointer;
}
.terminal-status-button .status-dot,
.terminal-status-footer .status-dot {
    width:13px;
    height:13px;
    min-width:13px;
    border-radius:50%;
    display:inline-block;
    border:1px solid rgba(0,0,0,.12);
}
.terminal-status-button.status-active { background:#e8f7ec; }
.terminal-status-button.status-active .status-dot,
.dot-active { background:#3d9b5f; }
.terminal-status-button.status-waiting_parts { background:#fff4d8; }
.terminal-status-button.status-waiting_parts .status-dot,
.dot-waiting_parts { background:#d9ad27; }
.terminal-status-button.status-customer_query { background:#fff0df; }
.terminal-status-button.status-customer_query .status-dot,
.dot-customer_query { background:#e58b32; }
.terminal-status-button.status-workshop_done { background:#f2e9fb; }
.terminal-status-button.status-workshop_done .status-dot,
.dot-workshop_done { background:#8a58b0; }
.terminal-status-button.is-current {
    border-color:#263037;
    box-shadow:0 0 0 2px rgba(255,255,255,.8) inset;
}
.terminal-status-button.is-current::after {
    content:'✓';
    margin-left:auto;
    font-size:1.05rem;
}
.terminal-status-footer {
    display:flex;
    align-items:center;
    gap:12px 18px;
    flex-wrap:wrap;
    margin-top:18px;
    padding:13px 16px;
    border:1px solid var(--line);
    border-radius:14px;
    background:#fff;
    box-shadow:var(--shadow);
}
.terminal-status-footer span {
    display:inline-flex;
    align-items:center;
    gap:6px;
    font-weight:750;
    color:#46545d;
}
.terminal-main-button { width:100%; min-height:54px; font-size:1rem; }
.terminal-quick-orders { display:grid; gap:8px; }
.terminal-order-button {
    width:100%;
    min-height:58px;
    text-align:left;
    border:1px solid var(--line);
    border-radius:14px;
    background:#f7faf8;
    padding:10px 12px;
    cursor:pointer;
}
.terminal-order-button:hover,
.terminal-order-button:focus-visible { border-color:var(--primary); background:#eef8f1; outline:none; }
.terminal-order-button strong,
.terminal-order-button small { display:block; }
.terminal-order-button small { color:var(--muted); margin-top:3px; }
.terminal-order-form { display:grid; gap:10px; }
.terminal-open-order { margin-top:0; }
.terminal-assigned-details { border:1px solid var(--line); border-radius:14px; background:#f8faf9; overflow:hidden; }
.terminal-assigned-details > summary { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:11px 12px; font-weight:900; cursor:pointer; list-style:none; user-select:none; }
.terminal-assigned-details > summary::-webkit-details-marker { display:none; }
.terminal-assigned-details > summary::after { content:'▾'; color:var(--muted); margin-left:auto; transition:transform .15s ease; }
.terminal-assigned-details[open] > summary::after { transform:rotate(180deg); }
.terminal-assigned-details .terminal-quick-orders { padding:0 10px 10px; }
.terminal-popup-body { min-height:100vh; background:var(--bg); }
.terminal-popup-shell { width:min(760px,calc(100% - 24px)); margin:12px auto 32px; }
.terminal-popup-head { position:sticky; top:0; z-index:20; background:#202b33; color:#fff; padding:12px 14px; box-shadow:0 5px 18px rgba(0,0,0,.12); }
.terminal-popup-head-inner { width:min(760px,calc(100% - 24px)); margin:auto; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.terminal-popup-head strong,.terminal-popup-head small { display:block; }
.terminal-popup-head small { color:#c3cbd0; }
.terminal-popup-section { margin-top:14px; }
.terminal-popup-material-list { display:grid; gap:6px; margin-top:12px; }
.terminal-popup-material-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; padding:8px 10px; border:1px solid var(--line); border-radius:10px; background:#f8faf9; }

.image-gallery {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(min(210px,100%),1fr));
    gap:14px;
}
.image-card { overflow:hidden; }
.image-card img,
.order-photo {
    display:block;
    width:100%;
    max-width:100%;
    height:auto;
    max-height:320px;
    object-fit:cover;
    border-radius:12px;
    border:1px solid var(--line);
    background:#f3f5f4;
}

.audit-details pre {
    margin:8px 0 0;
    padding:12px;
    max-width:620px;
    max-height:300px;
    overflow:auto;
    white-space:pre-wrap;
    overflow-wrap:anywhere;
    background:#182026;
    color:#eef3f5;
    border-radius:10px;
    font-size:.78rem;
}

@media (max-width:720px) {
    .terminal-status-buttons { grid-template-columns:1fr; }
    .terminal-status-button { min-height:58px; }
    .terminal-full-width { width:100%; margin-left:0; }
    .terminal-grid { grid-template-columns:1fr; grid-auto-rows:auto; row-gap:16px; }
    .terminal-user-card { padding:16px; }
    .terminal-user-card-free { grid-column:auto; width:100%; padding:14px; }
    .terminal-main-button { min-height:58px; }
    .image-gallery { grid-template-columns:1fr 1fr; }
}
@media (max-width:460px) {
    .image-gallery { grid-template-columns:1fr; }
}
.audit-json {
    margin:8px 0 0;
    padding:12px;
    max-width:620px;
    max-height:300px;
    overflow:auto;
    white-space:pre-wrap;
    overflow-wrap:anywhere;
    background:#182026;
    color:#eef3f5;
    border-radius:10px;
    font-size:.78rem;
}
.user-summary {
    display:flex;
    justify-content:space-between;
    gap:12px;
    padding:10px 0;
    border-bottom:1px solid var(--line);
}
.user-summary:last-child { border-bottom:0; }
.user-summary span { color:var(--muted); }
.detail-form { margin-top:12px; min-width:min(620px,80vw); }
@media (max-width:720px) {
    .detail-form { min-width:min(540px,82vw); }
    .user-summary { flex-direction:column; gap:3px; }
}
.photo-grid {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(160px,220px));
    gap:14px;
    justify-content:start;
}
.photo-tile {
    display:grid;
    gap:9px;
    min-width:0;
    padding:10px;
    border:1px solid var(--line);
    border-radius:14px;
    background:#f8faf9;
    color:inherit;
    text-decoration:none;
}
.photo-tile img {
    display:block;
    width:100%;
    max-width:220px;
    height:125px;
    object-fit:cover;
    border-radius:10px;
    background:#edf1ef;
}
.photo-tile span,
.photo-tile small { display:block; min-width:0; overflow-wrap:anywhere; }
.photo-tile small { color:var(--muted); margin-top:3px; }
.admin-photo > span { display:grid; gap:7px; }
@media (max-width:380px) {
    .photo-grid { grid-template-columns:1fr; }
}


.manual-entry-grid { display:grid; gap:18px; }
.file-capture-note { margin-top:6px; font-size:.92rem; color:var(--muted); }
@media (max-width: 720px) {
    .manual-entry-grid { grid-template-columns:1fr; }
}


/* ------------------------------------------------------------
   Kamera-/Sprachaufnahme und kompaktere Facto-Prüfung
------------------------------------------------------------ */
.file-capture-row {
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}
.file-capture-row input[type="file"] {
    flex:1 1 260px;
}
.file-capture-row .button {
    flex:0 0 auto;
}
.capture-preview {
    display:grid;
    gap:7px;
    margin-top:10px;
    max-width:260px;
}
.capture-preview img {
    display:block;
    width:100%;
    max-width:220px;
    aspect-ratio:4 / 3;
    object-fit:cover;
    border:1px solid var(--line);
    border-radius:12px;
    background:#eef2f0;
}
.capture-preview audio {
    display:block;
    width:min(100%, 340px);
}
.capture-preview small {
    color:var(--muted);
    overflow-wrap:anywhere;
}

.capture-panel {
    position:fixed;
    inset:0;
    z-index:220;
    display:grid;
    place-items:center;
    padding:18px;
    background:rgba(14,22,27,.82);
}
.capture-dialog {
    width:min(720px,100%);
    max-height:calc(100vh - 36px);
    overflow:auto;
    padding:18px;
    border-radius:18px;
    background:#fff;
    box-shadow:0 25px 80px rgba(0,0,0,.35);
}
.capture-dialog header {
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
    margin-bottom:14px;
}
.capture-dialog header strong,
.capture-dialog header small {
    display:block;
}
.capture-dialog header small {
    margin-top:4px;
    color:var(--muted);
}
.capture-dialog video {
    display:block;
    width:100%;
    max-height:65vh;
    object-fit:contain;
    border-radius:14px;
    background:#10171b;
}
.capture-dialog .actions {
    margin-top:14px;
}
.voice-capture-dialog {
    width:min(560px,100%);
}
.voice-live-indicator {
    display:flex;
    align-items:center;
    gap:10px;
    padding:18px;
    border:1px solid #efb0b0;
    border-radius:14px;
    background:#fff5f5;
    font-weight:800;
}
.voice-live-indicator span {
    width:12px;
    height:12px;
    border-radius:50%;
    background:#c92f2f;
    animation:voicePulse 1.2s ease-in-out infinite;
}
@keyframes voicePulse {
    0%,100% { opacity:.35; transform:scale(.85); }
    50% { opacity:1; transform:scale(1.1); }
}

.accounting-table .facto-cell {
    width:62px;
    text-align:center;
}
.accounting-table .facto-cell form {
    display:flex;
    justify-content:center;
    align-items:center;
    width:auto;
}

@media (max-width:720px) {
    .file-capture-row {
        align-items:stretch;
    }
    .file-capture-row input[type="file"],
    .file-capture-row .button {
        flex:1 1 100%;
        width:100%;
    }
    .capture-dialog {
        padding:14px;
    }
}

.todo-item input.facto-check { width:18px; height:18px; min-width:18px; min-height:18px; }

/* ------------------------------------------------------------
   V8 – Zusatzfunktionen / Ampelsystem / Transkription
------------------------------------------------------------ */
.feature-list { display:grid; gap:10px; }
.feature-toggle-card { display:flex; flex-direction:column; gap:8px; padding:14px 16px; border:1px solid var(--line); border-radius:14px; background:#fff; cursor:pointer; }
.feature-toggle-main { display:flex; align-items:flex-start; gap:12px; }
.feature-toggle-main input[type="checkbox"] { width:22px; height:22px; min-height:22px; flex:0 0 auto; margin-top:1px; }
.feature-toggle-main span { display:flex; flex-direction:column; gap:4px; }
.feature-toggle-main small, .feature-requires { color:var(--muted); font-weight:600; }
.feature-requires { padding-left:34px; }
.sticky-save-bar { position:sticky; bottom:12px; display:flex; justify-content:flex-end; padding:12px; background:rgba(245,247,248,.92); backdrop-filter:blur(8px); border:1px solid var(--line); border-radius:14px; z-index:20; }
.transcript-preview, .transcript-box { margin-top:9px; padding:11px 13px; border-radius:12px; border:1px solid #cfd9df; background:#f6f9fb; color:#33454f; line-height:1.45; }
.transcript-box p { margin:6px 0 0; white-space:pre-wrap; }

body.status-traffic-light .badge::before { content:""; width:8px; height:8px; border-radius:50%; background:#89969e; box-shadow:0 0 0 2px rgba(0,0,0,.04); flex:0 0 auto; }
body.status-traffic-light .badge.active::before { background:#2f9e5b; }
body.status-traffic-light .badge.paused::before { background:#e0a51b; }
body.status-traffic-light .badge.planned::before { background:#6688c6; }
body.status-traffic-light .badge.waiting_parts::before, body.status-traffic-light .badge.warning::before { background:#e0a51b; }
body.status-traffic-light .badge.customer_query::before { background:#d27b2d; }
body.status-traffic-light .badge.workshop_done::before, body.status-traffic-light .badge.done::before { background:#7b5db0; }
body.status-traffic-light .badge.facto_open::before { background:#287eb8; }
body.status-traffic-light .badge.completed::before { background:#8a969d; }
body.status-traffic-light .badge.archived::before { background:#7b858b; }
body.status-traffic-light .badge.active { background:#e4f6ea; color:#17643a; }
body.status-traffic-light .badge.paused { background:#fff3cf; color:#73520b; }
body.status-traffic-light .badge.planned { background:#eaf0fb; color:#34578f; }
body.status-traffic-light .badge.waiting_parts, body.status-traffic-light .badge.warning { background:#fff3cf; color:#73520b; }
body.status-traffic-light .badge.customer_query { background:#fff0df; color:#864a17; }
body.status-traffic-light .badge.workshop_done, body.status-traffic-light .badge.done { background:#f0eafb; color:#62458f; }
body.status-traffic-light .badge.facto_open { background:#e7f2f9; color:#235e82; }
body.status-traffic-light .badge.completed { background:#eef1f2; color:#55636b; }
body.status-traffic-light .badge.archived { background:#eceff1; color:#4f5d65; }
.status-legend { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }

/* ------------------------------------------------------------
   V8.1 - Facto-Arbeitsliste auf der Auftragsbearbeitungsübersicht
------------------------------------------------------------ */
.accounting-worklist-head { align-items:center; }
.accounting-worklist-grid { display:grid; gap:14px; margin-top:16px; }
.facto-order-card {
    border:1px solid var(--line);
    border-radius:15px;
    padding:16px;
    background:#fff;
    display:grid;
    gap:11px;
}
.facto-order-top { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.facto-order-title { font-size:1.08rem; font-weight:950; text-decoration:none; }
.facto-order-title:hover { color:var(--primary); }
.facto-order-description { margin-top:3px; }
.facto-order-count { display:flex; align-items:baseline; gap:7px; white-space:nowrap; }
.facto-order-count strong { font-size:1.15rem; }
.facto-order-count span { color:var(--muted); font-weight:800; font-size:.86rem; }
.facto-progress { height:9px; border-radius:999px; background:#e7ecef; overflow:hidden; }
.facto-progress > span { display:block; height:100%; border-radius:inherit; background:var(--primary); transition:width .25s ease; }
.facto-order-meta { display:flex; align-items:center; flex-wrap:wrap; gap:7px; }
.facto-open-positions { display:grid; gap:7px; border-top:1px solid var(--line); padding-top:10px; }
.facto-position-row { display:grid; grid-template-columns:28px minmax(0,1fr); gap:8px; align-items:start; padding:7px 0; }
.facto-position-icon { font-size:1rem; line-height:1.5; }
.facto-position-row div { min-width:0; display:flex; flex-direction:column; gap:2px; }
.facto-position-row strong { font-size:.92rem; }
.facto-position-row small { color:var(--muted); overflow-wrap:anywhere; }
.facto-order-actions { justify-content:flex-end; }
.compact-alert { margin:0; padding:10px 12px; font-size:.9rem; }

@media (max-width:720px) {
    .accounting-worklist-head, .facto-order-top { align-items:flex-start; flex-direction:column; }
    .facto-order-count { align-self:flex-start; }
    .facto-order-actions .button { width:100%; }
}
.facto-position-row small { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }

/* V8.3 Navigation und Scanner */
.nav-dropdown { position:relative; display:inline-block; }
.nav-dropdown > summary { list-style:none; cursor:pointer; font-weight:800; padding:12px 14px; white-space:nowrap; }
.nav-dropdown > summary::-webkit-details-marker { display:none; }
.nav-dropdown > summary::after { content:' ▾'; font-size:.78em; color:var(--muted); }
.nav-dropdown[open] > summary::after { content:' ▴'; }
.nav-dropdown-menu { position:absolute; z-index:70; top:100%; left:0; min-width:210px; padding:7px; background:#fff; border:1px solid var(--line); border-radius:12px; box-shadow:0 14px 34px rgba(22,35,43,.16); display:grid; gap:3px; }
.nav-dropdown-menu a { display:block; padding:10px 12px; border-radius:9px; }
.nav-dropdown-menu a:hover { background:#eef5f1; }
.terminal-employee-tools { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; align-items:end; margin-top:18px; }
.terminal-employee-tools .terminal-search { max-width:none; margin-top:0; }
.terminal-scan-hit { animation:terminal-scan-pulse 1.6s ease 2; outline:4px solid rgba(47,126,82,.32); }
@keyframes terminal-scan-pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.018)} }
@media (max-width:900px) {
  .nav-dropdown { display:block; width:100%; }
  .nav-dropdown > summary { padding:10px 0; }
  .nav-dropdown-menu { position:static; box-shadow:none; margin:0 0 8px; }
  .terminal-employee-tools { grid-template-columns:1fr; }
}
@media (min-width:901px) {
  .nav-tabs { overflow:visible; flex-wrap:wrap; }
}


/* ------------------------------------------------------------
   V8.5 - Auftragsfilter, Sticky-Legenden und breites Terminalfenster
------------------------------------------------------------ */
.overview-view-filter { min-width:min(100%,340px); }
.overview-view-filter label { display:grid; gap:6px; font-weight:800; }
.orders-plan-filter-grid { grid-template-columns:minmax(0,1.15fr) minmax(340px,.85fr); }
.status-legend-sticky {
    position:fixed;
    left:50%;
    transform:translateX(-50%);
    width:min(1280px,calc(100% - 24px));
    bottom:8px;
    z-index:35;
    align-items:center;
    padding:9px 12px;
    margin:0;
    background:rgba(255,255,255,.96);
    backdrop-filter:blur(9px);
    box-shadow:0 8px 28px rgba(24,35,42,.16);
}
.status-legend-spacer { height:66px; }
.status-legend-sticky strong { margin-right:2px; }
.terminal-status-footer {
    position:fixed;
    left:12px;
    right:12px;
    bottom:6px;
    z-index:35;
    padding:7px 10px;
    gap:7px 12px;
    margin:0;
    border-radius:11px;
    background:rgba(255,255,255,.95);
    backdrop-filter:blur(9px);
    font-size:.78rem;
    box-shadow:0 7px 24px rgba(24,35,42,.14);
}
.terminal-status-footer-spacer { height:54px; }
.terminal-status-footer .status-dot { width:10px; height:10px; min-width:10px; }
.terminal-status-footer span { gap:4px; font-weight:700; }
.accounting-order-finder .finder-result-head { margin:14px 0 8px; }
.accounting-order-filter { margin-top:14px; }
.accounting-complete-hint { margin:0 0 12px; }

.terminal-popup-shell {
    width:calc(100% - 24px);
    max-width:none;
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:14px;
    align-items:start;
    margin:12px auto 28px;
}
.terminal-popup-head-inner { width:calc(100% - 24px); max-width:none; }
.terminal-popup-shell > .hero-card,
.terminal-popup-shell > .alert { grid-column:1 / -1; }
.terminal-popup-column{display:flex;flex-direction:column;gap:14px;min-width:0;align-self:start}
.terminal-popup-section { margin-top:0; min-width:0; }
.terminal-popup-head-actions { display:flex; align-items:center; gap:12px; }
.terminal-popup-head-actions > small { white-space:nowrap; color:#d8e0e4; }
.terminal-note-log-scroll,.order-note-log-scroll{max-height:310px;overflow:auto;display:flex;flex-direction:column;gap:8px;padding-right:3px}
.terminal-note-log-entry,.order-note-log-entry{padding:9px 10px;border:1px solid var(--line);border-radius:10px;background:#f8faf9}
.terminal-note-log-meta,.order-note-log-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:4px;font-size:.78rem}
.terminal-note-log-meta span,.order-note-log-meta span{color:var(--muted);white-space:nowrap}
.terminal-note-log-entry>div:last-child,.order-note-log-text{font-size:.9rem;line-height:1.35}
.order-note-log-card{margin-top:0}

@media (max-width:1180px) {
    .terminal-popup-shell { grid-template-columns:1fr; }
    .terminal-popup-shell > .hero-card,
    .terminal-popup-shell > .alert { grid-column:auto; }
}
@media (max-width:900px) {
    .orders-plan-filter-grid { grid-template-columns:1fr; }
    .terminal-popup-head-actions > small { display:none; }
}


/* ------------------------------------------------------------
   V8.6 - Einheitliche mitlaufende Ampel-Legende
------------------------------------------------------------ */
.status-legend-sticky {
    border:1px solid var(--line);
    border-radius:13px;
}
.status-legend-sticky .badge { white-space:nowrap; }
.status-legend-compact {
    width:min(1180px,calc(100% - 18px));
    bottom:5px;
    padding:6px 9px;
    gap:5px;
    font-size:.76rem;
    border-radius:10px;
}
.status-legend-compact .badge { padding:4px 7px; font-size:.72rem; }
.status-legend-compact + * { scroll-margin-bottom:64px; }
@media (max-width:760px) {
    .status-legend-sticky {
        left:8px;
        right:8px;
        transform:none;
        width:auto;
        bottom:5px;
        max-height:31vh;
        overflow:auto;
    }
    .status-legend-spacer { height:92px; }
    .status-legend-sticky strong { flex-basis:100%; }
    .status-legend-compact { font-size:.72rem; max-height:26vh; }
    .status-legend-compact strong { flex-basis:auto; }
}


/* ------------------------------------------------------------
   V8.7 - Touch-Zahlentastatur für Materialmengen
------------------------------------------------------------ */
.terminal-quantity-keypad {
    position:fixed; inset:0; z-index:120;
    background:rgba(16,24,29,.38);
    display:flex; align-items:flex-end; justify-content:center;
    padding:14px;
}
.terminal-quantity-keypad.hidden { display:none; }
.terminal-quantity-keypad-panel {
    width:min(560px,calc(100vw - 20px));
    border:1px solid var(--line);
    border-radius:18px;
    background:var(--card);
    box-shadow:0 18px 60px rgba(13,25,31,.34);
    padding:14px;
}
.terminal-quantity-keypad-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:10px; }
.terminal-quantity-keypad-head > div { display:flex; flex-direction:column; gap:2px; }
.terminal-quantity-keypad-head small { color:var(--muted); }
.terminal-quantity-keypad-display {
    min-height:58px; display:flex; align-items:center; justify-content:flex-end;
    padding:8px 16px; margin-bottom:10px; border:2px solid var(--line);
    border-radius:13px; background:#fff; color:#18252c; font-size:2rem; font-weight:800;
    overflow:hidden;
}
.terminal-quantity-keypad-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:9px; }
.terminal-quantity-keypad-grid button {
    min-height:64px; border:1px solid #b9c5ca; border-radius:13px;
    background:#fff; color:#15232a; font:inherit; font-size:1.55rem; font-weight:800;
    cursor:pointer; touch-action:manipulation;
}
.terminal-quantity-keypad-grid button:active { transform:scale(.98); background:#eef3f5; }
.terminal-quantity-keypad-grid .qty-key-secondary { background:#eef2f3; }
.terminal-quantity-keypad-grid .qty-key-wide { grid-column:span 1; font-size:1rem; }
.terminal-quantity-keypad-grid .qty-key-done { grid-column:span 2; background:#244f3d; color:#fff; border-color:#244f3d; }
#popup_material_quantity { cursor:pointer; font-size:1.15rem; font-weight:750; }
@media (max-height:650px) {
    .terminal-quantity-keypad-panel { max-height:96vh; overflow:auto; }
    .terminal-quantity-keypad-grid button { min-height:52px; }
}

/* ------------------------------------------------------------
   V9 – Digitale Auftragsannahme [BETA]
------------------------------------------------------------ */
.beta-acceptance-hero { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }
.acceptance-form-wrap { margin-top:18px; }
.paper-intake-editor {
    width:min(1180px,100%); margin:0 auto; padding:22px;
    background:#fff; border:1px solid #cfd5d8; border-radius:18px;
    box-shadow:0 12px 34px rgba(20,34,41,.10); color:#151515;
}
.paper-intake-head { display:grid; grid-template-columns:180px 1fr 300px; gap:18px; align-items:start; margin-bottom:14px; }
.paper-logo-wrap img { width:150px; height:auto; display:block; }
.paper-title { text-align:center; padding-top:26px; display:flex; flex-direction:column; gap:3px; }
.paper-title strong { font-size:1.8rem; letter-spacing:.02em; }
.paper-title small { color:#5c666c; font-weight:800; }
.paper-company { text-align:right; font-size:.78rem; line-height:1.35; display:flex; flex-direction:column; }
.paper-company strong { font-size:.9rem; }
.paper-row { display:grid; border:1px solid #343434; border-radius:0; overflow:hidden; }
.paper-row-three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.paper-row-two { grid-template-columns:repeat(2,minmax(0,1fr)); }
.paper-row > label { border-right:1px solid #343434; border-radius:0; padding:0; gap:0; color:#222; font-size:.82rem; text-align:center; }
.paper-row > label:last-child { border-right:0; }
.paper-row label > input, .paper-row label > select { border:0; border-radius:0; background:rgba(255,255,255,.5); box-shadow:none; text-align:center; min-height:52px; }
.paper-row label::first-line { font-weight:900; }
.paper-row > label { padding-top:6px; }
.paper-peach { background:#f4d9cc; }
.paper-green { background:#dcebd2; }
.paper-blue { background:#d7e4f4; }
.acceptance-employee-picker { display:grid; grid-template-columns:1fr; margin-top:6px; background:rgba(255,255,255,.48); }
.acceptance-employee-picker input, .acceptance-employee-picker select { border:0; border-top:1px solid rgba(0,0,0,.18); border-radius:0; min-height:42px; background:transparent; }
.paper-customer-grid { display:grid; grid-template-columns:.9fr 1.1fr; gap:30px; margin-top:15px; }
.paper-customer-left, .paper-customer-right { display:grid; gap:12px; }
.paper-field { border:1px solid #343434; padding-top:6px; gap:5px; text-align:center; color:#222; font-size:.82rem; }
.paper-field input, .paper-field textarea { border:0; border-top:1px solid rgba(0,0,0,.18); border-radius:0; background:rgba(255,255,255,.52); box-shadow:none; }
.generated-order-number { min-height:52px; display:flex; flex-direction:column; justify-content:center; gap:1px; background:rgba(255,255,255,.5); border-top:1px solid rgba(0,0,0,.18); }
.generated-order-number strong { font-size:1.4rem; }
.generated-order-number small { color:#636b6f; font-size:.7rem; }
.paper-barcode-preview { margin:12px 0 0 auto; width:min(430px,100%); padding:7px 12px 4px; border:1px solid #ccd2d5; background:#fff; text-align:center; }
.paper-barcode-preview > span { display:block; font-size:.72rem; font-weight:900; color:#566269; margin-bottom:2px; }
.order-barcode { width:100%; height:auto; max-height:78px; display:block; }
.paper-work-block { margin-top:14px; border-top:8px solid #5c7831; }
.paper-work-head { display:grid; grid-template-columns:1fr 220px; border:1px solid #343434; border-top:0; background:#dcebd2; font-weight:900; text-align:center; }
.paper-work-head span { padding:8px; border-right:1px solid #343434; }
.paper-work-head span:last-child { border-right:0; }
.paper-work-body { display:grid; grid-template-columns:1fr 220px; border-left:1px solid #343434; border-right:1px solid #343434; border-bottom:1px solid #343434; min-height:260px; }
.paper-work-body > label { gap:0; min-width:0; }
.paper-work-body textarea { min-height:260px; resize:vertical; border:0; border-radius:0; box-shadow:none; padding:15px; line-height:1.5; background:repeating-linear-gradient(to bottom,#fff 0,#fff 38px,#e0e0e0 39px,#fff 40px); }
.paper-work-body .estimate-field { border-left:1px solid #343434; }
.paper-work-body .estimate-field input { border:0; border-radius:0; box-shadow:none; min-height:70px; text-align:center; font-size:1.35rem; font-weight:900; }
.acceptance-voice-row { display:grid; grid-template-columns:1fr auto; gap:12px; align-items:center; padding:12px; border:1px solid #cbd4d8; border-top:0; background:#f7f9fa; }
.acceptance-voice-row > div:first-child { display:flex; flex-direction:column; gap:3px; }
.acceptance-voice-row small { color:var(--muted); font-weight:650; }
.acceptance-voice-row .transcript-preview { grid-column:1/-1; margin:0; }
.visually-hidden-file { position:absolute; width:1px; height:1px; min-height:0; padding:0; opacity:0; pointer-events:none; }
.paper-bottom-options { display:grid; grid-template-columns:1.15fr .85fr; gap:22px; margin-top:14px; align-items:stretch; }
.paper-options-left { display:grid; gap:14px; padding:10px 0; }
.paper-checkbox-row { display:grid; grid-template-columns:auto 1fr 150px auto; gap:9px; align-items:center; font-size:.9rem; }
.paper-checkbox-row input[type="checkbox"] { width:28px; height:28px; min-height:28px; }
.paper-checkbox-row input[type="text"], .paper-checkbox-row input:not([type]) { min-height:44px; }
.parts-choice { display:flex; gap:16px; flex-wrap:wrap; align-items:center; }
.parts-choice label { flex-direction:row; align-items:center; gap:6px; }
.parts-choice input[type="radio"] { width:24px; height:24px; min-height:24px; }
.paper-customer-note { border:1px solid #343434; text-align:center; padding-top:7px; gap:5px; color:#222; }
.paper-customer-note textarea { border:0; border-top:1px solid rgba(0,0,0,.18); border-radius:0; min-height:95px; background:rgba(255,255,255,.52); box-shadow:none; }
.paper-signature-grid { display:grid; grid-template-columns:.8fr 1.25fr 1fr; gap:22px; margin-top:14px; }
.signature-place, .signature-customer, .signature-employee { border:1px solid #343434; min-height:170px; padding:8px; display:flex; flex-direction:column; gap:8px; text-align:center; }
.signature-place span, .signature-employee span { flex:1; display:grid; place-items:center; font-weight:800; }
.signature-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
#customer-signature { width:100%; height:170px; background:#fff; border:1px dashed #8a969d; border-radius:6px; touch-action:none; cursor:crosshair; }
.acceptance-submit-bar { position:sticky; bottom:12px; z-index:32; width:min(1180px,100%); margin:14px auto 0; display:flex; align-items:center; justify-content:space-between; gap:15px; padding:13px 15px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.96); backdrop-filter:blur(10px); box-shadow:0 12px 32px rgba(20,34,41,.16); }
.acceptance-submit-bar > span { display:flex; flex-direction:column; }
.acceptance-submit-bar small { color:var(--muted); }

.touch-keyboard { position:fixed; inset:0; z-index:180; background:rgba(10,17,21,.42); display:flex; align-items:flex-end; justify-content:center; padding:12px; }
.touch-keyboard.hidden { display:none; }
.touch-keyboard-panel { width:min(1040px,calc(100vw - 18px)); max-height:72vh; overflow:auto; padding:12px; border:1px solid var(--line); border-radius:18px; background:#fff; box-shadow:0 24px 70px rgba(0,0,0,.34); }
.touch-keyboard-head { display:flex; justify-content:space-between; gap:10px; align-items:center; margin-bottom:10px; }
.touch-keyboard-head > div { display:flex; flex-direction:column; }
.touch-keyboard-head small { color:var(--muted); }
.touch-keyboard-keys { display:grid; grid-template-columns:repeat(10,minmax(54px,1fr)); gap:7px; }
.touch-keyboard-keys button { min-height:54px; border:1px solid #bec8cd; border-radius:10px; background:#fff; color:#172229; font-size:1.1rem; font-weight:850; touch-action:manipulation; }
.touch-keyboard-keys button:active { transform:scale(.98); background:#eef3f5; }
.touch-keyboard-keys button.secondary { background:#eef1f2; }
.touch-keyboard-keys button.wide { grid-column:span 2; background:#eaf3ed; }

@media (max-width:980px) {
    .paper-intake-head { grid-template-columns:140px 1fr; }
    .paper-company { grid-column:1/-1; text-align:left; }
    .paper-customer-grid, .paper-bottom-options { grid-template-columns:1fr; gap:12px; }
    .paper-work-head, .paper-work-body { grid-template-columns:1fr 160px; }
    .paper-signature-grid { grid-template-columns:1fr; gap:12px; }
    .signature-place,.signature-employee { min-height:90px; }
    .touch-keyboard-keys { grid-template-columns:repeat(7,minmax(48px,1fr)); }
}
@media (max-width:680px) {
    .beta-acceptance-hero, .acceptance-submit-bar { flex-direction:column; align-items:stretch; }
    .paper-intake-editor { padding:10px; border-radius:12px; }
    .paper-intake-head, .paper-row-three, .paper-row-two { grid-template-columns:1fr; }
    .paper-row > label { border-right:0; border-bottom:1px solid #343434; }
    .paper-row > label:last-child { border-bottom:0; }
    .paper-work-head, .paper-work-body { grid-template-columns:1fr; }
    .paper-work-head span, .paper-work-body .estimate-field { border-right:0; border-left:0; border-top:1px solid #343434; }
    .paper-checkbox-row { grid-template-columns:auto 1fr; }
    .paper-checkbox-row input[name="extra_work_limit"] { grid-column:1/-1; }
    .touch-keyboard-keys { grid-template-columns:repeat(5,minmax(46px,1fr)); }
    .touch-keyboard-keys button { min-height:50px; }
}
.acceptance-attachment-card { border-left:5px solid #6d8538; }
.acceptance-attachment-grid > div { display:flex; flex-direction:column; gap:3px; padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:#f8faf9; }
.acceptance-attachment-grid strong { font-size:1rem; }
.acceptance-attachment-grid span { color:var(--muted); font-size:.88rem; }

/* V9.2 – Kundenstamm */
.customer-blocked-text {
    color: #8a1f2d;
    font-weight: 700;
}


/* V9.3 terminal/acceptance adjustments */
.terminal-overdue{animation:terminalOverdueBlink 1s linear infinite;border-color:#d22d2d;background:rgba(210,45,45,.14);}
.terminal-overdue strong,.terminal-overdue small,.terminal-overdue .terminal-timer{color:#8f1010;}
@keyframes terminalOverdueBlink{0%,49%{box-shadow:0 0 0 0 rgba(210,45,45,.45)}50%,100%{box-shadow:0 0 0 4px rgba(210,45,45,.12)}}
.terminal-slider-readout{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:6px 0 8px;color:#4d5b63}
.terminal-slider-readout strong{font-size:1.05rem;color:#11202c}
input[type=range][data-worked-minutes-slider]{width:100%;margin-top:8px}
.touch-keyboard .touch-keyboard-keys{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:8px}
.touch-keyboard .touch-keyboard-keys button{padding:12px 8px;border:1px solid #c7d1d8;border-radius:10px;background:#fff;font-weight:700}
.touch-keyboard .touch-keyboard-keys button.secondary{background:#eef3f7}
.touch-keyboard .touch-keyboard-keys button.wide{grid-column:span 2}
@media (max-width: 860px){.touch-keyboard .touch-keyboard-keys{grid-template-columns:repeat(5,minmax(0,1fr));}}

/* V9.4 - Auftragsbearbeitung: Erfassungsboxen gleichmäßig verteilen */
.ab-entry-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:stretch}
.ab-entry-grid>.card{height:100%;margin:0}
@media (min-width:1400px){.ab-entry-grid{grid-template-columns:repeat(4,minmax(0,1fr));}}
@media (max-width:900px){.ab-entry-grid{grid-template-columns:1fr;}}

/* V9.5 Kundenimport & Kundensuche */
.customer-csv-drop{display:grid;place-items:center;gap:7px;text-align:center;border:2px dashed #9bacb8;border-radius:16px;padding:28px 18px;background:#f8fafb;cursor:pointer;transition:.2s ease}
.customer-csv-drop:hover,.customer-csv-drop.is-dragging{border-color:#2c7a52;background:#eef8f2;transform:translateY(-1px)}
.customer-csv-drop input[type=file]{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.customer-csv-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:50%;background:#e6f2ea;font-size:28px;font-weight:900;color:#21663f}
.customer-import-batches{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px}
.customer-import-batch{display:grid;gap:3px;padding:12px;border:1px solid #d6dfe5;border-radius:12px;text-decoration:none;color:inherit;background:#fff}
.customer-import-batch:hover,.customer-import-batch.is-current{border-color:#629177;background:#f1f8f4}
.compact-list{margin:0;padding-left:18px;display:grid;gap:3px;font-size:.88rem}
.acceptance-customer-number-row{display:grid;grid-template-columns:1fr auto;gap:7px;align-items:end}
.acceptance-customer-search-button{min-width:46px;height:100%;font-size:1.05rem}
.customer-search-dialog{width:min(820px,96vw)}
.customer-search-results{display:grid;gap:8px;max-height:52vh;overflow:auto;margin:12px 0;padding-right:4px}
.customer-search-result{width:100%;display:grid;grid-template-columns:minmax(170px,.8fr) 1.3fr 1fr auto;gap:10px;align-items:center;text-align:left;border:1px solid #d4dde3;background:#fff;border-radius:12px;padding:11px 13px;cursor:pointer;color:#17242d}
.customer-search-result>span{display:flex;gap:9px;align-items:center}.customer-search-result strong{font-size:1rem}.customer-search-result b{font-weight:700}.customer-search-result small{color:#61717c}.customer-search-result em{font-style:normal;font-weight:700;color:#9b1c1c}
.customer-search-result:hover{border-color:#769e87;background:#f6faf7}.customer-search-result.is-selected{border:2px solid #28734c;background:#edf8f1}.customer-search-result.is-blocked{background:#fff5f5}
.customer-search-actions{position:sticky;bottom:-24px;background:#fff;padding-top:12px;border-top:1px solid #e1e7eb}
@media(max-width:760px){.customer-search-result{grid-template-columns:1fr}.customer-search-result>span{flex-wrap:wrap}.customer-admin-grid{grid-template-columns:1fr}}


/* V9.5.3 – Kundenverwaltung */
.grid.customer-find-create-grid{
    display:grid;
    grid-template-columns:minmax(360px,.85fr) minmax(520px,1.35fr);
    gap:16px;
    align-items:start;
    margin-top:16px;
}
.customer-find-create-grid>.card{margin:0;height:auto;min-width:0;}
.customer-find-card,.customer-create-card{overflow:hidden;}
.customer-find-card .section-head,.customer-create-card .section-head{margin-bottom:14px;}
.customer-filter-form{display:flex;flex-direction:column;gap:14px;margin:0;}
.customer-filter-query{display:block;width:100%;margin:0;}
.customer-filter-query input{width:100%;}
.customer-filter-actions,.customer-import-actions,.customer-create-actions,.customer-reset-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:0;}
.customer-filter-actions .button,.customer-import-actions .button,.customer-create-actions .button,.customer-reset-actions .button{min-height:42px;padding:9px 16px;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;}
.button.subtle{background:#f4f7f8;border-color:#d7e0e5;color:#3c4b54}.button.subtle:hover{background:#eaf0f3}
.customer-import-card{overflow:hidden;}
.customer-reset-zone{margin-top:16px;border:1px solid #e2aeb3;background:#fff8f8;box-shadow:none;padding:20px;}
.customer-reset-zone-head{max-width:none;}
.customer-reset-form{display:flex;gap:12px;align-items:flex-end;margin-top:16px;padding-top:16px;border-top:1px solid #efd7da;}
.customer-reset-form>label{display:flex;flex:1 1 460px;min-width:260px;flex-direction:column;gap:7px;margin:0;}
.customer-reset-form>label input{width:100%;}
.customer-reset-actions{flex:0 0 auto;padding:0;}
.customer-reset-actions .button.danger{min-width:190px;margin:0;}
@media(max-width:1050px){.grid.customer-find-create-grid{grid-template-columns:1fr}.customer-reset-form{flex-direction:column;align-items:stretch}.customer-reset-actions{justify-content:flex-start}.customer-reset-form>label{flex-basis:auto}}

/* Foto: Drag & Drop + Klick in derselben Fläche */
.image-drop-zone{position:relative;display:grid;place-items:center;gap:5px;text-align:center;min-height:132px;margin-top:7px;padding:18px;border:2px dashed #9bacb8;border-radius:14px;background:#f8fafb;cursor:pointer;transition:border-color .18s ease,background .18s ease,transform .18s ease;overflow:hidden}
.image-drop-zone:hover,.image-drop-zone:focus,.image-drop-zone.is-dragging{border-color:#2c7a52;background:#eef8f2;outline:none;transform:translateY(-1px)}
.image-drop-zone input[type=file]{position:absolute;inset:0;width:100%;height:100%;min-height:0;opacity:0;cursor:pointer;z-index:2;margin:0;padding:0}
.image-drop-zone>*:not(input){pointer-events:none;position:relative;z-index:1}
.image-drop-icon{font-size:26px;line-height:1}.image-drop-zone small{color:#62737d}.image-drop-name{display:inline-flex;padding:4px 9px;border-radius:999px;background:#e8eef1;color:#344650;font-size:.82rem;font-weight:700;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.voice-record-only{display:grid;gap:8px}.voice-record-only>.actions{margin:0}


/* V9.6 Werkstatt-Workflow */
.employee-capture-compact{display:grid;gap:8px;margin-top:8px}.employee-capture-compact>*{margin-top:0!important}.employee-section-grid{margin-top:8px;align-items:start;gap:8px}.employee-primary-grid{align-items:start;gap:8px}.employee-capture-column{display:grid;gap:8px;align-content:start;min-width:0}.employee-capture-compact .grid{gap:8px}.employee-capture-compact .card{padding:14px 16px;border-radius:14px}.employee-capture-compact .card.compact{padding:11px 13px}.employee-capture-compact h2{margin-bottom:8px}.employee-capture-compact .form-grid{gap:9px}.employee-capture-compact .inline-form{gap:8px}.employee-capture-compact .timer{font-size:clamp(2rem,6vw,3.7rem);margin:5px 0 10px}.employee-capture-compact .mt-12,.employee-capture-compact .mt-16{margin-top:8px}.employee-work-note-card textarea{min-height:76px}.employee-todo-note-card,.employee-work-note-card,.employee-followup-card{display:flex;flex-direction:column;gap:6px}.employee-todo-note-card .todo-list{gap:3px}.employee-todo-note-card .todo-item{padding:6px 0}.employee-active-actions{display:flex;flex-wrap:wrap;gap:6px}.employee-active-actions form{margin:0}.compact-details{margin-top:5px}.compact-details summary{cursor:pointer;font-weight:700}.employee-attachment-list>.component-attachments,.terminal-popup-attachments>.component-attachments{margin-top:0;height:auto}.employee-note-log-card .order-note-log-scroll{max-height:420px;overflow:auto}.employee-order-times-card table{min-width:760px}.workshop-order-view .important{margin-top:10px}.similar-customer-warning{display:grid;gap:5px;padding:12px;margin-bottom:8px}.similar-customer-warning .button{justify-self:start}.terminal-slider-readout{margin:4px 0 6px}
.employee-attachment-rows{display:grid;border:1px solid var(--line);border-radius:10px;overflow:hidden}.employee-attachment-rows>.muted{margin:0;padding:10px 12px}.employee-attachment-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 10px;padding:9px 11px;background:var(--surface)}.employee-attachment-row+.employee-attachment-row{border-top:1px solid var(--line)}.employee-attachment-row>a{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;color:var(--primary-strong)}.employee-attachment-row>span{color:var(--muted);font-size:.8rem;white-space:nowrap}.employee-attachment-row>small{grid-column:1/-1;color:var(--muted);overflow-wrap:anywhere}.employee-capture-compact .voice-card{height:auto;align-self:start}.employee-capture-compact .voice-card .audio-recorder{display:grid;gap:8px}.employee-capture-compact .voice-card .audio-recorder>p{margin:0}.employee-capture-compact .voice-card .audio-recorder label{margin:0}
@media(max-width:720px){.employee-attachment-row{grid-template-columns:minmax(0,1fr)}.employee-attachment-row>span{white-space:normal}.employee-attachment-row>small{grid-column:auto}}


/* V10 Auftragserfassung */
.field-needs-attention{animation:katFieldAttention 1s ease-in-out infinite;border-radius:8px;outline:3px solid rgba(190,35,35,.2)}
@keyframes katFieldAttention{0%,100%{background:transparent}50%{background:#ffd9d9}}
.switch-inline{display:flex;align-items:center;gap:8px;margin:0}.switch-inline input{width:22px;height:22px}
.touch-keyboard.calculator-keyboard .touch-keyboard-panel{max-width:430px}
.touch-keyboard.calculator-keyboard .touch-keyboard-keys{grid-template-columns:repeat(3,minmax(72px,1fr))}
.touch-keyboard.calculator-keyboard .touch-keyboard-keys button{font-size:1.35rem;min-height:62px}


/* V10.1 – kompakteres AB-Cockpit, einheitliche Navigation und Live-Suche */
.nav-tabs .nav-dropdown>summary{
  padding:14px 16px;
  font-weight:700;
  color:#3c4a53;
  line-height:inherit;
  border-radius:0;
}
.nav-tabs .nav-dropdown>summary:hover{color:var(--primary);}
.nav-tabs .nav-dropdown>summary::after{font-size:.72em;color:currentColor;opacity:.72;}
.accounting-worklist{padding:16px;}
.accounting-worklist-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:10px;}
.facto-order-card{padding:11px 12px;border-radius:12px;gap:7px;}
.facto-order-top{gap:9px;}
.facto-order-title{font-size:1rem;}
.facto-order-description{font-size:.86rem;margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:52ch;}
.facto-order-count strong{font-size:1.02rem;}
.facto-progress{height:6px;}
.facto-order-meta{gap:5px;}
.facto-open-positions{gap:2px;padding-top:6px;max-height:138px;overflow:auto;}
.facto-position-row{grid-template-columns:22px minmax(0,1fr);gap:5px;padding:3px 0;}
.facto-position-row strong{font-size:.84rem;}
.facto-position-row small{font-size:.78rem;-webkit-line-clamp:1;}
.facto-order-actions{margin-top:1px;}
.overview-live-search{display:grid;grid-template-columns:auto minmax(220px,1fr) auto;align-items:center;gap:10px;padding:10px 14px;border:1px solid var(--line);border-radius:12px;background:#fff;box-shadow:var(--shadow);}
.overview-live-search label{margin:0;white-space:nowrap;}
.overview-live-search input{min-width:0;margin:0;}
tr[hidden]{display:none!important;}
@media(max-width:1100px){.accounting-worklist-grid{grid-template-columns:1fr;}}
@media(max-width:720px){
  .overview-live-search{grid-template-columns:1fr;gap:6px;}
  .overview-live-search label{white-space:normal;}
  .nav-tabs .nav-dropdown>summary{padding:10px 0;}
}


/* V10.2 – Textbausteine in der Auftragsannahme */
.acceptance-editor-layout{
  width:min(1660px,100%);
  margin:0 auto;
  display:grid;
  grid-template-columns:minmax(390px,470px) minmax(0,1fr);
  gap:16px;
  align-items:start;
}
.acceptance-editor-layout.acceptance-editor-layout-no-blocks{grid-template-columns:1fr;max-width:1180px}
.acceptance-editor-layout .paper-intake-editor{width:100%;margin:0}
.acceptance-text-block-panel{
  position:sticky;
  top:132px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
  box-shadow:0 10px 28px rgba(20,34,41,.08);
}
.acceptance-text-block-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:6px}
.acceptance-text-block-head h2{margin:2px 0 0;font-size:1.15rem}
.acceptance-text-block-help{margin:0 0 12px;font-size:.86rem;line-height:1.35}
.acceptance-text-block-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.acceptance-text-block-option{
  min-width:0;
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  grid-template-areas:"check copy" "price price";
  gap:7px 8px;
  align-items:start;
  padding:10px;
  border:1px solid #d3dde2;
  border-radius:12px;
  background:#f8fafb;
  cursor:pointer;
  transition:border-color .15s ease,background .15s ease,transform .15s ease,box-shadow .15s ease;
}
.acceptance-text-block-option:hover{border-color:#98ada0;background:#f2f8f4;transform:translateY(-1px)}
.acceptance-text-block-option.is-selected{border-color:#4d835e;background:#eaf5ed;box-shadow:0 0 0 2px rgba(77,131,94,.10)}
.acceptance-text-block-option>input{grid-area:check;width:23px;height:23px;min-height:23px;margin:1px 0 0}
.acceptance-text-block-copy{grid-area:copy;display:flex;flex-direction:column;gap:3px;min-width:0}
.acceptance-text-block-copy strong{font-size:.92rem;line-height:1.18;min-width:0;max-width:100%;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere;word-break:break-word}
.acceptance-text-block-copy small{font-size:.76rem;line-height:1.28;color:#63717a;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.acceptance-text-block-option>b{grid-area:price;justify-self:end;font-size:.92rem;color:#295c3a}
.acceptance-text-block-total{margin-top:10px;padding:10px 12px;border-radius:11px;background:#edf4ef;display:flex;align-items:center;justify-content:space-between;gap:10px}
.acceptance-text-block-total span{font-weight:750;color:#526069}
.acceptance-text-block-total strong{font-size:1.1rem;color:#245637;white-space:nowrap}
.acceptance-text-block-preview{margin:8px 10px 10px;padding:10px 12px;border:1px solid #bed3c4;border-radius:10px;background:#f1f8f3;text-align:left;font-size:.82rem;line-height:1.35}
.acceptance-text-block-preview strong{display:block;margin-bottom:5px;color:#315c3d}
.acceptance-text-block-preview ul{margin:0;padding-left:18px}
.acceptance-submit-actions{display:flex;align-items:center;justify-content:flex-end;gap:9px;flex-wrap:wrap}
.acceptance-keyboard-control{min-height:46px;padding:7px 11px;border:1px solid #cbd5db;border-radius:10px;background:#f5f8f9;display:flex;align-items:center;gap:10px;cursor:pointer;white-space:nowrap;font-size:.88rem;font-weight:750}
.acceptance-keyboard-control>.switch-inline{display:flex;align-items:center;gap:6px}

.config-text-block-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.config-text-block-row{padding:13px;border:1px solid var(--line);border-radius:14px;background:#f9fbfb}
.config-text-block-row-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.config-text-block-row .form-grid.compact{gap:9px}
.config-text-block-row{transition:opacity .12s ease,transform .12s ease,border-color .12s ease}
.config-text-block-row.is-dragging{opacity:.55;border-color:#6f9879;transform:scale(.995)}
.config-service-order,.config-service-actions{display:flex;align-items:center;gap:7px}
.config-service-drag{border:0;background:transparent;font-size:1.25rem;line-height:1;cursor:grab;color:#65747c;padding:4px 6px}
.config-service-drag:active{cursor:grabbing}
.config-service-order [data-service-position]{color:var(--muted);font-size:.78rem;margin-left:4px}

@media(max-width:1320px){
  .acceptance-editor-layout{grid-template-columns:1fr}
  .acceptance-text-block-panel{position:static}
  .acceptance-text-block-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:900px){
  .acceptance-text-block-grid,.config-text-block-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  .acceptance-submit-bar{bottom:8px}
}
@media(max-width:680px){
  .acceptance-text-block-grid,.config-text-block-list{grid-template-columns:1fr}
  .acceptance-submit-actions{width:100%;justify-content:stretch}
  .acceptance-submit-actions>.button,.acceptance-keyboard-control{flex:1 1 100%;justify-content:center}
}


/* V10.2.1 – breite Auftragsannahme, zentrierter Auftrag und kompakter Tastaturschalter */
.shell.shell-acceptance-wide{
  width:calc(100% - 20px);
  max-width:none;
  margin-left:auto;
  margin-right:auto;
}
.shell-acceptance-wide .acceptance-editor-layout{
  width:100%;
  max-width:none;
  grid-template-columns:minmax(220px,1fr) minmax(700px,1180px) minmax(220px,1fr);
  gap:14px;
}
.shell-acceptance-wide .acceptance-text-block-panel{grid-column:1;}
.shell-acceptance-wide .paper-intake-editor{grid-column:2;max-width:1180px;justify-self:center;}
.shell-acceptance-wide .acceptance-editor-layout.acceptance-editor-layout-no-blocks{
  display:block;
  max-width:1180px;
  margin-left:auto;
  margin-right:auto;
}
.acceptance-keyboard-control{
  min-height:34px;
  padding:3px 7px;
  gap:6px;
  border-radius:8px;
  font-size:.76rem;
  font-weight:700;
}
.acceptance-keyboard-control .switch-inline input{width:16px;height:16px;min-height:16px;}
.acceptance-keyboard-control .switch-inline{gap:4px;font-size:.74rem;}
@media(max-width:1180px){
  .shell-acceptance-wide .acceptance-editor-layout{grid-template-columns:1fr;}
  .shell-acceptance-wide .acceptance-text-block-panel,
  .shell-acceptance-wide .paper-intake-editor{grid-column:1;}
}
@media(max-width:680px){
  .acceptance-submit-actions>.acceptance-keyboard-control{flex:0 0 auto;width:auto;align-self:flex-end;}
}
@media (min-width:1181px) and (max-width:1320px){
  .shell-acceptance-wide .acceptance-text-block-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}


/* V10.3 – Statistik, Termindringlichkeit und Kamera-Notizen */
.stats-main-grid{align-items:start}.stats-column{display:grid;gap:0;min-width:0}.stats-scroll-five{max-height:365px;overflow-y:auto}.stats-scroll-five thead th,.stats-daily-scroll thead th{position:sticky;top:0;z-index:2;background:#fff}.stats-order-description{display:block;max-width:420px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.stats-live-filter{min-width:min(320px,100%);margin:0}.stats-filter-result{margin:8px 0 0}.stats-daily-scroll{overflow-y:auto}
.terminal-order-title-line,.employee-order-title-line,.ab-todo-order-line{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.terminal-order-date{font-size:.72rem;font-weight:850;color:#58666e}.terminal-order-due-warning{background:#fff8df;border-color:#dfbd55}.terminal-order-due-danger{background:#ffe8e8;border-color:#ce5a5a}.terminal-order-due-warning:hover,.terminal-order-due-warning:focus-visible{background:#fff2c0}.terminal-order-due-danger:hover,.terminal-order-due-danger:focus-visible{background:#ffd8d8}
.badge.due-date::before{display:none}.badge.due-date{white-space:nowrap}.badge.due-date-normal{background:#eef3ff;color:#365a9e}.badge.due-date-warning{background:#fff3cf;color:#73520b}.badge.due-date-danger{background:#ffe2e2;color:#9b2424}.due-date-blink{animation:dueDatePulse 1.15s ease-in-out infinite}@keyframes dueDatePulse{0%,100%{box-shadow:0 0 0 0 rgba(190,35,35,.08)}50%{box-shadow:0 0 0 4px rgba(190,35,35,.22);background:#ffd1d1}}
.employee-order-title-line{justify-content:flex-start}.employee-order-due-warning{background:#fffdf4;border-color:#ead384}.employee-order-due-danger{background:#fff3f3;border-color:#e3a2a2}.note-photo-inputs{display:grid;gap:10px}.note-camera-actions{margin:0}.note-camera-button{cursor:pointer}.ab-todo-item>span{display:grid;gap:5px;width:100%}.ab-todo-order-line{justify-content:flex-start}
@media(max-width:720px){.stats-live-filter{width:100%}.stats-scroll-five{max-height:345px}.terminal-order-title-line{align-items:flex-start}.note-camera-button{width:100%}}


/* V10.3.3 – Dashboard-Anordnung, kompakte AB-Todos und einheitliche UI-Abstände */
.dashboard-top-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(340px,.65fr);gap:16px;align-items:stretch}.dashboard-top-grid>.card{margin:0}.dashboard-hero-card{height:100%}.dashboard-current-work-card{min-width:0;height:100%;padding:18px}.dashboard-current-work-card h2{margin-bottom:0}.dashboard-current-list{display:grid;gap:8px;max-height:148px;overflow-y:auto;padding-right:3px}.dashboard-current-list .card.compact{padding:10px 12px;box-shadow:none;text-decoration:none}.dashboard-order-finder{padding:0;overflow:hidden;scroll-margin-top:142px}.dashboard-collapse-summary{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 20px;cursor:pointer;list-style:none}.dashboard-collapse-summary::-webkit-details-marker{display:none}.dashboard-collapse-summary::after{content:'▾';font-size:1.05rem;font-weight:900;color:var(--primary);transition:transform .16s ease}.dashboard-order-finder[open]>.dashboard-collapse-summary::after{transform:rotate(180deg)}.dashboard-collapse-summary h2{margin:0}.dashboard-summary-hint{display:block;margin-top:3px;font-size:.86rem}.dashboard-summary-meta{margin-left:auto;padding:5px 9px;border-radius:999px;background:var(--surface-2);font-size:.78rem;font-weight:900;white-space:nowrap}.dashboard-collapse-body{padding:0 20px 20px;border-top:1px solid var(--line)}.dashboard-finder-intro{align-items:center;padding-top:14px}.dashboard-finder-intro p{margin:0;max-width:920px}.dashboard-action-grid{align-items:stretch}.dashboard-action-card{min-width:0;min-height:0}.ab-todo-card{display:grid;grid-template-rows:auto minmax(0,1fr);min-height:0;overflow:hidden}.ab-todo-scroll{min-height:0;max-height:none;overflow-y:auto;padding-right:4px;margin-top:4px;align-content:start}.ab-todo-item{padding:10px 4px;text-decoration:none}.ab-todo-copy{line-height:1.35}.ab-todo-status-date{display:flex;align-items:center;gap:6px;flex-wrap:nowrap;white-space:nowrap}.ab-todo-status-date .badge{font-size:.72rem;padding:4px 7px}.dashboard-planned-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.dashboard-planned-list>.card{box-shadow:none;text-decoration:none}.accounting-worklist{scroll-margin-top:142px}
@media(max-width:980px){.dashboard-top-grid{grid-template-columns:1fr}.dashboard-current-list{max-height:220px}.dashboard-planned-list{grid-template-columns:1fr}}
@media(max-width:720px){.dashboard-collapse-summary{align-items:flex-start;padding:14px 16px}.dashboard-collapse-body{padding:0 16px 16px}.dashboard-summary-meta{display:none}.dashboard-finder-intro{align-items:flex-start;flex-direction:column}.dashboard-finder-intro .button{width:100%}.ab-todo-card{display:block;overflow:visible}.ab-todo-scroll{max-height:none}.ab-todo-status-date{flex-wrap:wrap;white-space:normal}.overview-hero-card{padding:16px}}


/* V10.3.4 – Kundennummer, volle AB-Todo-Breite und einklappbare Auftragsfotos */
.ab-todo-scroll{width:100%;grid-template-columns:minmax(0,1fr)}
.ab-todo-item{width:100%;box-sizing:border-box}
.ab-todo-item>span,.ab-todo-order-line{min-width:0}
.acceptance-customer-supplement{font-weight:850;color:var(--primary)}
.photo-collapsible{padding:0;overflow:hidden}
.photo-collapsible-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 20px;cursor:pointer;list-style:none}
.photo-collapsible-summary::-webkit-details-marker{display:none}
.photo-collapsible-summary::after{content:'▾';font-size:1.05rem;font-weight:900;color:var(--primary);transition:transform .16s ease}
.photo-collapsible[open]>.photo-collapsible-summary::after{transform:rotate(180deg)}
.photo-collapsible-summary h2{margin:0;flex:1}
.photo-collapsible-summary .badge{margin-left:auto}
.photo-collapsible-body{padding:0 20px 20px;border-top:1px solid var(--line)}
.photo-collapsible-body>p:first-child{margin-top:16px}
@media(max-width:720px){.photo-collapsible-summary{padding:16px}.photo-collapsible-body{padding:0 16px 16px}}


/* V10.3.6 – konfigurierbare Bezeichnungen, kompakte Leistungen & internes KV-Modal */
.config-label-grid label small{display:block;margin-top:4px;color:var(--muted);font-size:.72rem;font-weight:600}
.acceptance-estimate-overwrite-dialog{width:min(520px,100%)}
.acceptance-estimate-overwrite-dialog>p{margin:8px 0 14px}
.acceptance-estimate-summary{display:grid;gap:8px;margin:14px 0 16px}
.acceptance-estimate-summary>div{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#f7f9fa}
.acceptance-estimate-summary span{color:var(--muted);font-size:.86rem}
.acceptance-estimate-summary strong{white-space:nowrap}
.acceptance-estimate-summary .is-total{background:#edf5ef;border-color:#b9d1bf}
.acceptance-estimate-summary .is-total strong{font-size:1.15rem;color:#245637}
@media(max-width:420px){
  .acceptance-text-block-option{padding:8px;gap:6px}
  .acceptance-text-block-copy strong{font-size:.86rem}
  .acceptance-text-block-option>b{font-size:.86rem}
}

/* V10.3.8 – frei erweiterbare Mengeneinheiten */
.config-unit-row{display:flex;align-items:flex-end;gap:8px;min-width:0}.config-unit-row>label{flex:1;min-width:0}.config-unit-row>.button{flex:0 0 auto;margin-bottom:1px}
@media(max-width:620px){.config-unit-row{align-items:stretch;flex-direction:column}.config-unit-row>.button{align-self:flex-start}}

/* V11: Terminalkarten bleiben immer in der sichtbaren Fensterhöhe und werden
   auch bei wenigen sichtbaren Mitarbeitern nicht künstlich gestreckt. */
.terminal-user-card {
    height: max-content;
    max-height: calc(100dvh - 150px);
    overflow: auto;
    align-self: start;
}
@media (max-height: 760px) and (min-width: 721px) {
    .terminal-user-card { max-height: calc(100dvh - 112px); }
}
@media (max-width: 720px) {
    .terminal-user-card { max-height: none; overflow: visible; }
}

.external-number-preview {
    display:flex;
    align-items:center;
    gap:10px 16px;
    flex-wrap:wrap;
    padding:14px 16px;
    border:1px solid var(--line);
    border-radius:14px;
    background:#f7faf8;
}
.external-number-preview strong { font-size:1.35rem; }
.external-number-preview small { color:var(--muted); }
.external-acceptance-hero .badge { vertical-align:middle; }

/* V11.0.1 – externe Annahmestandorte und kompakte Terminalkarten */
.settings-repeat-list { display:grid; gap:9px; }
.settings-repeat-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:9px; align-items:center; }
.external-location-row { margin-top:-1px; }
.external-location-row .paper-empty-cell { min-height:64px; border-right:1px solid #343434; background:var(--paper-peach,#f4d9cc); }
.external-location-row .paper-empty-cell:last-child { border-right:0; }
@media (max-width:680px) {
  .settings-repeat-row { grid-template-columns:1fr; }
  .external-location-row .paper-empty-cell { display:none; }
}

@media (min-width:721px) {
  .terminal-grid {
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    align-items:flex-start;
    gap:16px;
  }
  .terminal-user-card {
    flex:0 1 430px;
    width:min(430px,calc(100vw - 48px));
    max-width:430px;
    grid-row:auto !important;
  }
  .terminal-user-card-free {
    grid-column:auto;
    flex-basis:400px;
    width:min(400px,calc(100vw - 48px));
    max-width:400px;
    justify-self:auto;
  }
}

/* V11.0.2 – isolierte externe Auftragsannahme / Auftragsübersicht */
.external-module-nav{justify-content:center}
.external-orders-head{display:flex;align-items:center;justify-content:space-between;gap:20px}
.external-orders-head h1{margin:0 0 6px}
.external-orders-head p{margin:0}
.external-orders-kpis{display:grid;grid-template-columns:repeat(4,minmax(82px,1fr));gap:8px;min-width:min(100%,390px)}
.external-orders-kpis span{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:68px;padding:8px 10px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2)}
.external-orders-kpis strong{font-size:1.25rem;line-height:1}
.external-orders-kpis small{margin-top:5px;color:var(--muted);font-weight:700}
.external-orders-filter-card{margin-top:16px}
.external-orders-filter-grid{display:grid;grid-template-columns:minmax(260px,2fr) minmax(180px,1fr) minmax(180px,1fr);gap:12px;align-items:end}
.external-orders-filter-result{margin-top:10px;color:var(--muted);font-size:.9rem}
.external-orders-list-card{margin-top:16px;padding:0;overflow:hidden}
.external-orders-table-wrap{max-height:calc(100vh - 300px);min-height:260px;overflow:auto}
.external-orders-table{min-width:1120px;margin:0}
.external-orders-table thead th{position:sticky;top:0;z-index:2;background:var(--surface)}
.external-orders-table tbody tr[data-external-order]{border-top:1px solid var(--line)}
.external-orders-table tbody tr[data-external-order]:hover{background:#fafcfc}
.external-order-status-stack{align-items:flex-start}
.external-order-actions{white-space:nowrap}
.external-order-detail-row td{padding:0 12px 10px;background:#fafcfc}
.external-order-details{border:1px solid var(--line);border-radius:12px;background:var(--surface);overflow:hidden}
.external-order-details summary{cursor:pointer;padding:10px 12px;font-weight:850;list-style-position:inside}
.external-order-details[open] summary{border-bottom:1px solid var(--line);background:var(--surface-2)}
.external-order-detail-grid{display:grid;grid-template-columns:repeat(3,minmax(160px,1fr));gap:10px;padding:12px}
.external-order-detail-grid>div{display:flex;flex-direction:column;gap:3px;padding:9px 10px;border:1px solid var(--line);border-radius:10px;background:#fff}
.external-order-detail-grid span{font-size:.76rem;color:var(--muted);font-weight:750}
.external-order-detail-grid strong{font-size:.92rem}
.external-order-detail-text{padding:0 12px 12px}
.external-order-detail-text p{margin:5px 0 0;white-space:normal}
.external-orders-no-results{padding:28px;text-align:center;color:var(--muted)}
@media (max-width:900px){
    .external-orders-head{align-items:stretch;flex-direction:column}
    .external-orders-kpis{min-width:0;width:100%}
    .external-orders-filter-grid{grid-template-columns:1fr}
    .external-order-detail-grid{grid-template-columns:repeat(2,minmax(140px,1fr))}
    .external-orders-table-wrap{max-height:none}
}
@media (max-width:560px){
    .external-orders-kpis{grid-template-columns:repeat(2,1fr)}
    .external-order-detail-grid{grid-template-columns:1fr}
}

/* V11.0.3 – luftigere externe Übersicht und viewportgerechte Terminalkarten */
.external-overview-hero .order-card-head{align-items:center}
.external-overview-kpis .kpi{min-height:118px}
.external-overview-search{grid-template-columns:auto minmax(320px,1fr) auto}
.external-overview-filter-card{padding:14px 16px}
.external-overview-filter-grid{display:grid;grid-template-columns:minmax(220px,.8fr) minmax(220px,.8fr) minmax(180px,1fr);gap:16px;align-items:end}
.external-overview-filter-count{display:flex;align-items:center;justify-content:flex-end;gap:5px;min-height:46px;color:var(--muted)}
.external-overview-list-card{padding:18px 20px}
.external-overview-table{margin-top:12px}
.external-overview-table table{min-width:1320px}
.external-overview-table th,.external-overview-table td{padding:13px 15px}
.external-overview-table tbody tr[data-external-order]:hover{background:#fafcfc}
.external-overview-actions{min-width:190px}
.external-overview-actions .actions{flex-wrap:nowrap}
.external-overview-detail-row td{padding:0 14px 14px;background:#fafcfc}
.external-overview-detail-row[hidden]{display:none}

.terminal-hero h1{font-size:clamp(1.5rem,2.5vw,2.15rem)}
@media (min-width:721px){
  .terminal-grid{gap:18px 20px;padding-inline:12px}
  .terminal-user-card{
    flex:0 1 470px;
    width:min(470px,calc(100vw - 56px));
    max-width:470px;
    overflow:auto;
  }
  .terminal-user-card-free{
    flex-basis:450px;
    width:min(450px,calc(100vw - 56px));
    max-width:450px;
  }
}
@media (max-width:900px){
  .external-overview-search{grid-template-columns:1fr}
  .external-overview-filter-grid{grid-template-columns:1fr 1fr}
  .external-overview-filter-count{grid-column:1/-1;justify-content:flex-start;min-height:0}
}
@media (max-width:620px){
  .external-overview-hero .order-card-head{align-items:stretch;flex-direction:column}
  .external-overview-hero .button{width:100%}
  .external-overview-filter-grid{grid-template-columns:1fr}
  .external-overview-filter-count{grid-column:auto}
}

/* V11.0.3 – schreibgeschützte Auftragsansicht aus dem externen Modul */
.external-order-read-hero .order-card-head{align-items:center}
.external-order-read-kpis .kpi{min-height:118px}
.external-order-read-kpi-text{font-size:1.15rem;line-height:1.2}
.external-order-read-grid{display:grid;grid-template-columns:repeat(4,minmax(170px,1fr));gap:12px}
.external-order-read-grid>div{display:flex;flex-direction:column;gap:4px;padding:12px 13px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2)}
.external-order-read-grid span{font-size:.78rem;color:var(--muted);font-weight:750}
.external-order-read-grid strong{font-size:.94rem}
.external-order-read-columns{align-items:start}
@media(max-width:1050px){.external-order-read-grid{grid-template-columns:repeat(2,minmax(160px,1fr))}}
@media(max-width:620px){.external-order-read-grid{grid-template-columns:1fr}.external-order-read-hero .order-card-head{align-items:stretch;flex-direction:column}.external-order-read-hero .actions{width:100%}.external-order-read-hero .button{flex:1 1 auto}}


/* V11.0.7 – Dashboard: maximal sieben AB-Todos sichtbar, danach Scrollbereich */
.ab-todo-scroll.is-scroll-limited{
    max-height:var(--ab-todo-max-height);
    overflow-y:auto;
    overscroll-behavior:contain;
    scrollbar-gutter:stable;
}


/* V11.1: kompakter Terminal-Kopf und eingeklappte neue Aufträge */
.terminal-hero{padding:15px 18px}
.terminal-hero>.order-card-head{align-items:center;gap:10px}
.terminal-hero>.order-card-head h1{font-size:clamp(1.32rem,2.25vw,1.85rem);line-height:1.08;margin:0}
.terminal-hero .terminal-employee-tools{margin-top:11px;gap:10px}
.dashboard-new-orders-card{padding:0;overflow:hidden}
.dashboard-new-orders-card[open]>.dashboard-collapse-summary::after{transform:rotate(180deg)}
@media(max-width:720px){.terminal-hero{padding:13px 14px}}


/* V13 BETA – Kanban-Auftragsübersicht */
.kanban-preview-note{margin-bottom:16px}.kanban-hero{margin-bottom:16px}.kanban-hero .order-card-head{align-items:center}.kanban-hero h1{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.kanban-hero h1 .badge{font-size:.72rem;vertical-align:middle}.kanban-legend{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.kanban-legend span{padding:6px 9px;border:1px solid var(--line);border-radius:999px;background:#fff;font-size:.8rem;font-weight:800;white-space:nowrap}
.kanban-board{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(270px,310px);gap:14px;overflow-x:auto;align-items:start;padding:2px 2px 18px;scrollbar-gutter:stable}.kanban-column{display:grid;grid-template-rows:auto minmax(160px,1fr);min-height:360px;max-height:calc(100vh - 220px);background:#eef2f3;border:1px solid var(--line);border-radius:16px;overflow:hidden;transition:border-color .14s ease,box-shadow .14s ease,transform .14s ease}.kanban-column.is-drop-target{border-color:var(--primary);box-shadow:0 0 0 3px rgba(44,110,73,.14);transform:translateY(-1px)}.kanban-column-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 13px;background:#fff;border-bottom:1px solid var(--line)}.kanban-column-head>div{display:flex;align-items:center;gap:8px;min-width:0}.kanban-column-head strong{font-size:.92rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kanban-count{min-width:30px;justify-content:center}.kanban-status-dot{width:10px;height:10px;border-radius:50%;background:#81909a;flex:0 0 auto}.kanban-status-planned .kanban-status-dot{background:#6688c6}.kanban-status-active .kanban-status-dot{background:#2c6e49}.kanban-status-waiting_parts .kanban-status-dot{background:#bf8a2f}.kanban-status-customer_query .kanban-status-dot{background:#b05f78}.kanban-status-workshop_done .kanban-status-dot{background:#498f8b}.kanban-status-facto_open .kanban-status-dot{background:#8a63a9}.kanban-status-completed .kanban-status-dot{background:#52656f}.kanban-status-archived .kanban-status-dot{background:#8b9296}.kanban-column-body{display:flex;flex-direction:column;gap:9px;min-height:180px;padding:10px;overflow-y:auto}.kanban-empty{display:grid;place-items:center;min-height:92px;padding:14px;border:1px dashed #c7d0d5;border-radius:12px;color:var(--muted);font-size:.84rem;text-align:center}.kanban-card{background:#fff;border:1px solid #d6dee2;border-radius:13px;padding:11px 12px;box-shadow:0 5px 15px rgba(21,35,43,.06);cursor:grab;transition:opacity .12s ease,transform .12s ease,box-shadow .12s ease}.kanban-card:hover{box-shadow:0 8px 20px rgba(21,35,43,.10)}.kanban-card:active{cursor:grabbing}.kanban-card.is-dragging{opacity:.45;transform:rotate(1deg)}.kanban-card.kanban-due-warning{border-left:4px solid #d8a43c;background:#fffaf0}.kanban-card.kanban-due-danger{border-left:4px solid #bd4b4b;background:#fff4f4}.kanban-card-number{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:9px}.kanban-card-number a{font-weight:900;text-decoration:none;color:var(--ink)}.kanban-card-number a:hover{color:var(--primary)}.kanban-drag-handle{color:#96a1a7;font-size:1.15rem;line-height:1}.kanban-card-meta{display:grid;gap:5px;margin:0}.kanban-card-meta>div{display:grid;grid-template-columns:74px minmax(0,1fr);gap:8px;align-items:baseline}.kanban-card-meta dt{font-size:.72rem;text-transform:uppercase;letter-spacing:.035em;color:var(--muted);font-weight:800}.kanban-card-meta dd{margin:0;font-size:.84rem;font-weight:800;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kanban-mobile-status{display:none;margin-top:10px;font-size:.75rem;font-weight:800;color:var(--muted)}.kanban-mobile-status select{margin-top:4px}.toast.error{background:#7d2d2d}
@media (max-width:900px){.kanban-board{grid-auto-columns:minmax(255px,86vw)}.kanban-column{max-height:calc(100vh - 205px)}.kanban-card{cursor:default}.kanban-drag-handle{display:none}.kanban-mobile-status{display:block}.kanban-legend{display:none}}

/* V13.0.3 – Kanban bleibt bis 1980 px auf einer lesbaren Arbeitsbreite. */
.shell.shell-kanban-wide{width:calc(100% - 24px);max-width:none}
.kanban-scroll-wrap{width:100%;max-width:100%;overflow:visible}
.kanban-board{grid-auto-flow:row;grid-auto-columns:auto;grid-template-columns:repeat(var(--kanban-columns),minmax(0,1fr));gap:10px;overflow:visible;padding:2px 2px 16px}
.kanban-column{min-width:0}
.kanban-column-head{padding:10px 10px;gap:7px}
.kanban-column-head strong{font-size:.86rem}
.kanban-column-body{padding:8px;gap:8px}
.kanban-card{min-width:0;padding:10px 11px}
.kanban-card-number{gap:7px;margin-bottom:8px}
.kanban-card-number a{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.kanban-card-meta{gap:6px}
.kanban-card-meta>div{grid-template-columns:84px minmax(0,1fr);gap:8px;align-items:center;min-width:0}
.kanban-card-meta dt{font-size:.67rem;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.kanban-card-meta dd{font-size:.79rem;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.kanban-facto{margin-top:9px;padding-top:8px;border-top:1px solid #e6ebee}
.kanban-facto-head{display:grid;grid-template-columns:auto auto minmax(0,1fr);align-items:center;gap:5px;font-size:.68rem;line-height:1.2;color:var(--muted)}
.kanban-facto-head strong{color:var(--ink);font-size:.73rem}
.kanban-facto-head span:last-child{text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kanban-facto-open{color:#9b651a;font-weight:800}
.kanban-facto-progress{height:5px;margin-top:5px}

/* Unter 1980 px werden die Spalten nicht mehr zusammengestaucht, sondern horizontal gescrollt. */
@media (max-width:1979px){
  .shell.shell-kanban-wide{width:calc(100% - 16px)}
  .kanban-scroll-wrap{overflow-x:auto;overflow-y:hidden;padding-bottom:12px;scrollbar-gutter:stable;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
  .kanban-board{min-width:var(--kanban-board-min-width);grid-template-columns:repeat(var(--kanban-columns),minmax(225px,1fr));gap:10px;overflow:visible;padding-bottom:6px}
}

@media (max-width:900px){
  .kanban-column{max-height:calc(100vh - 205px)}
  .kanban-card{cursor:default}
  .kanban-drag-handle{display:none}
  .kanban-mobile-status{display:block}
  .kanban-legend{display:none}
}

/* V13.0.5 – robuster, systemunabhängig sichtbarer Horizontal-Scroller unter 1980 px. */
.kanban-hero{padding:14px 16px;margin-bottom:12px}
.kanban-hero .order-card-head{min-height:0}
.kanban-hero .order-card-head h1{margin:0;font-size:clamp(1.35rem,2vw,1.8rem)}
.kanban-scroll-proxy{display:none}
@media (max-width:1979px){
  .shell.shell-kanban-wide{padding-bottom:62px}
  .kanban-scroll-wrap{overflow-x:auto;overflow-y:hidden;padding-bottom:4px;scrollbar-width:none;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
  .kanban-scroll-wrap::-webkit-scrollbar{width:0;height:0}
  .kanban-scroll-proxy{
    display:block;
    position:fixed;
    z-index:5000;
    left:12px;
    right:12px;
    bottom:10px;
    height:38px;
    padding:7px 9px;
    box-sizing:border-box;
    border:2px solid #9aa8af;
    border-radius:14px;
    background:#eef2f3;
    box-shadow:0 7px 22px rgba(21,35,43,.28);
    touch-action:none;
  }
  .kanban-scroll-proxy-track{
    position:relative;
    width:100%;
    height:20px;
    border-radius:999px;
    background:#d3dce0;
    box-shadow:inset 0 1px 3px rgba(21,35,43,.20);
    cursor:pointer;
  }
  .kanban-scroll-proxy-thumb{
    position:absolute;
    top:2px;
    left:0;
    height:16px;
    min-width:120px;
    border-radius:999px;
    background:#52656f;
    box-shadow:0 1px 4px rgba(21,35,43,.30);
    cursor:grab;
    transform:translateX(0);
    will-change:transform,width;
  }
  .kanban-scroll-proxy-thumb:hover{background:#3f525c}
  .kanban-scroll-proxy-thumb.is-dragging{cursor:grabbing;background:#314650}
}
@media (max-width:720px){
  .kanban-scroll-proxy{left:7px;right:7px;bottom:6px;height:36px;padding:7px}
  .kanban-scroll-proxy-thumb{min-width:90px}
}


/* V13.1 – breitere Auftragsannahme, kompakteres AB-Dashboard und Betriebseinstellungen */
@media (min-width:1500px){
  .shell-acceptance-wide .acceptance-editor-layout{
    grid-template-columns:minmax(500px,590px) minmax(760px,1160px) minmax(28px,1fr);
    gap:18px;
  }
  .shell-acceptance-wide .acceptance-text-block-panel{width:100%;}
  .shell-acceptance-wide .paper-intake-editor{justify-self:stretch;max-width:1160px;}
  .shell-acceptance-wide .acceptance-text-block-copy strong{-webkit-line-clamp:3;}
  .shell-acceptance-wide .acceptance-text-block-copy small{-webkit-line-clamp:4;}
}
@media (min-width:1850px){
  .shell-acceptance-wide .acceptance-editor-layout{
    grid-template-columns:minmax(580px,680px) minmax(820px,1160px) minmax(32px,1fr);
    gap:20px;
  }
}
.dashboard-section-card{border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);background:#fff;}
.dashboard-collapse-summary::after{font-size:1.6rem;line-height:1;width:34px;height:34px;display:grid;place-items:center;border-radius:999px;background:var(--surface-2);border:1px solid var(--line);flex:0 0 34px;}
.dashboard-new-orders-card[open]>.dashboard-collapse-summary::after,.dashboard-order-finder[open]>.dashboard-collapse-summary::after{transform:rotate(180deg);}
.dashboard-order-description{display:inline-block;max-width:70ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom;}
.dashboard-new-order-item{display:grid;gap:5px;min-width:0;}
.dashboard-metrics-card{padding:0;overflow:hidden;}
.dashboard-metrics-table{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));}
.dashboard-metric{min-width:0;padding:13px 16px;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:'label value' 'meta value';gap:2px 12px;align-items:center;text-decoration:none;color:inherit;border-right:1px solid var(--line);}
.dashboard-metric:last-child{border-right:0;}
.dashboard-metric>span:first-child{grid-area:label;font-size:.78rem;font-weight:800;color:var(--muted);}
.dashboard-metric>strong{grid-area:value;font-size:1.4rem;line-height:1;white-space:nowrap;}
.dashboard-metric>span:last-child{grid-area:meta;font-size:.76rem;color:var(--primary);}
a.dashboard-metric:hover{background:var(--surface-2);}
.terminal-row-break{grid-column:1/-1;height:0;min-height:0;padding:0;margin:0;border:0;}
.settings-subnav{display:flex;gap:8px;flex-wrap:wrap;padding:10px 12px;position:sticky;top:72px;z-index:5;}
.settings-subnav a{padding:8px 12px;border-radius:10px;text-decoration:none;font-weight:800;background:var(--surface-2);border:1px solid var(--line);}
.settings-subnav a:hover{border-color:var(--primary);color:var(--primary);}
.settings-section{scroll-margin-top:145px;}
.settings-number-group{padding-top:5px;border-top:1px solid var(--line);}
.settings-number-group:first-of-type{border-top:0;}
.admin-order-action-grid{display:grid;grid-template-columns:auto minmax(320px,1fr);gap:16px;align-items:end;}
.admin-delete-order-form{display:grid;grid-template-columns:minmax(240px,1fr) auto;gap:10px;align-items:end;}
@media(max-width:1100px){.dashboard-metrics-table{grid-template-columns:repeat(2,minmax(0,1fr));}.dashboard-metric:nth-child(2){border-right:0}.dashboard-metric:nth-child(-n+2){border-bottom:1px solid var(--line);}}
@media(max-width:720px){.dashboard-metrics-table{grid-template-columns:1fr}.dashboard-metric{border-right:0;border-bottom:1px solid var(--line)}.dashboard-metric:last-child{border-bottom:0}.settings-subnav{position:static}.admin-order-action-grid,.admin-delete-order-form{grid-template-columns:1fr}}

/* V13.1.1 – kompakter Dashboard-Kopf mit laufenden Aufträgen daneben */
.dashboard-top-grid-compact{
  display:grid;
  grid-template-columns:max-content minmax(440px,1fr);
  gap:16px;
  align-items:stretch;
}
.dashboard-title-card{
  width:max-content;
  min-width:0;
  padding:18px 22px;
  display:flex;
  align-items:center;
}
.dashboard-title-card h1{
  margin:0;
  white-space:nowrap;
  font-size:clamp(1.45rem,2.2vw,2rem);
}
.dashboard-top-grid-compact .dashboard-current-work-card{
  margin:0;
  padding:14px 16px;
  min-width:0;
}
.dashboard-top-grid-compact .dashboard-current-work-card > .order-card-head{
  margin-bottom:8px;
}
.dashboard-top-grid-compact .dashboard-current-work-card h2{
  margin:0;
  font-size:1.05rem;
}
.dashboard-current-list[data-max-visible].is-scroll-limited{
  max-height:var(--dashboard-current-max-height);
  overflow-y:auto;
  scrollbar-gutter:stable;
  padding-right:5px;
}
.dashboard-current-list[data-max-visible] > .card{
  min-width:0;
}
@media(max-width:980px){
  .dashboard-top-grid-compact{grid-template-columns:1fr;}
  .dashboard-title-card{width:100%;}
  .dashboard-title-card h1{white-space:normal;}
}
.dashboard-top-grid-compact .dashboard-current-list{max-height:none;}


/* V13.1.2 – Dashboard-Laufkarten, Kundenstamm und temporäre Auftrags-Sortierung */
.dashboard-current-list-horizontal{
  display:flex;
  flex-wrap:nowrap;
  gap:10px;
  max-height:none;
  overflow-x:auto;
  overflow-y:hidden;
  padding:1px 2px 8px 0;
  scrollbar-gutter:stable;
  overscroll-behavior-x:contain;
}
.dashboard-current-list-horizontal > .card{
  flex:0 0 auto;
  width:max-content;
  min-width:300px;
  max-width:390px;
}
.dashboard-current-list-horizontal .order-card-head{
  gap:16px;
  flex-wrap:nowrap;
}
.dashboard-current-list-horizontal .order-card-head > div{
  min-width:165px;
}
.dashboard-current-list-horizontal .order-card-head strong,
.dashboard-current-list-horizontal .order-card-head .muted{
  white-space:nowrap;
}
.dashboard-current-list-horizontal .badge{
  flex:0 0 auto;
  white-space:nowrap;
}
.dashboard-current-list-horizontal::-webkit-scrollbar{height:12px;}
.dashboard-current-list-horizontal::-webkit-scrollbar-thumb{background:#9eabb2;border-radius:999px;border:3px solid transparent;background-clip:padding-box;}
.dashboard-current-list-horizontal::-webkit-scrollbar-track{background:var(--surface-2);border-radius:999px;}
.dashboard-new-orders-card + .dashboard-metrics-card{margin-top:24px;}
.customer-stock-details{padding:0;overflow:hidden;}
.customer-stock-details[open] > .customer-stock-summary::after{transform:rotate(180deg);}
.customer-stock-body{padding:0 16px 16px;border-top:1px solid var(--line);}
.customer-stock-body .table-wrap{margin-top:14px;}
@media(max-width:720px){
  .dashboard-current-list-horizontal > .card{min-width:280px;max-width:340px;}
  .customer-stock-body{padding:0 12px 12px;}
}
/* V13.1.3: Sortierung direkt über die Tabellenüberschriften. */
.overview-th-sort{
  appearance:none;
  border:0;
  background:transparent;
  padding:0;
  margin:0;
  color:inherit;
  font:inherit;
  font-weight:inherit;
  text-transform:inherit;
  letter-spacing:inherit;
  display:inline-flex;
  align-items:center;
  gap:6px;
  cursor:pointer;
  white-space:nowrap;
}
.overview-th-sort:hover,.overview-th-sort:focus-visible{
  text-decoration:underline;
  text-underline-offset:3px;
}
.overview-th-sort:focus-visible{
  outline:2px solid currentColor;
  outline-offset:4px;
  border-radius:4px;
}
.overview-sort-indicator{
  display:inline-flex;
  min-width:1em;
  justify-content:center;
  font-size:.82em;
  opacity:.55;
}
.overview-th-sort.is-active .overview-sort-indicator{opacity:1;}


/* V13.1.7 – allgemeine Dateivorschau & Drag-and-Drop-Anhänge */
.file-preview-backdrop{z-index:1200;padding:18px}
.file-preview-modal{width:min(1220px,96vw);height:min(900px,94vh);max-width:none;padding:0;overflow:hidden;display:flex;flex-direction:column}
.file-preview-modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 13px;border-bottom:1px solid var(--line);background:#fff}
.file-preview-modal-head>strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.file-preview-modal-head .actions{flex:0 0 auto}
.file-preview-modal-frame{width:100%;flex:1;min-height:0;border:0;background:#eef2f4}
.todo-attachment-form{display:grid;gap:10px;padding-top:14px;border-top:1px solid var(--line)}
.file-drop-zone{position:relative;min-height:118px;padding:16px;border:2px dashed #aebbc2;border-radius:14px;background:#f7fafb;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;text-align:center;cursor:pointer;transition:.15s ease}
.file-drop-zone:hover,.file-drop-zone:focus-visible,.file-drop-zone.is-dragging{border-color:var(--primary);background:#eef6f0;box-shadow:0 0 0 3px rgba(64,112,78,.08);outline:0}
.file-drop-zone input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.file-drop-zone .file-drop-icon{font-size:1.7rem;line-height:1}
.file-drop-zone small{color:var(--muted)}
.file-drop-zone .file-drop-name{max-width:100%;font-size:.8rem;font-weight:750;color:#46555d;overflow-wrap:anywhere}

/* V15: ausschließlich für Administratoren sichtbare Etikettendruck-Verwaltung. */
.printer-beta-hero h1{margin-top:8px}.printer-state{display:inline-flex;align-items:center;justify-content:center;padding:9px 13px;border-radius:999px;font-weight:850;white-space:nowrap}.printer-state.is-enabled{background:#dff3e7;color:#17643d}.printer-state.is-disabled{background:#f2e5e5;color:#8b2f2f}.printer-admin-grid{align-items:start}.printer-admin-grid form{margin:0}.printer-admin-grid .check-row small{display:block;margin-top:3px;color:var(--muted);font-weight:500}.printer-job-table td{vertical-align:top}.printer-job-table td small{display:block;margin-top:4px;color:var(--muted);white-space:nowrap}.print-status{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:.78rem;font-weight:850;white-space:nowrap}.print-status.status-sent,.print-status.status-completed{background:#dff3e7;color:#17643d}.print-status.status-error,.print-status.status-printer_error{background:#fde4e4;color:#982f2f}.print-status.status-cancelled{background:#eceff2;color:#4e5963}.print-status.status-queued{background:#fff1ce;color:#7b5800}.print-status.status-sending,.print-status.status-cups_sent{background:#dfecfa;color:#245d91}.print-status.status-printing{background:#e7e2fa;color:#59389a}.printer-job-error{max-width:300px;white-space:normal;overflow-wrap:anywhere;color:#495867}.printer-kpis .kpi{min-height:110px}.printer-job-filters{display:grid;grid-template-columns:minmax(150px,1fr) minmax(160px,1fr) minmax(180px,1.4fr) minmax(145px,.8fr) minmax(145px,.8fr) auto;gap:10px;align-items:end;margin-bottom:14px}.printer-job-filters label{margin:0}.printer-diagnostic-list{display:grid;gap:8px}.printer-diagnostic-row{display:grid;grid-template-columns:minmax(170px,240px) 1fr;gap:12px;padding:10px 12px;border:1px solid var(--line);border-left-width:5px;border-radius:10px;background:#fff}.printer-diagnostic-row.is-ok{border-left-color:#2f9c62}.printer-diagnostic-row.is-warning{border-left-color:#d89416}.printer-diagnostic-row.is-error{border-left-color:#bd3b3b}.printer-diagnostic-row.is-info{border-left-color:#3f78ae}@media(max-width:1180px){.printer-job-filters{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:900px){.printer-admin-grid{grid-template-columns:1fr}.printer-job-error{max-width:none}.printer-job-filters{grid-template-columns:1fr 1fr}.printer-diagnostic-row{grid-template-columns:1fr}}@media(max-width:620px){.printer-job-filters{grid-template-columns:1fr}}
@media(max-width:720px){.file-preview-backdrop{padding:6px}.file-preview-modal{width:100%;height:96vh}.file-preview-modal-head{align-items:flex-start}.file-preview-modal-head .actions{gap:5px}.file-preview-modal-head [data-file-preview-open]{display:none}}

/* Auftragsannahme: rechts neben dem Auftragszettel bleibt nur ein schmaler Rand.
   Die freie Breite soll links den Leistungen zugutekommen. */
@media (min-width:1181px){
  .shell-acceptance-wide .acceptance-editor-layout{
    grid-template-columns:minmax(300px,1fr) minmax(700px,1180px) minmax(10px,20px);
    gap:14px;
  }
  .shell-acceptance-wide .acceptance-text-block-panel{grid-column:1}
  .shell-acceptance-wide .paper-intake-editor{grid-column:2;justify-self:stretch}
}
@media (min-width:1500px){
  .shell-acceptance-wide .acceptance-editor-layout{
    grid-template-columns:minmax(500px,1fr) minmax(760px,1160px) 18px;
    gap:18px;
  }
}
@media (min-width:1850px){
  .shell-acceptance-wide .acceptance-editor-layout{
    grid-template-columns:minmax(580px,1fr) minmax(820px,1160px) 20px;
    gap:20px;
  }
}

/* V13.2 – kompakte Anhänge, Wartung und Software-Update */
.order-attachments-box{padding:0;overflow:hidden}
.order-attachments-box>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;cursor:pointer;list-style:none}
.order-attachments-box>summary::-webkit-details-marker{display:none}
.order-attachments-box>summary::after{content:'▾';font-weight:900;color:var(--primary);margin-left:8px;transition:transform .15s ease}
.order-attachments-box[open]>summary::after{transform:rotate(180deg)}
.order-attachments-box>summary .muted{margin-left:auto;font-size:.78rem}
.order-attachments-body{padding:0 16px 16px;border-top:1px solid var(--line)}
.compact-attachment-table{margin-top:10px}
.compact-attachment-table table{font-size:.78rem}
.compact-attachment-table th,.compact-attachment-table td{padding:7px 8px;vertical-align:middle}
.compact-attachment-table .attachment-sha code{font-size:.7rem;white-space:nowrap}
.compact-attachment-table .button{max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.order-attachment-upload-card .order-attachment-form,.software-update-form{display:grid;gap:10px}
.order-attachment-upload-card .file-drop-zone{min-height:96px}
.maintenance-banner .button{margin-left:8px}
.demo-mode-banner{border-style:dashed}
@media(max-width:760px){.compact-attachment-table{overflow-x:auto}.compact-attachment-table table{min-width:720px}}

/* V14.0 – Betriebsdashboard, Komponenten und systematische Notebook-Optimierung */
.health-state{display:inline-flex;align-items:center;gap:7px;font-size:.8rem;font-weight:800;white-space:nowrap}
.health-state i{width:9px;height:9px;border-radius:999px;background:currentColor;box-shadow:0 0 0 3px color-mix(in srgb,currentColor 14%,transparent)}
.health-ok{color:#2f7d45}.health-warning{color:#a26800}.health-error{color:#b23434}
.health-hero{display:flex;align-items:center;justify-content:space-between;gap:18px}
.health-kpis .kpi{display:grid;gap:4px}.health-kpis .kpi small{font-weight:800;color:var(--muted)}.health-kpis .kpi strong{font-size:1.55rem}.health-kpis .kpi span{font-size:.8rem;color:var(--muted)}
.system-check-list{display:grid;gap:0}.system-check-list>div{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:11px 0;border-bottom:1px solid var(--line)}.system-check-list>div:last-child{border-bottom:0}
.badge.beta{background:#eef1ff;color:#4853a6;border-color:#cfd4ff}
.ab-workbasket{overflow:hidden}.ab-workbasket-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.ab-workbasket-item{min-width:0;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:13px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2);text-decoration:none;color:inherit}.ab-workbasket-item:hover{border-color:var(--primary);background:#f5faf6}.ab-workbasket-item span{font-size:.8rem;font-weight:800;min-width:0}.ab-workbasket-item strong{font-size:1.35rem}.ab-workbasket-item.warning{border-color:#dfc98f;background:#fffaf0}.ab-workbasket-item.danger{border-color:#e1abab;background:#fff6f6}.ab-workbasket-item.muted-item{opacity:.72}
.completion-check{margin-top:12px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2);overflow:hidden}.completion-check>summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 14px}.completion-check>summary::-webkit-details-marker{display:none}.completion-check-grid{border-top:1px solid var(--line);padding:4px 14px}.completion-check-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:9px 0;border-bottom:1px solid var(--line)}.completion-check-row:last-child{border-bottom:0}.compact-alert{margin:10px 14px}
.audit-detail-list{display:grid;gap:5px;min-width:260px}.audit-detail-list>div{display:grid;grid-template-columns:minmax(105px,.65fr) minmax(160px,1.35fr);gap:9px;align-items:start}.audit-detail-list strong{font-size:.74rem;color:var(--muted)}.audit-detail-list span{font-size:.78rem;overflow-wrap:anywhere}.audit-raw{margin-top:7px}.audit-raw summary{cursor:pointer;font-size:.72rem;color:var(--muted)}.audit-json{max-width:680px;max-height:260px;overflow:auto;font-size:.7rem;white-space:pre-wrap;overflow-wrap:anywhere}
.maintenance-control-panel{border:1px solid var(--line);border-radius:16px;padding:14px;background:var(--surface-2);display:grid;gap:14px}.maintenance-current{display:flex;align-items:center;gap:11px}.maintenance-current-dot{width:13px;height:13px;border-radius:999px;box-shadow:0 0 0 4px rgba(80,100,90,.12)}.maintenance-control-panel.is-off .maintenance-current-dot{background:#2f7d45}.maintenance-control-panel.is-on .maintenance-current-dot{background:#c27600}.maintenance-current>div{display:grid;gap:2px}.maintenance-current small{color:var(--muted)}.maintenance-choice{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.maintenance-choice-card{position:relative;border:1px solid var(--line);background:#fff;border-radius:12px;padding:12px 14px;cursor:pointer;display:flex;align-items:flex-start;gap:10px}.maintenance-choice-card:has(input:checked){border-color:var(--primary);box-shadow:0 0 0 2px color-mix(in srgb,var(--primary) 12%,transparent)}.maintenance-choice-card input{margin-top:3px}.maintenance-choice-card span{display:grid;gap:3px}.maintenance-choice-card small{color:var(--muted);font-weight:500}
.demo-environment .topbar{box-shadow:inset 0 -3px 0 #a55b00}.demo-environment-banner{position:sticky;top:64px;z-index:18;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;padding:9px 16px;background:#fff4d9;border:1px solid #e2b95d;border-radius:12px;margin-bottom:14px;box-shadow:0 4px 14px rgba(80,62,20,.12)}.demo-environment-banner>span{font-weight:950;letter-spacing:.12em;background:#8a4d00;color:#fff;border-radius:8px;padding:5px 8px}.demo-environment-banner strong{font-size:.92rem}.demo-environment-banner small{color:#6d541f;font-weight:750}
.component-summary{min-height:48px}.component-attachments .badge{margin-left:5px}

/* Notebook: feste Betriebsbreiten statt seitenweiser Einzelkorrekturen. */
@media (max-width:1440px){
  .shell{width:calc(100% - 20px);max-width:none}
  .grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ab-workbasket-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .table-wrap{max-width:100%;overflow-x:auto}
  .dashboard-current-list-horizontal>.card{min-width:275px;max-width:350px}
}
@media (min-width:1101px) and (max-width:1440px){
  .shell-acceptance-wide{width:calc(100% - 10px);max-width:none}
  .shell-acceptance-wide .acceptance-editor-layout{grid-template-columns:minmax(280px,.9fr) minmax(650px,1.45fr) 6px;gap:10px}
  .shell-acceptance-wide .paper-intake-editor{min-width:0;width:100%}
}
@media (max-width:1100px){
  .grid.three,.grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}
  .health-hero{align-items:flex-start;flex-direction:column}
}
@media (max-width:760px){
  .ab-workbasket-grid,.maintenance-choice,.grid.three,.grid.four{grid-template-columns:1fr}
  .demo-environment-banner{position:static;grid-template-columns:auto 1fr}.demo-environment-banner small{grid-column:1/-1}
  .audit-detail-list>div{grid-template-columns:1fr;gap:1px}
}

/* V14.0.1 – kompaktere AB-/Auftragsansichten */
.order-attachment-upload-collapsible{padding:0;overflow:hidden}
.order-attachment-upload-collapsible>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;cursor:pointer;list-style:none}
.order-attachment-upload-collapsible>summary::-webkit-details-marker{display:none}
.order-attachment-upload-collapsible>summary::after{content:'▾';font-weight:900;color:var(--primary);transition:transform .15s ease}
.order-attachment-upload-collapsible[open]>summary::after{transform:rotate(180deg)}
.order-attachment-upload-body{padding:0 18px 18px;border-top:1px solid var(--line)}
.order-attachment-upload-body .order-attachment-form{padding-top:14px}

.acceptance-attachment-card{padding:13px 16px}
.acceptance-attachment-card .order-card-head{margin-bottom:8px;gap:10px}
.acceptance-attachment-card .order-card-head h2{margin-bottom:1px}
.acceptance-attachment-card .order-card-head p{font-size:.78rem;line-height:1.25;margin:0}
.acceptance-attachment-card .acceptance-attachment-grid{gap:8px}
.acceptance-attachment-card .acceptance-attachment-grid>div{padding:7px 9px;gap:1px;border-radius:9px}
.acceptance-attachment-card .acceptance-attachment-grid strong{font-size:.92rem}
.acceptance-attachment-card .acceptance-attachment-grid span{font-size:.78rem}


.ab-workbasket-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.ab-workbasket-item{padding:10px 12px;min-height:48px}
.ab-workbasket-item.metric{background:#f5f8f6;border-color:#cfdbd2}
.ab-workbasket-item.metric span{display:grid;gap:1px}
.ab-workbasket-item.metric small{font-size:.68rem;color:var(--muted);font-weight:700}
.ab-workbasket-item.metric strong{font-size:1.18rem}
.dashboard-action-grid{align-items:start}
.quick-order-card{min-width:0}
.quick-order-form{gap:9px 10px}
.quick-order-form textarea{min-height:58px;resize:vertical}
.quick-order-form label{gap:4px}
.quick-order-form .actions{margin-top:0}
.ab-todo-card{overflow:hidden;display:grid;grid-template-rows:auto minmax(0,1fr)}
.ab-todo-card .ab-todo-scroll{min-height:0;max-height:none;overflow-y:auto;padding-right:4px}

@media(max-width:1180px){
  .ab-workbasket-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:980px){
  .ab-workbasket-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:720px){
  .ab-workbasket-grid{grid-template-columns:1fr}
  .quick-order-form{grid-template-columns:1fr}
  .quick-order-form .full{grid-column:auto}
  .ab-todo-card{height:auto!important;display:block}
}
/* V14.0.2 – Auftragsworkflow, Abschlussprüfung und Notebook-Raster */
.order-main-workflow-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:start}
.order-side-workflow-stack{display:grid;gap:16px;min-width:0;align-content:start}
.order-master-card,.order-todos-card{min-width:0}
.order-todos-card .order-todo-create-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end}
.order-todos-card .order-todo-create-form label{min-width:0;width:100%}
.order-todo-list{display:grid;grid-template-columns:minmax(0,1fr);gap:7px;width:100%}
.order-todo-row{display:grid;grid-template-columns:minmax(0,1fr) max-content;align-items:center;gap:10px;width:100%;min-width:0;padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2)}
.order-todo-row:last-child{border-bottom:1px solid var(--line)}
.order-todo-main{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:9px;width:100%;min-width:0;margin:0}
.order-todo-main .facto-check{margin-top:2px}
.order-todo-title{display:block;width:100%;min-width:0;line-height:1.3;overflow-wrap:anywhere}
.order-todo-delete{margin:0;align-self:center;width:auto}
.order-todo-delete .button{white-space:nowrap}

.completion-check-cards{min-width:0;margin-top:0}
.completion-check-cards.card{padding:12px 14px}
.completion-check-embedded{margin-top:8px;padding-top:9px;border:0;border-top:1px solid var(--line);border-radius:0;background:transparent;overflow:visible}
.completion-check-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:7px}
.completion-check-head>strong{font-size:.92rem}
.completion-check-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px;padding:0;border-top:0}
.completion-check-item{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;min-height:46px;padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2)}
.completion-check-item.is-ok{border-color:#c9dccf;background:#f3f8f4}
.completion-check-item.is-warning{border-color:#e2cd98;background:#fffaf0}
.completion-check-item>span{font-size:.68rem;line-height:1.15;font-weight:850;color:var(--muted);min-width:0}
.completion-check-item>strong{font-size:.76rem;line-height:1.15;min-width:0;text-align:right}
.completion-check-item .health-state{font-size:.73rem;gap:5px;white-space:normal;min-width:0;justify-content:flex-end}
.completion-check-item .health-state i{width:7px;height:7px;min-width:7px;box-shadow:none}

/* Nur die Bildschirm-Zusammenfassung wird leicht verdichtet. Die A4-Druckvorlage bleibt unverändert. */
.acceptance-attachment-card{padding:11px 14px}
.acceptance-attachment-card .order-card-head{margin-bottom:6px;gap:8px}
.acceptance-attachment-card .acceptance-attachment-grid{gap:7px}
.acceptance-attachment-card .acceptance-attachment-grid>div{padding:6px 8px}
.acceptance-attachment-card .completion-check-embedded{margin-left:-1px;margin-right:-1px}

@media(max-width:1260px){
  .completion-check-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:980px){
  .order-main-workflow-grid{grid-template-columns:1fr}
}
@media(max-width:720px){
  .order-todos-card .order-todo-create-form{grid-template-columns:1fr}
  .order-todos-card .order-todo-create-form .button{width:100%}
  .completion-check-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:500px){
  .order-todo-row{grid-template-columns:1fr}
  .order-todo-delete{justify-self:start}
  .completion-check-grid{grid-template-columns:1fr}
}

/* V14.1 – Live-/AJAX-Aktionen */
[data-ajax-form].ajax-saving {
    opacity: .72;
}
[data-ajax-form].ajax-saving button[type="submit"]::after {
    content: " …";
}
.ajax-saving-control {
    opacity: .65;
    cursor: wait;
}
[data-live-region] {
    transition: opacity .15s ease;
}

/* V14.4 – kompakte Textbausteine und Pausenanzeige. */
.kat-quick-notes{display:flex;gap:6px;flex-wrap:wrap;margin:7px 0}
.kat-quick-notes .button{max-width:100%;white-space:normal;text-align:left;font-size:.79rem;padding:5px 9px}
.terminal-timer[data-pause-label][data-paused-at]:not([data-paused-at=""]){letter-spacing:.13em;font-size:clamp(1.4rem,2.7vw,3rem)}
.kat-followup-card .alert{overflow-wrap:anywhere}
