/* Gartenbau ERP – gemeinsames Grundlayout (Schritt A: UI-Grundgerüst).
   Bewusst ohne Build-System: reines statisches CSS. */

:root {
    --color-text: #20252a;
    --color-muted: #5b6670;
    --color-border: #d8dde0;
    --color-bg: #f4f5f6;
    --color-surface: #ffffff;
    --color-accent: #2f6f4f;
    --color-accent-contrast: #ffffff;
    --color-error: #b3261e;
    --color-error-bg: #fbeceb;
    --color-success: #1c6b3c;
    --color-success-bg: #e8f3ec;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--color-text);
    background: var(--color-bg);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
}

a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.app-header {
    display: flex;
    align-items: center;
    gap: 24px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 0 20px;
    height: 52px;
}

.app-header__brand {
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
}
.app-header__brand a { color: var(--color-text); }

.app-nav {
    display: flex;
    gap: 18px;
    flex: 1;
}

.app-nav a {
    color: var(--color-text);
    font-size: 13.5px;
    padding: 6px 2px;
    border-bottom: 2px solid transparent;
}

.app-nav a.is-active {
    font-weight: 600;
    border-bottom-color: var(--color-accent);
}

.app-header__search { margin: 0 12px; }
.app-header__search input {
    padding: 6px 9px;
    border: 1px solid var(--color-border);
    border-radius: 2px;
    font-size: 13px;
    width: 180px;
}

.app-header__user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--color-muted);
}

.app-logout-form { margin: 0; }

.link-button {
    background: none;
    border: none;
    padding: 0;
    color: var(--color-accent);
    font-size: 13px;
    cursor: pointer;
}
.link-button:hover { text-decoration: underline; }

.app-content {
    max-width: 1550px;
    margin: 0 auto;
    padding: 14px 24px 40px;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 12px;
}

.placeholder-hint {
    color: var(--color-muted);
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
.toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.search-form {
    display: flex;
    gap: 8px;
    flex: 1;
    justify-content: flex-end;
}

.search-form input[type="text"] {
    padding: 7px 9px;
    border: 1px solid var(--color-border);
    border-radius: 2px;
    font-size: 13.5px;
    width: 320px;
    max-width: 100%;
}

.messages {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
}
.message {
    padding: 8px 12px;
    border-radius: 2px;
    margin-bottom: 6px;
    font-size: 13.5px;
}
.message--error { background: var(--color-error-bg); color: var(--color-error); }
.message--success { background: var(--color-success-bg); color: var(--color-success); }

/* Buttons */
.btn {
    display: inline-block;
    padding: 7px 14px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 13.5px;
    border-radius: 2px;
    cursor: pointer;
}
.btn-primary {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-accent-contrast);
}
.btn-danger {
    background: #B3261E;
    border-color: #B3261E;
    color: #fff;
}

/* Tabellen-Grundstruktur */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-surface);
}
.data-table th, .data-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
    font-size: 13.5px;
}
.data-table th {
    color: var(--color-muted);
    font-weight: 600;
    font-size: 12.5px;
}
.data-table .text-right { text-align: right; }
.data-table .text-center { text-align: center; }
.data-table .nowrap { white-space: nowrap; }

/* Formular-Grundstruktur */
.form-row {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 420px;
}
.form-row label { font-size: 12.5px; color: var(--color-muted); }
.form-row input, .form-row select, .form-row textarea {
    padding: 7px 9px;
    border: 1px solid var(--color-border);
    border-radius: 2px;
    font-size: 13.5px;
    width: 100%;
}
.form-actions { margin-top: 16px; }

/* Desktop-ERP-Formular-Grid: mehrere Felder pro Zeile, bricht auf schmalen
   Bildschirmen sauber um (flex-wrap), keine feste Breite. */
.form-section { margin-bottom: 22px; }
.form-section h2 { font-size: 14px; margin: 0 0 8px; }
.form-grid-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.form-grid-row .form-row {
    margin-bottom: 8px;
    max-width: none;
}
.form-field--xs { flex: 0 1 90px; }
.form-field--sm { flex: 0 1 140px; }
.form-field--md { flex: 1 1 220px; }
.form-field--lg { flex: 1 1 320px; }
.form-field--wide { flex: 3 1 380px; }
.form-field--xl { flex: 1 1 100%; max-width: 640px; }

.conditions-box {
    display: inline-flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: flex-end;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    padding: 10px 14px;
}
.conditions-box .form-row { margin-bottom: 0; max-width: 120px; }

