@font-face {
    font-family: "Plus Jakarta Sans";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("../fonts/plus-jakarta-sans-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Plus Jakarta Sans";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("../fonts/plus-jakarta-sans-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Plus Jakarta Sans";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("../fonts/plus-jakarta-sans-vietnamese.woff2") format("woff2");
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

/* ============================================================
 * Farb-Palette „QuickStock Design 2026" (hell). Einzige Quelle der
 * Wahrheit – Variablen auf :root; das Stylesheet wird nur auf den
 * Plugin-Seiten geladen, leckt also nicht in den übrigen Admin.
 * (Früher existierte hier eine ältere blaue Palette, die weiter
 * unten von einem zweiten :root komplett überschrieben wurde. Beide
 * wurden zu diesem einen Block zusammengeführt.)
 * ============================================================ */
:root {
    --qsfw-font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --qsfw-surface: #fff;
    --qsfw-surface-2: #fbfcff;
    --qsfw-surface-3: #f6f7fb;
    --qsfw-surface-4: #eef1f7;
    --qsfw-surface-faint: #fafbff;
    --qsfw-header-from: #fbfaff;
    --qsfw-header-to: #f4f2fa;
    --qsfw-sorted-from: #f3eefe;
    --qsfw-sorted-to: #eee7fe;
    --qsfw-page-bg: #eceff4;
    --qsfw-text: #1c2230;
    --qsfw-text-muted: #5b6472;
    --qsfw-text-faint: #687385;
    --qsfw-text-dim: #a5adbb;
    --qsfw-border: #d8dde8;
    --qsfw-border-light: #e6e9f0;
    --qsfw-border-faint: #eef1f6;
    --qsfw-input-border: #bcc3ce;
    --qsfw-accent: #7c3aed;
    --qsfw-accent-2: #a855f7;
    --qsfw-accent-soft: #f3eefe;
    --qsfw-on-accent: #fff;
    --qsfw-row-hover: #faf7ff;
    --qsfw-input-bg: #fff;
    --qsfw-btn-bg: #fff;
    --qsfw-done-bg: #f1f3f7;
    --qsfw-critical-bg: #fef2f2;
    --qsfw-critical-text: #dc2626;
    --qsfw-warning-bg: #fff7ed;
    --qsfw-warning-text: #d97706;
    --qsfw-warning-border: #fed7aa;
    --qsfw-success-bg: #dcfce7;
    --qsfw-success-text: #15803d;
    --qsfw-ok: #16a34a;
    --qsfw-danger: #ef4444;
    --qsfw-star: #d6a32d;
    --qsfw-info-bg: #eef4ff;
    --qsfw-info-border: #c7d7fe;
    --qsfw-saving-bg: #fff7ed;
    --qsfw-saved-bg: #ecfdf3;
    --qsfw-failed-bg: #fef2f2;
    --qsfw-hint-bg: #fffbeb;
    --qsfw-hint-border: #fde68a;
    --qsfw-checker: #eef1f7;
    --qsfw-surface-blur: rgba(255, 255, 255, 0.94);
    --qsfw-bar-bg: rgba(255, 255, 255, 0.97);
    --qsfw-shadow: rgba(16, 24, 40, 0.10);
    --qsfw-shadow-strong: rgba(16, 24, 40, 0.22);
    --qsfw-overlay: rgba(17, 24, 39, 0.45);
    --qsfw-radius-sm: 8px;
    --qsfw-radius: 12px;
    --qsfw-radius-lg: 18px;
}

.stock-done { opacity: 0.4; text-decoration: line-through; background: var(--qsfw-done-bg, #f4f4f4) !important; }
.edit-input { width: 100%!important; /*max-width: 80px;*/ text-align: center; border: 1px solid var(--qsfw-border-light, #ddd); padding: 4px; border-radius:3px; box-sizing:border-box; background: var(--qsfw-input-bg, #fff); color: var(--qsfw-text, #1d2327); }

/* Moderner Ein/Aus-Schalter (Spalte „Kein Etikett") – native Checkbox als Toggle.
   Hebt die 100%-Breite von .edit-input auf; JS bindet weiterhin an .edit-input. */
input.qsfw-toggle[type="checkbox"] {
    appearance: none; -webkit-appearance: none;
    width: 34px !important; height: 18px; flex: none;
    margin: 0; padding: 0 !important; border: none;
    border-radius: 999px; box-shadow: none; cursor: pointer;
    vertical-align: middle; position: relative;
    background: var(--qsfw-toggle-off, #8c8f94);
    transition: background-color .15s ease;
}
input.qsfw-toggle[type="checkbox"]::before {
    /* Knopf-Struktur; Größe + Schatten kommen aus dem Theme-Layer. */
    content: ""; position: absolute; top: 2px; left: 2px;
    margin: 0 !important; /* WP-Core-Häkchen-Margin neutralisieren */
    border-radius: 50%; background: #fff;
    transition: transform .15s ease;
}
input.qsfw-toggle[type="checkbox"]:focus-visible { outline: 2px solid var(--qsfw-accent, #2271b1); outline-offset: 2px; }
.purchase-input { background-color: var(--qsfw-info-bg, #eef9ff) !important; border-color: var(--qsfw-info-border, #b3d4fc) !important; }
.cf-text-input { text-align: left !important; }
.cf-readonly { font-size: 10px; color: var(--qsfw-text-faint, #888); font-style: italic; }
.hb-transfer { display: flex; align-items: stretch; gap: 16px; max-width: 900px; }
.hb-transfer-col { flex: 1; display: flex; flex-direction: column; }
.hb-transfer-head { font-weight: 600; margin-bottom: 6px; }
.hb-transfer-search { margin-bottom: 6px; padding: 5px 8px; }
.hb-transfer-list { width: 100%; min-height: 280px; font-size: 12px; }
.hb-transfer-list option { padding: 3px 6px; }
.hb-transfer-btns { display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.hb-transfer-btns .button { font-weight: bold; font-size: 16px; line-height: 1; padding: 6px 10px; }
.link-input {
    width: 100%!important;
    max-width: none !important;
    text-align: left !important;
    font-size: 10px !important;
}
.sku-input { width: 90px !important; font-size: 11px !important; }
/* Specificity-Bump: die Redesign-Regel `.qsfw-admin-wrap input[type="text"]` (0,2,1)
   schlägt einfache .edit-input.stock-* (0,2,0). Darum hier den Wrapper mitnehmen,
   damit die Stock-Ampel (rot/orange/grün) gewinnt. */
/* Bewusst kräftigere, klar unterscheidbare Töne: die --qsfw-*-bg-Variablen sind für die
   Ampel zu blass (rot ~#fef2f2 vs. orange ~#fff7ed kaum trennbar). */
.qsfw-admin-wrap .edit-input.stock-critical { background-color: #fecaca !important; font-weight: bold; }
.qsfw-admin-wrap .edit-input.stock-warning { background-color: #fed7aa !important; font-weight: bold; }
.qsfw-admin-wrap .edit-input.stock-ok { background-color: #bbf7d0 !important; font-weight: bold; }
.stock-disabled { background-color: var(--qsfw-surface-4, #f0f0f1) !important; color: var(--qsfw-text-dim, #999) !important; }
.num-spinner { position: relative; }
.num-spinner .edit-input { padding-right: 16px !important; }
.ns-btns { position: absolute; top: 1px; bottom: 1px; right: 1px; width: 13px; display: flex; flex-direction: column; }
.ns-btn { display: flex; align-items: center; justify-content: center; flex: 1; width: 100%; background: var(--qsfw-btn-bg, #f1f1f1); border: none; border-left: 1px solid var(--qsfw-border-light, #ddd); cursor: pointer; font-size: 6px; color: var(--qsfw-text-muted, #666); padding: 0; line-height: 1; min-height: 0; }
.ns-btn + .ns-btn { border-top: 1px solid var(--qsfw-border-light, #ddd); }
.ns-btn:hover { background: var(--qsfw-accent, #2271b1); color: var(--qsfw-on-accent, #fff); }
.select-input { width: 100% !important; min-width: 0; max-width: 100%; padding: 3px !important; font-size: 11px !important; text-align: left !important; box-sizing:border-box; }

/* Tabelle: Produkt-Spalte flexibel, Header zweizeilig erlauben */
.wp-list-table { table-layout: fixed; border-collapse: separate; border-spacing: 0; }

.wp-list-table thead th,
.wp-list-table tbody td {
    padding: 6px 5px !important;
}
.wp-list-table thead th:first-child,
.wp-list-table tbody td:first-child {
    padding-left: 10px !important;
}
.wp-list-table thead th:last-child,
.wp-list-table tbody td:last-child {
    padding-right: 10px !important;
}

.wp-list-table thead th {
    /* Nur Struktur + Sticky-Verhalten. Aussehen (Hintergrund, Schrift, Rahmen,
       vertical-align …) setzt der Theme-Layer weiter unten. */
    white-space: normal !important;
    position: sticky;
    top: 32px;
    z-index: 10;
}
@media (max-width: 782px) {
    .wp-list-table thead th { top: 46px; }
}

.wp-list-table tbody tr {
    transition: background-color 0.15s ease;
}
.wp-list-table tbody tr:hover:not(.stock-done) {
    background-color: var(--qsfw-row-hover, #f0f6fc) !important;
}

/* Bild-Spalte schmal halten und mittig ausrichten – spart Platz auf kleinen Screens */
.wp-list-table th.col-image,
.wp-list-table td.col-image {
    padding-left: 2px !important;
    padding-right: 2px !important;
    text-align: center !important;
}
.wp-list-table td.col-image .hb-img-edit { display: inline-block; }

.wp-list-table th.col-title,
.wp-list-table td.col-title { width: auto !important; }
.wp-list-table td.col-title input.title-input {
    width: 100%;
    min-width: 160px;
    max-width: none !important;
}

/* === Variations-Gruppierung (Alle-Produkte-Tab) === */
.qsfw-parent-row { cursor: pointer; }
.qsfw-parent-row > td { background: var(--qsfw-surface-3, #f6f7f7); }
.qsfw-parent-row:hover > td { background: var(--qsfw-row-hover, #f0f6fc); }

/* Varianten-Toggle als klickbarer Pill-Button (Pfeil + "n Varianten") */
.qsfw-var-toggle {
    display: inline-flex; align-items: center; gap: 5px;
    border: 1px solid var(--qsfw-border, #ccd0d4);
    background: var(--qsfw-surface, #fff);
    color: var(--qsfw-text-muted, #50575e);
    cursor: pointer; vertical-align: middle;
    margin-right: 8px; padding: 2px 10px;
    border-radius: 12px; font-size: 12px; line-height: 1.5;
    transition: background .12s, border-color .12s, color .12s;
}
.qsfw-var-toggle:hover {
    border-color: var(--qsfw-accent, #2271b1);
    color: var(--qsfw-accent, #2271b1);
    background: var(--qsfw-row-hover, #f0f6fc);
}
.qsfw-parent-row.qsfw-expanded .qsfw-var-toggle {
    border-color: var(--qsfw-accent, #2271b1);
    color: var(--qsfw-accent, #2271b1);
}
.qsfw-var-arrow { display: inline-block; font-size: 9px; }
.qsfw-var-count { font-weight: 600; }

/* Offene Gruppe markieren: Akzent-Balken links an Eltern + Kind-Zeilen */
.qsfw-parent-row.qsfw-expanded > td:first-child,
.qsfw-variation-row:not(.qsfw-collapsed) > td:first-child {
    box-shadow: inset 3px 0 0 var(--qsfw-accent, #2271b1);
}

.qsfw-variation-row[hidden] { display: none; }
.qsfw-variation-row > td { background: var(--qsfw-surface-faint, #fbfbfc); }
.qsfw-variation-row td.col-title { padding-left: 28px; position: relative; }
.qsfw-variation-row td.col-title::before {
    content: "\21B3"; position: absolute; left: 12px; color: var(--qsfw-text-dim, #999);
}
/* Eltern-Bestand (Summe der Varianten): gesperrtes Feld im stock-disabled-Stil,
   zentriert + fett als Hinweis auf einen errechneten, nicht editierbaren Wert. */
.qsfw-agg-stock {
    text-align: center; font-weight: 600; cursor: not-allowed;
}

/* Filter-Layout */
.hb-filter-container {
    /* Nur Positionierungs-Kontext (Anker fürs Cockpit-Toggle); Hintergrund,
       Rahmen und Abstände setzt der Theme-Layer weiter unten. */
    position: relative;
}
.hb-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
/* Zeile 1 (Gruppe A „Liste" links, Gruppe C „Status" rechts) – Felder unten
   ausrichten, damit die Mini-Captions oben sauber abschliessen. */
.hb-row-1 { justify-content: space-between; align-items: flex-end; }
.hb-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hb-actions { display: flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 13px; }
.hb-actions-sep { color: var(--qsfw-text-faint, #c3c4c7); margin: 0 2px; }

/* Gruppierte Toolbar mit beschrifteten Feldern (Caption oben) */
.qsfw-tbgroup { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.qsfw-field { display: flex; flex-direction: column; gap: 3px; }
.qsfw-field-cap {
    font-size: 10px; font-weight: 600; letter-spacing: .04em;
    text-transform: uppercase; color: var(--qsfw-text-muted, #646970);
    line-height: 1.3; white-space: nowrap;
}
/* Einheitliche Control-Höhe: damit sind alle Kästchen oben UND unten bündig –
   und dadurch stehen auch alle Captions auf gleicher Höhe. Die <details>-
   Summaries (View, Spalten) sind sonst niedriger als die Selects/Buttons.
   !important, weil WP-Core/Theme die nativen Controls eigene Höhen geben. */
.qsfw-field > select,
.qsfw-field > input,
.qsfw-field > .button,
.qsfw-field .hb-dropdown > summary {
    height: 30px !important;
    min-height: 30px !important;
    box-sizing: border-box !important;
    line-height: normal;
    margin: 0;
}
.qsfw-field > .button,
.qsfw-field .hb-dropdown > summary {
    display: inline-flex !important;
    align-items: center;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
/* Felder ohne Caption (reine Aktions-Buttons) richten sich an der Control-
   Reihe der beschrifteten Felder aus – die align-items:flex-end der Gruppe
   erledigt das automatisch. */
.qsfw-field--nocap { justify-content: flex-end; }
/* Inline-Checkbox-Label (z. B. „Leere Spalte") als gleich hohe Box unten
   bündig zu den übrigen Controls. */
.qsfw-field--check { display: inline-flex; align-items: center; align-self: flex-end; height: 30px; }

/* Cockpit-Toggle: absolute positioniert oben rechts im Container, nimmt keinen Layout-Platz */
#qsfw-cockpit-toggle {
    /* Struktur/Position + Höhen-Reset. Farbe, Rahmen, Radius, Padding und Schatten
       kommen aus dem Theme-Layer. height:auto + min-height:unset (mit !important)
       heben die WP-Core-Button-Höhe auf – sie schlagen bewusst das (normale)
       min-height:40px des Theme-Layers, das darum dort entfernt wurde. */
    position: absolute; z-index: 2;
    font-size: 12px; letter-spacing: .03em;
    display: inline-flex; align-items: center; gap: 6px;
    cursor: pointer;
    height: auto !important; min-height: unset !important; line-height: 1.3;
    transition: filter .15s, box-shadow .15s;
}
#qsfw-cockpit-toggle:hover {
    /* Hover-Hintergrund (Verlauf) kommt aus dem Theme-Layer; hier nur Zusatz-Effekte. */
    filter: brightness(.88);
    box-shadow: 0 3px 12px rgba(34,113,177,.5);
}
.qsfw-cockpit-chevron {
    font-size: 18px; color: var(--qsfw-on-accent, #fff);
    transition: transform .3s ease;
}
.hb-filter-container.is-collapsed .qsfw-cockpit-chevron { transform: rotate(180deg); }
/* Collapsed-Höhe: 12px top-padding + 0 content + 30px bottom-padding = 42px */
.hb-filter-container.is-collapsed { padding-bottom: 30px; }
/* Form-Animation: max-height + opacity, gesteuert per JS (scrollHeight-Messung) */
#hb-filter-form { transition: max-height .35s ease-in-out, opacity .25s ease; }

/* „Drucken & Export"-Zeile: eigene Zeile, links bündig mit den übrigen Feldern */
.hb-row-output {
    align-items: stretch;
}
/* Output-Gruppen: Card-Chips für PDF vs. Schnellbestellung */
.qsfw-output-group {
    /* Layout; Hintergrund/Radius/Padding kommen aus dem Theme-Layer. */
    display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap;
    border: 1px solid var(--qsfw-border-light, #dcdcde);
}
.hb-row-2 { padding-left: 12px; }
.hb-row-2 .select2-container { width: 220px !important; flex: 0 0 220px; height: 40px !important; box-sizing: border-box; }
/* Kategorien-Box (select2) und Suche exakt gleich hoch (40px = WP-Admin-Inputhöhe).
   !important + min-height, weil WP-Core auf input[type=search] ein min-height:40px
   setzt (schlägt sonst height) und select2 dem Container/der Auswahl eigene Höhen gibt. */
.hb-row-2 .select2-container .select2-selection--single { height: 40px !important; box-sizing: border-box; }
.hb-row-2 .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 38px !important; }
.hb-row-2 .select2-container--default .select2-selection--single .select2-selection__arrow { height: 38px !important; }
.hb-row-2 select.hb-cat-select { width: 220px; height: 40px !important; box-sizing: border-box; }
/* Etikett-Auswahl bei „Nachbestellung" – gleiche Höhe wie Suche/Kategorie,
   ohne Caption. Breite richtet sich nach dem Inhalt, mit sinnvollem Minimum. */
.hb-row-2 select.hb-row2-label { min-width: 220px; height: 40px !important; min-height: 40px !important; box-sizing: border-box; padding: 0 8px; }
.hb-row-2 #stock-search { flex: 0 0 auto; width: 420px; max-width: 100%; height: 40px !important; min-height: 40px !important; box-sizing: border-box !important; padding: 0 10px; border: 1px solid var(--qsfw-border, #ccd0d4); border-radius: 4px; }
.hb-row-2 #stock-search:focus { border-color: var(--qsfw-accent, #2271b1); box-shadow: 0 0 0 1px var(--qsfw-accent, #2271b1); outline: 0; }



#search-status { display: inline-block; margin-left: 10px; font-size: 12px; color: var(--qsfw-text-muted, #666); min-width: 100px; }
#search-status .searching { color: var(--qsfw-accent, #2271b1); }
#search-status .hits { color: var(--qsfw-success-text, #155724); font-weight: bold; }
.edit-input.saving { border-color: var(--qsfw-accent, #2271b1) !important; background-color: var(--qsfw-saving-bg, #fff8dc) !important; }
.edit-input.saved  { border-color: var(--qsfw-ok, #46b450) !important; background-color: var(--qsfw-saved-bg, #ecf7ed) !important; }
.edit-input.failed { border-color: var(--qsfw-danger, #dc3232) !important; background-color: var(--qsfw-failed-bg, #fbeaea) !important; }
.save-indicator { display:inline-block; margin-left:4px; font-size:14px; font-weight:bold; vertical-align:middle; }
.save-indicator.ok   { color: var(--qsfw-ok, #46b450); }
.save-indicator.fail { color: var(--qsfw-danger, #dc3232); }
.title-input { width: 100% !important; text-align: left !important; box-sizing: border-box; }
.label-print-btn { cursor:pointer; font-size:14px; }
.label-print-btn:hover { transform:scale(1.2); display:inline-block; }

.action-icon { cursor: pointer; margin-left: 5px; font-size: 16px; color: var(--qsfw-text-faint, #72777c); text-decoration: none; }

/* Dropdowns mit <details> */
.hb-dropdown { position: relative; display: inline-block; vertical-align: middle; }
.hb-dropdown summary {
    cursor: pointer; padding: 4px 24px 4px 10px;
    background: var(--qsfw-surface-3, #f6f7f7); border: 1px solid var(--qsfw-border, #c3c4c7);
    border-radius: 3px; list-style: none; user-select: none;
    font-size: 12px; position: relative;
}
.hb-dropdown summary::-webkit-details-marker { display: none; }
.hb-dropdown summary::after {
    content: '▾'; position: absolute; right: 8px; top: 50%;
    transform: translateY(-50%); font-size: 10px;
}
.hb-dropdown[open] summary { background: var(--qsfw-surface-4, #f0f0f1); }
.hb-dropdown-panel {
    position: absolute; top: 100%; left: 0; margin-top: 2px;
    background: var(--qsfw-surface, #fff); border: 1px solid var(--qsfw-border, #c3c4c7); border-radius: 3px;
    padding: 8px 12px; z-index: 100; min-width: 180px;
    box-shadow: 0 2px 5px var(--qsfw-shadow, rgba(0,0,0,0.15));
}
.hb-dropdown-panel label {
    display: block; padding: 3px 0; font-size: 12px;
    cursor: pointer; white-space: nowrap;
}
.hb-dropdown-panel input[type="checkbox"] { margin-right: 6px; }
.hb-pdf-qty-lbl { font-size: 12px; white-space: nowrap; cursor: pointer; }
.hb-pdf-qty-lbl input[type="checkbox"] { margin-right: 4px; vertical-align: middle; }
/* === Settings-Page === */
.hb-settings-wrap {
    background: var(--qsfw-surface, #fff);
    padding: 30px;
    border: 1px solid var(--qsfw-border, #ccd0d4);
    margin-top: 20px;
    max-width: 1200px;
}
.hb-settings-intro {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--qsfw-border-faint, #f0f0f1);
}
.hb-settings-intro h2 { margin-top: 0; }
.hb-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.hb-settings-group {
    background: var(--qsfw-surface-2, #f9f9f9);
    border: 1px solid var(--qsfw-border-light, #e5e5e5);
    border-radius: 4px;
    padding: 15px 18px;
}
.hb-settings-group h3 {
    margin: 0 0 12px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--qsfw-border-light, #e5e5e5);
    padding-bottom: 8px;
}
.hb-settings-cols {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.hb-col-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 4px 0;
    font-size: 13px;
}
.hb-col-checkbox input[type="checkbox"] {
    margin-right: 10px;
}
.hb-col-checkbox:hover span {
    color: var(--qsfw-accent, #2271b1);
}
.hb-settings-actions {
    text-align: right;
    padding-top: 20px;
    border-top: 1px solid var(--qsfw-border-faint, #f0f0f1);
}

/* === Neue Spalten-Styles === */
.cat-display, .content-preview {
    /* Text vertikal mittig — auf gleicher Höhe wie die Feld-Texte in den
       Nachbarspalten (Inputs/Selects sind ~30px hoch und zentrieren ihren
       Text intern; reiner Zellentext säße sonst oben). */
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 30px;
    font-size: 11px;
    line-height: 1.4;
    max-height: 38px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--qsfw-text-muted, #555);
}
.textarea-input {
    width: 100% !important;
    max-width: none !important;
    text-align: left !important;
    font-size: 11px;
    resize: vertical;
    min-height: 38px;
}
.permalink-input {
    width: 100% !important;
    max-width: none !important;
    text-align: left !important;
    font-size: 11px;
}
.date-input {
    width: 100% !important;
    max-width: 110px !important;
    font-size: 11px;
}
/* === Drag & Drop === */
.hb-sortable-wrap {
    background: var(--qsfw-surface-2, #f9f9f9);
    border: 1px solid var(--qsfw-border-light, #e5e5e5);
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
    max-width: 600px;
}
.hb-sortable-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.hb-sortable-item {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--qsfw-border-light, #ddd);
    padding: 10px 14px;
    margin-bottom: 6px;
    cursor: grab;
    user-select: none;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.hb-sortable-item:active {
    cursor: grabbing;
}
.hb-sortable-item.sortable-ghost {
    opacity: 0.4;
    background: var(--qsfw-row-hover, #e7f3ff);
    border-color: var(--qsfw-accent, #2271b1);
}
.hb-sortable-item.sortable-chosen {
    box-shadow: 0 4px 12px var(--qsfw-shadow, rgba(0,0,0,0.15));
    transform: scale(1.02);
}
.hb-drag-handle {
    color: var(--qsfw-text-dim, #999);
    font-size: 18px;
    line-height: 1;
    cursor: grab;
    padding: 0 4px;
}
.hb-item-label {
    flex: 1;
    font-weight: 600;
    color: var(--qsfw-text, #1d2327);
}
.hb-item-group {
    font-size: 11px;
    color: var(--qsfw-text-faint, #888);
    background: var(--qsfw-surface-4, #f0f0f1);
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}
.hb-empty-hint {
    background: var(--qsfw-hint-bg, #fff8e1);
    border: 1px solid var(--qsfw-hint-border, #ffd966);
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    color: var(--qsfw-warning-text, #856404);
    font-size: 13px;
    max-width: 600px;
    line-height: 1.6;
}
/* Händler-Link Spalte: flexibel mit sinnvollen Grenzen */
.wp-list-table th.col-link,
.wp-list-table td.col-link {
    min-width: 140px;
    max-width: 320px;
}
/* === Ansicht-Presets === */
.hb-preset-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.hb-preset-card {
    background: var(--qsfw-surface-2, #f9f9f9);
    border: 1px solid var(--qsfw-border-light, #e5e5e5);
    border-radius: 4px;
    padding: 14px 16px;
}
.hb-preset-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.hb-preset-head strong { font-size: 14px; }
.hb-preset-actions .button { margin-left: 4px; }
.hb-preset-chips {
    font-size: 12px;
    color: var(--qsfw-text-muted, #50575e);
    line-height: 1.5;
    margin-bottom: 4px;
}
.hb-preset-meta { font-size: 11px; color: var(--qsfw-text-faint, #787c82); }
.hb-preset-defaults { margin-top: 8px; }
.hb-preset-badge {
    display: inline-block;
    background: var(--qsfw-accent, #2271b1);
    color: var(--qsfw-on-accent, #fff);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-right: 6px;
}
.hb-preset-editor {
    background: var(--qsfw-surface-3, #f6f7f7);
    border: 1px solid var(--qsfw-border-light, #dcdcde);
    border-radius: 4px;
    padding: 20px;
    margin-top: 16px;
    max-width: 720px;
}
.hb-preset-editor h3 { margin-top: 0; }
.hb-preset-check-lbl { margin: 0 8px; }
.hb-preset-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin: 16px 0;
}
.hb-preset-controls label { font-size: 12px; }
.hb-preset-default-box {
    border: 1px solid var(--qsfw-border-light, #dcdcde);
    border-radius: 4px;
    padding: 10px 14px;
    margin: 12px 0;
}
.hb-preset-default-box legend { font-weight: 600; padding: 0 6px; }
.hb-preset-default-box label { display: block; margin: 4px 0; }
/* Preset-Selektor im Tab */
.hb-preset-dropdown .hb-dropdown-panel { min-width: 240px; }
.hb-preset-scroll { max-height: 250px; overflow-y: auto; }
.hb-preset-opt {
    display: block;
    padding: 6px 10px;
    text-decoration: none;
    color: var(--qsfw-text, #1d2327);
    border-radius: 3px;
}
.hb-preset-opt:hover { background: var(--qsfw-surface-4, #f0f0f1); }
.hb-preset-row {
    display: flex;
    align-items: center;
    border-radius: 3px;
}
.hb-preset-row:hover { background: var(--qsfw-surface-4, #f0f0f1); }
.hb-preset-row .hb-preset-opt { flex: 1; }
.hb-preset-row .hb-preset-opt:hover { background: transparent; }
.hb-preset-row.is-active .hb-preset-opt { font-weight: 600; }
.hb-preset-defbtn {
    flex: 0 0 auto;
    padding: 6px 10px;
    text-decoration: none;
    color: var(--qsfw-text-dim, #b0b0b0);
    font-size: 14px;
    line-height: 1;
}
.hb-preset-defbtn:hover { color: var(--qsfw-star, #d4a017); }
.hb-preset-defbtn.is-default { color: var(--qsfw-star, #d4a017); }
.hb-preset-updbtn {
    flex: 0 0 auto;
    padding: 6px 8px;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    opacity: .75;
}
.hb-preset-updbtn:hover { opacity: 1; }
.hb-preset-delbtn {
    flex: 0 0 auto;
    padding: 6px 8px;
    text-decoration: none;
    color: var(--qsfw-text-dim, #b0b0b0);
    font-size: 13px;
    line-height: 1;
    opacity: .6;
}
.hb-preset-delbtn:hover { opacity: 1; color: #cc1818; }
.hb-preset-star { color: var(--qsfw-star, #d4a017); }
.hb-preset-foot {
    border-top: 1px solid var(--qsfw-border-faint, #f0f0f1);
    margin-top: 6px;
    padding-top: 6px;
    font-size: 11px;
}
/* Aktuelle Ansicht als Preset speichern (in Ansicht-Dropdown) */
.hb-preset-save-row {
    display: flex;
    align-items: center;
    gap: 6px;
    border-top: 1px solid var(--qsfw-border-faint, #f0f0f1);
    margin-top: 6px;
    padding-top: 8px;
}
.hb-preset-save-row input[type="text"] {
    flex: 1;
    font-size: 12px;
    padding: 3px 6px;
    border: 1px solid var(--qsfw-border, #c3c4c7);
    border-radius: 3px;
    min-width: 0;
}
/* Spalten-Dropdown: sortierbare Liste */
.hb-col-dropdown .hb-dropdown-panel { padding: 4px 6px; min-width: 260px; }
.hb-col-sortable-list { margin: 0; padding: 0; list-style: none; }
.hb-col-sortable-list .hb-sortable-item {
    padding: 4px 4px;
    font-size: 12px;
    border-bottom: 1px solid var(--qsfw-border-faint, #f7f7f7);
}
.hb-col-sortable-list .hb-sortable-item:last-child { border-bottom: none; }
.hb-col-check-lbl { margin: 0 4px; cursor: pointer; }
/* Settings Sub-Navigation */
.hb-settings-subtabs { margin-bottom: 0 !important; border-bottom: 1px solid var(--qsfw-border, #c3c4c7); }

/* === Etiketten-Designer === */
.hb-label-editor { --hb-accent: var(--qsfw-accent, #2271b1); }
.hb-label-grid {
    display: flex; gap: 28px; align-items: flex-start; flex-wrap: nowrap;
}
.hb-label-form { flex: 1 1 auto; min-width: 0; }

/* Sticky-Vorschau: align-self:flex-start ist entscheidend, sonst
   streckt der Flex-Default die Spalte auf volle Höhe und sticky greift nie. */
.hb-label-preview-wrap {
    /* Sticky-Layout; Flächen-Look (Hintergrund, Radius, Schatten) im Theme-Layer. */
    flex: 0 0 380px; align-self: flex-start;
    position: sticky; top: 32px;
    border: 1px solid var(--qsfw-border-light, #e2e4e7);
    padding: 18px;
}
.hb-label-preview-wrap .description {
    margin: 0 0 12px; font-size: 11px; font-weight: 600; letter-spacing: .04em;
    text-transform: uppercase; color: var(--qsfw-text-faint, #8c8f94); display: flex; align-items: center; gap: 6px;
}
.hb-label-preview-wrap .description::before {
    content: ""; width: 8px; height: 8px; border-radius: 50%;
    background: var(--qsfw-ok, #46b450); box-shadow: 0 0 0 3px rgba(70,180,80,.18);
}
.hb-label-hint {
    margin: 10px 0 0; font-size: 11px; color: var(--qsfw-text-faint, #8c8f94);
    text-align: center; font-style: italic;
}
#qsfw-label-preview {
    touch-action: none; user-select: none;
    background:
        linear-gradient(45deg, var(--qsfw-checker, #f0f0f1) 25%, transparent 25%) -8px 0/16px 16px,
        linear-gradient(-45deg, var(--qsfw-checker, #f0f0f1) 25%, transparent 25%) -8px 0/16px 16px,
        linear-gradient(45deg, transparent 75%, var(--qsfw-checker, #f0f0f1) 75%) -8px 0/16px 16px,
        linear-gradient(-45deg, transparent 75%, var(--qsfw-checker, #f0f0f1) 75%) -8px 0/16px 16px,
        var(--qsfw-surface, #fff);
    border: 1px solid var(--qsfw-border, #c3c4c7);
    box-shadow: 0 2px 6px var(--qsfw-shadow, rgba(0,0,0,.12));
    max-width: 100%; display: block; margin: 0 auto;
}

/* Karten-Look für die Feld-Abschnitte */
.hb-label-fs {
    border: 1px solid var(--qsfw-border-light, #e2e4e7); border-radius: 10px;
    padding: 6px 18px 16px; margin: 0 0 14px; background: var(--qsfw-surface, #fff);
    box-shadow: 0 1px 2px var(--qsfw-shadow, rgba(0,0,0,.04));
    transition: box-shadow .15s, border-color .15s;
}
.hb-label-fs:hover { box-shadow: 0 3px 10px var(--qsfw-shadow, rgba(0,0,0,.07)); }
.hb-label-fs > legend {
    font-weight: 600; font-size: 13px; padding: 0 6px; color: var(--qsfw-text, #1d2327);
}
.hb-label-el > legend { width: 100%; padding: 0; }
.hb-label-el > legend label {
    display: flex; align-items: center; gap: 9px;
    font-weight: 600; font-size: 14px; cursor: pointer;
    padding: 10px 4px 6px; color: var(--qsfw-text, #1d2327);
}
.hb-label-el > legend input[type=checkbox] {
    width: 18px; height: 18px; margin: 0; cursor: pointer;
    accent-color: var(--hb-accent);
}
/* Deaktivierte Elemente dezent ausgrauen (moderne Browser) */
/* Hervorhebung beim Anklicken eines Elements in der Vorschau */
@keyframes hbLabelFlash {
    0%   { box-shadow: 0 0 0 3px rgba(34,113,177,.55), 0 6px 18px rgba(34,113,177,.30); border-color: var(--hb-accent); }
    100% { box-shadow: 0 1px 2px rgba(0,0,0,.04); border-color: var(--qsfw-border-light, #e2e4e7); }
}
.hb-label-el.hb-flash {
    animation: hbLabelFlash 1.6s ease-out;
    border-color: var(--hb-accent);
}
.hb-label-el:has(legend input:not(:checked)) { background: var(--qsfw-surface-2, #fafafa); opacity: .72; }
.hb-label-el:has(legend input:not(:checked)) .hb-label-row { filter: grayscale(.4); }

.hb-label-row {
    display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: flex-end;
}
.hb-label-row:not(:last-child) { margin-bottom: 10px; }
.hb-label-row label, .hb-label-fs > label {
    display: flex; flex-direction: column; gap: 5px;
    font-size: 11px; font-weight: 600; letter-spacing: .02em;
    text-transform: uppercase; color: var(--qsfw-text-muted, #646970);
}
.hb-label-row input[type=number],
.hb-label-row input[type=text],
.hb-label-row select,
.hb-label-fs > label input,
.hb-label-fs > label select {
    border: 1px solid var(--qsfw-border, #c3c4c7); border-radius: 7px;
    padding: 6px 9px; font-size: 13px; font-weight: 400;
    text-transform: none; letter-spacing: normal; color: var(--qsfw-text, #1d2327);
    background: var(--qsfw-input-bg, #fff); transition: border-color .12s, box-shadow .12s; min-height: 34px;
}
.hb-label-row input:focus,
.hb-label-row select:focus,
.hb-label-fs > label input:focus,
.hb-label-fs > label select:focus {
    border-color: var(--hb-accent);
    box-shadow: 0 0 0 3px rgba(34,113,177,.18); outline: none;
}
.hb-label-row input[type=number],
.hb-label-row select { width: 104px; }
.hb-label-row input[type=text] { width: 190px; }
.hb-label-row label.hb-label-chk {
    flex-direction: row; align-items: center; gap: 7px;
    text-transform: none; font-size: 13px; font-weight: 500;
    color: var(--qsfw-text, #1d2327); align-self: center;
}
.hb-label-row label.hb-label-chk input { accent-color: var(--hb-accent); width: 16px; height: 16px; }

/* Größen-Fieldset oben hervorheben */
.hb-label-fs:first-of-type {
    background: linear-gradient(180deg, var(--qsfw-surface-3, #f6f9fc), var(--qsfw-surface, #fff));
    border-color: var(--qsfw-border-light, #cfe0ee);
}

.hb-label-editor h3 {
    font-size: 18px; margin: 4px 0 14px; color: var(--qsfw-text, #1d2327);
}
.hb-label-editor .hb-preset-default-box {
    border: 1px dashed var(--qsfw-border, #c3c4c7); border-radius: 10px; background: var(--qsfw-surface-faint, #fbfbfc);
}
.hb-label-editor .hb-settings-actions {
    position: sticky; bottom: 0; background: var(--qsfw-surface-blur, rgba(255,255,255,.92));
    backdrop-filter: blur(3px); padding: 14px 0; margin-top: 8px;
    border-top: 1px solid var(--qsfw-border-light, #e2e4e7); z-index: 2;
}

@media (max-width: 1100px) {
    .hb-label-grid { flex-wrap: wrap; }
    .hb-label-preview-wrap {
        order: -1; flex: 1 1 100%; position: static;
        display: flex; align-items: center; gap: 16px;
    }
    .hb-label-preview-wrap .description { margin: 0; }
}

/* === MASSENBEARBEITUNG === */
.hb-bulk-cell { text-align: center; }
.col-bulk_select { text-align: center; }
#hb-bulk-all { margin: 0; }

#hb-bulk-bar {
    position: fixed;
    left: 160px; right: 0; bottom: 0;
    background: var(--qsfw-bar-bg, rgba(255, 255, 255, 0.97));
    backdrop-filter: blur(4px);
    border-top: 1px solid var(--qsfw-border, #c3c4c7);
    box-shadow: 0 -2px 8px var(--qsfw-shadow, rgba(0, 0, 0, 0.08));
    padding: 12px 20px;
    z-index: 9990;
    transform: translateY(110%);
    transition: transform 0.18s ease;
}
#hb-bulk-bar.is-visible { transform: translateY(0); }
.folded #hb-bulk-bar { left: 36px; }
@media (max-width: 960px) { #hb-bulk-bar { left: 0; } }

#hb-reorder-bulk-bar {
    position: fixed;
    left: 160px; right: 0; bottom: 0;
    background: var(--qsfw-bar-bg, rgba(255, 255, 255, 0.97));
    backdrop-filter: blur(4px);
    border-top: 1px solid var(--qsfw-border, #c3c4c7);
    box-shadow: 0 -2px 8px var(--qsfw-shadow, rgba(0, 0, 0, 0.08));
    padding: 12px 20px;
    z-index: 9990;
    transform: translateY(110%);
    transition: transform 0.18s ease;
}
#hb-reorder-bulk-bar.is-visible { transform: translateY(0); }
.folded #hb-reorder-bulk-bar { left: 36px; }
@media (max-width: 960px) { #hb-reorder-bulk-bar { left: 0; } }
#hb-reorder-bulk-bar select {
    padding: 5px 8px; border: 1px solid var(--qsfw-border, #c3c4c7); border-radius: 3px;
    font-size: 13px; height: 32px; box-sizing: border-box;
}

.hb-bulk-inner {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.hb-bulk-sel { font-size: 13px; }
#hb-bulk-bar select,
#hb-bulk-bar .hb-bulk-input {
    padding: 5px 8px; border: 1px solid var(--qsfw-border, #c3c4c7); border-radius: 3px;
    font-size: 13px; height: 32px; box-sizing: border-box;
}
#hb-bulk-bar .hb-bulk-input[type="number"] { width: 110px; }

/* selectWoo-Widget (Kategorie-Suche) an die übrigen Bulk-Felder (32px) angleichen */
#hb-bulk-bar .select2-container { min-width: 200px; }
#hb-bulk-bar .select2-container .select2-selection--single { height: 32px; }
#hb-bulk-bar .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 32px; }
#hb-bulk-bar .select2-container--default .select2-selection--single .select2-selection__arrow { height: 30px; }

/* Modal */
#hb-bulk-modal {
    position: fixed; inset: 0;
    background: var(--qsfw-overlay, rgba(0, 0, 0, 0.5));
    z-index: 100000;
    display: none;
    align-items: center; justify-content: center;
}
#hb-bulk-modal.is-visible { display: flex; }
.hb-bulk-modal-box {
    background: var(--qsfw-surface, #fff); border-radius: 6px;
    padding: 24px 28px; max-width: 480px; width: 90%;
    box-shadow: 0 6px 30px var(--qsfw-shadow-strong, rgba(0, 0, 0, 0.3));
}
.hb-bulk-modal-box p { font-size: 14px; margin: 0 0 16px; }
#hb-bulk-modal-opts { margin: 0 0 16px; }
#hb-bulk-modal-opts:empty { margin: 0; }
.hb-bulk-opt { display: block; font-size: 13px; line-height: 1.5; }
.hb-bulk-opt input[type="checkbox"] { margin-right: 6px; vertical-align: middle; }
#hb-bulk-modal-actions button,
#hb-bulk-result button { margin-right: 8px; }
.hb-bulk-pbar {
    background: var(--qsfw-border-light, #e2e4e7); border-radius: 4px; height: 14px; overflow: hidden;
}
.hb-bulk-pfill {
    background: var(--qsfw-accent, #2271b1); height: 100%; width: 0; transition: width 0.2s ease;
}

/* === Erweiterte Filter (Slide-in Drawer) === */
#hb-adv-btn { position: relative; }
.hb-adv-badge {
    display: inline-block; margin-left: 6px; min-width: 18px;
    padding: 0 5px; border-radius: 9px; color: var(--qsfw-on-accent, #fff);
    font-size: 11px; line-height: 18px; text-align: center;
}
#hb-adv-backdrop {
    position: fixed; inset: 0; background: var(--qsfw-overlay, rgba(0, 0, 0, 0.4));
    z-index: 100000; opacity: 0; pointer-events: none;
    transition: opacity 0.2s ease;
}
#hb-adv-backdrop.is-open { opacity: 1; pointer-events: auto; }
#hb-adv-drawer {
    position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 92vw;
    box-shadow: -3px 0 16px var(--qsfw-shadow-strong, rgba(0, 0, 0, 0.22));
    z-index: 100001; display: flex; flex-direction: column;
    transform: translateX(100%); transition: transform 0.2s ease;
}
#hb-adv-drawer.is-open { transform: translateX(0); }
.hb-adv-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; border-bottom: 1px solid var(--qsfw-border-light, #dcdcde); font-size: 15px;
}
.hb-adv-x {
    background: none; border: none; font-size: 22px; line-height: 1;
    cursor: pointer; color: var(--qsfw-text-muted, #646970); padding: 0 4px;
}
.hb-adv-x:hover { color: var(--qsfw-text, #1d2327); }
.hb-adv-body { flex: 1; overflow-y: auto; padding: 8px 18px 18px; }
.hb-adv-section { padding: 12px 0; border-bottom: 1px solid var(--qsfw-border-faint, #f0f0f1); }
.hb-adv-section:last-child { border-bottom: none; }
.hb-adv-section h4 {
    margin: 0 0 8px; font-size: 12px; text-transform: uppercase;
    letter-spacing: 0.04em; color: var(--qsfw-text-muted, #646970);
}
.hb-adv-field { margin-bottom: 12px; }
.hb-adv-field:last-child { margin-bottom: 0; }
.hb-adv-flabel {
    display: block; font-weight: 600; font-size: 13px;
    color: var(--qsfw-text, #1d2327); margin-bottom: 4px;
}
.hb-adv-range { display: flex; align-items: center; gap: 6px; }
.hb-adv-range input { width: 100%; }
.hb-adv-range span { color: var(--qsfw-text-muted, #646970); }
.hb-adv-text { width: 100%; }
.hb-adv-cb {
    display: block; font-size: 13px; padding: 2px 0; color: var(--qsfw-text, #1d2327);
}
.hb-adv-termbox {
    max-height: 180px; overflow-y: auto; border: 1px solid var(--qsfw-border-light, #dcdcde);
    border-radius: 3px; padding: 6px 8px; background: var(--qsfw-surface-faint, #fbfbfc);
}
.hb-adv-empty { color: var(--qsfw-text-dim, #999); font-size: 12px; }
.hb-adv-mode { display: flex; gap: 12px; margin-bottom: 6px; }
.hb-adv-rb {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 13px; color: var(--qsfw-text, #1d2327);
}
/* SelectWoo-Dropdown im Drawer: über Drawer-Layer und Overlay sichtbar halten */
#hb-adv-drawer .select2-container { width: 100% !important; }
.select2-container--open { z-index: 100010; }
/* Body-Scroll-Lock, solange der erweiterte Filter offen ist */
body.qsfw-no-scroll { overflow: hidden; }
.hb-adv-foot {
    display: flex; gap: 8px; padding: 14px 18px;
    border-top: 1px solid var(--qsfw-border-light, #dcdcde); background: var(--qsfw-surface-3, #f6f7f7);
}
@media (max-width: 782px) {
    #hb-adv-drawer { width: 100%; }
}
.hb-bulk-pinfo { font-size: 12px; color: var(--qsfw-text-muted, #555); margin: 8px 0 0; text-align: center; }

/* --- Spalten-Sortierung (Excel-Style Mini-Menü) --- */
.wp-list-table thead th.hb-th-sortable { padding-right: 6px; }
/* .hb-th-inner: Struktur/Look definiert der Theme-Layer weiter unten
   (die Variante mit dem THRESHOLD-Fix-Kommentar). */
.hb-th-label { flex: 0 1 auto; min-width: 0; }
.hb-sort-toggle {
    /* Nur Flex-/Cursor-Basis; Größe und Aussehen kommen aus dem Theme-Layer (2 Regeln). */
    flex: 0 0 auto; cursor: pointer;
}
.hb-sort-toggle:hover { background: var(--qsfw-border-faint, rgba(0,0,0,0.08)); color: var(--qsfw-text, #1d2327); }
.hb-sort-toggle.is-active { color: var(--qsfw-accent, #2271b1); }
.wp-list-table thead th.hb-sorted {
    background: linear-gradient(to bottom, var(--qsfw-sorted-from, #eef4fb) 0%, var(--qsfw-sorted-to, #dde8f5) 100%) !important;
}
.hb-th-sortable .hb-sort-menu {
    display: none; position: absolute; top: 100%; left: 0; right: auto; margin-top: 2px;
    background: var(--qsfw-surface, #fff); border: 1px solid var(--qsfw-border, #c3c4c7); border-radius: 4px;
    box-shadow: 0 4px 14px var(--qsfw-shadow, rgba(0,0,0,0.16)); min-width: 150px; padding: 4px;
    z-index: 9995; text-transform: none; letter-spacing: 0; font-weight: 400;
}
.hb-th-sortable.hb-menu-open { z-index: 20; }
.hb-th-sortable.hb-menu-open .hb-sort-menu { display: block; }
.hb-sort-menu .hb-sort-opt {
    display: block; padding: 6px 10px; font-size: 12px; color: var(--qsfw-text, #1d2327);
    text-decoration: none; border-radius: 3px; white-space: nowrap;
}
.hb-sort-menu .hb-sort-opt:hover { background: var(--qsfw-row-hover, #f0f6fc); }

/* --- Spalten-Wertfilter (Excel-Style kombiniertes Menü) --- */
.hb-sort-toggle.is-filtered {
    color: var(--qsfw-accent, #2271b1);
    background: var(--qsfw-sorted-from, #eef4fb);
    border-color: var(--qsfw-accent, #2271b1);
    font-weight: 700;
}
.wp-list-table thead th.hb-filtered {
    background: linear-gradient(to bottom, var(--qsfw-sorted-from, #eef4fb) 0%, var(--qsfw-sorted-to, #dde8f5) 100%) !important;
}
.hb-sort-menu.hb-col-menu { min-width: 230px; max-width: 300px; }
/* Rechtsbündig ausrichten, wenn das Menü sonst über den rechten Rand ragt. */
.hb-sort-menu.hb-flip-right { left: auto; right: 0; }
.hb-colf-sep { height: 1px; background: var(--qsfw-border-light, rgba(0,0,0,0.12)); margin: 4px 2px; }
.hb-colf { padding: 4px 8px 2px; }
.hb-col-menu .hb-colf-search {
    width: 100%; box-sizing: border-box; margin: 4px 0 0;
    font-size: 12px; padding: 4px 8px;
    -webkit-appearance: none; appearance: none;
}
.hb-colf-contains { margin: 8px 0; padding: 0; }
.hb-colf-contains-link {
    display: inline-block; font-size: 12px; color: var(--qsfw-accent, #2271b1);
    text-decoration: none; padding: 2px 0;
}
.hb-colf-contains-link:hover { text-decoration: underline; }
.hb-colf-all {
    display: block; padding: 4px; font-size: 12px; font-weight: 600;
    border-bottom: 1px solid var(--qsfw-border-light, rgba(0,0,0,0.12));
    color: var(--qsfw-text, #1d2327); cursor: pointer; white-space: nowrap;
}
.hb-colf-list {
    list-style: none; margin: 0; padding: 0;
    max-height: 240px; overflow-y: auto;
}
.hb-colf-list li { margin: 0; }
.hb-colf-list label {
    display: flex; align-items: center; gap: 6px;
    padding: 3px 4px; font-size: 12px; cursor: pointer;
    color: var(--qsfw-text, #1d2327);
}
.hb-colf-list label:hover { background: var(--qsfw-row-hover, #f0f6fc); }
.hb-colf-list label span {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 230px;
}
.hb-colf-note {
    padding: 4px 6px; font-size: 11px; font-style: italic;
    color: var(--qsfw-text-faint, #777);
}
/* „(Leere)"-Eintrag (Excel-Style): optisch abgesetzt von echten Werten. */
.hb-colf-empty {
    border-bottom: 1px solid var(--qsfw-border-light, rgba(0,0,0,0.12));
}
.hb-colf-empty-label { font-style: italic; color: var(--qsfw-text-faint, #777); }
.hb-colf-foot {
    display: flex; gap: 6px; padding: 6px 2px 2px; margin-top: 4px;
    border-top: 1px solid var(--qsfw-border-light, rgba(0,0,0,0.12));
}
.hb-colf-foot .button.button-small { font-size: 11px; min-height: 24px; line-height: 22px; padding: 0 8px; }

.hb-img-edit {
    display: inline-block; position: relative; width: 40px; height: 40px;
    cursor: pointer; border-radius: 4px; overflow: hidden; vertical-align: middle;
}
.hb-img-edit img { width: 40px; height: 40px; object-fit: cover; display: block; }
.hb-img-edit .hb-img-add {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%; background: var(--qsfw-surface-3, #f6f7f7); border: 1px dashed var(--qsfw-border, #c3c4c7);
    color: var(--qsfw-text-faint, #777); font-size: 22px; line-height: 1; box-sizing: border-box; border-radius: 4px;
}
.hb-img-edit::after {
    content: "✎"; position: absolute; right: 2px; bottom: 1px;
    font-size: 10px; line-height: 12px; padding: 1px 3px;
    background: rgba(0,0,0,0.55); color: #fff; border-radius: 2px;
    opacity: 0; transition: opacity .15s;
}
.hb-img-edit:hover::after { opacity: 1; }
.hb-img-edit.is-busy { opacity: 0.5; pointer-events: none; }
/* Vom Elternprodukt geerbtes Variations-Bild: leicht abgesetzt darstellen. */
.hb-img-edit img.qsfw-inherited-img { opacity: 0.7; }

/* === Phase 1: Allgemeine Einstellungen === */

/* Zeilen-Density (Body-Klasse vom admin_body_class-Filter) */
body.qsfw-density-compact .wp-list-table thead th,
body.qsfw-density-compact .wp-list-table tbody td {
    padding: 2px 4px !important;
}
body.qsfw-density-comfortable .wp-list-table thead th,
body.qsfw-density-comfortable .wp-list-table tbody td {
    padding: 12px 8px !important;
}
/* normal = Default (6px 5px bleibt) */

/* Sticky-Header per Toggle aufhebbar (Default ist sticky) */
body:not(.qsfw-sticky-header) .wp-list-table thead th {
    position: static !important;
    box-shadow: none !important;
}

/* Akkordeon in Allgemein-Einstellungen */
.qsfw-general-form .qsfw-accordion {
    background: var(--qsfw-surface, #fff);
    border: 1px solid var(--qsfw-border, #c3c4c7);
    border-radius: 4px;
    margin: 8px 0 12px;
    overflow: hidden;
}
.qsfw-general-form .qsfw-accordion > summary {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 1px solid transparent;
    user-select: none;
    list-style: none;
}
.qsfw-general-form .qsfw-accordion > summary::-webkit-details-marker { display: none; }
.qsfw-general-form .qsfw-accordion > summary::before {
    content: "▸";
    display: inline-block;
    margin-right: 8px;
    transition: transform .15s ease;
    color: var(--qsfw-accent, #2271b1);
}
.qsfw-general-form .qsfw-accordion[open] > summary::before { transform: rotate(90deg); }
.qsfw-general-form .qsfw-accordion[open] > summary { border-bottom-color: var(--qsfw-border, #c3c4c7); }
.qsfw-general-form .qsfw-accordion-body { padding: 8px 16px 16px; }
.qsfw-general-form .qsfw-accordion-body .form-table { margin-top: 0; }

/* === Dirty-Bar (manueller Inline-Edit Modus) === */
#qsfw-dirty-bar {
    position: fixed;
    left: 160px; right: 0; bottom: 0;
    display: flex; align-items: center; gap: 12px;
    background: var(--qsfw-warning-bg, #fff3cd);
    color: var(--qsfw-text, #1d2327);
    border-top: 2px solid var(--qsfw-warning-border, #ffc107);
    box-shadow: 0 -2px 8px var(--qsfw-shadow, rgba(0, 0, 0, 0.08));
    padding: 10px 16px;
    z-index: 9991;
}
.folded #qsfw-dirty-bar,
.auto-fold #qsfw-dirty-bar { left: 36px; }
@media screen and (max-width: 782px) {
    #qsfw-dirty-bar,
    .folded #qsfw-dirty-bar,
    .auto-fold #qsfw-dirty-bar { left: 0; }
}

/* === Tastatur-Shortcut Cheat-Sheet === */
#qsfw-kbd-overlay {
    position: fixed; inset: 0;
    background: var(--qsfw-overlay, rgba(0, 0, 0, 0.55));
    z-index: 100000;
    align-items: center; justify-content: center;
}
.qsfw-kbd-box {
    background: var(--qsfw-surface, #fff); border-radius: 6px;
    padding: 24px 28px; max-width: 560px; width: 92%;
    box-shadow: 0 8px 32px var(--qsfw-shadow-strong, rgba(0, 0, 0, 0.25));
    max-height: 80vh; overflow-y: auto;
}
.qsfw-kbd-box h2 { margin: 0 0 12px; font-size: 16px; }
.qsfw-kbd-box h3 {
    margin: 16px 0 6px; font-size: 13px; color: var(--qsfw-text-muted, #555);
    text-transform: uppercase; letter-spacing: 0.04em;
}
.qsfw-kbd-box table { width: 100%; border-collapse: collapse; }
.qsfw-kbd-box th {
    text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--qsfw-border-light, #ddd);
    color: var(--qsfw-text-faint, #777); font-weight: normal; font-size: 12px;
}
.qsfw-kbd-box td { padding: 6px 8px; vertical-align: top; }
.qsfw-kbd-box tr + tr td { border-top: 1px solid var(--qsfw-border-faint, #f0f0f0); }
.qsfw-kbd-box kbd {
    background: var(--qsfw-surface-3, #f4f4f4); border: 1px solid var(--qsfw-border, #c3c4c7); border-bottom-width: 2px;
    border-radius: 3px; padding: 1px 7px;
    font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px;
    color: var(--qsfw-text, #1d2327); white-space: nowrap;
}
.qsfw-kbd-box kbd + kbd { margin-left: 2px; }
.qsfw-kbd-hint {
    margin: 14px 0 0; color: var(--qsfw-text-faint, #888); font-size: 12px; font-style: italic;
}
.hb-sort-menu .hb-sort-opt.is-active { background: var(--qsfw-accent, #2271b1); color: var(--qsfw-on-accent, #fff); }

/* ============================================================
 * QuickStock Design 2026 – Theme-Layer
 * Setzt auf den Struktur-/Basisregeln weiter oben auf und gibt der
 * Oberfläche ihr aktuelles Aussehen (Farben, Radien, Schatten,
 * Typografie). Die Farb-Variablen stehen gesammelt im :root ganz
 * oben in dieser Datei.
 * ============================================================ */

body.qsfw-density-compact,
body.qsfw-density-normal,
body.qsfw-density-comfortable {
    background: var(--qsfw-page-bg);
}
body.qsfw-density-compact #wpcontent,
body.qsfw-density-normal #wpcontent,
body.qsfw-density-comfortable #wpcontent,
body.qsfw-density-compact #wpbody-content,
body.qsfw-density-normal #wpbody-content,
body.qsfw-density-comfortable #wpbody-content {
    background: var(--qsfw-page-bg);
}
.qsfw-admin-wrap {
    max-width: none;
    margin: 0;
    /* Volle Seitenbreite nutzen (wie im alten Design) – WP setzt links/rechts
       schon eigenes Padding via #wpcontent, hier nur schmaler Innenabstand. */
    margin-right: 20px;
    padding: 14px 4px 56px;
    color: var(--qsfw-text);
    font-family: var(--qsfw-font);
    font-size: 14px;
}
.qsfw-admin-wrap *,
.qsfw-admin-wrap *::before,
.qsfw-admin-wrap *::after {
    box-sizing: border-box;
}
.qsfw-admin-wrap a {
    color: var(--qsfw-accent);
    text-decoration: none;
}
.qsfw-admin-wrap a:hover {
    color: #5b21b6;
}
.qsfw-app-header,
.qsfw-mainnav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.qsfw-app-header {
    margin-bottom: 12px;
}
.qsfw-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
}
.qsfw-brand-mark {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: linear-gradient(140deg, #8b5cf6, #c026d3);
    box-shadow: 0 8px 20px rgba(168, 85, 247, 0.32);
}
.qsfw-brand-mark img {
    width: 38px;
    height: 38px;
    display: block;
    border-radius: 11px;
}
.qsfw-brand-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.qsfw-brand-name {
    font-size: 18px;
    line-height: 1.05;
    font-weight: 800;
    color: var(--qsfw-text);
    letter-spacing: 0;
}
.qsfw-brand-sub {
    font-size: 13px;
    font-weight: 600;
    color: var(--qsfw-text-faint);
}
.qsfw-header-meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.qsfw-plan-pill,
.qsfw-version-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 30px;
    padding: 0 13px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.qsfw-plan-pill {
    color: #fff;
    background: linear-gradient(135deg, #8b5cf6, #c026d3);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.30);
}
.qsfw-version-pill {
    color: #6b7280;
    background: #fff;
    border: 1px solid var(--qsfw-border-light);
}
.qsfw-mainnav-row {
    margin-bottom: 14px;
}
.qsfw-mainnav {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    padding: 5px;
    overflow-x: auto;
    background: #fff;
    border: 1px solid var(--qsfw-border-light);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.qsfw-mainnav-item,
.qsfw-settings-nav {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 36px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--qsfw-text-muted);
    font-size: 14px;
    font-weight: 650;
    line-height: 1;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.qsfw-mainnav-item:hover,
.qsfw-settings-nav:hover {
    color: var(--qsfw-accent);
    background: var(--qsfw-accent-soft);
}
.qsfw-mainnav-item.is-active,
.qsfw-mainnav-item.is-active:hover {
    color: var(--qsfw-accent);
    background: var(--qsfw-accent-soft);
    border-color: var(--qsfw-accent);
    box-shadow: none;
    font-weight: 700;
}
.qsfw-pro-marker {
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
    color: var(--qsfw-accent);
    font-size: 12px;
    line-height: 1;
}
.qsfw-settings-nav {
    min-height: 46px;
    background: #fff;
    border-color: var(--qsfw-border-light);
    border-radius: 12px;
}
.qsfw-settings-nav.is-active {
    color: #fff;
    background: var(--qsfw-accent);
    border-color: var(--qsfw-accent);
    box-shadow: 0 6px 16px rgba(124, 58, 237, .28);
}
.qsfw-svg-icon {
    display: inline-flex;
    flex: none;
    width: 17px;
    height: 17px;
}
.qsfw-svg-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.qsfw-admin-wrap .notice,
.qsfw-admin-wrap .updated,
.qsfw-admin-wrap .error {
    border-radius: var(--qsfw-radius);
    border-color: var(--qsfw-border-light);
    box-shadow: 0 6px 18px rgba(16, 24, 40, .06);
}
.hb-filter-container,

.hb-settings-wrap,
.hb-empty-hint,
.qsfw-general-form .qsfw-accordion,
.qsfw-output-group,
.hb-sortable-wrap,
.hb-preset-editor,
.hb-preset-card,
.hb-label-preview-wrap,
.hb-label-fs,
.hb-bulk-modal-box,
.qsfw-kbd-box {
    border-color: var(--qsfw-border-light) !important;
    border-radius: var(--qsfw-radius-lg) !important;
    background: var(--qsfw-surface) !important;
    box-shadow: 0 10px 28px rgba(16, 24, 40, .06);
}
.hb-filter-container {
    margin: 0 0 22px;
    padding: 20px 20px 16px;
    border: 1px solid var(--qsfw-border-light);
}
.hb-row-1,
.qsfw-output-group,
.hb-adv-foot {
    background: transparent;
}
.hb-row-1 {
    padding: 0 132px 16px 0;
    margin-bottom: 16px;
    gap: 16px;
    border-bottom: 1px solid var(--qsfw-border-faint);
    border-radius: 0;
}
.hb-row-2,
.hb-row-output {
    gap: 14px;
}
.hb-row-output {
    margin-bottom: 14px;
}
.qsfw-output-group {
    padding: 12px;
    box-shadow: none;
}
#qsfw-cockpit-toggle {
    top: 20px;
    right: 20px;
    /* min-height bewusst NICHT gesetzt: die Basisregel erzwingt min-height:unset !important
       (Höhe = Inhalt). Ein Wert hier hätte keine Wirkung. */
    padding: 0 16px;
    border-radius: 12px;
    border: 0;
    background: linear-gradient(135deg, #8b5cf6, #c026d3);
    box-shadow: 0 10px 20px rgba(124, 58, 237, .25);
    color: #fff;
    font-family: var(--qsfw-font);
    font-weight: 750;
}
#qsfw-cockpit-toggle:hover {
    background: linear-gradient(135deg, #7c3aed, #a21caf);
}
.qsfw-field-cap,
.hb-label-row label,
.hb-label-fs > label,
.hb-adv-section h4,
.qsfw-kbd-box h3 {
    color: var(--qsfw-text-faint);
    font-family: var(--qsfw-font);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0;
    text-transform: uppercase;
}
.qsfw-admin-wrap input[type="text"],
.qsfw-admin-wrap input[type="search"],
.qsfw-admin-wrap input[type="number"],
.qsfw-admin-wrap input[type="date"],
.qsfw-admin-wrap input[type="url"],
.qsfw-admin-wrap input[type="email"],
.qsfw-admin-wrap select,
.qsfw-admin-wrap textarea,
.edit-input,
.select-input,
.textarea-input,
.permalink-input,
.date-input,
.hb-dropdown summary,
.hb-row-2 #stock-search,
.hb-row-2 select.hb-cat-select,
.hb-row-2 select.hb-row2-label {
    min-height: 36px;
    border: 1px solid var(--qsfw-input-border) !important;
    border-radius: 10px !important;
    background: var(--qsfw-input-bg) !important;
    color: var(--qsfw-text) !important;
    font-family: var(--qsfw-font);
    font-size: 13px;
    font-weight: 400;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}
.qsfw-admin-wrap input:focus,
.qsfw-admin-wrap select:focus,
.qsfw-admin-wrap textarea:focus,
.hb-dropdown[open] summary,
.hb-row-2 #stock-search:focus {
    border-color: var(--qsfw-accent) !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, .12) !important;
    outline: none;
}
/* Dropdown-Pfeil (Chevron) wiederherstellen: Die Feld-Grundregel setzt oben
   `background: ... !important` (Shorthand) und überschreibt damit den nativen
   WP-Select-Pfeil. Wir zeichnen einen eigenen Chevron, der zum Design passt,
   damit klar bleibt, dass es sich um ein Auswahlfeld handelt. */
.qsfw-admin-wrap select,
.select-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2350575e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 9px center !important;
    background-size: 14px 14px !important;
    padding-right: 28px !important;
    /* Text vertikal mittig: ohne oben/unten-Padding zentriert der Browser die
       Zeile über die volle Höhe (wie bei <input>). Die Basisregel setzt sonst
       `padding: 3px`, wodurch der Select-Text nach unten rutscht. */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: normal !important;
}
.qsfw-admin-wrap .button,
.qsfw-admin-wrap .button-secondary,
.qsfw-admin-wrap .button-small,
.hb-dropdown summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid var(--qsfw-border-light);
    border-radius: 10px;
    background: #fff;
    color: var(--qsfw-text-muted);
    font-family: var(--qsfw-font);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}
/* Dropdown-Summaries (VIEW, LABEL, COLUMNS …) sind Auswahlfelder, keine
   Aktions-Buttons: Text normal statt fett. Buttons bleiben bei 700. */
.hb-dropdown summary {
    font-weight: 400;
}
.hb-row-1 .qsfw-field > select,
.hb-row-1 .qsfw-field > input,
.hb-row-1 .qsfw-field > .button,
.hb-row-1 .qsfw-field .hb-dropdown > summary {
    height: 36px !important;
    min-height: 36px !important;
}
.qsfw-filter-actions {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 8px;
    padding-top: 16px;
}
.qsfw-filter-actions .button {
    white-space: nowrap;
    /* Ruhezustand im Look des aktiven Mainnav-Tabs (Akzentrahmen + weicher Grund) */
    border-color: var(--qsfw-accent);
    background: var(--qsfw-accent-soft);
    color: var(--qsfw-accent);
    font-weight: 700;
}
.qsfw-admin-wrap .button:hover,
.qsfw-admin-wrap .button-secondary:hover,
.hb-dropdown summary:hover {
    border-color: #c9d0df;
    color: var(--qsfw-accent);
    background: var(--qsfw-accent-soft);
}
/* Filter-Buttons tragen bereits im Ruhezustand den Akzent-Look → Hover dezent
   verstärken (etwas dunklerer Grund + Fokusrahmen), Text bleibt Akzentfarbe. */
.qsfw-filter-actions .button:hover {
    border-color: var(--qsfw-accent);
    background: #ece3fd;
    box-shadow: 0 0 0 1px var(--qsfw-accent);
    color: var(--qsfw-accent);
}

.qsfw-admin-wrap .button-primary {
    border-color: var(--qsfw-accent) !important;
    background: linear-gradient(135deg, #8b5cf6, #c026d3) !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(124, 58, 237, .22) !important;
}

.qsfw-admin-wrap .button-primary:hover {
    background: linear-gradient(135deg, #7c3aed, #a21caf) !important;
    color: #fff !important;
}
.qsfw-admin-wrap .button-link-delete {
    color: var(--qsfw-danger) !important;
    border-color: #fecaca !important;
    background: #fff !important;
}

.wp-list-table {
    /* KEIN overflow:hidden! Das würde die absolut positionierten Spalten-
       Dropdowns (.hb-sort-menu) am Tabellenrand abschneiden — sichtbar bei
       wenigen Zeilen, wo das Menü unter die kurze Tabelle ragt (User-Beschwerde
       2026-07-06). Die runden Ecken werden stattdessen direkt an den Eck-Zellen
       gerundet (siehe unten), sodass der Look erhalten bleibt. */
    overflow: visible;
    border: 1px solid var(--qsfw-border-light) !important;
    border-radius: var(--qsfw-radius-lg);
    background: #fff;
    box-shadow: 0 10px 28px rgba(16, 24, 40, .06);
}
/* Eck-Zellen runden, damit die Zell-Hintergründe (Header-Verlauf, Zeilen) nicht
   über die runde Tabellenkante hinausragen — ersetzt das entfernte overflow:hidden. */
.wp-list-table thead tr:first-child th:first-child { border-top-left-radius: var(--qsfw-radius-lg); }
.wp-list-table thead tr:first-child th:last-child  { border-top-right-radius: var(--qsfw-radius-lg); }
.wp-list-table tbody tr:last-child td:first-child  { border-bottom-left-radius: var(--qsfw-radius-lg); }
.wp-list-table tbody tr:last-child td:last-child   { border-bottom-right-radius: var(--qsfw-radius-lg); }
.wp-list-table thead th {
    height: 40px;
    padding: 8px 10px !important;
    border-bottom: 1px solid var(--qsfw-border-faint) !important;
    background: linear-gradient(180deg, #fbfcff, #f5f7fb) !important;
    box-shadow: none;
    color: #2a3343;
    font-family: var(--qsfw-font);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.18;
    text-transform: uppercase;
    word-break: normal !important;
    overflow-wrap: normal;
    /* Spaltentitel oben ausrichten, damit ein- und zweizeilige Titel auf
       gleicher Höhe beginnen (statt vertikal zentriert zu „springen"). */
    vertical-align: top !important;
}
.wp-list-table tbody td {
    padding: 14px !important;
    border-bottom: 1px solid var(--qsfw-border-faint);
    color: var(--qsfw-text);
    font-family: var(--qsfw-font);
    font-size: 13px;
    font-weight: 600;
    vertical-align: top;
}
.wp-list-table tbody tr,
.wp-list-table.striped > tbody > :nth-child(odd),
.wp-list-table.striped > tbody > :nth-child(even) {
    background: #fff;
}
.wp-list-table tbody tr:hover:not(.stock-done) {
    background: var(--qsfw-row-hover) !important;
}
.wp-list-table a {
    font-weight: 750;
}

.qsfw-admin-wrap > .wp-list-table thead th {
    height: 34px;
    padding: 6px 8px !important;
    font-size: 11px;
    line-height: 1.14;
}

.qsfw-admin-wrap > .wp-list-table tbody td {
    padding: 7px 10px !important;
}
.wp-list-table input[type="checkbox"] {
    border-color: var(--qsfw-input-border);
    border-radius: 5px;
    box-shadow: none;
}
.wp-list-table .edit-input,
.wp-list-table .select-input,
.wp-list-table input.small-text,
.wp-list-table input.regular-text {
    min-height: 34px;
    height: 34px;
    border-radius: 8px !important;
    /* Feld-Text normal, nicht fett (gilt auch für STATUS/SUPPLIER-Selects) */
    font-weight: 400;
}

.qsfw-admin-wrap > .wp-list-table .edit-input,
.qsfw-admin-wrap > .wp-list-table .select-input,
.qsfw-admin-wrap > .wp-list-table input.small-text,
.qsfw-admin-wrap > .wp-list-table input.regular-text {
    min-height: 30px;
    height: 30px;
}
.wp-list-table .textarea-input {
    min-height: 34px;
}

.qsfw-admin-wrap > .wp-list-table .textarea-input {
    min-height: 30px;
}
.wp-list-table .qsfw-link-field {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
}

.qsfw-admin-wrap > .wp-list-table .qsfw-link-field {
    gap: 3px;
}
.wp-list-table .qsfw-link-field .edit-input {
    width: 100% !important;
}
.wp-list-table .qsfw-link-field .action-icon {
    margin-left: 0;
}

.qsfw-admin-wrap > .wp-list-table .action-icon {
    display: inline-flex;
    align-items: center;
    margin-top: 3px;
    margin-left: 4px;
    font-size: 13px;
    line-height: 1;
}
.hb-th-inner {
    /* Der Filterpfeil (.hb-sort-toggle) fließt als inline-Element DIREKT im
       Textfluss hinter dem Titel — er belegt KEINE feste Spalte am rechten
       Rand. Dadurch nutzt der Titel die volle Zellbreite und bricht sauber an
       Wortgrenzen um (z. B. „STOCK MGMT." → „STOCK"/„MGMT."), statt mitten im
       Wort zerhackt zu werden. Reicht der Platz hinter dem letzten Wort nicht,
       rutscht der Pfeil in eine eigene Zeile — bleibt aber IMMER sichtbar und
       überdeckt den Titel nie. position:relative = Anker fürs absolute
       .hb-sort-menu. (Verlauf: eine feste Pfeil-Flexspalte + min-width:min-content
       am Label schob bei schmalen fixed-Spalten wie THRESHOLD/70px den Pfeil aus
       der Zelle hinter die Nachbarspalte → Pfeil UND Wortende verschwanden,
       User-Beschwerde 2026-07-01.) */
    display: block;
    position: relative;
    width: 100%;
    max-width: 100%;
    min-height: 18px;
    /* Feste 18px-Zeilenbox: sortierbare Köpfe bekommen ihre Zeilenhöhe vom
       18px-Pfeilbutton, reine Text-Köpfe (Done/Image) haben keinen Button.
       Ohne dieses line-height säßen die Text-Köpfe höher als die anderen. */
    line-height: 18px;
    padding: 0;
}
.hb-th-label {
    /* inline, damit der nachfolgende Pfeil im selben Textfluss sitzt. Die
       Tabelle ist table-layout:fixed (~Z.134) → schmale Spalten (z. B. 70px)
       wachsen NICHT auf die Wortbreite mit. break-word (NICHT `anywhere`!)
       bricht ein einzelnes zu langes Wort (THRESHOLD/lange Übersetzungen) nur
       dann inmitten um, wenn es allein nicht in die Spalte passt; `anywhere`
       würde JEDES Wort zeichenweise zerhacken („STOC K MGM T.") und ist tabu. */
    display: inline;
    word-break: normal !important;
    overflow-wrap: break-word;
}
.hb-sort-toggle {
    /* inline-block im Textfluss (KEINE feste Flexspalte, KEIN position:absolute):
       so kann der Pfeil den Titel nie überdecken und nie hinter der Nachbar-
       spalte verschwinden. NICHT auf position:absolute (verdeckt den Titel) oder
       eine feste Flexspalte mit min-width:min-content am Label zurückbauen (schob
       den Pfeil aus der Zelle). */
    display: inline-block;
    vertical-align: middle;
    position: static;
    top: auto;
    right: auto;
    margin-left: 3px;
    width: 16px;
    min-width: 16px;
    height: 18px;
    min-height: 18px;
    padding: 0;
    font-size: 14px;
    line-height: 16px;
    transform: none;
}

body.qsfw-density-compact .qsfw-admin-wrap > .wp-list-table thead th {
    height: 30px;
    padding: 4px 6px !important;
}

body.qsfw-density-compact .qsfw-admin-wrap > .wp-list-table tbody td {
    padding: 4px 6px !important;
}

body.qsfw-density-compact .qsfw-admin-wrap > .wp-list-table .edit-input,
body.qsfw-density-compact .qsfw-admin-wrap > .wp-list-table .select-input,
body.qsfw-density-compact .qsfw-admin-wrap > .wp-list-table input.small-text,
body.qsfw-density-compact .qsfw-admin-wrap > .wp-list-table input.regular-text {
    min-height: 28px;
    height: 28px;
}

body.qsfw-density-comfortable .qsfw-admin-wrap > .wp-list-table thead th {
    height: 40px;
    padding: 8px 10px !important;
}

body.qsfw-density-comfortable .qsfw-admin-wrap > .wp-list-table tbody td {
    padding: 11px 12px !important;
}

body.qsfw-density-comfortable .qsfw-admin-wrap > .wp-list-table .edit-input,
body.qsfw-density-comfortable .qsfw-admin-wrap > .wp-list-table .select-input,
body.qsfw-density-comfortable .qsfw-admin-wrap > .wp-list-table input.small-text,
body.qsfw-density-comfortable .qsfw-admin-wrap > .wp-list-table input.regular-text {
    min-height: 34px;
    height: 34px;
}

.hb-img-edit img,
.hb-img-edit .hb-img-add {
    border-radius: 10px;
    background: #f4f1fb;
    border-color: var(--qsfw-border-light);
}

.stock-critical,
.stock-warning,
.stock-ok {
    border-radius: 9px;
}

.stock-critical { color: var(--qsfw-critical-text) !important; }
.stock-warning { color: var(--qsfw-warning-text) !important; }
.stock-ok { color: var(--qsfw-success-text) !important; }
.qsfw-toggle[type="checkbox"],
input.qsfw-toggle[type="checkbox"] {
    width: 46px !important;
    height: 26px;
    background: #cbd2dd;
    box-shadow: inset 0 1px 2px rgba(16, 24, 40, .08);
}
input.qsfw-toggle[type="checkbox"]::before {
    width: 22px;
    height: 22px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .22);
}
input.qsfw-toggle[type="checkbox"]:checked {
    background: linear-gradient(135deg, #8b5cf6, #c026d3);
}
input.qsfw-toggle[type="checkbox"]:checked::before {
    transform: translateX(20px);
}

.hb-dropdown-panel,

.hb-th-sortable .hb-sort-menu,
#hb-adv-drawer,
#hb-bulk-modal,
#qsfw-kbd-overlay {
    font-family: var(--qsfw-font);
}
.hb-dropdown-panel,

.hb-th-sortable .hb-sort-menu {
    border-color: var(--qsfw-border-light);
    border-radius: var(--qsfw-radius);
    box-shadow: 0 16px 36px rgba(16, 24, 40, .13);
}
.hb-sort-menu .hb-sort-opt,
.hb-colf-list label,

.hb-preset-opt {
    border-radius: 8px;
}
.hb-sort-toggle {
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: #6b7686;
    box-shadow: none;
}
.hb-sort-toggle:hover,
.hb-sort-toggle.is-active,
.hb-sort-toggle.is-filtered {
    color: #1f2937;
    background: #eef1f6;
    border-color: #cfd6e2;
}
.wp-list-table thead th.hb-sorted,
.wp-list-table thead th.hb-filtered {
    background: linear-gradient(180deg, var(--qsfw-sorted-from), var(--qsfw-sorted-to)) !important;
}
.hb-adv-badge {
    background: var(--qsfw-accent);
}
#hb-adv-drawer {
    border-radius: 18px 0 0 18px;
    background: #fff;
}
.hb-adv-head,
.hb-adv-foot {
    border-color: var(--qsfw-border-light);
}
#hb-bulk-bar,
#hb-reorder-bulk-bar,
#qsfw-dirty-bar {
    background: var(--qsfw-bar-bg);
    border-top-color: var(--qsfw-border-light);
    box-shadow: 0 -10px 30px rgba(16, 24, 40, .10);
    font-family: var(--qsfw-font);
}
.hb-bulk-modal-box,
.qsfw-kbd-box {
    padding: 24px;
}

.qsfw-settings-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}
.qsfw-settings-sidebar,
.qsfw-settings-main > .hb-settings-wrap {
    border: 1px solid var(--qsfw-border-light);
    border-radius: var(--qsfw-radius-lg);
    background: #fff;
    box-shadow: 0 10px 28px rgba(16, 24, 40, .06);
}
.qsfw-settings-sidebar {
    position: sticky;
    top: calc(var(--wp-admin--admin-bar--height, 32px) + 16px);
    align-self: start;
    max-height: calc(100vh - var(--wp-admin--admin-bar--height, 32px) - 32px);
    overflow-x: hidden;
    overflow-y: auto;
}
.qsfw-settings-sidebar-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 20px;
    border-bottom: 1px solid var(--qsfw-border-faint);
}
.qsfw-settings-sidebar-head strong {
    display: block;
    color: var(--qsfw-text);
    font-size: 15px;
    font-weight: 800;
}
.qsfw-settings-sidebar-head small {
    display: block;
    margin-top: 2px;
    color: var(--qsfw-text-faint);
    font-size: 12px;
    font-weight: 650;
}
.qsfw-settings-icon-tile {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, #8b5cf6, #c026d3);
    box-shadow: 0 8px 18px rgba(124, 58, 237, .25);
}
.qsfw-settings-subnav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px;
}
.qsfw-settings-subnav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 10px;
    color: var(--qsfw-text-muted) !important;
    font-size: 13.5px;
    font-weight: 750;
}
.qsfw-settings-subnav-item:hover,
.qsfw-settings-subnav-item.is-active {
    color: #6d28d9 !important;
    background: var(--qsfw-accent-soft);
}
.qsfw-settings-main > .hb-settings-wrap {
    margin: 0;
    max-width: none;
    padding: 28px 32px;
}
.hb-settings-intro {
    border-bottom-color: var(--qsfw-border-faint);
}
.hb-settings-intro h2,

.hb-label-editor h3 {
    color: var(--qsfw-text);
    font-family: var(--qsfw-font);
    font-weight: 800;
    letter-spacing: 0;
}
.hb-settings-intro p,

.description {
    color: var(--qsfw-text-faint) !important;
    font-weight: 600;
}
.hb-settings-group,
.hb-sortable-wrap,
.hb-preset-card,
.hb-preset-editor,
.hb-label-fs,
.hb-transfer-list,
.hb-empty-hint {
    border-color: var(--qsfw-border-light) !important;
    border-radius: var(--qsfw-radius) !important;
    background: var(--qsfw-surface-2) !important;
}
.hb-settings-group h3 {
    color: var(--qsfw-accent);
    border-bottom-color: var(--qsfw-border-faint);
    letter-spacing: 0;
}
.hb-sortable-item {
    border-color: var(--qsfw-border-light);
    border-radius: 10px;
    background: #fff;
}
.hb-sortable-item:hover {
    border-color: var(--qsfw-accent);
    box-shadow: 0 8px 18px rgba(124, 58, 237, .10);
}
.hb-item-group,

.hb-preset-badge {
    border-radius: 999px !important;
}
.qsfw-general-form .qsfw-accordion > summary {
    background: linear-gradient(180deg, #fbfaff, #f6f4fb);
    border-bottom-color: var(--qsfw-border-faint);
    border-radius: var(--qsfw-radius) var(--qsfw-radius) 0 0;
}
.hb-label-preview-wrap {
    border-radius: var(--qsfw-radius-lg) !important;
}
#qsfw-label-preview {
    border-radius: 10px;
}

.subsubsub {
    display: inline-flex;
    gap: 4px;
    padding: 5px;
    margin: 0 0 20px !important;
    border: 1px solid var(--qsfw-border-light);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.subsubsub li {
    margin: 0;
}
.subsubsub a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 10px;
    color: var(--qsfw-text-muted);
    font-weight: 750;
}
.subsubsub a.current {
    color: var(--qsfw-accent);
    background: var(--qsfw-accent-soft);
}


@media (max-width: 1100px) {
    .qsfw-mainnav-row,
    .qsfw-app-header {
        align-items: flex-start;
        flex-direction: column;
    }
    .qsfw-settings-shell {
        grid-template-columns: 1fr;
    }
    .qsfw-settings-sidebar {
        position: static;
        max-height: none;
        overflow: hidden;
    }
    .qsfw-settings-subnav {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .qsfw-settings-sidebar-head {
        display: none;
    }
}
@media (max-width: 782px) {
    .qsfw-admin-wrap {
        padding: 18px 12px 52px;
    }
    .qsfw-mainnav,
    .qsfw-settings-nav,
    .qsfw-header-meta {
        width: 100%;
    }
    .qsfw-mainnav {
        display: flex;
    }
    .qsfw-mainnav-item,
    .qsfw-settings-nav {
        flex: 1 0 auto;
        justify-content: center;
    }
    .hb-filter-container {
        padding: 18px;
    }
    .hb-row-1 {
        padding-right: 0;
    }
    #qsfw-cockpit-toggle {
        position: static;
        width: 100%;
        margin: 12px 0 0;
    }
    .qsfw-settings-main > .hb-settings-wrap {
        padding: 22px 18px;
    }
}
