/* 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.0.2: 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;
}
.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; border-bottom: 1px solid rgba(255,255,255,.07); white-space: nowrap; overflow: hidden; }
.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; }
.menu-btn { display: none; }
.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 .nav-text, .nav-collapsed .brand-text { display: none; }
.nav-collapsed .nav a, .nav-collapsed .nav-toggle { justify-content: center; padding: 9px 0; }
.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; }
.dropdown a, .dropdown button { 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:hover, .dropdown button: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.0.2: what exactly is open (legal pages) */
.settings-intro { margin: 0 0 18px; max-width: 72ch; } /* 1.0.2: 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; }
.form-section { grid-column: 1 / -1; margin: 10px 0 -4px; padding-top: 14px; border-top: 1px solid var(--line-2); font-size: 14px; font-weight: 650; }
.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; }
.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; }
.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.0.2: 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.0.2 (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) {
  .sidebar { transform: translateX(-100%); width: var(--nav-w); box-shadow: none; } /* rc.6: the shadow of the closed menu showed as a grey strip */
  .nav-open .sidebar { box-shadow: 0 0 40px rgba(0,0,0,.25); }
  .nav-collapsed .sidebar { width: var(--nav-w); }
  .nav-collapsed .nav-label, .nav-collapsed .nav-text, .nav-collapsed .brand-text { display: revert; }
  .nav-collapsed .nav a { justify-content: flex-start; padding: 8px 10px; }
  .nav-open .sidebar { transform: none; }
  .main, .nav-collapsed .main { margin-left: 0; }
  .menu-btn { 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.0.2: 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); }
.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.0.2 (A2): a product list block – the shop shows the products here */
.rte-area .mo-products { 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 .mo-products::before { content: attr(data-label); font-weight: 600; }
.rte-area .mo-products: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; }
.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.0.2: the row's identifier in the import report */
.transfer-upload-status.is-error { color: var(--danger, #b4233c); }
.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. */
:where(:not(input[type="hidden"], script, template, style, link)) ~ :where(.card, .grid, .grid-2, .grid-3, .stats, .ext-grid, .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.0.2: 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.0.2: 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.0.2 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.0.2: 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; }

/* 1.1: 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-upload { margin-top: 24px; }
.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.0.2: 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.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; }
.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-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; }
