/* MultiOnline admin — design tokens, layout and components. No external fonts or libraries. */
:root {
  --bg: #eef1f4;
  --surface: #fff;
  --surface-2: #f7f9fa;
  --ink: #17232d;
  --ink-2: #3c4b57;
  --muted: #5f6d77; /* rc.4: 4.7:1 on --bg, 5.3:1 on white (was 4.24:1 on --bg, axe) */
  --line: #d9e0e5;
  --line-2: #e8edf0;
  --nav: #0c3a42;
  --nav-2: #0f4750;
  --nav-ink: #b9d0d3;
  --nav-ink-strong: #fff;
  --accent: #0b7480;
  --accent-ink: #fff;
  --accent-soft: #e1f1f2;
  --ok: #1f7a4d;
  --ok-soft: #e3f3ea;
  --warn: #a5650b;
  --warn-soft: #fbf0dc;
  --danger: #b4322a;
  --danger-soft: #fbe6e4;
  --focus: 0 0 0 3px rgba(11, 116, 128, .35);
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(23, 35, 45, .06), 0 1px 1px rgba(23, 35, 45, .04);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --nav-w: 248px;
  --nav-w-collapsed: 64px;
  --top-h: 56px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.5 var(--font); color: var(--ink); background: var(--bg); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a.text-link { text-decoration: underline; text-underline-offset: 2px; } /* 1.1.0: a link inside running text – not told apart by colour alone */
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 20px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
p { margin: 0 0 1em; }
code, pre, kbd { font-family: var(--mono); font-size: 12.5px; }
code { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 5px; }
pre { background: #0f2a30; color: #d6e6e8; padding: 14px 16px; border-radius: var(--radius-sm); overflow-x: auto; line-height: 1.55; }
pre code { background: none; border: 0; padding: 0; color: inherit; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
/* 1.1.0: the focus ring is a solid outline in the accent colour (5.3:1 on white; WCAG 1.4.11) – the soft 35 % halo
   before was 1.8:1, vanished on the dark menu and lost against components with their own shadow (the current menu item) */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Shell ---------- */
.shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--nav-w); background: var(--nav); color: var(--nav-ink);
  display: flex; flex-direction: column; z-index: 40; transition: width .18s ease, transform .2s ease;
}
.sidebar-head { display: flex; align-items: center; border-bottom: 1px solid rgba(255,255,255,.07); flex: none; }
.brand { display: flex; align-items: center; gap: 10px; height: var(--top-h); padding: 0 16px; color: var(--nav-ink-strong); font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; flex: 1; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 7px; background: #fff; color: var(--nav); display: grid; place-items: center; font-weight: 800; font-size: 15px; flex: none; }
.nav { flex: 1; overflow-y: auto; padding: 10px 10px 16px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.nav-group + .nav-group { margin-top: 14px; }
.nav-label { padding: 6px 10px; font-size: 12px; color: #84a5aa; /* rc.4: 4.67:1 on --nav (was 4.49:1, axe) */ white-space: nowrap; overflow: hidden; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--nav-ink); white-space: nowrap; overflow: hidden; }
.nav a:hover { background: var(--nav-2); color: var(--nav-ink-strong); text-decoration: none; }
.nav a[aria-current="page"] { background: rgba(255,255,255,.12); color: var(--nav-ink-strong); box-shadow: inset 3px 0 0 #6fd2d9; }
.nav-foot { border-top: 1px solid rgba(255,255,255,.07); padding: 10px; }
.nav-toggle { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--nav-ink); font: inherit; cursor: pointer; white-space: nowrap; overflow: hidden; }
.nav-toggle:hover { background: var(--nav-2); color: #fff; }

.main { margin-left: var(--nav-w); min-height: 100vh; display: flex; flex-direction: column; transition: margin-left .18s ease; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--top-h); display: flex; align-items: center; gap: 12px; padding: 0 24px; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(6px); border-bottom: 1px solid var(--line); }
.topbar-title { font-size: 15px; font-weight: 600; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 1.4.0: the menu button opens the drawer of a tablet or a phone only. «.menu-btn» alone lost against «.btn» further
   down (same weight, later rule): on a desktop it stood in the top bar and did nothing – the owner's «three dots» */
.topbar .menu-btn, .sidebar .nav-close { display: none; }
.nav-close { align-items: center; justify-content: center; width: 40px; height: 40px; margin-right: 8px; flex: none; border: 0; border-radius: var(--radius-sm); background: none; color: var(--nav-ink); cursor: pointer; }
.nav-close:hover { background: var(--nav-2); color: var(--nav-ink-strong); }
.content { padding: 24px; flex: 1; width: 100%; max-width: 1440px; }
.content-narrow { max-width: 920px; }

/* Collapsed sidebar (desktop) */
.nav-collapsed .sidebar { width: var(--nav-w-collapsed); }
.nav-collapsed .main { margin-left: var(--nav-w-collapsed); }
.nav-collapsed .nav-label, .nav-collapsed .brand-text { display: none; }
/* 1.4.0: the narrowed menu keeps its entries' names for screen readers and voice control (they were display: none –
   only the title attribute was left); sighted users see the name as the tooltip */
.nav-collapsed .nav-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav-collapsed .nav a, .nav-collapsed .nav-toggle { justify-content: center; padding: 9px 0; position: relative; }
.nav-collapsed .nav-toggle .i { transform: rotate(180deg); }

/* User menu */
.user-menu { position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 8px 4px 4px; border-radius: 999px; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: var(--surface-2); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.dropdown { position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(23,35,45,.12); padding: 6px; }
/* 1.1.0 (round 2): a real button in a menu (the list columns' «Übernehmen», a view's «Speichern») keeps its look –
   as a menu entry it was plain text */
.dropdown a:where(:not(.btn)), .dropdown button:where(:not(.btn)) { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; font: inherit; color: var(--ink); border-radius: var(--radius-sm); cursor: pointer; text-align: left; }
.dropdown a:where(:not(.btn)):hover, .dropdown button:where(:not(.btn)):hover { background: var(--surface-2); text-decoration: none; }
.dropdown-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 6px; }
.dropdown-head strong { display: block; }

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--gap); flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Cards & grid ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.card-head h2 { margin: 0; font-size: 15px; }
.card-body { padding: 18px; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--line-2); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid > .card + .card { margin-top: 0; }
.stack > * + * { margin-top: 16px; }

/* Definition list for status data */
.kv { display: grid; grid-template-columns: minmax(140px, 38%) 1fr; margin: 0; }
.kv dt, .kv dd { padding: 9px 0; border-bottom: 1px solid var(--line-2); margin: 0; }
.kv dt { color: var(--muted); padding-right: 12px; }
.kv dd { overflow-wrap: anywhere; }
.kv dt:last-of-type, .kv dd:last-of-type { border-bottom: 0; }

/* Checklist (dashboard setup) */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.checklist li:last-child { border-bottom: 0; }
.check-dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; margin-top: 1px; }
.check-dot .i { width: 14px; height: 14px; stroke-width: 2.6; }
.check-dot.done { background: var(--ok-soft); color: var(--ok); }
.check-dot.todo { background: var(--warn-soft); color: var(--warn); }
.checklist strong { display: block; font-weight: 600; }
.checklist span { color: var(--muted); }
.checklist .checklist-detail { display: block; margin-top: 4px; color: var(--ink-2); font-size: 13px; } /* 1.1.0: what exactly is open (legal pages) */
.settings-intro { margin: 0 0 18px; max-width: 72ch; } /* 1.1.0: a settings group that explains itself (Legal) */

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: 500 14px/1 var(--font); cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn .i { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #09636d; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #9a2a23; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn-icon { width: 36px; padding: 0; }
.btn-sm.btn-icon { width: 30px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.link-danger { color: var(--danger); }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.form-grid .span-2 { grid-column: 1 / -1; }
/* 1.4.0: 8 px under the heading in the page flow; only in a grid (whose 16 px row gap follows) the -4 px – outside a
   grid it pulled the next block over the heading (the product editor's stock journal table cut its letters) */
.form-section { grid-column: 1 / -1; margin: 10px 0 var(--space-2, 8px); padding-top: 14px; border-top: 1px solid var(--line-2); font-size: 14px; font-weight: 650; }
:is(.form-grid, .row-forms, .grid, .grid-2, .grid-3) > .form-section { margin-bottom: -4px; }
.form-section:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.field label, .field-label { display: block; font-weight: 550; margin-bottom: 6px; }
.field .req { color: var(--danger); margin-left: 2px; }
.input, select.input, textarea.input {
  width: 100%; height: 38px; padding: 0 11px; border: 1px solid #c6d0d6; border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font: 14px var(--font);
}
textarea.input { height: auto; min-height: 96px; padding: 9px 11px; line-height: 1.5; resize: vertical; }
select.input { padding-right: 32px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2366747f' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
.input:hover { border-color: #aab7bf; }
.input:focus { border-color: var(--accent); box-shadow: var(--focus); outline: none; }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input-color { width: 56px; padding: 3px; height: 38px; }
.input-group { display: flex; gap: 8px; align-items: center; }
.input-group .input { flex: 1; }
.help { color: var(--muted); font-size: 13px; margin-top: 5px; }
/* 1.2.0: what switching a setting on allows (schema «warning»), under its help text */
.field-warning { margin: 8px 0 0; font-size: 13px; }
.error-text { color: var(--danger); font-size: 13px; margin-top: 5px; }
.i18n-row { display: flex; align-items: center; gap: 8px; }
.i18n-row + .i18n-row { margin-top: 6px; }
.i18n-code { width: 36px; flex: none; text-align: center; font: 600 11px/22px var(--font); color: var(--muted); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 4px; text-transform: uppercase; }
.choices { display: flex; flex-wrap: wrap; gap: 8px 18px; }
/* 1.7.0: a «repeater» setting – its rows (the same fields side by side), the row's buttons at its end */
.repeater-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.repeater-row { display: flex; gap: 12px; align-items: flex-end; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.repeater-fields { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px 12px; }
.repeater-field { margin: 0; }
.repeater-field-text_i18n .input + .input { margin-top: 4px; }
.repeater-actions { display: flex; gap: 2px; flex: none; }
.repeater-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 8px 0 0; }
.choice { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; cursor: pointer; } /* rc.6: its own row; long text wraps under itself */
.choice input { width: 18px; height: 18px; accent-color: var(--accent); margin: 2px 0 0; flex: none; }

/* Toggle switch */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
/* 1.1.0: a settings field's label is a block (.field label) – the switch inside it stays a row (its track was 0 px wide) */
.field label.switch { display: inline-flex; margin-bottom: 0; font-weight: 500; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { width: 38px; height: 22px; border-radius: 999px; background: #c3cdd3; position: relative; transition: background .15s; flex: none; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: var(--gap); overflow-x: auto; scrollbar-width: none; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-weight: 500; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
.tabs .i { width: 16px; height: 16px; }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid; margin-bottom: var(--space-4); }
.alert .i { margin-top: 1px; }
.alert-body { flex: 1; }
.alert-success { background: var(--ok-soft); border-color: #b7dec8; color: #155a38; }
.alert-error { background: var(--danger-soft); border-color: #efbdb8; color: #8a241e; }
.alert-warning { background: var(--warn-soft); border-color: #ecd09e; color: #7a4a07; }
.alert-info { background: var(--accent-soft); border-color: #b5dcdf; color: #0a5961; }
.alert-close { border: 0; background: none; color: inherit; cursor: pointer; padding: 3px; margin: -3px; opacity: .7; line-height: 0; } /* 1.1.0: a 24 px target around its 18 px icon */
.alert-close:hover { opacity: 1; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line-2); }
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge-warn { background: var(--warn-soft); color: #9b5e0a; border-color: transparent; } /* rc.4: text 4.6:1 on its background (--warn gave 4.16:1) */
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge-accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge-plain::before { display: none; }

/* ---------- Lists: toolbar, table, bulk, pagination ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px; border-bottom: 1px solid var(--line-2); }
.toolbar .search { position: relative; flex: 1 1 240px; max-width: 360px; }
.toolbar .search .i { position: absolute; left: 10px; top: 10px; color: var(--muted); width: 16px; height: 16px; }
.toolbar .search .input { padding-left: 34px; height: 36px; }
.toolbar select.input { width: auto; min-width: 150px; height: 36px; }
.toolbar-spacer { flex: 1; }
.bulkbar { display: none; align-items: center; gap: 10px; padding: 10px 12px; background: var(--accent-soft); border-bottom: 1px solid #c2e1e3; }
.bulkbar.is-visible { display: flex; }
.bulkbar select.input { width: auto; height: 32px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table th { font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
.table tbody tr:hover { background: #fafcfc; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .col-check { width: 40px; }
.table .col-actions { width: 1%; white-space: nowrap; text-align: right; }
.table input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; vertical-align: middle; } /* 1.1.0: 20 px like every box of the admin (was 16) */
/* 1.1.0 (axe, WCAG 2.2 – 2.5.8 Target Size): a box with its label inside a table row (an order line's «remove») sits
   close to the fields next to it – 20px with 2px around, as everywhere else outside the list checkboxes */
.table .choice input[type="checkbox"] { width: 24px; height: 24px; margin: 0; } /* 1.1.0: the full 24 px, not only by its spacing */
.th-sort { color: inherit; display: inline-flex; align-items: center; gap: 4px; }
.th-sort:hover { color: var(--ink); text-decoration: none; }
.th-sort .i { width: 14px; height: 14px; }
.th-sort.is-active { color: var(--ink); }
.cell-title { font-weight: 600; color: var(--ink); }
.cell-sub { display: block; color: var(--muted); font-size: 13px; }
.row-actions { display: inline-flex; gap: 2px; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between; padding: 12px; border-top: 1px solid var(--line-2); }
.pagination-info { color: var(--muted); }
.pages { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.pages a, .pages span { min-width: 34px; height: 34px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: var(--radius-sm); border: 1px solid var(--line); color: var(--ink); background: var(--surface); font-variant-numeric: tabular-nums; }
.pages a:hover { background: var(--surface-2); text-decoration: none; }
.pages .is-current { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.pages .is-gap { border-color: transparent; background: none; }
.pages .is-disabled { color: #a9b4bb; }
.per-page { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.per-page select.input { width: auto; height: 34px; }
.empty { text-align: center; padding: 48px 20px; }
.empty .i { width: 36px; height: 36px; color: #9fb0b8; margin-bottom: 8px; }
.empty h3 { font-size: 15px; margin-bottom: 4px; }
.empty p { color: var(--muted); margin-bottom: 14px; }

/* Permission matrix */
.perm-group { border: 1px solid var(--line-2); border-radius: var(--radius-sm); }
.perm-group + .perm-group { margin-top: var(--gap-panel); }
.perm-group h3 { margin: 0; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line-2); font-size: 13px; }
.perm-group .choices { padding: 12px 14px; }

/* Extension cards (plugins / themes) */
.ext-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--gap); }
.ext { display: flex; flex-direction: column; }
.ext .card-body { flex: 1; }
.ext-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.ext-title h2 { margin: 0; }
.ext-meta { color: var(--muted); font-size: 13px; }
.theme-shot { aspect-ratio: 16 / 10; background: var(--surface-2); border-bottom: 1px solid var(--line-2); border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; display: grid; place-items: center; color: var(--muted); }
.theme-shot img { width: 100%; height: 100%; object-fit: cover; }

/* Logs */
.log-view { max-height: 70vh; font-size: 12px; white-space: pre-wrap; word-break: break-word; }
.copy-row { display: flex; gap: 8px; align-items: stretch; }
.copy-row code { flex: 1; display: block; padding: 9px 11px; overflow-x: auto; white-space: nowrap; }

/* ---------- Modal (native <dialog>) ---------- */
dialog.modal { border: 0; border-radius: var(--radius); padding: 0; width: min(480px, calc(100vw - 32px)); box-shadow: 0 20px 50px rgba(12, 30, 36, .3); color: var(--ink); }
dialog.modal::backdrop { background: rgba(12, 30, 36, .45); }
.modal-body { padding: 22px 22px 8px; }
.modal-body h2 { font-size: 17px; }
.modal-body p { color: var(--ink-2); }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px 20px; flex-wrap: wrap; }

/* ---------- Auth & installer ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; background: linear-gradient(180deg, var(--nav) 0, var(--nav) 34vh, var(--bg) 34vh); }
.auth-box { width: 100%; max-width: 420px; }
.auth-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 17px; margin-bottom: 18px; }
.auth .card-body { padding: 26px; }
.auth h1 { font-size: 19px; margin-bottom: 4px; }
.auth .lead { color: var(--muted); margin-bottom: 20px; }
.auth .field + .field { margin-top: 14px; }
.auth .btn-primary { width: 100%; height: 40px; margin-top: 18px; }
.auth-links { margin-top: 16px; text-align: center; }
.install-box { max-width: 760px; }
.steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 18px; counter-reset: step; flex-wrap: wrap; }
.steps li { counter-increment: step; display: flex; align-items: center; gap: 8px; color: #a7c3c6; font-weight: 500; padding-right: 10px; }
.steps li::before { content: counter(step); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 1px solid #4f7d84; font-size: 12px; }
.steps li.is-done { color: #d7e8ea; }
.steps li.is-done::before { background: #4f7d84; border-color: #4f7d84; color: #fff; }
.steps li.is-current { color: #fff; }
.steps li.is-current::before { background: #fff; color: var(--nav); border-color: #fff; font-weight: 700; }
.req-list { list-style: none; margin: 0; padding: 0; }
.req-list li { display: grid; grid-template-columns: 26px 1fr; gap: 4px 8px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.req-list li:last-child { border-bottom: 0; }
.req-list small { grid-column: 2; color: var(--muted); }
.req-ok { color: var(--ok); }
.req-warn { color: var(--warn); }
.req-err { color: var(--danger); }
.lang-switch { display: flex; gap: 6px; }
.lang-switch a { color: #cfe3e5; padding: 2px 8px; border-radius: 4px; font-size: 13px; }
.lang-switch a[aria-current="true"] { background: rgba(255,255,255,.15); color: #fff; }

/* ---------- Docs ---------- */
.docs { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--gap); align-items: start; }
.docs-nav { position: sticky; top: calc(var(--top-h) + 16px); padding: 8px; }
.docs-nav a { display: block; padding: 7px 10px; border-radius: var(--radius-sm); color: var(--ink-2); }
.docs-nav a:hover { background: var(--surface-2); text-decoration: none; }
.docs-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.doc { padding: 28px 32px; max-width: 860px; font-size: 15px; line-height: 1.65; }
.doc h1 { font-size: 24px; margin-bottom: .6em; }
.doc h2 { font-size: 18px; margin: 1.8em 0 .6em; padding-top: .4em; border-top: 1px solid var(--line-2); }
.doc h3 { font-size: 15px; margin: 1.4em 0 .5em; }
.doc ul, .doc ol { padding-left: 1.4em; }
.doc li + li { margin-top: .3em; }
.doc blockquote { margin: 1em 0; padding: 10px 16px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.doc blockquote p:last-child { margin: 0; }
.doc-table { overflow-x: auto; margin: 1em 0; }
.doc table { border-collapse: collapse; width: 100%; font-size: 14px; }
.doc th, .doc td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; }
.doc th { background: var(--surface-2); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 1.1.0: two cards side by side need room – beside the menu (1024 px) a table in half the width broke its order
     numbers into one character per line (dashboard «Neueste Bestellungen»); one column until the screen is wide */
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  /* rc.6: the shadow of the closed menu showed as a grey strip. 1.4.0: the closed drawer is hidden, not only moved
     away – its 40 links were Tab stops nobody could see */
  .sidebar { transform: translateX(-100%); width: var(--nav-w); box-shadow: none; visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s; }
  .nav-open .sidebar { box-shadow: 0 0 40px rgba(0,0,0,.25); visibility: visible; transition: transform .2s ease; }
  .nav-collapsed .sidebar { width: var(--nav-w); }
  .nav-collapsed .nav-label, .nav-collapsed .brand-text { display: revert; }
  .nav-collapsed .nav-text { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .nav-collapsed .nav a { justify-content: flex-start; padding: 8px 10px; }
  .nav-open .sidebar { transform: none; }
  .main, .nav-collapsed .main { margin-left: 0; }
  .topbar .menu-btn, .sidebar .nav-close { display: inline-flex; }
  .nav-foot { display: none; }
  .scrim { position: fixed; inset: 0; background: rgba(12,30,36,.4); z-index: 35; display: none; }
  .nav-open .scrim { display: block; }
  .content { padding: 16px; }
  .topbar { padding: 0 12px; }
  .docs { grid-template-columns: minmax(0, 1fr); }
  .docs-nav { position: static; }
  .doc { padding: 20px; }
}
@media (max-width: 720px) {
  .grid-2, .grid-3, .form-grid { grid-template-columns: minmax(0, 1fr); } /* rc.6: 1fr grew to the widest content (501px on a 390px phone) */
  .user-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } /* rc.10: hidden on screen, still the menu's name for screen readers and voice control */
  .kv { grid-template-columns: 1fr; }
  .kv dt { border-bottom: 0; padding-bottom: 0; }
  .toolbar .search { max-width: none; }
  .table .hide-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- Utilities ---------- */
.mt { margin-top: 16px; }
.split { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.text-danger { color: var(--danger) !important; }
.is-copied { color: var(--ok); border-color: var(--ok); }
.brand-row { display: flex; align-items: center; gap: 10px; }
.install-foot { margin: 22px -26px -26px; }
.check-dot-lg { width: 48px; height: 48px; margin: 0 auto 12px; }
.check-dot-lg .i { width: 24px; height: 24px; }
.doc li pre { margin: 8px 0 4px; }

/* Two-factor authentication */
.input-code { font-family: var(--mono); font-size: 18px; letter-spacing: .18em; max-width: 220px; }
.setup-steps { padding-left: 1.3em; margin: 0; }
.setup-steps > li { padding: 4px 0 18px; }
.setup-steps > li + li { border-top: 1px solid var(--line-2); padding-top: 16px; }
.qr-box { display: inline-block; margin: 14px 0 10px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); line-height: 0; }
.qr-box svg { width: 220px; height: 220px; max-width: 100%; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.inline-form .input:not(.input-code) { max-width: 280px; }
.code-lines { white-space: pre; overflow-x: auto; margin: 0 0 10px; }
.recovery-codes { background: var(--surface-2); color: var(--ink); border: 1px dashed var(--line); font-size: 15px; letter-spacing: .08em; columns: 2; max-width: 360px; }

/* Shared small helpers */
.small { font-size: 12.5px; }
.plain-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.fact-list { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink-2); } /* 1.1.0: Settings › Wartungsmodus */
.toolbar-end { margin-left: auto; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.segmented .btn { border: 0; border-radius: 0; }
.segmented .btn + .btn { border-left: 1px solid var(--line); }
.btn.is-active { background: var(--accent-soft); color: var(--accent); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: var(--gap); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 4px; }
.stat-label { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.stat-value { font-size: 26px; font-weight: 650; font-variant-numeric: tabular-nums; }
.stat-sub { color: var(--muted); font-size: 12.5px; }
.progress { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin: 10px 0 6px; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .3s; }
.lang-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; }
.lang-tabs button { border: 1px solid var(--line); background: var(--surface); color: var(--muted); padding: 5px 12px; border-radius: 99px; font: inherit; font-size: 13px; cursor: pointer; }
.lang-tabs button[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); border-color: transparent; font-weight: 600; }
.card-foot form { display: inline; }

/* Media library */
.uploader { padding: 0; }
.dropzone { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 26px 20px; border: 2px dashed var(--line); border-radius: var(--radius); margin: 14px; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone > .i { width: 30px; height: 30px; color: var(--accent); }
.dropzone:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.upload-queue { list-style: none; margin: 0; padding: 0 14px; display: grid; gap: 8px; }
.upload-queue:not(:empty) { padding-bottom: 14px; }
.upload-note { margin: 0; padding: 0 14px 14px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.upload-item { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; font-size: 13px; }
.upload-item .progress { grid-column: 1 / -1; margin: 0; height: 6px; }
.upload-item.is-error { color: var(--danger); }
.upload-item.is-error .progress > span { background: var(--danger); }
.upload-item.is-done .progress > span { background: var(--ok); }
/* 1.5.0: one upload area everywhere (partials/dropzone.php) – the refusal is read in red, not in the grey of the state
   (it was grey in the media library too); the notes under a zone (plugins, themes) stay inside the card's inset */
.upload-item.is-error .muted { color: inherit; }
.uploader-notes { padding: 0 14px 14px; }
.uploader-notes > .help { margin: 0; max-width: 90ch; }
.uploader-notes > .help + .help { margin-top: 6px; }
.media-grid { list-style: none; margin: 0; padding: 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.media-tile { position: relative; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.media-tile > a { display: block; color: inherit; text-decoration: none; }
.media-tile > input[type="checkbox"] { position: absolute; top: 8px; left: 8px; z-index: 2; width: 18px; height: 18px; accent-color: var(--accent); }
.media-tile:has(input:checked) { outline: 2px solid var(--accent); outline-offset: -1px; }
.media-thumb { display: grid; place-items: center; aspect-ratio: 1; background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface) 0 50%) 50% / 16px 16px; color: var(--muted); position: relative; }
.media-thumb img { width: 100%; height: 100%; object-fit: contain; }
.media-thumb .i { width: 34px; height: 34px; }
.media-ext { position: absolute; bottom: 8px; font-size: 11px; font-weight: 700; letter-spacing: .05em; color: var(--muted); }
.media-name { display: block; padding: 7px 9px; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-top: 1px solid var(--line-2); }
.media-badge { position: absolute; top: 8px; right: 8px; background: var(--surface); border-radius: 99px; padding: 3px; line-height: 0; box-shadow: var(--shadow); color: var(--accent); }
.media-badge .i { width: 14px; height: 14px; }
.media-row { display: flex; gap: 12px; align-items: center; }
.media-thumb-sm { width: 44px; height: 44px; flex: none; border-radius: 6px; overflow: hidden; aspect-ratio: auto; }
.media-thumb-sm .i { width: 20px; height: 20px; }
.media-edit { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--gap); align-items: start; }
.media-preview { display: grid; place-items: center; min-height: 220px; max-height: 520px; background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface) 0 50%) 50% / 20px 20px; border-bottom: 1px solid var(--line); position: relative; color: var(--muted); }
.media-preview img, .media-preview video { max-width: 100%; max-height: 520px; object-fit: contain; display: block; }
.media-preview audio { width: 90%; }
.media-preview > .i { width: 60px; height: 60px; }
.copy-row .input { flex: 1; min-width: 0; }
@media (max-width: 960px) { .media-edit { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .media-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: var(--space-3); padding: var(--space-3); } .toolbar-end { margin-left: 0; } }

/* Media picker dialog */
dialog.picker { width: min(960px, calc(100vw - 24px)); max-height: calc(100vh - 40px); border: 0; border-radius: var(--radius); padding: 0; box-shadow: 0 12px 40px rgba(23, 35, 45, .25); background: var(--surface); color: var(--ink); }
.picker::backdrop { background: rgba(15, 18, 30, .5); }
.picker-head { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.picker-head h2 { margin: 0; font-size: 16px; flex: 1; }
.picker-body { overflow-y: auto; max-height: calc(100vh - 190px); }
.picker-body .media-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.picker-item { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); padding: 0; overflow: hidden; cursor: pointer; text-align: left; font: inherit; color: inherit; width: 100%; }
.picker-item:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.picker-item:focus-visible { border-color: var(--accent); }
.picker-item.is-selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent); }
.rte-area .mo-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 1em 0; }
.rte-area .mo-gallery figure { margin: 0; }
.rte-area .mo-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.picker-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); }
.media-field { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.media-field-preview { width: 96px; height: 96px; border-radius: var(--radius-sm); border: 1px solid var(--line); overflow: hidden; }
.media-field-preview:empty { display: none; }
.media-field-preview img { width: 100%; height: 100%; object-fit: contain; }
.media-field-name { display: block; padding: 8px; font-size: 12px; line-height: 1.3; overflow-wrap: anywhere; } /* a video or file has no picture: its name */

/* Rich text editor */
.rte { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.rte:focus-within { border-color: var(--accent); box-shadow: var(--focus); }
.rte-toolbar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 6px; border-bottom: 1px solid var(--line); background: var(--surface-2); border-radius: var(--radius-sm) var(--radius-sm) 0 0; position: sticky; top: var(--top-h); z-index: 5; }
.rte-group { display: inline-flex; flex-wrap: wrap; max-width: 100%; gap: 1px; padding-right: 4px; margin-right: 2px; border-right: 1px solid var(--line); } /* 1.1.0: a long group wraps (its 11 buttons made the toolbar 383 px on a 375 px phone) */
.rte-group:last-child { border-right: 0; }
.rte-table-tools { display: none; }
.rte-in-table .rte-table-tools { display: inline-flex; }
.rte-format { font: inherit; font-size: 13px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--ink); }
.rte-btn { min-width: 30px; height: 30px; display: inline-grid; place-items: center; border: 0; border-radius: 5px; background: transparent; color: var(--ink-2); cursor: pointer; font: inherit; font-size: 13px; padding: 0 6px; }
.rte-btn:hover { background: var(--surface); color: var(--ink); }
.rte-btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.rte-btn:disabled { opacity: .35; cursor: default; }
.rte-btn .i { width: 17px; height: 17px; }
.rte-text-icon { font-family: Georgia, serif; font-size: 15px; line-height: 1; }
.rte-area { position: relative; min-height: 220px; max-height: 70vh; overflow-y: auto; padding: 14px 16px; outline: none; line-height: 1.6; }
.rte-area:empty::before, .rte-area[data-placeholder]:has(> p:only-child > br:only-child)::before { content: attr(data-placeholder); color: var(--muted); position: absolute; pointer-events: none; }
.rte-area > :first-child { margin-top: 0; }
.rte-area h2 { font-size: 1.5em; } .rte-area h3 { font-size: 1.25em; } .rte-area h4 { font-size: 1.1em; }
.rte-area blockquote { margin: 1em 0; padding-left: 1em; border-left: 3px solid var(--line); color: var(--ink-2); }
.rte-area pre { background: var(--surface-2); padding: 10px; border-radius: 6px; white-space: pre-wrap; }
.rte-area img { max-width: 100%; height: auto; cursor: pointer; }
.rte-area figure { margin: 1em 0; }
.rte-area figure.align-center { text-align: center; } .rte-area figure.align-right { text-align: right; }
.rte-area figcaption { font-size: 13px; color: var(--muted); }
.rte-area table { border-collapse: collapse; width: 100%; margin: 1em 0; }
.rte-area th, .rte-area td { border: 1px solid var(--line); padding: 6px 8px; min-width: 40px; vertical-align: top; }
.rte-area .mo-embed { aspect-ratio: 16 / 9; background: #000; position: relative; margin: 1em 0; }
.rte-area .mo-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }
/* 1.1.0 (A2): a product list block – the shop shows the products here */
.rte-area :is(.mo-products, .mo-posts) { margin: 1em 0; padding: 14px 16px; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--surface-2); color: var(--ink-2); cursor: pointer; user-select: none; }
.rte-area :is(.mo-products, .mo-posts)::before { content: attr(data-label); font-weight: 600; }
.rte-area :is(.mo-products, .mo-posts):focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.rte-area .mo-btn { display: inline-block; padding: 8px 16px; border-radius: 6px; background: var(--accent); color: #fff; text-decoration: none; }
.rte-area .mo-btn-secondary { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 2px currentColor; }
.rte-area .text-center { text-align: center; } .rte-area .text-right { text-align: right; }
.rte-source { width: 100%; border: 0; border-radius: 0; min-height: 240px; resize: vertical; font-size: 12.5px; }
.rte-status { padding: 5px 10px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line-2); text-align: right; }
.rte-dialog { border: 0; border-radius: var(--radius); padding: 18px 20px; width: min(460px, calc(100vw - 24px)); box-shadow: 0 12px 40px rgba(23, 35, 45, .25); background: var(--surface); color: var(--ink); }
.rte-dialog::backdrop { background: rgba(15, 18, 30, .45); }
.rte-dialog h2 { margin: 0 0 12px; font-size: 17px; }
.rte-dialog label { display: block; font-weight: 550; }
.rte-dialog label .input { margin-top: 6px; font-weight: 400; }
.rte-dialog .choice { font-weight: 400; display: flex; }
.rte-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

/* Content editor */
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--gap); align-items: start; }
.editor-side { position: sticky; top: calc(var(--top-h) + 16px); }
.input-lg { font-size: 20px; font-weight: 600; padding: 10px 12px; }
.seo-panel > summary { cursor: pointer; list-style: none; }
.seo-panel > summary::-webkit-details-marker { display: none; }
.seo-panel > summary h2 { display: flex; gap: 8px; align-items: center; }
.seo-panel[open] > summary { border-bottom: 1px solid var(--line); }
.counter.is-over { color: var(--warn); font-weight: 600; }
.check-tree { max-height: 260px; overflow-y: auto; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 8px 10px; }
.check-tree .choice { display: flex; padding: 3px 0 3px calc(var(--depth, 0) * 16px); }
.revision-list { list-style: none; margin: 0; padding: 0; }
.revision-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 16px; border-top: 1px solid var(--line-2); font-size: 13px; }
.revision-list li:first-child { border-top: 0; }
.lang-pill { display: inline-block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 1px 5px; margin-right: 3px; border-radius: 4px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line-2); }
.pager-keyset { display: flex; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--line-2); }
.mt-sm { margin-top: 8px; }
.tree-indent { display: inline-block; width: calc(var(--depth, 0) * 18px); }
@media (max-width: 1100px) { .editor-layout { grid-template-columns: minmax(0, 1fr); } .editor-side { position: static; } }
.seo-inline { border-top: 1px solid var(--line-2); padding-top: 10px; margin-top: 6px; }
.seo-inline > summary { cursor: pointer; display: inline-flex; gap: 6px; align-items: center; font-weight: 600; color: var(--ink-2); }
.seo-inline[open] > summary { margin-bottom: 10px; }
.redirect-form { display: grid; grid-template-columns: 1fr 1fr 220px; gap: 12px; }
@media (max-width: 800px) { .redirect-form { grid-template-columns: 1fr; } }

/* Menu editor */
.menu-editor { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: var(--gap); align-items: start; }
.menu-add details > summary { cursor: pointer; list-style: none; }
.menu-add details > summary::-webkit-details-marker { display: none; }
.menu-tree, .menu-children { list-style: none; margin: 0; padding: 0; }
.menu-tree { min-height: 60px; border-radius: var(--radius-sm); }
.menu-tree.drop-inside { outline: 2px dashed var(--accent); }
.menu-children { padding-left: 28px; }
.menu-node { margin: 6px 0; }
.menu-node-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.menu-handle { cursor: grab; color: var(--muted); letter-spacing: -2px; user-select: none; }
.menu-node-title { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-node-actions { display: inline-flex; gap: 0; }
.menu-node-actions .btn-icon { min-width: 28px; height: 28px; font-size: 14px; }
.menu-node-body { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius-sm) var(--radius-sm); padding: 10px 12px; background: var(--surface-2); }
.menu-node.is-dragging > .menu-node-head { opacity: .45; }
.menu-node.drop-before > .menu-node-head { box-shadow: 0 -3px 0 var(--accent); }
.menu-node.drop-after > .menu-node-head { box-shadow: 0 3px 0 var(--accent); }
.menu-node.drop-inside > .menu-node-head { outline: 2px solid var(--accent); background: var(--accent-soft); }
@media (max-width: 960px) { .menu-editor { grid-template-columns: minmax(0, 1fr); } }
.comment-admin-list { list-style: none; margin: 0; padding: 0; }
.comment-admin-list > li { display: flex; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line-2); }
.comment-admin-list > li > input { margin-top: 4px; }
.comment-admin-body { flex: 1; min-width: 0; display: grid; gap: 6px; }
.comment-admin-text { overflow-wrap: anywhere; }
.comment-admin-reply > summary { cursor: pointer; font-size: 13px; color: var(--accent); }