.page-title-action {
    font-size: 13px;
    padding: 4px 10px;
    margin-left: 12px;
    vertical-align: middle;
}

.search-form--left { justify-content: flex-start; margin-bottom: 10px; }
.selection-table { margin-top: 8px; }

.filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 14px;
}
.filter-bar input[type="text"] {
    padding: 7px 9px;
    border: 1px solid var(--color-border);
    border-radius: 2px;
    font-size: 13.5px;
    flex: 2 1 380px;
    min-width: 220px;
}
.filter-bar select {
    padding: 7px 9px;
    border: 1px solid var(--color-border);
    border-radius: 2px;
    font-size: 13.5px;
    flex: 0 1 auto;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}
.badge--success { background: var(--color-success-bg); color: var(--color-success); }
.badge--muted { background: var(--color-bg); color: var(--color-muted); }
.badge--error { background: var(--color-error-bg); color: var(--color-error); }

.import-summary { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }

.checkbox-group { display: flex; gap: 18px; flex-wrap: wrap; }
.checkbox-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--color-text); }
.checkbox-inline input[type="checkbox"] { width: auto; }
.toggle-active-form { display: inline-block; margin-top: -6px; }
.inline-form { display: flex; gap: 6px; align-items: center; }
.inline-form input[type="number"] { width: 90px; }

.form-field--full { flex: 1 1 100%; max-width: none; }
.input-affix-group { display: flex; align-items: center; gap: 6px; }
.input-affix-group input { flex: 1 1 auto; }
.input-affix { color: var(--color-muted); font-size: 13.5px; white-space: nowrap; }

.selected-customer {
    margin: 0 0 10px;
    padding: 8px 10px;
    border-left: 3px solid var(--color-accent);
    background: var(--color-surface);
    font-weight: 600;
}
.form-hint { margin: -2px 0 10px; color: var(--color-muted); font-size: 12.5px; }
.record-section { margin: 0 0 24px; }
.record-section h2 { margin: 0 0 8px; font-size: 15px; }
.record-section h3 { margin: 0 0 8px; font-size: 14px; }
.section-heading-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.section-heading-actions h2 { margin-bottom: 0; }
.section-heading-actions form, .offer-workflow-actions form { margin: 0; }