.form-actions { margin: 0 0 18px; display: flex; gap: 8px; }

.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line); vertical-align: -2px; margin-right: 6px; }
.picker { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; }
.picker-results { list-style: none; margin: 6px 0 0; padding: 0; max-height: 240px; overflow-y: auto; }
.picker-results li button { width: 100%; text-align: left; padding: 6px 8px; border: 0; background: none; border-radius: var(--radius-sm); cursor: pointer; font: inherit; color: inherit; }
.picker-results li button:hover, .picker-results li button:focus { background: var(--surface-2); }
.picker-selected { list-style: none; margin: 10px 0 0; padding: 0; }
.picker-selected li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); margin-top: 4px; }
.picker-selected li span { flex: 1; }

/* Product editor */
.attr-row { border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: var(--gap-panel); }
.attr-row-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.attr-row-head .btn { margin-left: auto; }
.attr-row-flags { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
/* 1.5.0: the value picker – «„Mavi“ als neuen Wert hinzufügen», a name chosen twice lights up, the single-value notice */
.picker-results li button.picker-create { color: var(--accent); font-weight: 600; }
.picker-selected li.is-flash { animation: picker-flash 1.2s ease-out; }
@keyframes picker-flash { from { background: var(--warn-soft); border-color: #ecd09e; } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .picker-selected li.is-flash { animation: none; outline: 2px solid #ecd09e; } }
.attr-row-notice { margin: var(--space-3) 0 0; }
.attr-row-notice .alert-body > p { margin: 0 0 8px; }
.attr-row-notice .alert-body > :last-child { margin-bottom: 0; }
.attr-row-notice .help { color: inherit; } /* the alert's own colour: grey help text fell below 4.5:1 on its background */
.gallery-list { list-style: none; margin: 6px 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; }
.gallery-list li { position: relative; aspect-ratio: 1; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.gallery-list img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-btn { position: absolute; top: 2px; width: 24px; height: 24px; border: 0; border-radius: 4px; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: 12px; line-height: 1; } /* 1.1.0: 24 px targets (were 22) */
.gallery-btn:first-of-type { left: 2px; } .gallery-btn:last-of-type { right: 2px; }
.col-thumb { width: 48px; } .col-thumb img { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; display: block; }
.table-compact td, .table-compact th { padding: 6px 8px; }

/* The hidden attribute must win over component display rules (.form-grid, .field …). */
[hidden] { display: none !important; }

/* Variant table */
.variant-table .input { min-width: 0; }
.variant-table td { vertical-align: top; }
.variant-table input[name$="[sku]"] { width: 140px; }
.variant-table input[name$="[price]"], .variant-table input[name$="[sale_price]"] { width: 100px; }
.input-xs { width: 90px; padding: 4px 6px; font-size: 13px; }
.media-field-xs { display: flex; align-items: center; gap: 4px; }
.media-field-xs .media-field-preview { width: 32px; height: 32px; }
.media-field-xs .media-field-preview img { width: 32px; height: 32px; object-fit: cover; border-radius: 4px; }
.variant-table tr.is-unfit td { background: var(--danger-soft, #fdf0ef); }
.variant-more > summary { cursor: pointer; font-size: 13px; color: var(--accent); white-space: nowrap; }
.variant-more-body { display: grid; gap: 6px; padding-top: 6px; min-width: 220px; }
.variant-more-body label { display: grid; gap: 2px; font-size: 12px; color: var(--muted); }

.quick-edit > summary { cursor: pointer; font-size: 12px; color: var(--accent); display: inline-block; margin-top: 2px; }
.quick-edit-body { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; padding: 8px 0 2px; }
.quick-edit-body label { display: grid; gap: 2px; font-size: 12px; color: var(--muted); }
.text-danger { color: var(--danger, #b4322a); }

/* ---------- Phase 6: menus from <details>, on/off pill, language blocks, bank accounts ---------- */
.menu-details { position: relative; }
.menu-details > summary { list-style: none; } .menu-details > summary::-webkit-details-marker { display: none; }
.menu-details > .dropdown { z-index: 20; list-style: none; margin: 0; }
.badge-button { border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); border-radius: 999px; padding: 3px 12px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.badge-button.is-on { background: var(--ok-soft); border-color: var(--ok-soft); color: var(--ok); } /* focus: the global :focus-visible ring */
.lang-block { border: 1px solid var(--line-2); border-radius: var(--radius); padding: 12px 14px; margin-inline: 0; display: grid; gap: 10px; } /* 1.1.0: no «margin: 0» – it beat the stack's gap and the language blocks of a payment method touched */
.lang-block legend { font-weight: 600; padding: 0 6px; }
.account-block { border: 1px solid var(--line-2); border-radius: var(--radius); padding: 14px; display: grid; gap: 10px; }
.account-block h3 { margin: 0; }
.nowrap { white-space: nowrap; }

/* ---------- Phase 7: order statuses ---------- */
.status-badge { display: inline-flex; align-items: center; gap: 6px; background: color-mix(in srgb, var(--status) 12%, transparent); color: var(--ink); border: 1px solid color-mix(in srgb, var(--status) 35%, transparent); }
.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--status, #718096); flex: none; margin-right: 4px; }
.status-badge .status-dot { margin-right: 0; }
.status-form { display: grid; gap: 10px; padding: 10px 0; }
.status-edit-row td { padding-top: 0; border-top: 0; }
.order-note { border-left: 3px solid var(--line); padding: 4px 0 4px 10px; }
.order-note.is-customer { border-left-color: var(--accent); }

/* 9.2 import/export */
.progress { height: .75rem; border-radius: 999px; background: var(--surface-2, #e8edf1); overflow: hidden; margin: .5rem 0 .75rem; }
.progress > span { display: block; height: 100%; width: 0; background: var(--accent, #1f6feb); transition: width .3s ease; }
.transfer-counts { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; list-style: none; padding: 0; margin: 0 0 1rem; }
.transfer-ref { min-width: 10rem; overflow-wrap: anywhere; } /* 1.1.0: the row's identifier in the import report */
.input-short { max-width: 5rem; }
.field-inline { display: flex; align-items: center; gap: .75rem; }
@media (prefers-reduced-motion: reduce) { .progress > span { transition: none; } }

/* 10.0 reports */
.filter-row { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; }
.filter-row .field { margin: 0; min-width: 150px; }
.report-filter .help { padding-top: 0; }
.stat-change.is-up { color: var(--ok); }
.stat-change.is-down { color: var(--danger); }
a.stat { color: inherit; text-decoration: none; }
a.stat:hover, a.stat:focus-visible { border-color: var(--accent); }
.chart { width: 100%; height: auto; display: block; }
.chart-bar { fill: var(--accent); }
.chart-bar:hover { opacity: .8; }
.chart-line { fill: none; stroke: var(--muted); stroke-width: 2; stroke-dasharray: 5 4; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-axis { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-legend { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin: 0; }
.legend-bar { display: inline-block; width: 12px; height: 12px; background: var(--accent); border-radius: 2px; }
.legend-line { display: inline-block; width: 18px; border-top: 2px dashed var(--muted); margin-left: 8px; }
.chart-data { margin-top: 10px; }
.chart-data summary { cursor: pointer; color: var(--accent); }
@media print { .report-filter, .page-actions, .tabs { display: none; } }

/* rc.3: columns and saved views of the lists – <details> menus, keyboard ready without script */
.list-tools { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin: 0 0 var(--space-3); }
.list-menu { position: relative; }
.list-menu > summary { list-style: none; cursor: pointer; }
.list-menu > summary::-webkit-details-marker { display: none; }
.list-menu-panel { display: grid; gap: 6px; padding: 8px; z-index: 30; }
.list-menu-panel fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 4px; }
.list-menu-panel .choice { display: flex; gap: 8px; align-items: center; padding: 4px 6px; }
.list-views { list-style: none; margin: 0; padding: 0; }
.list-view { display: flex; align-items: center; }
.list-view form { margin-left: auto; }
.list-views a[aria-current="true"] { font-weight: 600; }
.list-view-save { display: grid; gap: 6px; border-top: 1px solid var(--line-2); padding-top: 8px; }

/* B6: list filters (a search row, more filters in a <details> panel that is open while one is set), bulk bars with
   fields of their own, the customer form's address book, the bulk edit of products */
.list-filter .toolbar { border-bottom: 0; }
.filter-panel { border-bottom: 1px solid var(--line-2); padding: 0 12px 12px; }
.filter-panel > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--accent); font-weight: 600; padding: 4px 2px; list-style: none; border-radius: var(--radius-sm); }
.filter-panel > summary::-webkit-details-marker { display: none; }
.filter-panel > summary .i { width: 16px; height: 16px; }
.filter-panel[open] > summary { margin-bottom: 10px; }
.filter-panel .filter-row .field { flex: 1 1 160px; }
.filter-panel .input-short { width: 100%; max-width: 160px; }
.bulkbar { flex-wrap: wrap; }
.bulkbar .inline-fields .choice { white-space: nowrap; }
.address-edit { border: 1px solid var(--line); border-radius: var(--radius-sm); }
.address-edit > summary { cursor: pointer; padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.address-edit[open] > summary { border-bottom: 1px solid var(--line-2); }
.address-edit > form { padding: 12px; }
.address-edit > form + form { padding-top: 0; }
.customer-notes { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.customer-notes p { margin: 4px 0 0; }
.bulk-changes { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.bulk-items > summary { cursor: pointer; color: var(--accent); }
.bulk-multi { min-height: 140px; }
@media (max-width: 560px) { .filter-panel .filter-row .field { flex-basis: 100%; } .filter-panel .input-short { max-width: none; } }

/* rc.4 (found by the browser tests): the sticky top bar hid the field the browser scrolled to – a focused field
   stayed under it for keyboard users (WCAG 2.2, 2.4.11 Focus Not Obscured). Scrolling keeps clear of the bar. */
html { scroll-padding-top: calc(var(--top-h) + 16px); }

/* rc.4 (axe, WCAG 2.2 – 2.5.8 Target Size): boxes 20px with 2px around them, so a 24px circle keeps clear of the next
   target; the boxes on the media cards sit on the card's own link, so they get the full 24px */
input[type="checkbox"], input[type="radio"] { inline-size: 20px; block-size: 20px; margin: 2px; }
.media-card input[type="checkbox"], .media-grid input[type="checkbox"] { inline-size: 24px; block-size: 24px; }

/* ======================================================================================================================
   rc.6 design pass – one rhythm for the whole admin (found by looking at every page in Chrome, desktop and phone)
   ====================================================================================================================== */
/* 1.1.0: one spacing scale – every gap and padding of the layout comes from these steps */
:root {
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px;
  --gap: var(--space-5);       /* between cards, grids and sections */
  --pad: var(--space-5);       /* inside a card */
  --gap-panel: var(--space-3); /* between panels inside a card (attribute rows, permission groups, language blocks) */
}

/* Rhythm: one gap between cards, grids and sections; a card keeps its own height next to a taller one */
.grid, .stats { gap: var(--gap); }
/* 1.1.0: .grid-2 / .grid-3 are grids on their own – five pages used them without .grid and their cards stacked
   glued to each other (order, customer, reports, import/export, storage) */
.grid-2, .grid-3 { display: grid; gap: var(--gap); align-items: start; }
.grid > *, .grid-2 > *, .grid-3 > *, .form-grid > * { min-width: 0; } /* content never widens a column: wide tables scroll inside their own box */
.grid { align-items: start; }
/* 1.1.0: one rule for card stacks. A card, a grid of cards, an alert or the form's buttons that follow anything
   visible in the page flow (in the content, a form, a section, an editor column, a language panel …) keep one gap
   from it – before, only «.card + .card» did, and a card after a form, a wrapper or a hidden field sat glued to the
   one above. Hidden fields (CSRF token) and scripts before it do not count; a form that holds cards counts as one
   (a card, then the profile's form with its card). In a grid the grid's gap spaces them. Round 2: the editors' own
   grids count too (a menu's name card sat glued to the columns below it). */
:where(:not(input[type="hidden"], script, template, style, link)) ~ :where(.card, .grid, .grid-2, .grid-3, .stats, .ext-grid, .editor-layout, .menu-editor, .media-edit, .alert, .form-actions, form:has(> .card)):where(:not(.card-body)) { margin-top: var(--gap); }
:where(.grid, .grid-2, .grid-3, .ext-grid, .stats, .editor-layout, .menu-editor, .media-edit, .docs, .media-grid) > * { margin-top: 0; }
.card-head { padding: 14px var(--pad); flex-wrap: wrap; row-gap: 8px; }
.card-body { padding: var(--pad); }
.card-foot { padding: 12px var(--pad); }

/* Forms: every field keeps its distance – inside a form grid the grid's gap does it */
.field + .field, .field + .form-grid, .form-grid + .field, .form-grid + .form-grid, .field + .choice, .choice + .field,
.choice + .choice { margin-top: 16px; }
/* side by side (any grid or row): the container's gap spaces them – a margin would push the second one down */
:is(.grid, .grid-2, .grid-3, .form-grid, .split, .filter-row, .copy-row, .ext-grid, .media-row, .inline-fields, .toolbar, .input-group, .choices,
    .fb-i18n, .fb-editor, .fb-condition, .fb-rule, .fb-accept) > :is(.field, .choice, .form-grid, .btn, button) { margin-top: 0; }
.choice + .btn, .choice + button, .field + .btn, .field + button, .help + .btn { margin-top: 16px; }
.input + .choice { margin-top: 6px; } /* 1.1.0: a box right under a field (order lines «Entfernen») keeps its 24 px target clear of it */
.form-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--gap); }

/* Badges: a status badge brings its own coloured dot */
.status-badge::before { display: none; }

/* Tables: money, dates and numbers stay on one line */
.table td.num, .table th.num, .table .nowrap, .table .money, .table time { white-space: nowrap; }

/* Figures: a value never breaks; it scales with the screen */
.stats { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.stat { container-type: inline-size; min-width: 0; }
.stat-value { white-space: nowrap; font-size: 20px; font-size: clamp(16px, 12cqi, 26px); } /* sized by its own tile: wide on the dashboard, narrow in reports, two by two on a phone */

/* Tabs that scroll: a soft edge says there is more (set by admin.js) */
.tabs { scroll-behavior: smooth; }
.tabs.more-right { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
.tabs.more-left { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); }
.tabs.more-left.more-right { -webkit-mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent); }

@media (max-width: 720px) {
  :root { --gap: var(--space-4); --pad: var(--space-4); }
  .content { padding: var(--space-4); }
  .hide-sm { display: none !important; }
  .topbar { gap: 8px; }
  .topbar-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
  .page-head { margin-bottom: var(--gap); gap: var(--space-3); }
  .page-head h1 { font-size: 22px; line-height: 1.25; }
  .page-head p { font-size: 14px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1 1 auto; justify-content: center; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
  .stat { padding: 12px 14px; }
  .stat-label, .stat-sub { font-size: 12.5px; }
  .card-head h2 { font-size: 15px; }
  .toolbar { padding: 10px; }
  .toolbar .search { flex-basis: 100%; }
  .toolbar select.input { flex: 1 1 140px; min-width: 0; }

  /* List tables become cards: each cell shows its column (data-label, set by admin.js); the first cell is the title.
     Tables to edit in (inputs in their cells) keep scrolling sideways. */
  .table.is-stacked thead { display: none; }
  .table.is-stacked, .table.is-stacked tbody, .table.is-stacked tr, .table.is-stacked td { display: block; width: auto; }
  .table.is-stacked tr { position: relative; padding: 12px var(--pad); border-bottom: 1px solid var(--line-2); }
  .table.is-stacked tbody tr:last-child { border-bottom: 0; }
  .table.is-stacked td { border: 0; padding: 3px 0; text-align: right; min-height: 0; }
  .table.is-stacked td::after { content: ""; display: table; clear: both; }
  .table.is-stacked td[data-label]::before { content: attr(data-label); float: left; margin-right: 12px; color: var(--muted); font-size: 12.5px; font-weight: 600; text-align: left; }
  .table.is-stacked td .cell-sub { display: block; }
  .table.is-stacked td.is-primary { display: block; text-align: left; font-size: 15px; padding-bottom: 6px; }
  .table.is-stacked td.is-primary::before { content: none; }
  .table.is-stacked td:empty, .table.is-stacked td.col-thumb:not(:has(img)) { display: none; }
  .table.is-stacked tr:has(> td.col-check) { padding-left: calc(var(--pad) + 32px); }
  .table.is-stacked td.col-check { position: absolute; left: var(--pad); top: 14px; padding: 0; }
  .table.is-stacked td.col-thumb { float: right; margin-left: 10px; }
  .table.is-stacked td.col-actions { text-align: left; padding-top: 8px; }
  .table.is-stacked td.col-actions::before { content: none; }
  .table.is-stacked .hide-sm { display: none !important; }
  /* tables without column heads (short lists): the row's cells flow, the first on its own line */
  .table.is-stacked.no-labels tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
  .table.is-stacked.no-labels td { text-align: left; padding: 0; }
  .table.is-stacked.no-labels td.is-primary { flex-basis: 100%; padding-bottom: 2px; }
}

/* rc.6: long words (file names, addresses) break where they must instead of widening a table or a card */
.table td, .card-body, .kv dd, .doc { overflow-wrap: anywhere; }
.doc pre, .doc pre code { overflow-wrap: normal; } /* code blocks scroll; inline code may break like any word */
.doc pre { overflow-x: auto; max-width: 100%; }
/* a deep menu scrolls inside its card; a node stays usable however deep it sits */
.menu-tree-card .card-body { overflow-x: auto; }
.menu-node-head { min-width: 240px; }
@media (max-width: 720px) {
  .menu-children { padding-left: 16px; }
  .doc { padding: 18px 16px; }
}
/* the upload area wraps on a phone; back links are a real target (they were 16px high) */
.dropzone { overflow-wrap: anywhere; max-width: 100%; }
.dropzone > * { max-width: 100%; }
a.back { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
@media (max-width: 720px) {
  /* standalone links in a card head, crumbs, small notes and help lines: a 32px target on a phone */
  .card-head a:not(.btn), .crumbs a, div.small > a, div.help > a, .help > a:only-child { display: inline-flex; align-items: center; min-height: 32px; }
}

/* rc.6: classes the admin views used but no stylesheet defined (found by checking every class in every view) */
.alert-danger { background: var(--danger-soft); border-color: #efbdb8; color: #8a241e; }       /* = .alert-error */
.badge-success { background: var(--ok-soft); color: var(--ok); border-color: transparent; }     /* = .badge-ok */
.field-error { color: var(--danger); font-size: 13px; margin-top: 5px; }                        /* = .error-text */
.inline-fields { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); align-items: flex-end; } /* 1.1.0: fields, boxes and buttons of a row sit on one line under their labels (a label on two lines pushed its field down) */
.inline-fields > .field-grow { flex: 1 1 260px; } /* 1.1.0: the wide field of a row (tracking address) */
.inline-fields > .input, .inline-fields > select.input { width: auto; flex: 1 1 180px; min-width: 0; }
.inline-label { display: inline-flex; align-items: center; gap: 8px; }
.form-stack { display: grid; gap: 16px; }
.form-stack > .field + .field { margin-top: 0; }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.link-list a { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; padding: 14px; }
.bulk-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
.input-sm { height: 32px; padding-top: 4px; padding-bottom: 4px; font-size: 13.5px; }
.input-addon { display: inline-flex; align-items: center; padding: 0 10px; min-height: 38px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.address-block { font-style: normal; line-height: 1.55; }
.comment-admin-meta { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.pre-wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.recovery-key { display: block; font-family: var(--mono); font-size: 15px; letter-spacing: .04em; word-spacing: .3em; padding: 12px 14px; background: var(--surface-2); border: 1px dashed var(--line); border-radius: var(--radius-sm); user-select: all; overflow-wrap: anywhere; }
.steps-list { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; }
:where(.card-foot form, .card-body > form.inline-fields) { margin: 0; } /* 1.1.0: no weight – a stack of row forms keeps its gap (the carriers' rows touched) */
@media (max-width: 720px) {
  /* short facts stay side by side on a phone (label above value made the list twice as long) */
  .kv { grid-template-columns: minmax(104px, 38%) minmax(0, 1fr); }
  .kv dt { border-bottom: 1px solid var(--line-2); padding-bottom: 9px; }
  .card-foot { justify-content: flex-start; }
}

/* rc.11 editor tools */
.rte { position: relative; }
.rte-area mark { background: #fff1a8; color: inherit; padding: 0 .1em; border-radius: 2px; }
.rte-area .mo-note { margin: 1em 0; padding: .8em 1em; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0 6px 6px 0; }
.rte-area .mo-note > :first-child { margin-top: 0; }
.rte-area .mo-note > :last-child { margin-bottom: 0; }
.rte-area .mo-lead { font-size: 1.15em; }
::highlight(rte-find) { background-color: #ffe58a; }
::highlight(rte-find-current) { background-color: #f59e0b; color: #111; }
.rte.rte-fullscreen { position: fixed; inset: 0; z-index: 2000; border: 0; border-radius: 0; display: flex; flex-direction: column; background: var(--surface); box-shadow: none; }
.rte.rte-fullscreen .rte-area { flex: 1; max-height: none; width: 100%; max-width: 860px; margin: 0 auto; padding: 32px 24px; font-size: 17px; }
.rte.rte-fullscreen .rte-source { flex: 1; max-width: 1000px; margin: 0 auto; width: 100%; }
html.rte-fullscreen-open { overflow: hidden; }
.rte-dialog.rte-find { position: absolute; inset: 52px 8px auto auto; margin: 0; z-index: 30; width: min(380px, calc(100% - 16px)); }
.rte-dialog.rte-find .rte-dialog-actions { flex-wrap: wrap; }
.rte-chars-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; }
.rte-chars-grid .rte-char { height: 42px; padding: 0; justify-content: center; font-size: 19px; }
.rte-keys { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; align-items: baseline; }
.rte-keys dt { white-space: nowrap; }
.rte-keys dd { margin: 0; }
.rte-keys kbd { font-family: var(--mono); font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 1px 6px; }
/* A3: money inputs of the shipping forms (no inline widths) */
.input-money { max-width: 160px; }

/* 1.1.0 payments: Payrexx payment means, incoming payments (camt), provider refunds, payment reminders */
.choice-set { border: 0; margin: 0; padding: 0; min-width: 0; }
.choice-set legend { padding: 0; }
.choice-set .choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 18px; }
.choice-set .choice + .choice { margin-top: 0; }
.bank-items td { vertical-align: top; }
.bank-items tr.is-done td { color: var(--muted); }
.bank-ref .mono { word-break: break-all; }
.bank-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 210px; }
.bank-actions form { margin: 0; }
.bank-assign { gap: 6px; flex-wrap: nowrap; }
.bank-assign .input { width: 120px; }
.restock-row td { border-top: 0; padding-top: 0; }
.restock summary { cursor: pointer; color: var(--accent); font-weight: 550; font-size: 13.5px; padding: 4px 0; }
.restock[open] summary { margin-bottom: 10px; }
.reminder-list li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
@media (max-width: 720px) {
  .bank-actions { min-width: 0; }
  .bank-assign { flex-wrap: wrap; }
}

/* ---------- 1.1.0: System › Status ---------- */
.health-grid { align-items: start; }
.health-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.health-item { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 2px 12px; align-items: baseline; }
.health-item .badge { justify-self: start; }
.health-label { font-weight: 600; overflow-wrap: anywhere; }
.health-value, .health-hint { grid-column: 2; overflow-wrap: anywhere; }
.health-value { color: var(--ink-2); }
.health-hint { margin: 0; }
.health-intro { margin: 0 0 14px; } /* 1.1.0: «Zustellbarkeit der E-Mails» */
.health-foot { justify-content: space-between; align-items: center; }

/* 1.1.0: panels of plugins in the editors, extension packages */
.pre-line { white-space: pre-line; }
.editor-side .plugin-panel .form-grid { grid-template-columns: minmax(0, 1fr); }
.plugin-panel .help:first-child { margin-top: 0; }
.ext-install .alert { margin-top: 16px; }
.ext-install .choice { margin: 4px 0 0; }
.ext-grid > .card + .card { margin-top: 0; } /* the grid's gap spaces the cards */
/* a confirm dialog with an alternative button ("also delete data") gets room for its three buttons */
#confirm-dialog:has([data-confirm-alt]:not([hidden])) { width: min(560px, calc(100vw - 32px)); }

/* ---------- 1.1.0: an active filter that is not a field of the toolbar (the product of the review list) ---------- */
.filter-chips { padding-top: 0; margin: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); font-size: 13px; }
.chip a { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; min-height: 24px; border-radius: 999px; color: inherit; }
.chip a:hover, .chip a:focus-visible { background: var(--line); }
/* the product of a review and «Nur dieser Artikel» under it: two links on top of each other, each a full 24 px target */
.review-product a, a.target-24 { display: inline-flex; align-items: center; min-height: 24px; }
/* 1.6.0 (V6): the photos of a review in the moderation list – from their private files, each with «Foto entfernen» */
.review-admin-photos { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 4px; padding: 0; }
.review-admin-photos li { display: grid; gap: 4px; justify-items: start; }
.review-admin-photos a { display: block; line-height: 0; border-radius: 6px; }
.review-admin-photos img { width: 72px; height: 72px; object-fit: cover; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }

/* 1.1.0 «Bestellung erfassen» (orders/manual) */
.manual-order .picker[data-single] .picker-selected .btn:not(:last-child) { display: none; } /* one account: nothing to move */
.manual-lines td { vertical-align: top; }
.manual-lines .is-own-price td:first-child { box-shadow: inset 3px 0 0 var(--warn); } /* a price the owner set */
.manual-lines .badge { margin-top: 6px; }
.manual-own { display: grid; gap: 6px; min-width: 150px; max-width: 240px; }
.manual-own .input { width: 100%; max-width: none; }
.manual-own + .cell-sub { margin-top: 4px; }
.manual-order .choice-set + .field { margin-top: 16px; }
.manual-drafts, .manual-alert { margin-bottom: var(--gap, 16px); } /* above the form's two columns: not glued to them */
.manual-add .picker-results:empty { display: none; }
.manual-choices.stack > * + * { margin-top: 10px; }
.manual-coupon { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; }
/* 1.2.0: a gift card line's details in a row of their own; the gift cards that pay above the payment methods */
.manual-lines .manual-giftcard-row td { border-top: 0; padding-top: 0; }
.manual-giftcard { border: 1px solid var(--line-2); margin: 0; padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius-sm); min-width: 0; }
.manual-giftcard > .field-label { padding: 0; margin-bottom: 8px; }
.manual-giftcard .form-grid { margin: 0; }
.manual-giftcards { margin: 0 0 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line-2); }
.manual-totals dd { text-align: right; font-variant-numeric: tabular-nums; }
.manual-totals .manual-total { font-weight: 700; font-size: 15px; }
.manual-problems { margin: 12px 0 0; }
.manual-switches { border-top: 1px solid var(--line-2); }
.manual-order .card-foot { display: grid; grid-template-columns: minmax(0, 1fr); }
.manual-order .card-foot .btn { justify-content: center; }

/* 1.1.0: gift cards – what the shop owes (list and reports), a card's code, the actions beside its details */
.giftcard-liability .card-body { align-items: flex-start; }
.giftcard-liability h2 { margin: 0 0 4px; font-size: 15px; }
.giftcard-liability .help { margin: 0; max-width: 60ch; }
.giftcard-liability-figures { display: grid; gap: 2px; justify-items: end; text-align: right; }
.giftcard-liability-amount { font-size: 24px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.giftcard-code { font-size: 15px; font-weight: 650; letter-spacing: .06em; user-select: all; }
.report-giftcards .kv dd { font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .giftcard-liability-figures { justify-items: start; text-align: left; }
}

/* ======================================================================================================================
   1.1.0 layout pass (V1): every admin page screenshotted at 1440, 1024, 768 and 375 px – what was found is fixed here
   once for all pages (the spacing scale and the card-stack rule are at the top of the rc.6 block);
   tests/e2e/s92_admin_layout.py keeps it so
   ====================================================================================================================== */
/* Focus ring: light on the dark menu; inside the box where a scroll container or a joined control would cut it */
.sidebar :focus-visible { outline-color: #6fd2d9; outline-offset: -2px; } /* 6.8:1 on the menu */
.tabs a:focus-visible, .segmented .btn:focus-visible { outline-offset: -2px; }
.media-tile:has(> a:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; } /* the tile clips its link's own ring */
.media-tile > a:focus-visible { outline: none; }

/* Form rows: a switch or a box row after a field keeps the fields' distance (a hidden «0» field between them broke
   «.field + …»); a box list in a tree stays dense; a box in a row of fields sits on the fields' line */
:where(.field, .choice, .switch, .form-grid, .media-field, .picker, .check-tree) ~ :where(label.switch) { margin-top: var(--space-4); }
:where(label.switch) ~ :where(.field, .choice, .form-grid) { margin-top: var(--space-4); }
:where(.grid, .grid-2, .grid-3, .form-grid, .split, .filter-row, .inline-fields, .toolbar, .choices, .card-foot, .page-actions) > label.switch { margin-top: 0; }
.check-tree > .choice + .choice { margin-top: 0; }
/* a group of boxes or radios as a field (fieldset.field): no browser frame – it looks like any field, its legend
   like a label (the import format, a page's visibility, the shipping locations had the grooved default border) */
fieldset:where(.field, .form-stack) { border: 0; padding: 0; margin-inline: 0; min-width: 0; }
fieldset:where(.field, .form-stack) > legend { padding: 0; font-weight: 550; margin-bottom: 6px; }
fieldset.field > .choice + .choice { margin-top: var(--space-2); }
.inline-fields > .choice { min-height: 38px; align-items: center; }

/* Inside a card: an alert or the list tools directly in the card (not in its body) keep the card's padding from
   its edges; two bodies after each other do not double their padding */
.card > .alert { margin: var(--space-3) var(--pad); }
.card > .list-tools { margin: 0; padding: var(--space-2) var(--space-3) 0; }
.card > .search-note { margin: 0; padding: var(--space-2) var(--space-3) 0; } /* 1.2.0: a broad customer search, newest first */
.card-body + .card-body { padding-top: 0; }
p.card-body { margin: 0; } /* a body that is a paragraph keeps the card's padding only */

/* The editor's side column sticks under the top bar only while it fits the screen; a taller one (product editor)
   scrolls with the page and then stays with its lower end in view – before, its lower cards were out of reach until
   the end of the page (admin.js sets .is-tall) */
@media (min-width: 1101px) {
  .editor-side.is-tall { top: auto; bottom: var(--space-4); align-self: end; }
}

/* A button under fields, a field grid or a table keeps the fields' distance («Versandklasse anlegen», «Staffel
   hinzufügen» sat on the field above) */
:where(.form-grid, .field, .choice, .switch, .inline-fields, .table, .table-wrap, .picker, .media-field, .check-tree) + :where(.btn, button) { margin-top: var(--space-4); }
/* tabs after a card (reports: the filter card above its tabs) keep the gap like any card; tabs inside a card run
   from edge to edge under its head */
:where(:not(input[type="hidden"], script, template, style, link)) ~ :where(.tabs) { margin-top: var(--gap); }
.card > .tabs { margin: 0; padding: 0 var(--space-3); }

/* A scroll box is the containing block of what it holds: a screen-reader text (.sr-only, position: absolute) in a
   wide table's head escaped it and made the whole page 469 px wide on a phone (Formulare) */
.table-wrap, .tabs { position: relative; }

/* A value to copy (cron command, two-factor key) and a short command wrap instead of scrolling: a box that scrolls
   needs the keyboard (admin.js gives the other scroll boxes – tables, code blocks, the log – a Tab stop) */
.copy-row code, .card-body pre.code { white-space: pre-wrap; overflow-wrap: anywhere; overflow-x: visible; }

/* Links in running text are underlined – told apart by more than their colour (WCAG 1.4.1, axe link-in-text-block: a
   link in a grey help line was 1.03:1 against it, the documentation's 2.9:1); also in the text being edited */
:where(p, .help, .alert-body, .settings-intro, .doc, .rte-area) a:not(.btn) { text-decoration: underline; text-underline-offset: 2px; }
.chip a { text-decoration: none; } /* the remove «×» of a filter chip is a button-like target, not a word */

/* A list table shown as cards on a phone: its sums (an order's subtotal, shipping, total) as label left, amount right */
@media (max-width: 720px) {
  .table.is-stacked tfoot tr { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); padding: var(--space-2) var(--pad); border-top: 1px solid var(--line-2); }
  .table.is-stacked tfoot :is(td, th) { display: block; padding: 0; border: 0; background: none; text-align: left; }
  .table.is-stacked tfoot :is(td, th):last-child { text-align: right; white-space: nowrap; }
}

/* Lists: the bulk bar wraps on a phone instead of pushing its button out */
.bulkbar.is-visible { flex-wrap: wrap; }

/* Narrow fields (were inline styles in the views; the admin's CSP convention keeps style="" for data only) */
.input-tiny { max-width: 100px; }
.input-num { max-width: 120px; }
.input-narrow { max-width: 160px; }
.input-medium { max-width: 360px; }
.field-narrow { max-width: 240px; }

/* Tables: words stay whole – «overflow-wrap: anywhere» let a squeezed column break «Inaktiv» into «Inak / tiv» and
   e-mail addresses mid-word between 720 and 1100 px; a table that cannot fit scrolls in its .table-wrap instead.
   Addresses, paths and codes (.mono) may still break anywhere, so a long one never widens the table. */
.table td, .table th { overflow-wrap: break-word; }
.table td.mono, .table td .mono, .table .cell-break { overflow-wrap: anywhere; }
.badge-button { white-space: nowrap; }

/* ======================================================================================================================
   1.1.0 layout pass, round 2 (V1): the pages that came after the first pass (customers, gift cards, bulk edit, coupon
   codes …) and the whole panel in Turkish – its labels are longer than the German ones. Again fixed here once for all
   pages; tests/e2e/s92_admin_layout.py checks the menu pages in Turkish too.
   ====================================================================================================================== */
/* Tabs wrap into rows wherever the screen has room for rows – with Turkish labels the 17 settings tabs ran out of the
   page and the last ones were reached only by scrolling sideways. Every row keeps its line (drawn by the box, one per
   row height), the current tab its accent line on it. On a phone the row still scrolls: 17 tabs in rows would fill
   the screen before the first field. */
@media (min-width: 721px) {
  .tabs { --tab-h: 44px; flex-wrap: wrap; gap: 0 2px; overflow: visible; border-bottom: 0;
    background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--tab-h) - 1px), var(--line) calc(var(--tab-h) - 1px), var(--line) var(--tab-h)); }
  .tabs a { height: var(--tab-h); padding-block: 0; margin-bottom: 0; }
}

/* «Entfernen» of a media field shows only while something is chosen. The hidden field holds the file's id; setting a
   hidden field by script writes its attribute too, so the rule follows a pick and a removal without more script. */
.media-field:has(> input[type="hidden"][value=""]) [data-media-clear],
.media-field:has(> input[type="hidden"]:not([value])) [data-media-clear] { display: none; }
.picker-empty { margin: 0; padding: var(--space-4); } /* the media picker's «nothing found» (was a style attribute built in media.js) */

/* Row forms: a list of small forms with the same fields (the carriers) shares one grid – every row's fields stand
   under each other whatever else a row holds. The first row and the row after a heading show the labels, like a
   table's head; the other rows keep them for screen readers. On a phone each form is a stack with all its labels. */
.row-forms { display: grid; grid-template-columns: minmax(140px, 240px) minmax(0, 1fr) auto auto; gap: var(--space-3); align-items: end; }
.row-forms > form { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; gap: var(--space-2) var(--space-3); align-items: end; margin: 0; }
.row-forms > form > :is(.field, .choice) { margin-top: 0; }
.row-forms > form > .choice, .row-form-actions { min-height: 38px; align-items: center; }
.row-forms > form > :is(.row-form-full, .error-text), .row-forms > .form-section { grid-column: 1 / -1; }
.row-form-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
@media (min-width: 721px) {
  .row-forms > form:not(:first-child):not(.form-section + form) > .field:not(.row-form-full) > label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 720px) {
  .row-forms, .row-forms > form { grid-template-columns: minmax(0, 1fr); }
  .row-forms > form + form { padding-top: var(--space-3); border-top: 1px solid var(--line-2); }
}

/* Editor toolbar: a button that says a word («HTML» for the source view) instead of showing a glyph */
.rte-word-icon { font: 700 10px/1 var(--font); letter-spacing: .03em; }

/* A box or a radio button inside a field (a fieldset's options, «yes, all 39 products») is an option, not the field's
   name: normal weight, the box beside its text – «.field label» made every one a bold block with its box on the
   baseline, a long text wrapped under the box. */
.field label.choice { display: flex; font-weight: 400; margin-bottom: 0; }

/* The form's buttons with an option before them (the customer form's «send the link now», the bulk edit's «yes, all»):
   the option on its own line, the buttons under it – in one row the button hung 16 px lower than the box. */
.form-actions > :is(.field, .choice) { flex: 1 0 100%; margin: 0 0 var(--space-2); }
.form-actions > :is(.field, .choice) ~ :is(.btn, button) { margin-top: 0; }

/* The columns menu of a list: its grid spaces the boxes – the form rows' 16 px came on top, except after the hidden
   field of a fixed column, so the rows stood unevenly */
.list-menu-panel fieldset > .choice { margin-top: 0; }

/* A box in a row of filter fields (the reports' «compare») stands on the fields' line, like in .inline-fields; so
   does a switch in a row of fields (a shipping method's «Aktiv» hung at the lower edge of «Reihenfolge») */
.filter-row > .choice, :is(.inline-fields, .filter-row) > label.switch { min-height: 38px; align-items: center; }
.split:has(> .inline-fields) { align-items: flex-end; } /* …and the button beside such a row stands on the fields' line, not on the middle of label and field */

/* The search field of a list: room for its hint («Code, letzte 4 Zeichen, E-Mail oder Bestellnummer» was cut at
   360 px); where a field is still too short for its hint or its value, the text ends with «…» instead of a cut letter. */
.toolbar .search { max-width: 400px; }
.input, .input::placeholder { text-overflow: ellipsis; }

@media (max-width: 720px) {
  /* a list of facts on a phone: the names' column as wide as its longest name, at most 62 % – at a fixed 38 % the
     report's «Düzenlenen (elle oluşturulanlar dahil)» stood in four lines beside «CHF 305.00» */
  .kv { grid-template-columns: minmax(104px, auto) minmax(38%, 1fr); }
  /* the menus over a list (columns, views) open under the whole row, not under their own button: the left one of
     the two reached out of the screen */
  .list-tools { position: relative; }
  .list-tools > .list-menu { position: static; }
  .list-tools > .list-menu > .dropdown { right: var(--space-3); max-width: calc(100% - 2 * var(--space-3)); }
  /* the bulk bar's extra fields take their own row and their texts wrap (the orders' «Kundin oder Kunden
     benachrichtigen …» in one line made the page 65 px wider than the phone) */
  .bulkbar .inline-fields { flex: 1 1 100%; min-width: 0; }
  .bulkbar .inline-fields .choice { white-space: normal; }
  /* a list row and the row with its panel («edit», «reply») are one card */
  .table.is-stacked tr:has(+ tr > td.is-panel) { border-bottom: 0; padding-bottom: 0; }
  .table.is-stacked td.is-panel { font-size: inherit; padding-bottom: 0; }
}

/* Between the phone's cards and a wide screen (721–1100 px: a tablet, a small laptop beside the menu) a list has about
   730 px: its cells stand closer and a column's head may take two lines – the orders' total and the gift cards' last
   column were cut at the edge of their box (up to 59 px with Turkish heads). */
@media (min-width: 721px) and (max-width: 1100px) {
  .table th, .table td { padding-inline: 8px; }
  .table th { white-space: normal; }
}

/* The bulk bar's own fields keep their natural width from a tablet up: a select that asked for 180 px though its
   texts are shorter made its group break after it and then stretched over the whole line (the orders' «new status»
   over the box «tell the customer», the button beside both). */
@media (min-width: 721px) { .bulkbar .inline-fields > select.input { flex: 0 1 auto; } }
/* …and the bar is a row: its selects, its box and its button stand on one line (the button after the fields got the
   form rows' 16 px on top and hung 8 px lower, the group's select 3 px lower than the action before it). */
.bulkbar > :is(.btn, button, .field, .choice, .help), .bulkbar .inline-fields > * { margin-top: 0; }
.bulkbar .inline-fields { align-items: center; }
.bulkbar .inline-fields > .choice { min-height: 32px; }

/* A form laid out as a grid (.status-form, .form-stack): its button keeps its own width – the grid stretched the
   statuses' «Status hinzufügen» / «Speichern» over the whole card. */
:is(.status-form, .form-stack) > :is(.btn, button) { justify-self: start; }

/* Tables of the documentation: the first column and the heads keep their words whole – beside a long text the page's
   «break anywhere» squeezed «e2e/s92_admin_layout.py» to two letters per line. On a phone the table keeps a readable
   width and scrolls in its own box. */
.doc-table :is(th, td:first-child) { overflow-wrap: break-word; }
@media (max-width: 720px) { .doc-table table { min-width: 560px; } }

/* The installer (checked on a fresh shop, both languages, 1440 to 375 px): two fields side by side start on one line
   – «.auth .field + .field» put the right one of each pair 14 px lower; «Zurück» and the step's button share one row
   («Zurück» stood alone at the right edge, the button stretched over a row of its own), both the same height; on a
   phone the button fills the row beside «Zurück» or, if its text needs it, a row of its own. The finished step's tick
   is the green «done» dot (the empty state's grey 36 px icon rule had made it a grey tick stuck to the dot's top). */
.auth .form-grid > .field { margin-top: 0; }
.install-foot { align-items: center; }
.install-foot .btn { min-height: 40px; }
.install-foot .btn-primary { width: auto; margin: 0 0 0 auto; }
@media (max-width: 720px) { .install-foot .btn-primary { flex: 1 1 auto; } }
.empty .check-dot .i { width: 24px; height: 24px; margin: 0; color: inherit; }

/* A customer's addresses on her page: each one a block of its own, a line between them – three addresses read as one
   (name, street, town of the next one right under the country of the one before) */
.address-block + .address-block { margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--line-2); }

/* A form's first section heading after its hidden fields (the token) is the start of its box, like a first child:
   no line and no space above it – the gift card's «Bakiyeyi düzelt» had a second line right under the card's head.
   Only in the box's first form: the next forms' headings keep their line, it parts them. */
:first-child > input[type="hidden"]:first-child + .form-section,
:first-child > input[type="hidden"]:first-child + input[type="hidden"] + .form-section { border-top: 0; padding-top: 0; margin-top: 0; }

/* 1.2.0 Settings › Datenschutz & Tracking: the test buttons of server-side tracking – one form per provider, a line between */
.tracking-test + .tracking-test { margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--line-2); }
.tracking-test .input-group { max-width: 520px; }

/* ===============================================================================================================
   1.4.0 admin UI pass (U1): every admin page at 1440, 1024, 768 and 375 px, measured (tests/e2e/s54_admin_ui.py) and
   looked at – what was found is fixed here once for all pages
   ====================================================================================================================== */
/* Fields side by side in a page's own grid start on one line: the rows' «.field + .field» 16 px pushed the second and
   third field of the redirect form 16 px below the first */
.redirect-form > :is(.field, .choice) { margin-top: 0; }
.redirect-form + :is(.choice, .field, label.switch) { margin-top: var(--space-3); }

/* The page head: its title and text take the room and wrap, the actions stay on the right – a long introduction pushed
   «Importieren / Exportieren» and «Neue Gruppe» under the text (compatibility, search, «Bestellung erfassen») */
.page-head > :first-child:not(.page-actions) { flex: 1 1 320px; min-width: 0; }
.page-head > .page-actions { flex: 0 1 auto; justify-content: flex-end; }
@media (max-width: 720px) { .page-head > .page-actions { justify-content: flex-start; } }

/* Figures fill their row (four tiles on the dashboard stood on four of five columns, two in the search statistics on
   two of five) – the columns stay as wide as before when there are more tiles than fit */
.stats { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* A heading with its icon (a card's «Versionen»): icon and word apart, on one line */
:is(h1, h2, h3):has(> .i:first-child) { display: flex; align-items: center; gap: var(--space-2); }

/* A closed card that opens (<details class="card">, the editors' SEO panel, the form builder's JSON): its head has no
   line of its own above the card's lower edge – the two lines stood 1 px apart */
details.card:not([open]) > summary.card-head { border-bottom: 0; }

/* The counts in tabs and buttons are plain numbers (the review, newsletter, coupon code and form entry tabs and the
   media's «Papierkorb» showed a status dot) */
:is(.tabs, .btn) .badge::before { display: none; }

/* Switches one after the other (an attribute's «Filter», «Varianten», «Produktseite») stand under each other – inline
   they ran on in one line, the next switch right after the text of the one before */
label.switch ~ label.switch { display: flex; width: fit-content; }

/* Row forms (the carriers): a line between the rows – with its second line («Sendungsnummer prüfen») one carrier ran
   into the next */
.row-forms > form + form { padding-top: var(--space-3); border-top: 1px solid var(--line-2); }

/* The buttons of a table row stand side by side, also when one of them is a form (a backup's download and delete were
   stacked) */
.table td:is(.col-actions, .actions) > form, .row-actions > form { display: inline-flex; margin: 0; vertical-align: middle; }
.table td.actions { white-space: nowrap; text-align: right; width: 1%; }

/* A bulk bar under a list (the form entries): its select as wide as its text, no second line at the card's edge */
.bulk-actions select.input { width: auto; flex: 0 1 auto; min-width: 0; }
.card > .bulk-actions:last-child { border-bottom: 0; border-top: 1px solid var(--line-2); }

/* A table's sums (an order's «Total» and «Noch zu bezahlen», the VAT report's «Total» – the <th> rows of a <tfoot>)
   read as figures: they had the small grey type of the column heads */
.table tfoot th { color: var(--ink); font-size: 14px; font-weight: 650; }

/* On a phone the page's main action fills its row; its quiet links («Zurück», «Importieren / Exportieren», the
   customers' «Datenschutz», «Newsletter» …) stay as wide as their words and line up from the left – stretched, each
   stood alone in the middle of a row of its own */
@media (max-width: 720px) {
  .page-actions .btn-ghost { flex: 0 1 auto; }
}

/* A chart on a phone keeps a readable width and scrolls in its own box (shrunk to the screen its labels were 5 px
   high); its figures are also in «Daten als Tabelle» */
.chart-box { overflow-x: auto; }
@media (max-width: 720px) {
  .chart-box .chart { min-width: 560px; }
  .chart-box .chart-axis { font-size: 15px; }
}
/* The documentation's table of contents on a phone: a box of its own height above the text, not 30 entries to
   scroll past before the first line */
@media (max-width: 960px) { .docs-nav { max-height: 50vh; overflow-y: auto; } }
/* …four figures (the dashboard) beside the menu of a tablet: two by two, not three and one */
@media (min-width: 721px) and (max-width: 1100px) { .stats:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 1.4.0 Katalog › Fragen & Antworten (catalog/questions, catalog/question-edit) */
.questions-table .questions-product { min-width: 160px; }
.questions-table .questions-product a { display: inline-flex; align-items: center; min-height: 24px; } /* two links one under the other: 24 px targets (WCAG 2.5.8) */
.questions-table .questions-state { white-space: nowrap; }
.questions-table .questions-state .badge + .badge { margin-left: 4px; }
.questions-status-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; }

/* ======================================================================================================================
   1.4.1 menu search (U2): a field at the top of the sidebar that filters the entries (admin.js); the same height in
   every state – the wide menu, the narrowed one (a button) and the drawer – so the menu below never moves
   ====================================================================================================================== */
.nav-search { flex: none; padding: 10px 10px 0; }
.nav-search-field { position: relative; display: flex; align-items: center; }
.nav-search-field > .i { position: absolute; left: 10px; width: 16px; height: 16px; color: var(--nav-ink); pointer-events: none; }
/* the field's edge 3.3:1 on the menu (WCAG 1.4.11), placeholder 5.4:1, text 10:1 */
.nav-search-input { width: 100%; height: 36px; margin: 0; padding: 0 36px 0 34px; border: 1px solid #6d898e; border-radius: var(--radius-sm); background: rgba(255,255,255,.06); color: #fff; font: inherit; -webkit-appearance: none; appearance: none; }
.nav-search-input::placeholder { color: #a6c0c4; opacity: 1; }
.nav-search-input::-webkit-search-cancel-button, .nav-search-input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.nav-search-input:hover { border-color: #8fa9ad; }
.nav-search-input:focus { border-color: #6fd2d9; background: rgba(255,255,255,.1); }
.sidebar .nav-search-input:focus-visible { outline-offset: 1px; }
.nav-search-key { position: absolute; right: 9px; min-width: 20px; height: 20px; padding: 0 5px; display: grid; place-items: center; border: 1px solid #6d898e; border-radius: 4px; color: var(--nav-ink); font-size: 12px; line-height: 1; pointer-events: none; }
.nav-search-input:focus ~ .nav-search-key, .nav-search-input:not(:placeholder-shown) ~ .nav-search-key { display: none; }
@media (hover: none) { .nav-search-key { display: none; } } /* a touch screen has no «/» key to press */
.nav-search-clear { position: absolute; right: 4px; width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 4px; background: none; color: var(--nav-ink); cursor: pointer; }
.nav-search-clear:hover { background: var(--nav-2); color: #fff; }
.nav-search-clear .i { width: 16px; height: 16px; }
.nav-search-open { display: none; align-items: center; justify-content: center; width: 100%; height: 36px; padding: 0; border: 0; border-radius: var(--radius-sm); background: none; color: var(--nav-ink); cursor: pointer; }
.nav-search-open:hover { background: var(--nav-2); color: #fff; }
.nav-search-status:not(.sr-only) { margin: 2px 10px 8px; color: var(--nav-ink); }
/* the part of a name found */
.nav mark { background: #6fd2d9; color: #0c3a42; border-radius: 2px; box-shadow: 0 0 0 1px #6fd2d9; } /* 7:1 */
/* a sub-entry only the search shows: «Einstellungen › SEO», under its item, the whole name (it may wrap) */
.nav a.nav-sub { align-items: flex-start; white-space: normal; }
.nav a.nav-sub > .i { margin-top: 1px; }
.nav-sub .nav-text { min-width: 0; overflow-wrap: anywhere; }
.nav-sub-of { color: #a6c0c4; } /* 6.4:1, 5.4:1 under the pointer */
.nav a:hover .nav-sub-of { color: inherit; }
.nav-sub .nav-sub-sep { width: 14px; height: 14px; vertical-align: -2px; }
/* the narrowed desktop menu: a search button in the field's place; pressed (or «/»), the menu opens over the page with
   the field (.nav-peek) – the page keeps its place, the remembered choice stays narrow */
@media (min-width: 961px) {
  .nav-collapsed .nav-search-field { display: none; }
  .nav-collapsed .nav-search-open { display: flex; }
  .nav-collapsed.nav-peek .nav-search-field { display: flex; }
  .nav-collapsed.nav-peek .nav-search-open { display: none; }
  .nav-collapsed.nav-peek .sidebar { width: var(--nav-w); box-shadow: 0 0 40px rgba(0,0,0,.25); }
  .nav-collapsed.nav-peek .nav-label, .nav-collapsed.nav-peek .brand-text { display: revert; }
  .nav-collapsed.nav-peek .nav-text { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .nav-collapsed.nav-peek .nav a, .nav-collapsed.nav-peek .nav-toggle { justify-content: flex-start; padding: 8px 10px; }
}

/* 1.5.0 (B1): the product editor's «Paket» card – the components table and its preview */
.bundle-table .bundle-main { text-align: center; width: 1%; }
.bundle-table [data-bundle-stock] { margin-top: 4px; }
.bundle-table [data-bundle-stock]:empty { display: none; }
.bundle-table td .error-text { margin-top: 4px; }
[data-bundle-preview] .alert-body p { margin: 0 0 4px; }
[data-bundle-preview] .alert-body p:last-child { margin-bottom: 0; }
/* 1.6.0 (MM6): the «Wahlplätze» card – the pricing, one fieldset per slot */
.mix-pricing { margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.mix-pricing .choice { display: block; margin: 0 0 6px; }
.mix-discount { max-width: 22rem; margin: 6px 0 0 24px; }
.mix-slots { display: grid; gap: 16px; margin: 0 0 12px; }
.mix-slot { min-width: 0; margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.mix-slot-title { padding: 0 6px; font-weight: 600; }
.mix-source { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 8px 0; }
.mix-choices td .error-text { margin-top: 4px; }
.mix-choices [data-mix-hint]:empty { display: none; }
.mix-slot-status { margin: 8px 0 0; font-size: 13px; }
.mix-slot-status:empty { display: none; }
.mix-slot-status.is-problem { color: var(--danger); font-weight: 600; }
.mix-slot-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; margin: 8px 0 0; }
[data-mix-preview] .alert-body p { margin: 0 0 4px; }
[data-mix-preview] .alert-body p:last-child { margin-bottom: 0; }

/* 1.6.0 (O6): the option field editor (Katalog › Produktoptionen, the product's «Produktoptionen» card) and its preview */
/* minmax(0, 1fr): a wide table of choices scrolls in its .table-wrap instead of widening the column under the side cards */
.option-editor { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.option-field-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.option-field { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: var(--surface); }
.option-field.is-new { border-style: dashed; background: var(--surface-2); }
.option-field.has-error { border-color: var(--danger, #b4322a); }
.option-field.is-removed { opacity: .55; }
.option-field-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; }
.option-field-title { margin: 0; font-size: 15px; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.option-field-tools { display: flex; align-items: center; gap: 6px; }
.option-field [hidden] { display: none !important; }
.option-texts { padding-top: 8px; border-top: 1px solid var(--line-2); }
.option-span { grid-column: 1 / -1; margin: 0; }
.option-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.option-required { align-self: end; padding-bottom: 6px; }
.option-choices td { vertical-align: top; min-width: 90px; }
.option-choices .input { min-width: 0; }
.option-editor-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0; }
.option-delete { margin: 16px 0 0; }
.option-preview { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
.option-preview-item.is-heading strong { font-size: 15px; }
.option-preview-choices { margin: 4px 0 0; padding-left: 18px; }
.option-preview-price { color: var(--muted); white-space: nowrap; }
.option-preview-cond { display: flex; gap: 6px; align-items: center; }

/* 1.6.0 (QT6): Verkauf › Angebote – the editor and a sent quote */
.quote-message-text { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.quote-lines td { vertical-align: top; }
.quote-lines .input-xs + .choice { margin-top: 6px; }
.quote-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.quote-actions form { margin: 0; }
.quote-actions .btn { width: 100%; justify-content: center; }
.quote-more-actions { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.quote-more-actions form { margin: 0; }
.quote-more-actions .inline-fields .field { margin: 0; }
.order-from-quote { margin-bottom: var(--gap, 16px); }
.text-warn { color: var(--warn); }
/* 1.6.0 (BK6): Verkauf › Buchungen – the week (seven columns, on a narrow screen one under the other) and the day, an
   entry per booking (its state also as a badge in words, a blocked time hatched), the period navigation; the setup page */
.booking-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.booking-range { font-weight: 600; margin-inline: 4px; }
.booking-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin: 0 0 16px; }
.booking-week.is-day { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1100px) { .booking-week { grid-template-columns: minmax(0, 1fr); } }
.booking-col { min-width: 0; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.booking-col.is-today { border-color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }
.booking-col-head { margin: 0 0 8px; font-size: 13px; font-weight: 700; }
.booking-col-head a { color: inherit; text-decoration: none; }
.booking-col-head a:hover { text-decoration: underline; }
.booking-entries { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.booking-entry a { display: grid; gap: 2px; padding: 6px 8px; border: 1px solid var(--line-2); border-inline-start: 3px solid var(--accent); border-radius: 6px; background: var(--surface-2); color: var(--ink-2); text-decoration: none; font-size: 13px; min-width: 0; }
.booking-entry a:hover { border-color: var(--line); border-inline-start-color: var(--accent); background: var(--accent-soft); }
.booking-entry.is-hold a { border-inline-start-color: var(--warn); }
.booking-entry.is-cancelled a { border-inline-start-color: var(--danger); opacity: .8; }
.booking-entry.is-cancelled .booking-entry-title { text-decoration: line-through; }
.booking-entry.is-block a { border-inline-start-color: var(--ink-2); background: repeating-linear-gradient(135deg, var(--surface-2) 0 6px, var(--line-2) 6px 12px); }
.booking-entry-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.booking-entry-title { font-weight: 600; overflow-wrap: anywhere; }
.booking-entry-sub { color: var(--muted); overflow-wrap: anywhere; }
.booking-entry .badge { justify-self: start; }
.booking-hours { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 12px; }
.booking-weekdays { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.booking-setup-table .input { min-width: 5em; }
.booking-closure-list { margin: 0 0 12px; padding-left: 18px; display: grid; gap: 4px; }
.booking-closure-list form { display: inline; }