.dashboard-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 0 0 28px; }
.kpi-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-accent);
    background: var(--color-surface);
}
.kpi-card--warning { border-left-color: var(--color-error); }
.kpi-card__label { color: var(--color-muted); font-size: 12.5px; }
.kpi-card__value { font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-card__sub { color: var(--color-muted); font-size: 12.5px; }
.kpi-card a { font-size: 12.5px; margin-top: 2px; }

.site-report-photos { display: flex; flex-wrap: wrap; gap: 6px; }
.site-report-photo { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.site-report-photo img { width: 56px; height: 56px; object-fit: cover; border: 1px solid var(--color-border); border-radius: 2px; }
.site-report-photo .link-button { font-size: 11px; color: var(--color-muted); }
.site-report-photo .link-button:hover { color: var(--color-error); }
.offer-header-editor { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.offer-header-form { flex: 1 1 680px; }
.offer-header-form .form-grid-row { gap: 10px; }
.offer-header-form .form-row { flex-basis: 150px; }
.offer-workflow-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.offer-workflow-actions form { display: flex; gap: 6px; align-items: center; }
.offer-workflow-actions select { padding: 6px 8px; border: 1px solid var(--color-border); border-radius: 2px; }
.revision-links { color: var(--color-muted); font-size: 12px; }
.record-table { max-width: 900px; }
.record-table th { width: 135px; }

/* Offerteneditor: dichter Desktop-Arbeitsbereich */
.offer-editor-toolbar {
    position: sticky;
    top: 0;
    z-index: 30;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    margin: 0 0 10px;
    padding: 10px 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.offer-editor-toolbar__actions { gap: 5px; }
.offer-editor-toolbar__actions .btn { padding: 6px 10px; }
.offer-editor-toolbar #section-form,
.offer-editor-toolbar #text-form { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--color-border); }
.offer-editor-section { margin-bottom: 18px; }
.offer-editor-drag-hint { margin: -1px 0 6px; font-size: 11.5px; }
.offer-editor-table-wrap { overflow-x: auto; }
.offer-editor-table { min-width: 960px; table-layout: fixed; }
.offer-editor-table th, .offer-editor-table td { padding: 6px 6px; font-size: 13px; vertical-align: middle; }
.offer-editor-table th { font-size: 11.5px; white-space: nowrap; }
.offer-col--grip { width: 28px; }
.offer-col--position { width: 42px; }
.offer-col--article { width: 62px; }
.offer-col--quantity { width: 108px; }
.offer-col--unit { width: 52px; }
.offer-col--price { width: 88px; }
.offer-col--vat { width: 60px; }
.offer-col--amount { width: 92px; }
.offer-col--action { width: 54px; }
.offer-editor-table .text-right { text-align: right; }
.offer-editor-table .desc-preview {
    display: block;
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
}
.offer-editor-table .article-number { font-size: 12px; color: var(--color-muted); }
.offer-editor-table .empty-article { color: #aeb6bc; font-size: 12px; }

/* Click-to-Edit (Offerteneditor) */
.editable-cell { cursor: text; }
.editable-cell:hover { background: #f8faf8; box-shadow: inset 0 -1px 0 #a9c7b2; }
.editable-cell:hover .cell-display { background: transparent; }
.editable-cell .cell-input {
    width: 100%;
    font: inherit;
    padding: 3px 5px;
    border: 1px solid var(--color-accent);
    border-radius: 2px;
}
.cell-error { color: var(--color-error); font-size: 11.5px; margin-top: 2px; }
.desc-preview {
    display: inline-block;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

/* Rechtsklick-Kontextmenü (Offerteneditor) */
.context-menu {
    position: fixed;
    z-index: 100;
    min-width: 200px;
    padding: 4px 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 3px;
    box-shadow: 0 4px 14px rgba(32, 37, 42, 0.18);
}
.context-menu button {
    display: block;
    width: 100%;
    padding: 7px 14px;
    border: none;
    background: none;
    text-align: left;
    font-size: 13px;
    color: var(--color-text);
    cursor: pointer;
}
.context-menu button:hover { background: #eef2ef; }
.context-menu hr { margin: 4px 0; border: none; border-top: 1px solid var(--color-border); }

.hidden { display: none; }

/* Drag & Drop (Offerteneditor: Kapitel/Positionen umordnen, Pointer Events) */
.drag-handle-cell { width: 20px; padding-right: 0; text-align: center; }
.drag-handle { cursor: grab; color: var(--color-muted); user-select: none; touch-action: none; display: inline-block; padding: 1px 3px; border-radius: 2px; }
.drag-handle:hover { color: var(--color-text); background: #e7eee9; }
.drag-handle:active { cursor: grabbing; }
body.dnd-active, body.dnd-active .drag-handle { cursor: grabbing; }
#positions-table tr.dragging { opacity: 0.4; }
#positions-table tr.chapter-row { background: #edf2ee; }
#positions-table tr.chapter-row td { border-top: 1px solid #cbd9cf; border-bottom-color: #cbd9cf; }
#positions-table .chapter-cell { font-weight: 600; letter-spacing: 0; }
#positions-table tr.ungrouped-heading td { color: var(--color-muted); background: #fafbfa; font-size: 12px; }
#positions-table tr.position-row--grouped td:first-child { padding-left: 9px; }
#positions-table tr.position-row--text { background: #fbfcfb; color: var(--color-muted); }
#positions-table tr.position-row--text td { border-bottom-color: #e5e9e6; }
.text-position-label { color: var(--color-muted); font-size: 11px; font-weight: 600; margin-left: 5px; text-transform: uppercase; }
.measurement-badge { margin-left: 4px; padding: 1px 5px; border-radius: 7px; font-size: 10.5px; font-weight: 600; vertical-align: 1px; }
.position-delete { color: var(--color-muted); font-size: 12px; }
.position-delete:hover { color: var(--color-error); }
.position-measurements { margin-right: 8px; font-size: 12px; }
.offer-measurement-panel {
    position: fixed;
    z-index: 20;
    right: 24px;
    bottom: 0;
    left: 24px;
    max-height: 42vh;
    overflow-y: auto;
    margin: 0;
    padding: 10px 14px 14px;
    border: 1px solid var(--color-border);
    border-bottom: none;
    background: var(--color-surface);
    box-shadow: 0 -4px 14px rgba(32, 37, 42, 0.12);
}
.offer-measurement-panel h2 { margin: 0; font-size: 14px; }
.offer-measurement-panel .form-grid-row { gap: 8px; margin-top: 8px; }
.offer-measurement-panel .form-row { margin-bottom: 0; }
/* Reserviert Scrollraum, damit das fixierte Vorausmass-Panel die Zwischensumme/
   das Gesamttotal am Seitenende nicht dauerhaft verdeckt - hochscrollbar. */
.offer-editor-section--with-measurement { padding-bottom: 44vh; }
@media (max-width: 760px) {
    .offer-editor-section--with-measurement { padding-bottom: 0; }
}
#positions-table tr.position-row--measurement-active td { background: #eef5f0; }
#positions-table tr.position-row:not(.position-row--text) { cursor: pointer; }
@media (max-width: 760px) {
    .offer-measurement-panel { position: static; max-height: none; margin-top: 16px; border-bottom: 1px solid var(--color-border); box-shadow: none; }
}
#positions-table tr.drop-placeholder td { padding: 0; border: none; }
#positions-table tr.drop-placeholder .drop-placeholder-cell {
    height: 3px;
    background: var(--color-accent);
    padding: 0;
}

/* Drag & Drop (Regie-Editor: Kategorien/Positionen umordnen) - gleiches
   Muster wie #positions-table oben, nur ohne die offertenspezifischen
   Text-/Vorausmass-Zustände. */
#regie-lines-table tr.dragging { opacity: 0.4; }
#regie-lines-table tr.chapter-row { background: #edf2ee; }
#regie-lines-table tr.chapter-row td { border-top: 1px solid #cbd9cf; border-bottom-color: #cbd9cf; }
#regie-lines-table .chapter-cell { font-weight: 600; letter-spacing: 0; }
#regie-lines-table tr.drop-placeholder td { padding: 0; border: none; }
#regie-lines-table tr.drop-placeholder .drop-placeholder-cell {
    height: 3px;
    background: var(--color-accent);
    padding: 0;
}
.section-subtotal-row td {
    padding-top: 5px;
    padding-bottom: 5px;
    background: #fafbfa;
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 600;
}
.section-subtotal-row .section-subtotal-amount { color: var(--color-text); }
.offer-totals {
    display: grid;
    gap: 3px;
    width: min(100%, 350px);
    margin: 12px 0 0 auto;
    padding-top: 8px;
    border-top: 1px solid var(--color-border);
}
.offer-totals__row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    font-size: 13px;
}
.offer-totals__row strong { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.offer-totals__row--vat { color: var(--color-muted); font-size: 12px; }
.offer-totals__row--total {
    margin-top: 3px;
    padding-top: 6px;
    border-top: 1px solid var(--color-border);
    color: var(--color-text);
    font-size: 14px;
}

/* Katalog-Mehrfachauswahl (separates Auswahlfenster) */
.catalog-picker-window { max-width: 980px; padding-top: 18px; }
.catalog-picker-window .page-title { margin-bottom: 10px; }
.catalog-picker-filter-row { display: flex; gap: 10px; align-items: end; margin-bottom: 8px; }
.catalog-picker-section { display: flex; flex: 0 1 260px; flex-direction: column; gap: 3px; }
.catalog-picker-section label { color: var(--color-muted); font-size: 12px; }
.catalog-picker-section select { padding: 6px 8px; border: 1px solid var(--color-border); border-radius: 2px; font-size: 13px; }
.catalog-picker-controls { display: flex; gap: 6px; align-items: center; margin: 8px 0; flex-wrap: wrap; }
.catalog-picker-controls .btn { padding: 6px 10px; }
.catalog-picker-window .data-table th, .catalog-picker-window .data-table td { padding: 6px 7px; font-size: 13px; }
.catalog-picker-window .form-actions { margin-top: 10px; }
.quantity-input { width: 72px; }
#catalog-search {
    padding: 6px 8px;
    border: 1px solid var(--color-border);
    border-radius: 2px;
    font-size: 13.5px;
    flex: 1 1 340px;
    width: auto;
    max-width: 100%;
}

.party-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    max-width: 1000px;
}
.recipient-form {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
}
@media (max-width: 760px) {
    .toolbar, .search-form { align-items: stretch; flex-direction: column; }
    .search-form input[type="text"] { width: 100%; }
    .party-grid { grid-template-columns: 1fr; }
}

/* Login-Seite */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 32px 36px;
    width: 320px;
}
.login-box h1 { font-size: 16px; margin: 0 0 4px; }
.login-box h2 { font-size: 13px; font-weight: 400; color: var(--color-muted); margin: 0 0 20px; }

/* Tablet und Handy: gleiche Seiten, angepasste Darstellung (kein zweites Layout). */
.app-nav-toggle { display: none; }

@media (max-width: 900px) {
    .app-header { flex-wrap: wrap; height: auto; gap: 4px 12px; padding: 8px 14px; }
    .app-header__brand { order: 1; }
    .app-nav-toggle {
        display: inline-flex;
        align-items: center;
        order: 2;
        margin-left: auto;
        min-height: 44px;
        padding: 0 16px;
        border: 1px solid var(--color-border);
        border-radius: 2px;
        background: var(--color-surface);
        color: var(--color-text);
        font-size: 14px;
        cursor: pointer;
    }
    .app-nav, .app-header__search, .app-header__user { display: none; }
    .app-header.is-open .app-nav { display: flex; flex: 1 1 100%; flex-direction: column; gap: 0; order: 3; }
    .app-header.is-open .app-nav a { padding: 13px 4px; border-bottom: 1px solid var(--color-border); font-size: 15px; }
    .app-header.is-open .app-header__search { display: block; flex: 1 1 100%; order: 4; margin: 4px 0; }
    .app-header.is-open .app-header__search input { width: 100%; min-height: 44px; font-size: 16px; }
    .app-header.is-open .app-header__user { display: flex; flex: 1 1 100%; justify-content: space-between; order: 5; padding-bottom: 6px; }
}

@media (max-width: 760px) {
    body { font-size: 15px; }
    .app-content { padding: 12px 12px 32px; }
    .page-title { font-size: 18px; }

    .form-row { max-width: none; }
    .form-row input, .form-row select, .form-row textarea,
    .inline-form input, .inline-form select, .inline-form textarea, .filter-bar input, .filter-bar select { min-height: 44px; font-size: 16px; }
    .form-row textarea, .inline-form textarea { min-height: 72px; }
    .form-row input[type="checkbox"], .form-row input[type="radio"] { min-height: 0; }
    .form-grid-row { gap: 0 10px; }
    .form-grid-row .form-row { flex: 1 1 100%; }
    .form-grid-row .form-field--xs, .form-grid-row .form-field--sm { flex: 1 1 calc(50% - 10px); }
    .inline-form { flex-wrap: wrap; }
    .inline-form input[type="number"] { width: 110px; }

    .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 16px; font-size: 15px; }
    form > button.btn-primary, form > .form-actions > .btn-primary { width: 100%; }
    .link-button { min-height: 36px; font-size: 14px; }

    /* Kennzahlen-Tabellen: Bezeichnung links, Wert rechts, je Paar eine Zeile. */
    .record-table, .record-table tbody { display: block; max-width: none; }
    .record-table tr { display: grid; grid-template-columns: minmax(90px, 40%) 1fr; }
    .record-table th, .record-table td { width: auto; }

    /* Listen als Karten (Tabellen mit class="table-cards" und data-label je Zelle). */
    .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
    .table-cards thead { display: none; }
    .table-cards tr { margin: 0 0 10px; border: 1px solid var(--color-border); background: var(--color-surface); }
    .table-cards td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 10px; border-bottom: 1px solid var(--color-border); text-align: right; }
    .table-cards td:last-child { border-bottom: none; }
    .table-cards td[data-label]::before { content: attr(data-label); flex: 0 0 34%; color: var(--color-muted); font-size: 12.5px; font-weight: 600; text-align: left; }
    .table-cards td.text-right, .table-cards td.text-center { text-align: right; }
    .table-cards .drag-handle-cell { display: none; }
    .table-cards tr.chapter-row { background: #edf2ee; }
    .table-cards tr.chapter-row td { display: block; text-align: left; border-bottom: none; }
    .table-cards .editable-cell { min-height: 44px; }
    .table-cards .editable-cell .cell-input { flex: 1 1 auto; min-width: 0; font-size: 16px; min-height: 40px; }
    .table-cards td > form { margin: 0; }
    .desktop-only { display: none; }

    /* Übrige Tabellen bleiben Tabellen und scrollen seitlich statt die Seite zu verbreitern. */
    .data-table:not(.table-cards):not(.offer-editor-table):not(.record-table) { display: block; max-width: 100%; overflow-x: auto; }

    .offer-totals { width: 100%; }
    .offer-totals__row .inline-form { flex: 1 1 auto; justify-content: flex-end; }
}
